A Collision Volume Bsphere.
More...
#include <CollisionVolumeBSphere.h>
|
virtual void | debugDraw (const Vect &color, int depth) const override |
| Draws it collision volume. More...
|
|
|
Vect | _center |
|
float | _radius |
|
A Collision Volume Bsphere.
inherits from CollisionVolume.
◆ computeData() [1/3]
Calculates the data for BSphere. In this case the radius and center position.
- Parameters
-
◆ computeData() [2/3]
void CollisionVolumeBSphere::computeData |
( |
const Triangle & |
triangle | ) |
|
Calculates the data for BSphere. In this case the radius and center position.
- Parameters
-
◆ computeData() [3/3]
void CollisionVolumeBSphere::computeData |
( |
Model * |
pModel, |
|
|
const Matrix & |
worldMatrix |
|
) |
| |
|
overridevirtual |
Calculates the data for BSphere. In this case the radius and center position.
- Parameters
-
pModel | the pointer to a model. |
worldMatrix | The world matrix. |
Implements CollisionVolume.
◆ debugDraw()
void CollisionVolumeBSphere::debugDraw |
( |
const Vect & |
color, |
|
|
int |
depth |
|
) |
| const |
|
overrideprivatevirtual |
Draws it collision volume.
Used for debuggin purposes. Depth value is used only for Octree collision value. All other collision volumes ignore it.
- Parameters
-
color | the color to render the collision volume. |
depth | the depth to render collision volume. |
Implements CollisionVolume.
◆ getCenter()
const Vect & CollisionVolumeBSphere::getCenter |
( |
| ) |
const |
Gets the center position of BSphere.
- Returns
- The center.
◆ getRadius()
float CollisionVolumeBSphere::getRadius |
( |
| ) |
const |
Gets the radius of the BSphere.
- Returns
- The radius.
◆ intersectAccept()
bool CollisionVolumeBSphere::intersectAccept |
( |
const CollisionVolume & |
collisionVolume | ) |
const |
|
overridevirtual |
Accepts a collision volume to perform intersect test.
Uses Visitor Pattern. This is the first step of the process. Then calls on intersectVisitor().
- Parameters
-
collisionVolume | a collision volume. |
Implements CollisionVolume.
◆ intersectVisitor() [1/4]
Visits a collision volume AABB to perform intersect test.
Uses Visitor Pattern. This is the second step of the process.
- Parameters
-
AABB | a collision volume AABB. |
Implements CollisionVolume.
◆ intersectVisitor() [2/4]
Visits a collision volume BSphere to perform intersect test.
Uses Visitor Pattern. This is the second step of the process.
- Parameters
-
collisionBSphere | a collision volume BSphere. |
Implements CollisionVolume.
◆ intersectVisitor() [3/4]
Visits a collision volume OBB to perform intersect test.
Uses Visitor Pattern. This is the second step of the process.
- Parameters
-
OBB | a collision volume OBB. |
Implements CollisionVolume.
◆ intersectVisitor() [4/4]
Visits a collision volume Octree to perform intersect test.
Uses Visitor Pattern. This is the second step of the process.
- Parameters
-
Octree | a collision volume Octree. |
Implements CollisionVolume.
The documentation for this class was generated from the following files: