#include <pDomain.h>
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 |
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.