Box Class Reference
#include <Box.h>
Inheritance diagram for Box:
![](../class_box.png)
# Public Member Functions | |
void | constructor (Entity owner, const ColliderSpec *colliderSpec) |
Class' constructor. | |
override void | resize (fixed_t sizeDelta) |
override void | configureWireframe () |
Configure the wireframe used to show the collider. | |
override void | print (int32 x, int32 y) |
void | getVertexes (Vector3D vertexes[8]) |
void | projectOntoItself () |
Project the box's vertexes onto its normals. |
# Static Public Member Functions | |
static void | project (Vector3D vertexes[8], Vector3D vector, fixed_t *min, fixed_t *max) |
# Protected Attributes | |
VertexProjection | vertexProjections [__COLLIDER_NORMALS] |
The normals of the box. | |
MeshSpec * | meshSpec |
Mesh used to draw the collider. | |
RightBox | rightBox |
Bounding box. | |
Normals * | normals |
The normals of the box. | |
Vector3D | rotationVertexDisplacement |
# Additional Inherited Members | |
![]() | |
enum | CollisionResult |
enum | ColliderClassIndexes |
typedef const ColliderSpec | ColliderROMSpec |
![]() | |
void | constructor (Entity owner, const ColliderSpec *colliderSpec) |
Class' constructor. | |
override bool | onEvent (ListenerObject eventFirer, uint16 eventCode) |
override bool | handleMessage (Telegram telegram) |
override void | handleCommand (int32 command, va_list args) |
void | enable () |
Enable the collider for collision checks. | |
void | disable () |
Disable the collider for collision checks. | |
void | setLayers (uint32 layers) |
uint32 | getLayers () |
void | setLayersToIgnore (uint32 layersToIgnore) |
uint32 | getLayersToIgnore () |
void | checkCollisions (bool checkCollisions) |
void | registerCollisions (bool registerCollisions) |
CollisionResult | collides (Collider collider) |
void | resolveCollision (const CollisionInformation *collisionInformation) |
bool | canMoveTowards (Vector3D displacement) |
void | discardCollisions () |
Discard any registered collision. | |
fixed_t | getCollidingFrictionCoefficient () |
void | show () |
Show the collider. | |
void | hide () |
Hide the collider. | |
virtual Vector3D | getNormal () |
![]() | |
Vector3D | position |
Displaced position. | |
VirtualList | otherColliders |
List of colliding colliders. | |
uint32 | layers |
Layers on which this collider live. | |
uint32 | layersToIgnore |
Layers to ignore when checking for collisions. | |
Wireframe | wireframe |
Wireframe to make the collider visible (mainly for debugging purposes) | |
bool | enabled |
If false, it is ignored in all callision checks. | |
uint8 | checkForCollisions |
If false, it doesn't check collision against other colliders. | |
bool | registerCollisions |
If true, it registers other colliders when a collision arises. | |
uint8 | classIndex |
Class index to avoid using __GET_CAST when checking for collisions. | |
bool | invalidPosition |
Flag to force the computation of the collider's position. |
# Detailed Description
# Member Function Documentation
# configureWireframe()
|
virtual |
# constructor()
void Box::constructor | ( | Entity | owner, |
const ColliderSpec * | colliderSpec ) |
# getVertexes()
void Box::getVertexes | ( | Vector3D | vertexes[8] | ) |
# print()
# project()
|
static |
Project the vertexes onto the provided vector.
- Parameters
-
vertexes Array of vectors to project vector Vector onto which make the projections min min: Variable to store the value of the lowest value of the projection max max: Variable to store the value of the biggest value of the projection
# projectOntoItself()
void Box::projectOntoItself | ( | ) |
# resize()
|
virtual |
# Member Data Documentation
# meshSpec
|
protected |
# normals
# rightBox
# rotationVertexDisplacement
# vertexProjections
|
protected |
The documentation for this class was generated from the following files: