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

The U4DEntity class is a Super-Class for all the entities in a game, such as 3D models, buttons, fonts, etc. More...

Inherited by U4DEngine::U4DButton, U4DEngine::U4DCamera, U4DEngine::U4DJoyStick, U4DEngine::U4DMacArrowKey, U4DEngine::U4DMacKey, U4DEngine::U4DMacMouse, U4DEngine::U4DPadButton, U4DEngine::U4DPadJoystick, U4DEngine::U4DParticle, and U4DEngine::U4DVisibleEntity.

Public Member Functions

 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...
 
virtual void viewInDirection (U4DVector3n &uDestinationPoint)
 Method which sets the view direction of the entity. More...
 
virtual U4DVector3n getViewInDirection ()
 Method which rotates the view direction of the entiy. 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...
 
virtual void render (id< MTLRenderCommandEncoder > uRenderEncoder)
 Renders the current entity. More...
 
virtual void renderShadow (id< MTLRenderCommandEncoder > uRenderShadowEncoder, id< MTLTexture > uShadowTexture)
 Renders the shadow for a 3D entity. More...
 
virtual void update (double dt)
 Updates the state of each entity. More...
 
virtual void loadRenderingInformation ()
 Loads all rendering information for the entiy.
 
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 isCollisionBehaviorEnabled ()
 Method which returns if the model can detect collisions. More...
 
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...
 

Public Attributes

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

U4DVector3n localOrientation
 Entity local orientation.
 
U4DVector3n localPosition
 Entity local position.
 
U4DVector3n absoluteOrientation
 Entity absolute orientation.
 
U4DVector3n absolutePosition
 Entity absolute position.
 

Detailed Description

The U4DEntity class is a Super-Class for all the entities in a game, such as 3D models, buttons, fonts, etc.

Member Function Documentation

◆ addChild() [1/3]

void U4DEngine::U4DEntity::addChild ( U4DEntity uChild)

Method which adds a child entity to a scenegraph.

Parameters
uChildChild entity to add to scenegraph

◆ addChild() [2/3]

void U4DEngine::U4DEntity::addChild ( U4DEntity uChild,
U4DEntity uNext 
)

Method which adds a child entity to a scenegraph at a particular location.

Parameters
uChildChild entity to add to scenegraph
uNextlocation to insert child

◆ addChild() [3/3]

void U4DEngine::U4DEntity::addChild ( U4DEntity uChild,
int  uZDepth 
)

Method which adds a child entity to a scenegraph at a particular location.

Parameters
uChildChild entity to add to scenegraph
uZDepthlocation to insert child

◆ changeLastDescendant()

void U4DEngine::U4DEntity::changeLastDescendant ( U4DEntity uNewLastDescendant)

Method which changes the entity's last descendant in the scenegraph.

Parameters
uNewLastDescendantLast descendant of the entity

◆ changeState() [1/4]

virtual void U4DEngine::U4DEntity::changeState ( TOUCHSTATE &  uTouchState,
U4DVector3n uTouchPosition 
)
inlinevirtual

Changes the state of the button depending on the touch position.

It checks if the user input touch coordinates falls within the location of the buttons

Parameters
uTouchStatetouch state such as began, ended, released
uTouchPositionposition of touch

Reimplemented in U4DEngine::U4DJoyStick, and U4DEngine::U4DButton.

◆ changeState() [2/4]

virtual void U4DEngine::U4DEntity::changeState ( GAMEPADACTION &  uGamePadAction,
const U4DPadAxis uPadAxis 
)
inlinevirtual

Update the state of the controller pad.

It changes the state of the controller such as pressed, released or moved

Parameters
uGamePadActionaction on the pad
uPadAxismovement direction vector

◆ changeState() [3/4]

virtual void U4DEngine::U4DEntity::changeState ( KEYBOARDACTION &  uKeyboardAction,
const U4DVector2n uPadAxis 
)
inlinevirtual

Updates the state of the controller.

It changes the state of the controller such as if the key is pressed or released

Parameters
uKeyboardActionaction on the key
uPadAxis[description]

◆ changeState() [4/4]

virtual void U4DEngine::U4DEntity::changeState ( MOUSEACTION &  uMouseAction,
const U4DVector2n uMouseAxis 
)
inlinevirtual

Updates the state of the controller.

It changes the state of the controller such as if the mouse is moved, a pressed began or ended

Parameters
uMouseActionaction on the mouse
uMouseAxisthe movement direction vector of the mouse

◆ getAbsoluteMatrixOrientation()

U4DMatrix3n U4DEngine::U4DEntity::getAbsoluteMatrixOrientation ( )

Method which returns the absolute orientation of the Entity.

Returns
Returns the absolute orientation of the Entity in 3x3 matrix format

◆ getAbsoluteOrientation()

U4DVector3n U4DEngine::U4DEntity::getAbsoluteOrientation ( )

Method which returns the absolute orientation of the Entity.

Returns
Absolute orientation in 3D vector representation

◆ getAbsolutePosition()

U4DVector3n U4DEngine::U4DEntity::getAbsolutePosition ( )

Method which returns the absolute position of the Entity.

Returns
Absolute position in 3D vector representation

◆ getAbsoluteSpace()

U4DDualQuaternion U4DEngine::U4DEntity::getAbsoluteSpace ( )

Method which returns the absolute space of the Entity.

Returns
Returns the absolute space of the Entity

◆ getAbsoluteSpaceOrientation()

U4DQuaternion U4DEngine::U4DEntity::getAbsoluteSpaceOrientation ( )

Method which returns the absolute orientation space of the Entity.

Returns
Returns the absolute space orientation of the Entity

◆ getAbsoluteSpacePosition()

U4DQuaternion U4DEngine::U4DEntity::getAbsoluteSpacePosition ( )

Method which returns the absolute position space of the Entity.

Returns
Returns the absolute space position of the Entity

◆ getEntityForwardVector()

U4DVector3n U4DEngine::U4DEntity::getEntityForwardVector ( )

Method which returns the forwad vector of the Entity.

Returns
Forward vector of the Entity

◆ getEntityType()

ENTITYTYPE U4DEngine::U4DEntity::getEntityType ( )

Method which returns the type of the Entity.

Returns
Returns the type of the Entity

◆ getFirstChild()

U4DEntity * U4DEngine::U4DEntity::getFirstChild ( )

Method which returns the entity's first child in the scenegraph.

Returns
Returns the entity's first child

◆ getKeyboardElementType()

virtual KEYBOARDELEMENT U4DEngine::U4DEntity::getKeyboardElementType ( )
inlinevirtual

Gets a keyboard element

a keyboard element can be a key or arrow

Returns
keyboard element

◆ getLastChild()

U4DEntity * U4DEngine::U4DEntity::getLastChild ( )

Method which returns the entity's last child in the scenegraph.

Returns
Returns the entity's last child

◆ getLocalMatrixOrientation()

U4DMatrix3n U4DEngine::U4DEntity::getLocalMatrixOrientation ( )

Method which returns the local orientation of the Entity.

Returns
Returns the local orientation of the Entity in 3x3 matrix format

◆ getLocalOrientation()

U4DVector3n U4DEngine::U4DEntity::getLocalOrientation ( )

Method which returns the Local orientation of the Entity.

Returns
Local orientation in 3D vector representation

◆ getLocalPosition()

U4DVector3n U4DEngine::U4DEntity::getLocalPosition ( )

Method which returns the local position of the Entity.

Returns
Local position in 3D vector representation

◆ getLocalSpaceOrientation()

U4DQuaternion U4DEngine::U4DEntity::getLocalSpaceOrientation ( )

Method which returns the local orientation space of the Entity.

Returns
Returns the local space orientation of the Entity

◆ getLocalSpacePosition()

U4DQuaternion U4DEngine::U4DEntity::getLocalSpacePosition ( )

Method which returns the local position space of the Entity.

Returns
Returns the local space position of the Entity

◆ getMouseElementType()

virtual MOUSEELEMENT U4DEngine::U4DEntity::getMouseElementType ( )
inlinevirtual

gets the mouse element

a mouse element can be the left or right button

Returns
mouse element

◆ getName()

std::string U4DEngine::U4DEntity::getName ( )

Method which returns the name of the Entity.

Returns
Returns the name of the Entity

◆ getNextSibling()

U4DEntity * U4DEngine::U4DEntity::getNextSibling ( )

Method which returns the entity's next sibling in the scenegraph.

Returns
Returns the entity's next sibling

◆ getPadElementType()

virtual GAMEPADELEMENT U4DEngine::U4DEntity::getPadElementType ( )
inlinevirtual

Gets the game pad element.

A pad element can be a key or joystick

Returns
game pad element

◆ getParent()

U4DEntity * U4DEngine::U4DEntity::getParent ( )

Gets the parent to the entity.

Returns
pointer to the entity parent

◆ getPrevSibling()

U4DEntity * U4DEngine::U4DEntity::getPrevSibling ( )

Method which returns the entity's previous sibling in the scenegraph.

Returns
Returns the entity's previous sibling

◆ getRootParent()

U4DEntity * U4DEngine::U4DEntity::getRootParent ( )

Gets the root parent (top parent in the scenegraph) of the entity.

Returns
pointer to the root parent

◆ getViewInDirection()

virtual U4DVector3n U4DEngine::U4DEntity::getViewInDirection ( )
inlinevirtual

Method which rotates the view direction of the entiy.

Returns
Returns a 3D vector representing the view direction of the entity

Reimplemented in U4DEngine::U4DModel, U4DEngine::U4DLights, and U4DEngine::U4DCamera.

◆ getZDepth()

int U4DEngine::U4DEntity::getZDepth ( )

Gets the z-depth value used for rendering ordering.

Returns
z-depth value

◆ isCollisionBehaviorEnabled()

virtual bool U4DEngine::U4DEntity::isCollisionBehaviorEnabled ( )
inlinevirtual

Method which returns if the model can detect collisions.

Returns
Returns true if the model can detect collisions

Reimplemented in U4DEngine::U4DStaticModel.

◆ isKineticsBehaviorEnabled()

virtual bool U4DEngine::U4DEntity::isKineticsBehaviorEnabled ( )
inlinevirtual

Method which returns if kinetics behavior are allowed to act on the 3D model.

Returns
Returns true if kinetics behavior are allowed to act on the 3D model

Reimplemented in U4DEngine::U4DDynamicModel.

◆ isLeaf()

bool U4DEngine::U4DEntity::isLeaf ( )

Method which returns true if the entity represents a leaf node in the scenegraph.

Returns
Returns true if the entity represents a leaf node in the scenegraph

◆ isRoot()

bool U4DEngine::U4DEntity::isRoot ( )

Method which returns true if the entity represents a root node in the scenegraph.

Returns
Returns true if the entity represents a root node in the scenegraph

◆ loadIntoCollisionEngine()

virtual void U4DEngine::U4DEntity::loadIntoCollisionEngine ( U4DEntityManager uEntityManager)
inlinevirtual

Self load 3D model into the collision engine.

Parameters
uEntityManagerpointer to the entity manager

Reimplemented in U4DEngine::U4DDynamicModel.

◆ loadIntoPhysicsEngine()

virtual void U4DEngine::U4DEntity::loadIntoPhysicsEngine ( U4DEntityManager uEntityManager,
float  dt 
)
inlinevirtual

Self load 3D model into the physics engine.

Parameters
uEntityManagerpointer to the entity manager
dttime step

Reimplemented in U4DEngine::U4DDynamicModel.

◆ loadIntoVisibilityManager()

virtual void U4DEngine::U4DEntity::loadIntoVisibilityManager ( U4DEntityManager uEntityManager)
inlinevirtual

self load 3d model into the visibility manager

Parameters
uEntityManagerpointer to the entity manager

Reimplemented in U4DEngine::U4DDynamicModel.

◆ nextInPreOrderTraversal()

U4DEntity * U4DEngine::U4DEntity::nextInPreOrderTraversal ( )

Method which returns the entity's next pointer in pre-order traversal order.

Returns
Returns the entity's next pointer in pre-order traversal order

◆ operator=()

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

Entity Copy Constructor.

Parameters
valueEntity to copy to
Returns
Returns a copy of the Entity object

◆ prevInPreOrderTraversal()

U4DEntity * U4DEngine::U4DEntity::prevInPreOrderTraversal ( )

Method which returns the entity's previous sibling in pre-order traversal order.

Returns
Returns the entity's previous sibling in pre-order traversal order

◆ removeChild()

void U4DEngine::U4DEntity::removeChild ( U4DEntity uChild)

Method which removes a child entity from the scenegraph.

Parameters
uChildChild entity to remove from the scenegraph

◆ render()

virtual void U4DEngine::U4DEntity::render ( id< MTLRenderCommandEncoder >  uRenderEncoder)
inlinevirtual

Renders the current entity.

Updates the space matrix, any rendering flags, bones and shadows properties. It encodes the pipeline, buffers and issues the draw command

Parameters
uRenderEncoderMetal encoder object for the current entity

Reimplemented in U4DEngine::U4DJoyStick, U4DEngine::U4DModel, U4DEngine::U4DWorld, U4DEngine::U4DParticleSystem, U4DEngine::U4DText, U4DEngine::U4DButton, U4DEngine::U4DLights, U4DEngine::U4DVisibleEntity, U4DEngine::U4DSprite, U4DEngine::U4DImage, U4DEngine::U4DSkybox, and U4DEngine::U4DMultiImage.

◆ renderShadow()

virtual void U4DEngine::U4DEntity::renderShadow ( id< MTLRenderCommandEncoder >  uRenderShadowEncoder,
id< MTLTexture >  uShadowTexture 
)
inlinevirtual

Renders the shadow for a 3D entity.

Updates the shadow space matrix, any rendering flags. It also sends the attributes and space uniforms to the GPU

Parameters
uRenderShadowEncoderMetal encoder object for the current entity
uShadowTextureTexture shadow for the current entity

Reimplemented in U4DEngine::U4DModel, and U4DEngine::U4DVisibleEntity.

◆ rotateAboutAxis() [1/2]

void U4DEngine::U4DEntity::rotateAboutAxis ( float  angle,
U4DVector3n axisOrientation,
U4DVector3n axisPosition 
)

Method which rotates entity about an axis.

Parameters
angleAngle representing rotation
axisOrientationAxis of rotation
axisPositionPosition of rotation axis

◆ rotateAboutAxis() [2/2]

void U4DEngine::U4DEntity::rotateAboutAxis ( U4DQuaternion uOrientation,
U4DVector3n axisPosition 
)

Method which rotates entity about an axis.

Parameters
uOrientationOrientation to rotate
axisPositionPosition of axis

◆ rotateBy() [1/3]

void U4DEngine::U4DEntity::rotateBy ( U4DQuaternion rotation)

Method which rotates entity by a certain amount.

Parameters
rotationQuaternion representing orientation

◆ rotateBy() [2/3]

void U4DEngine::U4DEntity::rotateBy ( float  angle,
U4DVector3n axis 
)

Method which rotates entity by certain amount.

Parameters
angleAngle of rotation
axisAxis of rotation

◆ rotateBy() [3/3]

void U4DEngine::U4DEntity::rotateBy ( float  angleX,
float  angleY,
float  angleZ 
)

Method which rotates entity by a certain amount.

Parameters
angleXAngle of rotation along x-axis
angleYAngle of rotation along y-axis
angleZAngle of rotation along z-axis

◆ rotateTo() [1/3]

void U4DEngine::U4DEntity::rotateTo ( U4DQuaternion rotation)

Method which rotates entity to a new orientation.

Parameters
rotationQuaternion representing orientation

◆ rotateTo() [2/3]

void U4DEngine::U4DEntity::rotateTo ( float  angle,
U4DVector3n axis 
)

Method which rotates entity to a new orientation.

