#include <colmodel.h>
Public Member Functions | |
| CDBox () | |
| virtual | ~CDBox () |
| void | zeroize () |
| Zeroize the vertices of the box. | |
| void | translate (const GLVector3d translation) |
| Adds translation vector to all vertices. | |
| void | rotate (GLQuaterniond rotation) |
| Rotates all vertices by rotation represented by quaternion. | |
| double | getMin (int cordinate) const |
| Get minimal value in a coorinate. | |
| double | getMax (int cordinate) const |
| Get maximal value in coorinate. | |
| bool | quickCheckCollision (const CDBox &box) const |
| Quick check colision with another box. | |
| void | project (const GLVector3d &normal, double &min, double &max) const |
| Return min and max for the projection. | |
| double | trySepparatingAxis (const CDBox &box, int a1, int a2, int b1, int b2, GLVector3d &normal) const |
| Try separation with plane contructed from axis taken from both boxes. | |
| double | trySepparatingAxisSelf (const CDBox &box, int a1, int a2, int b1, int b2, GLVector3d &normal) const |
| Try separation with plane contructed from axis taken from this box. | |
Static Public Member Functions | |
| static double | projectAndCompare (const CDBox &box1, const CDBox &box2, const GLVector3d &normal) |
| Project boxes to normal and try to decide collision. | |
Public Attributes | |
| GLVector3d | mVertex [8] |
| Eight vertices representing the box. | |
Definition at line 31 of file colmodel.h.
|
|
Definition at line 34 of file colmodel.h. |
|
|
Definition at line 35 of file colmodel.h. |
|
|
Get maximal value in coorinate.
Definition at line 91 of file colmodel.h. References mVertex. Referenced by quickCheckCollision(). |
|
|
Get minimal value in a coorinate.
Definition at line 78 of file colmodel.h. References mVertex. Referenced by quickCheckCollision(). |
|
||||||||||||||||
|
Return min and max for the projection. Compute min and max value of dot product of every vertex of the box and vector normal.
Definition at line 125 of file colmodel.h. References mVertex. Referenced by projectAndCompare(), and projectAndCompareMax(). |
|
||||||||||||||||
|
Project boxes to normal and try to decide collision.
Definition at line 212 of file colmodel.h. References project(). Referenced by trySepparatingAxis(), and trySepparatingAxisSelf(). Here is the call graph for this function: ![]() |
|
|
Quick check colision with another box. Does only check based on min/max coordinates.
Definition at line 105 of file colmodel.h. References getMax(), and getMin(). Referenced by CollisionModel::computeMinimalAvoidDistance(), and CollisionModel::computeMinimalAvoidVector(). Here is the call graph for this function: ![]() |
|
|
Rotates all vertices by rotation represented by quaternion.
Definition at line 66 of file colmodel.h. References mVertex. |
|
|
Adds translation vector to all vertices.
Definition at line 58 of file colmodel.h. References mVertex. |
|
||||||||||||||||||||||||||||
|
Try separation with plane contructed from axis taken from both boxes.
Definition at line 149 of file colmodel.h. References mVertex, and projectAndCompare(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||||||
|
Try separation with plane contructed from axis taken from this box.
Definition at line 183 of file colmodel.h. References mVertex, and projectAndCompare(). Here is the call graph for this function: ![]() |
|
|
Zeroize the vertices of the box.
Definition at line 48 of file colmodel.h. References mVertex. Referenced by CollisionModel::CollisionModel(). |
|
|
Eight vertices representing the box. Eight vertices representing the box, the indices represents them in the following order: BOTTOM_FRONT_LEFT, BOTTOM_FRONT_RIGHT, BOTTOM_BACK_RIGHT, BOTTOM_BACK_LEFT, TOP_FRONT_LEFT, TOP_FRONT_RIGHT, TOP_BACK_RIGHT, TOP_BACK_LEFT. Definition at line 35 of file colmodel.h. Referenced by TaskSimulationServer::checkTerrainHeights(), getMax(), getMin(), project(), Tank::render(), rotate(), translate(), trySepparatingAxis(), trySepparatingAxisMax(), trySepparatingAxisSelf(), trySepparatingAxisSelfMax(), and zeroize(). |
1.4.5