Untold Engine  Beta v0.0.12
API Documentation
U4DEngine::U4DStaticModel Class Reference

The U4DStaticModel class represents a 3D static model entity. More...

Inherits U4DEngine::U4DModel.

Inherited by U4DEngine::U4DDynamicModel.

Public Member Functions

 U4DStaticModel ()
 Constructor for the class.
 
 ~U4DStaticModel ()
 Destructor for the class.
 
 U4DStaticModel (const U4DStaticModel &value)
 Copy constructor.
 
U4DStaticModeloperator= (const U4DStaticModel &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...
 
U4DBoundingVolumegetNarrowPhaseBoundingVolume ()
 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...
 
U4DBoundingVolumegetBroadPhaseBoundingVolume ()
 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< U4DVector3ngetCollisionContactPoints ()
 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...
 
U4DVector3n getModelDimensions ()
 Get the 3D dimensions. More...
 
void setIsCollisionSensor (bool uValue)
 Sets the entity as a collision sensor. More...
 
bool getIsCollisionSensor ()
 Is the entity a collision sensor. More...
 
void addToCollisionList (U4DStaticModel *uModel)
 Add all the 3D models the entity is currently colliding. More...
 
void addToBroadPhaseCollisionList (U4DStaticModel *uModel)
 Add all the 3D models the entity is currently colliding in broad phase collision. More...
 
std::vector< U4DStaticModel * > getCollisionList ()
 Gets a list of all entities currently colliding with the entity. More...
 
std::vector< U4DStaticModel * > 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...
 
void enableMeshManager (int uSubDivisions)
 Enables the mesh manager to build an octree. More...
 
U4DMeshOctreeManagergetMeshOctreeManager ()
 gets a pointer to the mesh manager in charge of building an octree
 
- Public Member Functions inherited from U4DEngine::U4DModel
 U4DModel ()
 Constructor for the class.
 
 ~U4DModel ()
 Destructor for the class.
 
 U4DModel (const U4DModel &value)
 Copy constructor for the class.
 
U4DModeloperator= (const U4DModel &value)
 Copy constructor for the class. More...
 
virtual void update (double dt)
 Method which updates the state of the 3D model. More...
 
void render (id< MTLRenderCommandEncoder > uRenderEncoder)
 Renders the current entity. More...
 
void renderShadow (id< MTLRenderCommandEncoder > uRenderShadowEncoder, id< MTLTexture > uShadowTexture)
 Renders the shadow for a 3D entity. More...
 
void setNormalMapTexture (std::string uTexture)
 sets the Normal Map texture used for the 3d model More...
 
void setEnableNormalMap (bool uValue)
 enable Normal Map rendering More...
 
bool getEnableNormalMap ()
 gets if Normal Map rendering is enabled More...
 
void setEnableShadow (bool uValue)
 Enables shadow rendering on the 3d model. More...
 
bool getEnableShadow ()
 gets if shadow rendering has been enabled on the 3d model More...
 
void setHasNormalMap (bool uValue)
 Informs the engine that the 3d model contains Normal Map texture. More...
 
bool getHasNormalMap ()
 returns true if the 3D model has Normal Map texture More...
 
void computeNormalMapTangent ()
 computes the Normal map tangent vectors More...
 
void setHasMaterial (bool uValue)
 Informs the engine that the 3D model contains material color information. More...
 
void setHasTexture (bool uValue)
 Informs the engine that the 3D model contains texture information. More...
 
void setHasAnimation (bool uValue)
 Method to inform the engine that the 3D model contains animation information. More...
 
void setHasArmature (bool uValue)
 Method to inform the engine that the 3D model contains armature information. More...
 
bool getHasMaterial ()
 Method which returns true if the 3D model has material color information. More...
 
bool getHasTexture ()
 Method which returns true if the 3D model has texture information. More...
 
bool getHasAnimation ()
 Method which returns true if the 3D model has animation information. More...
 
bool getHasArmature ()
 Method which returns true if the 3D model has armature information. More...
 
U4DVector3n getViewInDirection ()
 Method which returns a 3D vector representing the current view-direction of the 3D model. More...
 
void viewInDirection (U4DVector3n &uDestinationPoint)
 Method which sets the view-direction of the 3D model. More...
 
U4DDualQuaternion getBoneAnimationSpace (std::string uName)
 Gets the pose animation space of the bone. More...
 
void setModelVisibility (bool uValue)
 set if the model should be rendered or not depending if it lies within frustum
 
void initCullingBoundingVolume ()
 Method which initialized the boundary volume used for frustum culling.
 
void setCullingPhaseBoundingVolumeVisibility (bool uValue)
 Methods which sets the visibility of the Culling-Phase bounding volume. More...
 
void updateCullingPhaseBoundingVolumeSpace ()
 Method which updates the culling-phase bounding volume space.
 
U4DBoundingVolumegetCullingPhaseBoundingVolume ()
 Method which returns the culling-phase bounding volume. More...
 
bool getCullingPhaseBoundingVolumeVisibility ()
 Method which returns if the engine should render the culling-phase bounding volume. More...
 
- Public Member Functions inherited from U4DEngine::U4DVisibleEntity
 U4DVisibleEntity ()
 Constructor for the class.
 
virtual ~U4DVisibleEntity ()
 Destructor for the class.
 
 U4DVisibleEntity (const U4DVisibleEntity &value)
 Copy constructor for the visible entity.
 
U4DVisibleEntityoperator= (const U4DVisibleEntity &value)
 Copy constructor for the visible entity. More...
 
void loadRenderingInformation ()
 Method which loads all rendering information for the entiy.
 
void setShader (std::string uVertexShaderName, std::string uFragmentShaderName)
 sets the shader used for rendering the entity More...
 
std::string getVertexShader ()
 get the name of the vertex shader More...
 
std::string getFragmentShader ()
 get the name of the fragment shader More...
 
- Public Member Functions inherited from U4DEngine::U4DEntity
 U4DEntity ()
 Entity Constructor. It creates the entity with the local orientation set to zero and local position set to the origin. The forwad vector is set to (0.0,0.0,-1.0). Parent and Next pointer set to null.
 
 ~U4DEntity ()
 Entity Destructor.
 
 U4DEntity (const U4DEntity &value)
 Entity Copy Constructor.
 
U4DEntityoperator= (const U4DEntity &value)
 Entity Copy Constructor. More...
 
void setName (std::string uName)
 Method which sets the name of the Entity. More...
 
std::string getName ()
 Method which returns the name of the Entity. More...
 
void setEntityType (ENTITYTYPE uType)
 Method which sets the type of the Entity. More...
 
ENTITYTYPE getEntityType ()
 Method which returns the type of the Entity. More...
 
void setLocalSpace (U4DDualQuaternion &uLocalSpace)
 Method which sets the local space of the Entity. More...
 
void setLocalSpace (U4DMatrix4n &uMatrix)
 Method which sets the local space of the Entity. More...
 
U4DDualQuaternion getLocalSpace ()
 
U4DDualQuaternion getAbsoluteSpace ()
 Method which returns the absolute space of the Entity. More...
 
U4DQuaternion getLocalSpaceOrientation ()
 Method which returns the local orientation space of the Entity. More...
 
U4DQuaternion getLocalSpacePosition ()
 Method which returns the local position space of the Entity. More...
 
U4DQuaternion getAbsoluteSpaceOrientation ()
 Method which returns the absolute orientation space of the Entity. More...
 
U4DQuaternion getAbsoluteSpacePosition ()
 Method which returns the absolute position space of the Entity. More...
 
void setLocalSpaceOrientation (U4DQuaternion &uOrientation)
 Method which sets the local space orientation of the Entity. More...
 
void setLocalSpacePosition (U4DQuaternion &uPosition)
 Method which sets the local space position of the Entity. More...
 
U4DVector3n getLocalOrientation ()
 Method which returns the Local orientation of the Entity. More...
 
U4DVector3n getLocalPosition ()
 Method which returns the local position of the Entity. More...
 
U4DVector3n getAbsoluteOrientation ()
 Method which returns the absolute orientation of the Entity. More...
 
U4DVector3n getAbsolutePosition ()
 Method which returns the absolute position of the Entity. More...
 
U4DVector3n getEntityForwardVector ()
 Method which returns the forwad vector of the Entity. More...
 
void setEntityForwardVector (U4DVector3n &uForwardVector)
 Method which sets the forward vectof of the Entity. The default value is (0.0,0.0,-1.0) More...
 
U4DMatrix3n getAbsoluteMatrixOrientation ()
 Method which returns the absolute orientation of the Entity. More...
 
U4DMatrix3n getLocalMatrixOrientation ()
 Method which returns the local orientation of the Entity. More...
 
void translateTo (U4DVector3n &translation)
 Method which translates entity to a new position. More...
 
void translateTo (float x, float y, float z)
 Method which translates entity to a new position. More...
 
void translateTo (U4DVector2n &translation)
 Method which translates entity to a new position. More...
 
void translateBy (float x, float y, float z)
 Method which translates entity by certain amount. More...
 
void translateBy (U4DVector3n &translation)
 Method which translates entity by a certain amount. More...
 
void rotateTo (U4DQuaternion &rotation)
 Method which rotates entity to a new orientation. More...
 
void rotateBy (U4DQuaternion &rotation)
 Method which rotates entity by a certain amount. More...
 
void rotateTo (float angle, U4DVector3n &axis)
 Method which rotates entity to a new orientation. More...
 
void rotateBy (float angle, U4DVector3n &axis)
 Method which rotates entity by certain amount. More...
 
void rotateTo (float angleX, float angleY, float angleZ)
 Method which rotates entity to a new orientation. More...
 
void rotateBy (float angleX, float angleY, float angleZ)
 Method which rotates entity by a certain amount. More...
 
void rotateAboutAxis (float angle, U4DVector3n &axisOrientation, U4DVector3n &axisPosition)
 Method which rotates entity about an axis. More...
 
void rotateAboutAxis (U4DQuaternion &uOrientation, U4DVector3n &axisPosition)
 Method which rotates entity about an axis. More...
 
void addChild (U4DEntity *uChild)
 Method which adds a child entity to a scenegraph. More...
 
void addChild (U4DEntity *uChild, U4DEntity *uNext)
 Method which adds a child entity to a scenegraph at a particular location. More...
 
void addChild (U4DEntity *uChild, int uZDepth)
 Method which adds a child entity to a scenegraph at a particular location. More...
 
void removeChild (U4DEntity *uChild)
 Method which removes a child entity from the scenegraph. More...
 
void changeLastDescendant (U4DEntity *uNewLastDescendant)
 Method which changes the entity's last descendant in the scenegraph. More...
 
U4DEntitygetFirstChild ()
 Method which returns the entity's first child in the scenegraph. More...
 
U4DEntitygetLastChild ()
 Method which returns the entity's last child in the scenegraph. More...
 
U4DEntitygetNextSibling ()
 Method which returns the entity's next sibling in the scenegraph. More...
 
U4DEntitygetPrevSibling ()
 Method which returns the entity's previous sibling in the scenegraph. More...
 
U4DEntityprevInPreOrderTraversal ()
 Method which returns the entity's previous sibling in pre-order traversal order. More...
 
U4DEntitynextInPreOrderTraversal ()
 Method which returns the entity's next pointer in pre-order traversal order. More...
 
bool isLeaf ()
 Method which returns true if the entity represents a leaf node in the scenegraph. More...
 
bool isRoot ()
 Method which returns true if the entity represents a root node in the scenegraph. More...
 
U4DEntitygetParent ()
 Gets the parent to the entity. More...
 
U4DEntitygetRootParent ()
 Gets the root parent (top parent in the scenegraph) of the entity. More...
 
U4DEntitysearchChild (std::string uName)
 Searches for an entity. More...
 
void setZDepth (int uZDepth)
 Sets the z-depth value used for rendering ordering. More...
 
int getZDepth ()
 Gets the z-depth value used for rendering ordering. More...
 
virtual void loadIntoCollisionEngine (U4DEntityManager *uEntityManager)
 Self load 3D model into the collision engine. More...
 
virtual void loadIntoPhysicsEngine (U4DEntityManager *uEntityManager, float dt)
 Self load 3D model into the physics engine. More...
 
virtual void loadIntoVisibilityManager (U4DEntityManager *uEntityManager)
 self load 3d model into the visibility manager More...
 
virtual void cleanUp ()
 clear collision information, resets time of impact, resets equilibrium, clears collision list
 
virtual bool isKineticsBehaviorEnabled ()
 Method which returns if kinetics behavior are allowed to act on the 3D model. More...
 
virtual void changeState (TOUCHSTATE &uTouchState, U4DVector3n &uTouchPosition)
 Changes the state of the button depending on the touch position. More...
 
virtual void changeState (GAMEPADACTION &uGamePadAction, const U4DPadAxis &uPadAxis)
 Update the state of the controller pad. More...
 
virtual void changeState (KEYBOARDACTION &uKeyboardAction, const U4DVector2n &uPadAxis)
 Updates the state of the controller. More...
 
virtual void changeState (MOUSEACTION &uMouseAction, const U4DVector2n &uMouseAxis)
 Updates the state of the controller. More...
 
virtual GAMEPADELEMENT getPadElementType ()
 Gets the game pad element. More...
 
virtual KEYBOARDELEMENT getKeyboardElementType ()
 Gets a keyboard element
More...
 
virtual MOUSEELEMENT getMouseElementType ()
 gets the mouse element More...
 

Additional Inherited Members

- Public Attributes inherited from U4DEngine::U4DModel
U4DVertexData bodyCoordinates
 Object which contains attribute data such as vertices, normals, uv-coordinates, bone indices, bone weights, etc.
 
U4DMaterialData materialInformation
 Object which contains material color information.
 
U4DTextureData textureInformation
 Object which contains texture information.
 
U4DArmatureDataarmatureManager
 Pointer to an armature object representing an armature manager.
 
U4DPolygonData polygonInformation
 Object with polygon (vertices, edges and faces) information.
 
std::vector< U4DMatrix4narmatureBoneMatrix
 Container holding armature bone matrix data.
 
- Public Attributes inherited from U4DEngine::U4DVisibleEntity
U4DRenderManagerrenderManager
 pointer to the rendering manager
 
- Public Attributes inherited from U4DEngine::U4DEntity
U4DDualQuaternion localSpace
 Local Space of the entity.
 
U4DDualQuaternion absoluteSpace
 Absolute Space of the entity.
 
U4DTransformationtransformation
 U4DTransformation object pointer in charge of translating/rotating the entity.
 
U4DVector3n entityForwardVector
 Forward vector of the entity. This is used to compute the view-direction vector.
 
U4DEntityparent
 Entity parent pointer.
 
U4DEntityprevSibling
 Entity previous sibling pointer.
 
U4DEntitynext
 Entity Next pointer.
 
U4DEntitylastDescendant
 Entity last descendant pointer.
 
- Protected Attributes inherited from U4DEngine::U4DVisibleEntity
std::string vertexShader
 name of the vertex shader used for rendering
 
std::string fragmentShader
 name of the fragment shader used for rendering
 
- Protected Attributes inherited from U4DEngine::U4DEntity
U4DVector3n localOrientation
 Entity local orientation.
 
U4DVector3n localPosition
 Entity local position.
 
U4DVector3n absoluteOrientation
 Entity absolute orientation.
 
U4DVector3n absolutePosition
 Entity absolute position.
 

Detailed Description

The U4DStaticModel class represents a 3D static model entity.

Member Function Documentation

◆ addCollisionContactPoint()

void U4DEngine::U4DStaticModel::addCollisionContactPoint ( U4DVector3n uContactPoint)

Method which adds collision contact points to a container.

Parameters
uContactPointcollision contact points to add to container

◆ addToBroadPhaseCollisionList()

void U4DEngine::U4DStaticModel::addToBroadPhaseCollisionList ( U4DStaticModel 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

Parameters
uModel3d model currently colliding

◆ addToCollisionList()

void U4DEngine::U4DStaticModel::addToCollisionList ( U4DStaticModel 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

Parameters
uModel3d model currently colliding

◆ clearBroadPhaseCollisionList()

void U4DEngine::U4DStaticModel::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

◆ clearCollisionList()

void U4DEngine::U4DStaticModel::clearCollisionList ( )

Clears the collision list.

The collision list keeps a list of all the 3D entities currently colliding with this entity

◆ enableCollisionBehavior()

void U4DEngine::U4DStaticModel::enableCollisionBehavior ( )

Enables the model to detect collisions.

enables the model to collide with other convex objects.

◆ enableMeshManager()

void U4DEngine::U4DStaticModel::enableMeshManager ( int  uSubDivisions)

Enables the mesh manager to build an octree.

Builds an octree for the 3D model using AABB boxes

Parameters
uSubDivisionsThe subdivisions used for the octree. 1 subdivision=9 nodes, 2 subdivisions=73 node, 3 subdivisions=585 nodes

◆ getBroadPhaseBoundingVolume()

U4DBoundingVolume * U4DEngine::U4DStaticModel::getBroadPhaseBoundingVolume ( )

Method which returns the broad-phase bounding volume.

Returns
Returns the broad-phase bounding volume

◆ getBroadPhaseBoundingVolumeVisibility()

bool U4DEngine::U4DStaticModel::getBroadPhaseBoundingVolumeVisibility ( )

Method which returns if the engine should render the broad-phase bounding volume.

Returns
Returns true if the engine should render the broad-phase bounding volume

◆ getBroadPhaseCollisionList()

std::vector< U4DStaticModel * > U4DEngine::U4DStaticModel::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

Returns
vector with a list of entities

◆ getCenterOfMass()

U4DVector3n U4DEngine::U4DStaticModel::getCenterOfMass ( )

Method which returns the center of mass of the model.

Returns
Returns the center of mass of the model

◆ getCoefficientOfRestitution()

float U4DEngine::U4DStaticModel::getCoefficientOfRestitution ( )

Method which returns the coefficient of restitution of the model.

Returns
Returns the coefficient of restitution of the model

◆ getCollidingTag()

std::string U4DEngine::U4DStaticModel::getCollidingTag ( )

Gets the collision tag.

The collision tag can be used to determine exactly who is the entity colliding with

Returns
tag name

◆ getCollisionContactPoints()

std::vector< U4DVector3n > U4DEngine::U4DStaticModel::getCollisionContactPoints ( )

Method which returns the collision contact points.

Returns
Returns the collision contact points

◆ getCollisionFilterCategory()

int U4DEngine::U4DStaticModel::getCollisionFilterCategory ( )

Get the collision filter category for the entity.

The filter category refers to "I am of type..."

Returns
filter category

◆ getCollisionFilterGroupIndex()

signed int U4DEngine::U4DStaticModel::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.

Returns
filter group

◆ getCollisionFilterMask()

int U4DEngine::U4DStaticModel::getCollisionFilterMask ( )

Get the collision filter mask for the entity

the filter mask refers to "I collide with types of..."

Returns
filter mask

◆ getCollisionList()

std::vector< U4DStaticModel * > U4DEngine::U4DStaticModel::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

Returns
vector with a list of entities

◆ getCollisionNormalFaceDirection()

U4DVector3n U4DEngine::U4DStaticModel::getCollisionNormalFaceDirection ( )

Method which returns the collision normal face direction vector.

Returns
Returns 3D vector representing the collision normal face direction vector

◆ getCollisionPenetrationDepth()

float U4DEngine::U4DStaticModel::getCollisionPenetrationDepth ( )

Method which returns the collision penetration depth.

Returns
Returns the collision penetration depth

◆ getConvexHullVertices()

std::vector< U4DVector3n > & U4DEngine::U4DStaticModel::getConvexHullVertices ( )

Method which returns the convex-hull vertices.

Returns
Returns the convex-hull vertices

◆ getConvexHullVerticesCount()

int U4DEngine::U4DStaticModel::getConvexHullVerticesCount ( )

Method which returns the convex-hull vertices count.

Returns
Return the convex-hull vertices count

◆ getInertiaTensorType()

INERTIATENSORTYPE U4DEngine::U4DStaticModel::getInertiaTensorType ( )

Method which returns the inertia tensor type of the model.

Returns
Returns the inertia tensor type. i.e., cubic, spherical or cylindrical

◆ getInverseMomentOfInertiaTensor()

U4DMatrix3n U4DEngine::U4DStaticModel::getInverseMomentOfInertiaTensor ( )

Method which returns a 3x3 matrix representing the inverse moment of inertia tensor.

Returns
Returns a 3x3 matrix representing the inverse moment of inertia tensor

◆ getIsCollisionSensor()

bool U4DEngine::U4DStaticModel::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

Returns
true if the entity is a collision sensor

◆ getIsPlatform()

bool U4DEngine::U4DStaticModel::getIsPlatform ( )

Method which returns if the model should be seens as a platform by the collision detection system.

Returns
Returns true if the model is a platform

◆ getMass()

float U4DEngine::U4DStaticModel::getMass ( ) const

Method which returns the mass of the model.

Returns
Returns the mass of the model

◆ getModelDimensions()

U4DVector3n U4DEngine::U4DStaticModel::getModelDimensions ( )

Get the 3D dimensions.

Gets the widht, length and depth dimensions of the 3D entity

Returns
vector with the dimensions

◆ getModelHasCollided()

bool U4DEngine::U4DStaticModel::getModelHasCollided ( )

Method which returns true if the model has collided.

Returns
Returns true if the model has collided

◆ getModelHasCollidedBroadPhase()

bool U4DEngine::U4DStaticModel::getModelHasCollidedBroadPhase ( )

Method which returns true if the model has collided in Broad Phase stage.

Returns
Returns true if the model has collided

◆ getMomentOfInertiaTensor()

U4DMatrix3n U4DEngine::U4DStaticModel::getMomentOfInertiaTensor ( )

Method which returns a 3x3 matrix representing the moment of inertia tensor.

Returns
Returns a 3x3 matrix representing the moment of inertia tensor

◆ getNarrowPhaseBoundingVolume()

U4DBoundingVolume * U4DEngine::U4DStaticModel::getNarrowPhaseBoundingVolume ( )

Method which returns the narrow-phase bounding volume.

Returns
Returns the narrow-phase bounding volume

◆ getNarrowPhaseBoundingVolumeVisibility()

bool U4DEngine::U4DStaticModel::getNarrowPhaseBoundingVolumeVisibility ( )

Method which returns if the engine should render the narrow-phase bounding volume.

Returns
Returns true if the engine should render the narrow-phase bounding volume

◆ getNormalForce()

U4DVector3n U4DEngine::U4DStaticModel::getNormalForce ( )

Method which returns a 3D vector representing the Normal force.

Returns
Returns a 3D vector representing the normal force

◆ initAsPlatform()

void U4DEngine::U4DStaticModel::initAsPlatform ( bool  uValue)

Method which sets the model as a platform.

Parameters
uValueSet to true if the collision detection system should treat this model as a floor/ground

◆ initCenterOfMass()

void U4DEngine::U4DStaticModel::initCenterOfMass ( U4DVector3n uCenterOfMass)

Method which sets the center of mass of the model.

Parameters
uCenterOfMassCenter of mass of the static model

◆ initCoefficientOfRestitution()

void U4DEngine::U4DStaticModel::initCoefficientOfRestitution ( float  uValue)

Method which sets the coefficient of restitution of the model.

Parameters
uValueCoefficient of restitution of the static model

◆ initInertiaTensorType()

void U4DEngine::U4DStaticModel::initInertiaTensorType ( INERTIATENSORTYPE  uInertiaTensorType)

Method which sets the Interta tensor type of the model.

Parameters
uInertiaTensorTypeInertia Tensor type. i.e., cubic, spherical or cylindrical

◆ initMass()

void U4DEngine::U4DStaticModel::initMass ( float  uMass)

Method which sets the mass of the model.

Parameters
uMassMass of the static model

◆ isCollisionBehaviorEnabled()

bool U4DEngine::U4DStaticModel::isCollisionBehaviorEnabled ( )
virtual

Method which returns if the model can detect collisions.

Returns
Returns true if the model can detect collisions

Reimplemented from U4DEngine::U4DEntity.

◆ operator=()

U4DStaticModel & U4DEngine::U4DStaticModel::operator= ( const U4DStaticModel value)

Copy constructor.

Parameters
value3D Static model object to copy to
Returns
Returns a copy of the 3D static model

◆ resumeCollisionBehavior()

void U4DEngine::U4DStaticModel::resumeCollisionBehavior ( )

Resumes the ability for the model to detect collisions.

informs the collision engine to re-start collision detection with this object.

◆ setBroadPhaseBoundingVolumeVisibility()

void U4DEngine::U4DStaticModel::setBroadPhaseBoundingVolumeVisibility ( bool  uValue)

Methods which sets the visibility of the Broad-Phase bounding volume.

Parameters
uValueThe engine will render the broad-phase bounding volume if set to true

◆ setCollidingTag()

void U4DEngine::U4DStaticModel::setCollidingTag ( std::string  uCollidingTag)

Sets a collision tag.

The collision tag can be used to determine exactly who is the entity colliding with

Parameters
uCollidingTagtag name

◆ setCollisionFilterCategory()

void U4DEngine::U4DStaticModel::setCollisionFilterCategory ( int  uFilterCategory)

Sets the filter category for collision.

The filter category refers to "I am of type...".

Parameters
uFilterCategoryfilter category

◆ setCollisionFilterGroupIndex()

void U4DEngine::U4DStaticModel::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.

Parameters
intgroup index

◆ setCollisionFilterMask()

void U4DEngine::U4DStaticModel::setCollisionFilterMask ( int  uFilterMask)

Set the filter mask for collision.

The filter mask refers to "I collide with types..."

Parameters
uFilterMaskfilter mask

◆ setCollisionNormalFaceDirection()

void U4DEngine::U4DStaticModel::setCollisionNormalFaceDirection ( U4DVector3n uNormalFaceDirection)

Method which sets the collision normal face direction.

Parameters
uNormalFaceDirection3D vector representing the normal face direction

◆ setCollisionPenetrationDepth()

void U4DEngine::U4DStaticModel::setCollisionPenetrationDepth ( float  uPenetrationDepth)

Method which sets the collision penetration depth.

Parameters
uPenetrationDepthCollision penetration depth

◆ setIsCollisionSensor()

void U4DEngine::U4DStaticModel::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

Parameters
uValuevalue

◆ setModelHasCollided()

void U4DEngine::U4DStaticModel::setModelHasCollided ( bool  uValue)

Method which informs the engine that the model has collided.

Parameters
uValueIf set to true, the model has collided

◆ setModelHasCollidedBroadPhase()

void U4DEngine::U4DStaticModel::setModelHasCollidedBroadPhase ( bool  uValue)

Method which informs the engine that the model has collided in broad phase stage.

Parameters
uValueIf set to true, the model has collided

◆ setNarrowPhaseBoundingVolumeVisibility()

void U4DEngine::U4DStaticModel::setNarrowPhaseBoundingVolumeVisibility ( bool  uValue)

Methods which sets the visibility of the Narrow-Phase bounding volume.

Parameters
uValueThe engine will render the narrow-phase bounding volume if set to true

◆ setNormalForce()

void U4DEngine::U4DStaticModel::setNormalForce ( U4DVector3n uNormalForce)

Method which sets the Normal force.

Parameters
uNormalForce3D vector representing the normal force