Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

Plane Class Reference

Holds a vector that represents the normal to the plane plus a float that corresponds to D in the plane equation Ax + By + Cz + D = 0 where (A,B,C) is the normal. More...

List of all members.

Public Member Functions

EMMA_EXPORT Plane ()
 Default constructor.
EMMA_EXPORT Plane (const Fusion::Vec3f &n, float D)
 Construct a plane given normal and distance from origin along normal.
EMMA_EXPORT Plane (const Fusion::Vec3f &p0, const Fusion::Vec3f &p1, const Fusion::Vec3f &p2)
 Construct a plane given 3 points.
EMMA_EXPORT Plane (const Fusion::Vec3f &n, const Fusion::Vec3f &p)
 Construct a plane given normal and a point to pass through Orientation is given by the normal vector n.
void getValue (Fusion::Vec3f &normal, float &D) const
 Returns the normal vector and distance from origin.
EMMA_EXPORT void setValue (const Fusion::Vec3f &normal, float D)
 Sets the normal and D.
void transform (const Matrix &mat, bool matIsInvTranspose)
 transforms plane by the given matrix if matIsInvTranspose is true, then the inverse transpose matrix has already been computed and should be used
EMMA_EXPORT bool isInHalfSpace (const Fusion::Vec3f &point) const
 Returns TRUE if the given point is within the half-space defined by the plane.
EMMA_EXPORT float distFromPlane (const Fusion::Vec3f &point)
 Returns the distance from the plane to the passed point as measured along the normal vector.
EMMA_EXPORT void offset (float d)
 offset a plane by a given distance
EMMA_EXPORT bool intersect (const Line &l, Fusion::Vec3f &intersection) const
 Intersect line and plane.


Detailed Description

Holds a vector that represents the normal to the plane plus a float that corresponds to D in the plane equation Ax + By + Cz + D = 0 where (A,B,C) is the normal.


Constructor & Destructor Documentation

EMMA_EXPORT Plane const Fusion::Vec3f &  n,
float  D
[inline]
 

Construct a plane given normal and distance from origin along normal.

Orientation is given by the normal vector n.

EMMA_EXPORT Plane const Fusion::Vec3f &  p0,
const Fusion::Vec3f &  p1,
const Fusion::Vec3f &  p2
 

Construct a plane given 3 points.

Orientation is computed by taking (p1 - p0) x (p2 - p0) and pointing the normal in that direction.


Member Function Documentation

EMMA_EXPORT bool intersect const Line l,
Fusion::Vec3f &  intersection
const
 

Intersect line and plane.

Parameters:
l line to intersect with plane.
intersection the returned intersection point
Returns:
true if there is an intersection, false if line is parallel to plane


Generated on Sat Apr 1 06:08:07 2006 for Emma Content Development Kit by  doxygen 1.4.3