Parameters
angleAngle of rotation
axisAsis of rotation

◆ rotateTo() [3/3]

void U4DEngine::U4DEntity::rotateTo ( float  angleX,
float  angleY,
float  angleZ 
)

Method which rotates entity to a new orientation.

Parameters
angleXAngle of rotation along the x-axis
angleYAngle of rotation along the y-axis
angleZAngle of rotation along the z-axis

◆ searchChild()

U4DEntity * U4DEngine::U4DEntity::searchChild ( std::string  uName)

Searches for an entity.

Parameters
uNamename of the entity
Returns
pointer to the entity

◆ setEntityForwardVector()

void U4DEngine::U4DEntity::setEntityForwardVector ( U4DVector3n uForwardVector)

Method which sets the forward vectof of the Entity. The default value is (0.0,0.0,-1.0)

Parameters
uForwardVectorForward vector for entity

◆ setEntityType()

void U4DEngine::U4DEntity::setEntityType ( ENTITYTYPE  uType)

Method which sets the type of the Entity.

Parameters
uTypeType of the Entity

◆ setLocalSpace() [1/2]

void U4DEngine::U4DEntity::setLocalSpace ( U4DDualQuaternion uLocalSpace)

Method which sets the local space of the Entity.

Parameters
uLocalSpaceLocal space of the Entity in Dual-Quaternion form

◆ setLocalSpace() [2/2]

void U4DEngine::U4DEntity::setLocalSpace ( U4DMatrix4n uMatrix)

Method which sets the local space of the Entity.

Parameters
uMatrixLocal space of the Entity in 4x4 Matrix form

◆ setLocalSpaceOrientation()

void U4DEngine::U4DEntity::setLocalSpaceOrientation ( U4DQuaternion uOrientation)

Method which sets the local space orientation of the Entity.

Parameters
uOrientationLocal space orientation for the Entity

◆ setLocalSpacePosition()

void U4DEngine::U4DEntity::setLocalSpacePosition ( U4DQuaternion uPosition)

Method which sets the local space position of the Entity.

Parameters
uPositionLocal space position for the Entity

◆ setName()

void U4DEngine::U4DEntity::setName ( std::string  uName)

Method which sets the name of the Entity.

Parameters
uNameName for the Entity

◆ setZDepth()

void U4DEngine::U4DEntity::setZDepth ( int  uZDepth)

Sets the z-depth value used for rendering ordering.

Parameters
uZDepthz-depth value. Default is 100

◆ translateBy() [1/2]

void U4DEngine::U4DEntity::translateBy ( float  x,
float  y,
float  z 
)

Method which translates entity by certain amount.

Parameters
xTranslaiion along x-coordinate
yTranslation along y-coordinate
zTranslation along z-coordinate

◆ translateBy() [2/2]

void U4DEngine::U4DEntity::translateBy ( U4DVector3n translation)

Method which translates entity by a certain amount.

Parameters
translation3D vector offset translation

◆ translateTo() [1/3]

void U4DEngine::U4DEntity::translateTo ( U4DVector3n translation)

Method which translates entity to a new position.

Parameters
translation3D vector translation

◆ translateTo() [2/3]

void U4DEngine::U4DEntity::translateTo ( float  x,
float  y,
float  z 
)

Method which translates entity to a new position.

Parameters
xTranslation along x-coordinate
yTranslation along y-coordinate
zTranalation along z-coordinate

◆ translateTo() [3/3]

void U4DEngine::U4DEntity::translateTo ( U4DVector2n translation)

Method which translates entity to a new position.

Parameters
Translation2D vector translation

◆ update()

virtual void U4DEngine::U4DEntity::update ( double  dt)
inlinevirtual

◆ viewInDirection()

virtual void U4DEngine::U4DEntity::viewInDirection ( U4DVector3n uDestinationPoint)
inlinevirtual

Method which sets the view direction of the entity.

Parameters
uDestinationPointView direction of entity

Reimplemented in U4DEngine::U4DModel, U4DEngine::U4DCamera, and U4DEngine::U4DLights.