PDPlane Class Reference

Arbitrarily-oriented plane. More...

#include <pDomain.h>

Inheritance diagram for PDPlane:

pDomain

List of all members.

Public Member Functions

 PDPlane (const pVec &p0, const pVec &Normal)
bool Within (const pVec &pos) const
 Returns true if the point is in the positive half-space of the plane (in the plane or on the side that Normal points to).
pVec Generate () const
 Returns the point p0.
float Size () const
 Returns the size of the domain (length, area, or volume).
pDomaincopy () const

Public Attributes

pVec p
pVec nrm
float D


Detailed Description

Arbitrarily-oriented plane.

The point p0 is a point on the plane. Normal is the normal vector of the plane. If you have a plane in a,b,c,d form remember that n = [a,b,c] and you can compute a suitable point p0 as p0 = -n*d. The normal will get normalized, so it need not already be unit length.

Generate returns the point p0. Within returns true if the point is in the positive half-space of the plane (in the plane or on the side that Normal points to).


Generated on Tue Dec 30 11:28:40 2008 for ParticleAPI by  doxygen 1.5.8