Propane::Math::Plane Class Reference

#include <Plane.h>

List of all members.

Public Member Functions

 Plane ()
 Basic constructor. Sets A,B,C,D to 0.
 Plane (const Propane::Math::Vector3 &newAbc, float newD)
 Data-based constructor.
void fromTriangle (const Vector3 &tri1, const Vector3 &tri2, const Vector3 &tri3)
 Create a plane from a triangle.
void setPlaneNormal (const Propane::Math::Vector3 &newAbc)
 Set the plane normal (A,B,C).
void setPlaneIntercept (float newD)
 Set the plane intercept (D).
bool intersect (const Plane &p2, const Plane &p3, Vector3 &intersectPoint) const
 Check for plane intersection.
Propane::Math::Vector4 getABCD () const
 Get the ABCD representation of this plane.
PlanePointClassification classifyPlane (const Vector3 &v) const
 Classify a point as being on, in front of, or behind the plane.
float getDistance (const Vector3 &point) const
 Get the distance from a point to the plane.
void setA (float na)
 Set the A component of the normal.
void setB (float nb)
 Set the B component of the normal.
void setC (float nc)
 Set the C component of the normal.
void setD (float nd)
 Set the D component (plane intercept).


Detailed Description

A representation of a 3D plane in space.


Constructor & Destructor Documentation

Propane::Math::Plane::Plane const Propane::Math::Vector3 &  newAbc,
float  newD
[inline]
 

Data-based constructor.

Parameters:
newAbc The A,B,C components of the plane.
newD The D component of the plane.


Member Function Documentation

PlanePointClassification Propane::Math::Plane::classifyPlane const Vector3 &  v  )  const [inline]
 

Classify a point as being on, in front of, or behind the plane.

Parameters:
v The point in 3D space to check.
Returns:
A PlanePointClassification representing the status of your point.

void Propane::Math::Plane::fromTriangle const Vector3 &  tri1,
const Vector3 &  tri2,
const Vector3 &  tri3
[inline]
 

Create a plane from a triangle.

Parameters:
tri1 The first vertex of the triangle.
tri2 The second vertex of the triangle.
tri3 The third vertex of the triangle.

Propane::Math::Vector4 Propane::Math::Plane::getABCD  )  const [inline]
 

Get the ABCD representation of this plane.

Returns:
The Vector4 containing the ABCD-representation of this plane

float Propane::Math::Plane::getDistance const Vector3 &  point  )  const [inline]
 

Get the distance from a point to the plane.

Parameters:
point The point, in 3D space to check
Returns:
The distance, in world units, between the point and plane.

bool Propane::Math::Plane::intersect const Plane p2,
const Plane p3,
Vector3 &  intersectPoint
const [inline]
 

Check for plane intersection.

Stores the intersection of the three planes in the referenced intersectPoint vector.

Parameters:
p2 The second plane
p3 The third plane
intersectPoint A reference to the vector that the resultant intersection point will be stored in.
Returns:
True if there was an intersection, false otherwise.

void Propane::Math::Plane::setA float  na  )  [inline]
 

Set the A component of the normal.

Parameters:
na The new A component.

void Propane::Math::Plane::setB float  nb  )  [inline]
 

Set the B component of the normal.

Parameters:
nb The new B component.

void Propane::Math::Plane::setC float  nc  )  [inline]
 

Set the C component of the normal.

Parameters:
nc The new C component.

void Propane::Math::Plane::setD float  nd  )  [inline]
 

Set the D component (plane intercept).

Parameters:
nd The new plane intercept.

void Propane::Math::Plane::setPlaneIntercept float  newD  )  [inline]
 

Set the plane intercept (D).

Parameters:
newD The new plane intercept.

void Propane::Math::Plane::setPlaneNormal const Propane::Math::Vector3 &  newAbc  )  [inline]
 

Set the plane normal (A,B,C).

Parameters:
newAbc The new plane normal.


The documentation for this class was generated from the following file:
Generated on Sun Jan 14 16:49:12 2007 for Propane Injector by  doxygen 1.4.6