PDBox Class Reference

Axis-aligned box. More...

#include <pDomain.h>

Inheritance diagram for PDBox:

pDomain

List of all members.


Public Member Functions

  PDBox (const pVec &e0, const pVec &e1)
bool  Within (const pVec &pos) const
  Returns true if the point is in the box.
pVec  Generate () const
  Returns a random point in this box.
float  Size () const
  Returns the size of the domain (length, area, or volume).
pDomain copy () const

Public Attributes

pVec  p0
pVec  p1
pVec  dif
float  vol

Detailed Description

Axis-aligned box.

e0 and e1 are opposite corners of an axis-aligned box. It doesn't matter which of each coordinate is min and which is max.

Generate returns a random point in this box. Within returns true if the point is in the box.

It is only possible to bounce particles off the outside of the box, not the inside. Likewise, particles can only Avoid the box from the outside. To use the Avoid action inside a box, define the box as six planes.


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