Untold Engine
Beta v0.0.16
docs
|
The U4DStaticAction class represents actions such as collision detections applied to a 3D model entity. More...
Inherited by U4DEngine::U4DDynamicAction.
Public Member Functions | |
U4DStaticAction (U4DModel *uU4DModel) | |
Constructor for the class. | |
~U4DStaticAction () | |
Destructor for the class. | |
U4DStaticAction (const U4DStaticAction &value) | |
Copy constructor. | |
U4DStaticAction & | operator= (const U4DStaticAction &value) |
Copy constructor. More... | |
void | initMass (float uMass) |
Method which sets the mass of the model. More... | |
void | initCenterOfMass (U4DVector3n &uCenterOfMass) |
Method which sets the center of mass of the model. More... | |
void | initCoefficientOfRestitution (float uValue) |
Method which sets the coefficient of restitution of the model. More... | |
void | initInertiaTensorType (INERTIATENSORTYPE uInertiaTensorType) |
Method which sets the Interta tensor type of the model. More... | |
void | initAsPlatform (bool uValue) |
Method which sets the model as a platform. More... | |
void | setNarrowPhaseBoundingVolumeVisibility (bool uValue) |
Methods which sets the visibility of the Narrow-Phase bounding volume. More... | |
void | setBroadPhaseBoundingVolumeVisibility (bool uValue) |
Methods which sets the visibility of the Broad-Phase bounding volume. More... | |
void | setCollisionNormalFaceDirection (U4DVector3n &uNormalFaceDirection) |
Method which sets the collision normal face direction. More... | |
void | setCollisionPenetrationDepth (float uPenetrationDepth) |
Method which sets the collision penetration depth. More... | |
void | setNormalForce (U4DVector3n &uNormalForce) |
Method which sets the Normal force. More... | |
void | setModelHasCollided (bool uValue) |
Method which informs the engine that the model has collided. More... | |
void | setModelHasCollidedBroadPhase (bool uValue) |
Method which informs the engine that the model has collided in broad phase stage. More... | |
void | enableCollisionBehavior () |
Enables the model to detect collisions. More... | |
void | pauseCollisionBehavior () |
Pauses the ability of the model to detect collisions. | |
void | resumeCollisionBehavior () |
Resumes the ability for the model to detect collisions. More... | |
bool | isCollisionBehaviorEnabled () |
Method which returns if the model can detect collisions. More... | |
void | computeInertiaTensor () |
Computes the inertia tensor of the model geometry. | |
void | updateConvexHullVertices () |
Method which updates the convex-hull vertices of the model. | |
void | addCollisionContactPoint (U4DVector3n &uContactPoint) |
Method which adds collision contact points to a container. More... | |
void | clearConvexHullVertices () |
Method which clears all convex-hull vertices. | |
void | clearCollisionInformation () |
Method which clears all collision information. | |
float | getMass () const |
Method which returns the mass of the model. More... | |
U4DVector3n | getCenterOfMass () |
Method which returns the center of mass of the model. More... | |
float | getCoefficientOfRestitution () |
Method which returns the coefficient of restitution of the model. More... | |
INERTIATENSORTYPE | getInertiaTensorType () |
Method which returns the inertia tensor type of the model. More... | |
bool | getIsPlatform () |
Method which returns if the model should be seens as a platform by the collision detection system. More... | |
U4DMatrix3n | getMomentOfInertiaTensor () |
Method which returns a 3x3 matrix representing the moment of inertia tensor. More... | |
U4DMatrix3n | getInverseMomentOfInertiaTensor () |
Method which returns a 3x3 matrix representing the inverse moment of inertia tensor. More... | |
std::vector< U4DVector3n > & | getConvexHullVertices () |
Method which returns the convex-hull vertices. More... | |
int | getConvexHullVerticesCount () |
Method which returns the convex-hull vertices count. More... | |
U4DBoundingVolume * | getNarrowPhaseBoundingVolume () |
Method which returns the narrow-phase bounding volume. More... | |
bool | getNarrowPhaseBoundingVolumeVisibility () |
Method which returns if the engine should render the narrow-phase bounding volume. More... | |
U4DBoundingVolume * | getBroadPhaseBoundingVolume () |
Method which returns the broad-phase bounding volume. More... | |
bool | getBroadPhaseBoundingVolumeVisibility () |
Method which returns if the engine should render the broad-phase bounding volume. More... | |
U4DVector3n | getNormalForce () |
Method which returns a 3D vector representing the Normal force. More... | |
std::vector< U4DVector3n > | getCollisionContactPoints () |
Method which returns the collision contact points. More... | |
void | clearCollisionContactPoints () |
Method which clears all collision contact points. | |
U4DVector3n | getCollisionNormalFaceDirection () |
Method which returns the collision normal face direction vector. More... | |
float | getCollisionPenetrationDepth () |
Method which returns the collision penetration depth. More... | |
bool | getModelHasCollided () |
Method which returns true if the model has collided. More... | |
bool | getModelHasCollidedBroadPhase () |
Method which returns true if the model has collided in Broad Phase stage. More... | |
void | setCollisionFilterCategory (int uFilterCategory) |
Sets the filter category for collision. More... | |
void | setCollisionFilterMask (int uFilterMask) |
Set the filter mask for collision. More... | |
void | setCollisionFilterGroupIndex (signed int uGroupIndex) |
Sets the group filter for collisions. More... | |
int | getCollisionFilterCategory () |
Get the collision filter category for the entity. More... | |
int | getCollisionFilterMask () |
Get the collision filter mask for the entity More... | |
signed int | getCollisionFilterGroupIndex () |
Get the filter group index More... | |
void | setIsCollisionSensor (bool uValue) |
Sets the entity as a collision sensor. More... | |
bool | getIsCollisionSensor () |
Is the entity a collision sensor. More... | |
void | addToCollisionList (U4DStaticAction *uModel) |
Add all the 3D models the entity is currently colliding. More... | |
void | addToBroadPhaseCollisionList (U4DStaticAction *uModel) |
Add all the 3D models the entity is currently colliding in broad phase collision. More... | |
std::vector< U4DStaticAction * > | getCollisionList () |
Gets a list of all entities currently colliding with the entity. More... | |
std::vector< U4DStaticAction * > | getBroadPhaseCollisionList () |
Gets a list of all entities currently colliding (broad phase stage) with the entity. More... | |
void | setCollidingTag (std::string uCollidingTag) |
Sets a collision tag. More... | |
std::string | getCollidingTag () |
Gets the collision tag. More... | |
void | clearCollisionList () |
Clears the collision list. More... | |
void | clearBroadPhaseCollisionList () |
Clears the collision list. More... | |
Public Attributes | |
U4DModel * | model |
Protected Attributes | |
std::string | name |
Name of the entity. | |
The U4DStaticAction class represents actions such as collision detections applied to a 3D model entity.
void U4DEngine::U4DStaticAction::addCollisionContactPoint | ( | U4DVector3n & | uContactPoint | ) |
Method which adds collision contact points to a container.
uContactPoint | collision contact points to add to container |
void U4DEngine::U4DStaticAction::addToBroadPhaseCollisionList | ( | U4DStaticAction * | uModel | ) |
Add all the 3D models the entity is currently colliding in broad phase collision.
The collision list keeps a list of all the 3D entities currently colliding with this entity
uModel | 3d model currently colliding |
void U4DEngine::U4DStaticAction::addToCollisionList | ( | U4DStaticAction * | uModel | ) |
Add all the 3D models the entity is currently colliding.
The collision list keeps a list of all the 3D entities currently colliding with this entity
uModel | 3d model currently colliding |
void U4DEngine::U4DStaticAction::clearBroadPhaseCollisionList | ( | ) |
Clears the collision list.
The collision list keeps a list of all the 3D entities currently colliding with this entity during broad phase stage
void U4DEngine::U4DStaticAction::clearCollisionList | ( | ) |
Clears the collision list.
The collision list keeps a list of all the 3D entities currently colliding with this entity
void U4DEngine::U4DStaticAction::enableCollisionBehavior | ( | ) |
Enables the model to detect collisions.
enables the model to collide with other convex objects.
U4DBoundingVolume * U4DEngine::U4DStaticAction::getBroadPhaseBoundingVolume | ( | ) |
Method which returns the broad-phase bounding volume.
bool U4DEngine::U4DStaticAction::getBroadPhaseBoundingVolumeVisibility | ( | ) |
Method which returns if the engine should render the broad-phase bounding volume.
std::vector< U4DStaticAction * > U4DEngine::U4DStaticAction::getBroadPhaseCollisionList | ( | ) |
Gets a list of all entities currently colliding (broad phase stage) with the entity.
The collision list keeps a list of all the 3D entities currently colliding with this entity
U4DVector3n U4DEngine::U4DStaticAction::getCenterOfMass | ( | ) |
Method which returns the center of mass of the model.
float U4DEngine::U4DStaticAction::getCoefficientOfRestitution | ( | ) |
Method which returns the coefficient of restitution of the model.
std::string U4DEngine::U4DStaticAction::getCollidingTag | ( | ) |
Gets the collision tag.
The collision tag can be used to determine exactly who is the entity colliding with
std::vector< U4DVector3n > U4DEngine::U4DStaticAction::getCollisionContactPoints | ( | ) |
Method which returns the collision contact points.
int U4DEngine::U4DStaticAction::getCollisionFilterCategory | ( | ) |
Get the collision filter category for the entity.
The filter category refers to "I am of type..."
signed int U4DEngine::U4DStaticAction::getCollisionFilterGroupIndex | ( | ) |
Get the filter group index
If both group index values are the same and positive, then both entities will collide. if both group index values are the same and negative, they the entities do not collide. if either entity has a group index of zero, then the category/mask rule is used. if both entities group index are non-zero but different, the category/mask rule is used.
int U4DEngine::U4DStaticAction::getCollisionFilterMask | ( | ) |
Get the collision filter mask for the entity
the filter mask refers to "I collide with types of..."
std::vector< U4DStaticAction * > U4DEngine::U4DStaticAction::getCollisionList | ( | ) |
Gets a list of all entities currently colliding with the entity.
The collision list keeps a list of all the 3D entities currently colliding with this entity
U4DVector3n U4DEngine::U4DStaticAction::getCollisionNormalFaceDirection | ( | ) |
Method which returns the collision normal face direction vector.
float U4DEngine::U4DStaticAction::getCollisionPenetrationDepth | ( | ) |
Method which returns the collision penetration depth.
std::vector< U4DVector3n > & U4DEngine::U4DStaticAction::getConvexHullVertices | ( | ) |
Method which returns the convex-hull vertices.
int U4DEngine::U4DStaticAction::getConvexHullVerticesCount | ( | ) |
Method which returns the convex-hull vertices count.
INERTIATENSORTYPE U4DEngine::U4DStaticAction::getInertiaTensorType | ( | ) |
Method which returns the inertia tensor type of the model.
U4DMatrix3n U4DEngine::U4DStaticAction::getInverseMomentOfInertiaTensor | ( | ) |
Method which returns a 3x3 matrix representing the inverse moment of inertia tensor.
bool U4DEngine::U4DStaticAction::getIsCollisionSensor | ( | ) |
Is the entity a collision sensor.
When an entity is set as a sensor, the engine will not compute a collision response for the entity. That is, it will not compute the resultant velocity and position
bool U4DEngine::U4DStaticAction::getIsPlatform | ( | ) |
Method which returns if the model should be seens as a platform by the collision detection system.
float U4DEngine::U4DStaticAction::getMass | ( | ) | const |
Method which returns the mass of the model.
bool U4DEngine::U4DStaticAction::getModelHasCollided | ( | ) |
Method which returns true if the model has collided.
bool U4DEngine::U4DStaticAction::getModelHasCollidedBroadPhase | ( | ) |
Method which returns true if the model has collided in Broad Phase stage.
U4DMatrix3n U4DEngine::U4DStaticAction::getMomentOfInertiaTensor | ( | ) |
Method which returns a 3x3 matrix representing the moment of inertia tensor.
U4DBoundingVolume * U4DEngine::U4DStaticAction::getNarrowPhaseBoundingVolume | ( | ) |
Method which returns the narrow-phase bounding volume.
bool U4DEngine::U4DStaticAction::getNarrowPhaseBoundingVolumeVisibility | ( | ) |
Method which returns if the engine should render the narrow-phase bounding volume.
U4DVector3n U4DEngine::U4DStaticAction::getNormalForce | ( | ) |
Method which returns a 3D vector representing the Normal force.
void U4DEngine::U4DStaticAction::initAsPlatform | ( | bool | uValue | ) |
Method which sets the model as a platform.
uValue | Set to true if the collision detection system should treat this model as a floor/ground |
void U4DEngine::U4DStaticAction::initCenterOfMass | ( | U4DVector3n & | uCenterOfMass | ) |
Method which sets the center of mass of the model.
uCenterOfMass | Center of mass of the static model |
void U4DEngine::U4DStaticAction::initCoefficientOfRestitution | ( | float | uValue | ) |
Method which sets the coefficient of restitution of the model.
uValue | Coefficient of restitution of the static model |
void U4DEngine::U4DStaticAction::initInertiaTensorType | ( | INERTIATENSORTYPE | uInertiaTensorType | ) |
Method which sets the Interta tensor type of the model.
uInertiaTensorType | Inertia Tensor type. i.e., cubic, spherical or cylindrical |
void U4DEngine::U4DStaticAction::initMass | ( | float | uMass | ) |
Method which sets the mass of the model.
uMass | Mass of the static model |
bool U4DEngine::U4DStaticAction::isCollisionBehaviorEnabled | ( | ) |
Method which returns if the model can detect collisions.
U4DStaticAction & U4DEngine::U4DStaticAction::operator= | ( | const U4DStaticAction & | value | ) |
Copy constructor.
value | 3D Static model object to copy to |
void U4DEngine::U4DStaticAction::resumeCollisionBehavior | ( | ) |
Resumes the ability for the model to detect collisions.
informs the collision engine to re-start collision detection with this object.
void U4DEngine::U4DStaticAction::setBroadPhaseBoundingVolumeVisibility | ( | bool | uValue | ) |
Methods which sets the visibility of the Broad-Phase bounding volume.
uValue | The engine will render the broad-phase bounding volume if set to true |
void U4DEngine::U4DStaticAction::setCollidingTag | ( | std::string | uCollidingTag | ) |
Sets a collision tag.
The collision tag can be used to determine exactly who is the entity colliding with
uCollidingTag | tag name |
void U4DEngine::U4DStaticAction::setCollisionFilterCategory | ( | int | uFilterCategory | ) |
Sets the filter category for collision.
The filter category refers to "I am of type...".
uFilterCategory | filter category |
void U4DEngine::U4DStaticAction::setCollisionFilterGroupIndex | ( | signed int | uGroupIndex | ) |
Sets the group filter for collisions.
If both group index values are the same and positive, then both entities will collide. if both group index values are the same and negative, they the entities do not collide. if either entity has a group index of zero, then the category/mask rule is used. if both entities group index are non-zero but different, the category/mask rule is used.
int | group index |
void U4DEngine::U4DStaticAction::setCollisionFilterMask | ( | int | uFilterMask | ) |
Set the filter mask for collision.
The filter mask refers to "I collide with types..."
uFilterMask | filter mask |
void U4DEngine::U4DStaticAction::setCollisionNormalFaceDirection | ( | U4DVector3n & | uNormalFaceDirection | ) |
Method which sets the collision normal face direction.
uNormalFaceDirection | 3D vector representing the normal face direction |
void U4DEngine::U4DStaticAction::setCollisionPenetrationDepth | ( | float | uPenetrationDepth | ) |
Method which sets the collision penetration depth.
uPenetrationDepth | Collision penetration depth |
void U4DEngine::U4DStaticAction::setIsCollisionSensor | ( | bool | uValue | ) |
Sets the entity as a collision sensor.
When an entity is set as a sensor, the engine will not compute a collision response for the entity. That is, it will not compute the resultant velocity and position
uValue | value |
void U4DEngine::U4DStaticAction::setModelHasCollided | ( | bool | uValue | ) |
Method which informs the engine that the model has collided.
uValue | If set to true, the model has collided |
void U4DEngine::U4DStaticAction::setModelHasCollidedBroadPhase | ( | bool | uValue | ) |
Method which informs the engine that the model has collided in broad phase stage.
uValue | If set to true, the model has collided |
void U4DEngine::U4DStaticAction::setNarrowPhaseBoundingVolumeVisibility | ( | bool | uValue | ) |
Methods which sets the visibility of the Narrow-Phase bounding volume.
uValue | The engine will render the narrow-phase bounding volume if set to true |
void U4DEngine::U4DStaticAction::setNormalForce | ( | U4DVector3n & | uNormalForce | ) |
Method which sets the Normal force.
uNormalForce | 3D vector representing the normal force |