![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
Public Member Functions | |
| float | distance (const vec3 &x) const |
| std::string | getDataInfo () const |
| std::optional< vec3 > | getIntersection (const vec3 &start, const vec3 &stop) const |
| Get intersection point with plane and line segment. Intersects if plane is in between start and stop. Segement start point will be returned if segment lies in the plane. | |
| std::optional< float > | getIntersectionWeight (const vec3 &start, const vec3 &stop) const |
| const vec3 & | getNormal () const noexcept |
| const vec3 & | getPoint () const noexcept |
| mat4 | inPlaneBasis () const |
| bool | isInside (const vec3 &point) const |
| bool | perpendicularToPlane (const vec3 &) const |
| Plane (vec3 point, vec3 normal) noexcept | |
| vec3 | projectPoint (const vec3 &x) const |
| void | setNormal (const vec3 &) |
| void | setPoint (const vec3) |
| Plane | transform (const mat4 &transform) const |
Static Public Attributes | |
| static constexpr std::string_view | classIdentifier {"org.inviwo.Plane"} |
| static constexpr uvec3 | colorCode {225, 174, 225} |
| static constexpr std::string_view | dataName {"Plane"} |
| float inviwo::Plane::distance | ( | const vec3 & | x | ) | const |
Return signed distance from plane to point, i.e. dot(x - p, normal).
Plane | p-> normal
x <-—|----> x (point) -d d
| std::optional< vec3 > inviwo::Plane::getIntersection | ( | const vec3 & | start, |
| const vec3 & | stop ) const |
Get intersection point with plane and line segment. Intersects if plane is in between start and stop. Segement start point will be returned if segment lies in the plane.
Returned intersection point is invalid if no intersection exist.
| start | Start point of segment |
| stop | End point of segment |
| std::optional< float > inviwo::Plane::getIntersectionWeight | ( | const vec3 & | start, |
| const vec3 & | stop ) const |
Returns the intersection point as a fraction of the distance between start and stop. The point would be start + retval * (stop -start)
| mat4 inviwo::Plane::inPlaneBasis | ( | ) | const |
Calculate an basis in the plane, the normal will be the last component.
| bool inviwo::Plane::isInside | ( | const vec3 & | point | ) | const |
Check if point is on positive side of plane.
Plane
|
|-> normal
(outside) | (inside)
| point | to check |
| vec3 inviwo::Plane::projectPoint | ( | const vec3 & | x | ) | const |
Project point onto plane. Plane | |-> normal projection |<-— x (point)
| x | Point to project |