Cutout Vis2012
TUWienVisualisierung2(SS2012)-AdaptiveCutaways
 All Classes Namespaces Functions Pages
Public Member Functions | List of all members
Plane Class Reference

#include <Plane.h>

Public Member Functions

 Plane (const glm::vec3 &a, const glm::vec3 &b, const glm::vec3 &c)
 
 Plane (const glm::vec3 &origin, const glm::vec3 &normal)
 
double signedDistance (const glm::vec3 &p) const
 
bool isFrontFacingTo (const glm::vec3 &direction) const
 
bool lineIntersect (const glm::vec3 &linePoint, const glm::vec3 &lineDirection, glm::vec3 &intersection)
 

Detailed Description

Geometric object of a plane

Constructor & Destructor Documentation

Plane::Plane ( const glm::vec3 &  a,
const glm::vec3 &  b,
const glm::vec3 &  c 
)

Creates a plane that contains the three points

Plane::Plane ( const glm::vec3 &  origin,
const glm::vec3 &  normal 
)

Creates a plane that contains origin and is orthogonal to normal

Member Function Documentation

bool Plane::isFrontFacingTo ( const glm::vec3 &  direction) const

Returns true iff direction points in the opposite direction of the normal vector.

bool Plane::lineIntersect ( const glm::vec3 &  linePoint,
const glm::vec3 &  lineDirection,
glm::vec3 &  intersection 
)

Returns false iff ´lineDirection´ is parallel to this plane, true otherwise. Returns the intersection point between this plane and the line described by the origin linePoint and the direction lineDirection.

Parameters
[out]intersectionintersection point between this plane ant the line
double Plane::signedDistance ( const glm::vec3 &  p) const

Returns the distance between this plane and p, positive is the normal vector points in the direction of p, negative otherwise


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