A Zone defining an axis-aligned Box. More...
Public Member Functions | |
| AABox (const Vector3D &position=Vector3D(0.0f, 0.0f, 0.0f), const Vector3D &dimension=Vector3D(0.0f, 0.0f, 0.0f)) | |
| Constructor of AABox. | |
| void | setDimension (const Vector3D &dimension) |
| Sets the dimensions of this AABox. | |
| const Vector3D & | getDimension () const |
| Gets the dimensions of this AABox. | |
| virtual void | generatePosition (Particle &particle, bool full) const |
| Randomly generates a position inside this Zone for a given Particle. | |
| virtual bool | contains (const Vector3D &v) const |
| Checks whether a point is within the Zone. | |
| virtual bool | intersects (const Vector3D &v0, const Vector3D &v1, Vector3D *intersection, Vector3D *normal) const |
| Checks whether a line intersects the Zone. | |
| virtual void | moveAtBorder (Vector3D &v, bool inside) const |
| Moves a point at the border of the Zone. | |
| virtual Vector3D | computeNormal (const Vector3D &point) const |
| Computes the normal for the point. | |
Static Public Member Functions | |
| static AABox * | create (const Vector3D &position=Vector3D(0.0f, 0.0f, 0.0f), const Vector3D &dimension=Vector3D(0.0f, 0.0f, 0.0f)) |
| Creates and registers a new AABox. | |
A Zone defining an axis-aligned Box.
An AABox is defined by its center and a dimension in each axis.
Definition at line 36 of file SPK_AABox.h.
Computes the normal for the point.
| point | : the point from where the normal is computed |
Implements Zone.
| virtual bool contains | ( | const Vector3D & | point | ) | const [virtual] |
| AABox * create | ( | const Vector3D & | position = Vector3D(0.0f,0.0f,0.0f), |
|
| const Vector3D & | dimension = Vector3D(0.0f,0.0f,0.0f) | |||
| ) | [static] |
| virtual void generatePosition | ( | Particle & | particle, | |
| bool | full | |||
| ) | const [virtual] |
| const Vector3D & getDimension | ( | ) | const |
Gets the dimensions of this AABox.
Definition at line 110 of file SPK_AABox.h.
| virtual bool intersects | ( | const Vector3D & | v0, | |
| const Vector3D & | v1, | |||
| Vector3D * | intersection, | |||
| Vector3D * | normal | |||
| ) | const [virtual] |
Checks whether a line intersects the Zone.
The intersection is computed only if the Vector3D* intersection is not NULL.
The normal is computed if the Vector3D* normal AND intersection are not NULL.
| v0 | : start of the line | |
| v1 | : end of the line | |
| intersection | : the Vector3D where the intersection will be stored, NULL not to compute the intersection | |
| normal | : the Vector3D where the normal will be stored, NULL not to compute the normal |
Implements Zone.
| virtual void moveAtBorder | ( | Vector3D & | point, | |
| bool | inside | |||
| ) | const [virtual] |
1.6.1