Inviwo  0.9.10.1
Inviwo documentation
inviwo::Plane Class Reference

Public Member Functions

 Plane (vec3 point, vec3 normal)
 
vec3 getPoint () const
 
vec3 getNormal () const
 
IntersectionResult 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. More...
 
float distance (const vec3 &x) const
 
vec3 projectPoint (const vec3 &x) const
 
bool isInside (const vec3 &point) const
 
bool perpendicularToPlane (const vec3 &) const
 
void setPoint (const vec3)
 
void setNormal (const vec3 &)
 
std::string getDataInfo () const
 

Static Public Attributes

static uvec3 COLOR_CODE = uvec3(225, 174, 225)
 
static const std::string CLASS_IDENTIFIER = "org.inviwo.Plane"
 

Member Function Documentation

◆ distance()

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

Returns
Negative distance if behind plane, positive otherwise.

◆ getIntersection()

IntersectionResult 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.

Parameters
startStart point of segment
stopEnd point of segment
Returns
Intersected point and true if intersecting.

◆ isInside()

bool inviwo::Plane::isInside ( const vec3 &  point) const

Check if point is on positive side of plane.

         Plane
           |
           |-> normal
 (outside) |  (inside)
See also
Plane::distance
Parameters
pointto check
Returns
true if on positive side of normal or on the plane, otherwise false

◆ projectPoint()

vec3 inviwo::Plane::projectPoint ( const vec3 &  x) const

Project point onto plane. Plane | |-> normal projection |<-— x (point)

Parameters
xPoint to project
Returns
point on the plane

The documentation for this class was generated from the following files: