|
Wraith
0.1.5
Basic 3D game engine in C++
|
A Collision Volume AABB. More...
#include <CollisionVolumeAABB.h>


Public Member Functions | |
| CollisionVolumeAABB (const CollisionVolumeAABB &)=default | |
| CollisionVolumeAABB & | operator= (const CollisionVolumeAABB &)=default |
| CollisionVolumeAABB (CollisionVolumeAABB &&)=default | |
| CollisionVolumeAABB & | operator= (CollisionVolumeAABB &&)=default |
| virtual void | computeData (Model *pModel, const Matrix &worldMatrix) override |
| Calculates the data for AABB. In this case the Max and Min Vertices. More... | |
| void | computeData (const CollisionVolumeBSphere &BSphere) |
| Calculates the data for AABB. In this case the Max and Min Vertices. More... | |
| virtual bool | intersectAccept (const CollisionVolume &) const override |
| Accepts a collision volume to perform intersect test. More... | |
| virtual bool | intersectVisitor (const CollisionVolumeBSphere &) const override |
| Visits a collision volume BSphere to perform intersect test. More... | |
| virtual bool | intersectVisitor (const CollisionVolumeAABB &) const override |
| Visits a collision volume AABB to perform intersect test. More... | |
| virtual bool | intersectVisitor (const CollisionVolumeOBB &) const override |
| Visits a collision volume OBB to perform intersect test. More... | |
| virtual bool | intersectVisitor (const CollisionVolumeOctree &) const override |
| Visits a collision volume Octree to perform intersect test. More... | |
| void | setMinMaxWorldVertex (const Vect &minWorldVertex, const Vect &maxWorldVertex) |
| Sets the minimum and maximum vertex in world space. More... | |
| const Vect & | getMinWorldVertex () const |
| Gets the minimum vertex in world space. More... | |
| const Vect & | getMaxWorldVertex () const |
| Gets the maximum vertex in world space. More... | |
| const Matrix & | getWorldMatrix () const |
| Gets the world matrix of AABB. More... | |
| const Matrix & | getInverseWorldMatrix () const |
| Gets the inverse world matrix of AABB. More... | |
| const Vect & | getMinLocalVertex () const |
| Gets the minimum vertex in local space. More... | |
| const Vect & | getMaxLocalVertex () const |
| Gets the maximum vertex in local space. More... | |
| const Vect & | getLocalHalfDiagonal () const |
| Gets the half diagonal of AABB in local space. More... | |
| const Vect & | getWorldCenter () const |
| Gets the center position of AABB in world space. More... | |
| float | getScalingFactorSquared () const |
| Gets scaling factor sqaured of AABB. More... | |
| void | computeData (const CollisionVolumeOBB &OBB) |
| Calculates the data for AABB. In this case the Max and Min Vertices. More... | |
| void | computeData (const Triangle &triangle) |
| Calculates the data for AABB. In this case the Max and Min Vertices. More... | |
| virtual int | getMaxDepth () const override |
Public Member Functions inherited from CollisionVolume | |
| CollisionVolume (const CollisionVolume &)=default | |
| CollisionVolume & | operator= (const CollisionVolume &)=default |
| CollisionVolume (CollisionVolume &&)=default | |
| CollisionVolume & | operator= (CollisionVolume &&)=default |
Private Member Functions | |
| virtual void | debugDraw (const Vect &color, int depth) const override |
| Draws it collision volume. More... | |
A Collision Volume AABB.
inherits from CollisionVolume.
| void CollisionVolumeAABB::computeData | ( | const CollisionVolumeBSphere & | BSphere | ) |
Calculates the data for AABB. In this case the Max and Min Vertices.
Uses a BSphere.
| bSphere | A BSphere. |
| void CollisionVolumeAABB::computeData | ( | const CollisionVolumeOBB & | OBB | ) |
Calculates the data for AABB. In this case the Max and Min Vertices.
Uses a OBB.
| OBB | A OBB. |
| void CollisionVolumeAABB::computeData | ( | const Triangle & | triangle | ) |
|
overridevirtual |
Calculates the data for AABB. In this case the Max and Min Vertices.
| pModel | the pointer to a model. |
| worldMatrix | The world matrix. |
Implements CollisionVolume.
|
overrideprivatevirtual |
Draws it collision volume.
Used for debuggin purposes. Depth value is used only for Octree collision value. All other collision volumes ignore it.
| color | the color to render the collision volume. |
| depth | the depth to render collision volume. |
Implements CollisionVolume.
| const Matrix & CollisionVolumeAABB::getInverseWorldMatrix | ( | ) | const |
Gets the inverse world matrix of AABB.
| const Vect & CollisionVolumeAABB::getLocalHalfDiagonal | ( | ) | const |
Gets the half diagonal of AABB in local space.
| const Vect & CollisionVolumeAABB::getMaxLocalVertex | ( | ) | const |
Gets the maximum vertex in local space.
| const Vect & CollisionVolumeAABB::getMaxWorldVertex | ( | ) | const |
Gets the maximum vertex in world space.
| const Vect & CollisionVolumeAABB::getMinLocalVertex | ( | ) | const |
Gets the minimum vertex in local space.
| const Vect & CollisionVolumeAABB::getMinWorldVertex | ( | ) | const |
Gets the minimum vertex in world space.
| float CollisionVolumeAABB::getScalingFactorSquared | ( | ) | const |
Gets scaling factor sqaured of AABB.
| const Vect & CollisionVolumeAABB::getWorldCenter | ( | ) | const |
Gets the center position of AABB in world space.
| const Matrix & CollisionVolumeAABB::getWorldMatrix | ( | ) | const |
Gets the world matrix of AABB.
|
overridevirtual |
Accepts a collision volume to perform intersect test.
Uses Visitor Pattern. This is the first step of the process. Then calls on intersectVisitor().
| collisionVolume | a collision volume. |
Implements CollisionVolume.
|
overridevirtual |
Visits a collision volume AABB to perform intersect test.
Uses Visitor Pattern. This is the second step of the process.
| AABB | a collision volume AABB. |
Implements CollisionVolume.
|
overridevirtual |
Visits a collision volume BSphere to perform intersect test.
Uses Visitor Pattern. This is the second step of the process.
| collisionBSphere | a collision volume BSphere. |
Implements CollisionVolume.
|
overridevirtual |
Visits a collision volume OBB to perform intersect test.
Uses Visitor Pattern. This is the second step of the process.
| OBB | a collision volume OBB. |
Implements CollisionVolume.
|
overridevirtual |
Visits a collision volume Octree to perform intersect test.
Uses Visitor Pattern. This is the second step of the process.
| Octree | a collision volume Octree. |
Implements CollisionVolume.
| void CollisionVolumeAABB::setMinMaxWorldVertex | ( | const Vect & | minWorldVertex, |
| const Vect & | maxWorldVertex | ||
| ) |
Sets the minimum and maximum vertex in world space.
| minWorldVertex | The min world vertex. |
| maxWorldVertex | The max world vertex. |