TDME2 1.9.121
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Friends | List of all members
Entity Class Referenceabstract

TDME engine entity. More...

#include <tdme/engine/Entity.h>

Inheritance diagram for Entity:
Inheritance graph
Collaboration diagram for Entity:
Collaboration graph

Public Types

enum  RenderPass {
  RENDERPASS_NONE = 0 , RENDERPASS_SKY = 1 , RENDERPASS_NOFRUSTUMCULLING = 1 , RENDERPASS_TERRAIN = 2 ,
  RENDERPASS_STANDARD = 4 , RENDERPASS_WATER = 8 , RENDERPASS_POST_POSTPROCESSING = 16
}
 
enum  EntityType {
  ENTITYTYPE_ENTITYHIERARCHY , ENTITYTYPE_ENVIRONMENTMAPPING , ENTITYTYPE_IMPOSTEROBJECT3D , ENTITYTYPE_LINESOBJECT3D ,
  ENTITYTYPE_LODOBJECT3D , ENTITYTYPE_LODOBJECT3DIMPOSTER , ENTITYTYPE_OBJECT3D , ENTITYTYPE_OBJECT3DRENDERGROUP ,
  ENTITYTYPE_FOGPARTICLESYSTEM , ENTITYTYPE_OBJECTPARTICLESYSTEM , ENTITYTYPE_PARTICLESYSTEMGROUP , ENTITYTYPE_POINTSPARTICLESYSTEM
}
 

Public Member Functions

virtual EntityType getEntityType ()=0
 
virtual void setEngine (Engine *engine)=0
 Set up engine. More...
 
virtual void setRenderer (Renderer *renderer)=0
 Set up renderer. More...
 
virtual const string & getId ()=0
 
virtual bool isEnabled ()=0
 
virtual void setEnabled (bool enabled)=0
 Enable/disable rendering. More...
 
virtual bool isFrustumCulling ()=0
 
virtual void setFrustumCulling (bool frustumCulling)=0
 Set frustum culling. More...
 
virtual bool isPickable ()=0
 
virtual void setPickable (bool pickable)=0
 Set this object pickable. More...
 
virtual bool isContributesShadows ()=0
 
virtual void setContributesShadows (bool contributesShadows)=0
 Enable/disable contributes shadows. More...
 
virtual bool isReceivesShadows ()=0
 
virtual void setReceivesShadows (bool receivesShadows)=0
 Enable/disable receives shadows. More...
 
virtual const Color4getEffectColorMul () const =0
 The effect color will be multiplied with fragment color. More...
 
virtual void setEffectColorMul (const Color4 &effectColorMul)=0
 Set effect color that will be multiplied with fragment color. More...
 
virtual const Color4getEffectColorAdd () const =0
 The effect color will be added to fragment color. More...
 
virtual void setEffectColorAdd (const Color4 &effectColorAdd)=0
 Set effect color that will be added to fragment color. More...
 
virtual void initialize ()=0
 Initiates this object 3d. More...
 
virtual void dispose ()=0
 Dispose this object 3d. More...
 
virtual BoundingBoxgetBoundingBox ()=0
 
virtual BoundingBoxgetBoundingBoxTransformed ()=0
 
virtual const Vector3getTranslation () const =0
 
virtual void setTranslation (const Vector3 &translation)=0
 Set translation. More...
 
virtual const Vector3getScale () const =0
 
virtual void setScale (const Vector3 &scale)=0
 Set scale. More...
 
virtual const Vector3getPivot () const =0
 
virtual void setPivot (const Vector3 &pivot)=0
 Set pivot. More...
 
virtual const int getRotationCount () const =0
 
virtual RotationgetRotation (const int idx)=0
 Get rotation at given index. More...
 
virtual void addRotation (const Vector3 &axis, const float angle)=0
 Add rotation. More...
 
virtual void removeRotation (int idx)=0
 Remove rotation. More...
 
virtual const Vector3getRotationAxis (const int idx) const =0
 
virtual void setRotationAxis (const int idx, const Vector3 &axis)=0
 Set rotation axis. More...
 
virtual const float getRotationAngle (const int idx) const =0
 
virtual void setRotationAngle (const int idx, const float angle)=0
 
virtual const QuaterniongetRotationsQuaternion () const =0
 
virtual const Matrix4x4getTransformationsMatrix () const =0
 
virtual void fromTransformations (const Transformations &transformations)=0
 Set up this transformations from given transformations. More...
 
virtual void update ()=0
 Update transformations. More...
 
virtual const TransformationsgetTransformations () const =0
 
virtual RenderPass getRenderPass () const =0
 
virtual void setRenderPass (RenderPass renderPass)=0
 Set render pass. More...
 
virtual ~Entity ()
 Destructor. More...
 

Static Public Attributes

static constexpr int RENDERPASS_MAX { 5 }
 
static constexpr int RENDERPASS_ALL { 1 + 2 + 4 + 8 + 16 }
 

Private Member Functions

virtual EntitygetParentEntity ()=0
 
virtual void setParentEntity (Entity *entity)=0
 Set parent entity, needs to be called before adding to engine. More...
 
virtual void applyParentTransformations (const Transformations &parentTransformations)=0
 Apply parent transformations. More...
 

Friends

class Engine
 
class EntityHierarchy
 
class ParticleSystemGroup
 
class SceneConnector
 

Detailed Description

TDME engine entity.

Author
Andreas Drewke
Version
$Id$

Definition at line 30 of file Entity.h.

Member Enumeration Documentation

◆ EntityType

enum EntityType
Enumerator
ENTITYTYPE_ENTITYHIERARCHY 
ENTITYTYPE_ENVIRONMENTMAPPING 
ENTITYTYPE_IMPOSTEROBJECT3D 
ENTITYTYPE_LINESOBJECT3D 
ENTITYTYPE_LODOBJECT3D 
ENTITYTYPE_LODOBJECT3DIMPOSTER 
ENTITYTYPE_OBJECT3D 
ENTITYTYPE_OBJECT3DRENDERGROUP 
ENTITYTYPE_FOGPARTICLESYSTEM 
ENTITYTYPE_OBJECTPARTICLESYSTEM 
ENTITYTYPE_PARTICLESYSTEMGROUP 
ENTITYTYPE_POINTSPARTICLESYSTEM 

Definition at line 60 of file Entity.h.

◆ RenderPass

enum RenderPass
Enumerator
RENDERPASS_NONE 
RENDERPASS_SKY 
RENDERPASS_NOFRUSTUMCULLING 
RENDERPASS_TERRAIN 
RENDERPASS_STANDARD 
RENDERPASS_WATER 
RENDERPASS_POST_POSTPROCESSING 

Definition at line 58 of file Entity.h.

Constructor & Destructor Documentation

◆ ~Entity()

virtual ~Entity ( )
inlinevirtual

Destructor.

Definition at line 320 of file Entity.h.

Member Function Documentation

◆ addRotation()

virtual void addRotation ( const Vector3 axis,
const float  angle 
)
pure virtual

◆ applyParentTransformations()

virtual void applyParentTransformations ( const Transformations parentTransformations)
privatepure virtual

◆ dispose()

virtual void dispose ( )
pure virtual

◆ fromTransformations()

virtual void fromTransformations ( const Transformations transformations)
pure virtual

Set up this transformations from given transformations.

Parameters
transformationstransformations

Implemented in EntityHierarchy, EnvironmentMapping, FogParticleSystem, ImposterObject3D, LinesObject3D, LODObject3D, LODObject3DImposter, Object3D, Object3DRenderGroup, ObjectParticleSystem, ParticleSystemGroup, and PointsParticleSystem.

◆ getBoundingBox()

virtual BoundingBox * getBoundingBox ( )
pure virtual

◆ getBoundingBoxTransformed()

virtual BoundingBox * getBoundingBoxTransformed ( )
pure virtual

◆ getEffectColorAdd()

virtual const Color4 & getEffectColorAdd ( ) const
pure virtual

◆ getEffectColorMul()

virtual const Color4 & getEffectColorMul ( ) const
pure virtual

◆ getEntityType()

virtual EntityType getEntityType ( )
pure virtual

◆ getId()

virtual const string & getId ( )
pure virtual

◆ getParentEntity()

virtual Entity * getParentEntity ( )
privatepure virtual

◆ getPivot()

virtual const Vector3 & getPivot ( ) const
pure virtual

◆ getRenderPass()

virtual RenderPass getRenderPass ( ) const
pure virtual

◆ getRotation()

virtual Rotation & getRotation ( const int  idx)
pure virtual

◆ getRotationAngle()

virtual const float getRotationAngle ( const int  idx) const
pure virtual

◆ getRotationAxis()

virtual const Vector3 & getRotationAxis ( const int  idx) const
pure virtual

◆ getRotationCount()

virtual const int getRotationCount ( ) const
pure virtual

◆ getRotationsQuaternion()

virtual const Quaternion & getRotationsQuaternion ( ) const
pure virtual

◆ getScale()

virtual const Vector3 & getScale ( ) const
pure virtual

◆ getTransformations()

virtual const Transformations & getTransformations ( ) const
pure virtual

◆ getTransformationsMatrix()

virtual const Matrix4x4 & getTransformationsMatrix ( ) const
pure virtual

◆ getTranslation()

virtual const Vector3 & getTranslation ( ) const
pure virtual

◆ initialize()

virtual void initialize ( )
pure virtual

◆ isContributesShadows()

virtual bool isContributesShadows ( )
pure virtual

◆ isEnabled()

virtual bool isEnabled ( )
pure virtual

◆ isFrustumCulling()

virtual bool isFrustumCulling ( )
pure virtual

◆ isPickable()

virtual bool isPickable ( )
pure virtual

◆ isReceivesShadows()

virtual bool isReceivesShadows ( )
pure virtual

◆ removeRotation()

virtual void removeRotation ( int  idx)
pure virtual

◆ setContributesShadows()

virtual void setContributesShadows ( bool  contributesShadows)
pure virtual

◆ setEffectColorAdd()

virtual void setEffectColorAdd ( const Color4 effectColorAdd)
pure virtual

◆ setEffectColorMul()

virtual void setEffectColorMul ( const Color4 effectColorMul)
pure virtual

Set effect color that will be multiplied with fragment color.

Parameters
effectColorMuleffect color

Implemented in EntityHierarchy, EnvironmentMapping, FogParticleSystem, ImposterObject3D, LinesObject3D, LODObject3D, LODObject3DImposter, Object3D, Object3DRenderGroup, ObjectParticleSystem, ParticleSystemGroup, and PointsParticleSystem.

◆ setEnabled()

virtual void setEnabled ( bool  enabled)
pure virtual

◆ setEngine()

virtual void setEngine ( Engine engine)
pure virtual

◆ setFrustumCulling()

virtual void setFrustumCulling ( bool  frustumCulling)
pure virtual

◆ setParentEntity()

virtual void setParentEntity ( Entity entity)
privatepure virtual

Set parent entity, needs to be called before adding to engine.

Parameters
entityentity

Implemented in EntityHierarchy, EnvironmentMapping, FogParticleSystem, ImposterObject3D, LinesObject3D, LODObject3D, LODObject3DImposter, Object3D, Object3DRenderGroup, ObjectParticleSystem, ParticleSystemGroup, and PointsParticleSystem.

◆ setPickable()

virtual void setPickable ( bool  pickable)
pure virtual

◆ setPivot()

virtual void setPivot ( const Vector3 pivot)
pure virtual

◆ setReceivesShadows()

virtual void setReceivesShadows ( bool  receivesShadows)
pure virtual

◆ setRenderer()

virtual void setRenderer ( Renderer renderer)
pure virtual

◆ setRenderPass()

virtual void setRenderPass ( RenderPass  renderPass)
pure virtual

◆ setRotationAngle()

virtual void setRotationAngle ( const int  idx,
const float  angle 
)
pure virtual
Parameters
idxrotation index
anglerotation angle
Returns
rotation angle for rotation with given index

Implemented in EntityHierarchy, EnvironmentMapping, FogParticleSystem, ImposterObject3D, LinesObject3D, LODObject3D, LODObject3DImposter, Object3D, Object3DRenderGroup, ObjectParticleSystem, ParticleSystemGroup, and PointsParticleSystem.

◆ setRotationAxis()

virtual void setRotationAxis ( const int  idx,
const Vector3 axis 
)
pure virtual

◆ setScale()

virtual void setScale ( const Vector3 scale)
pure virtual

◆ setTranslation()

virtual void setTranslation ( const Vector3 translation)
pure virtual

◆ update()

virtual void update ( )
pure virtual

Friends And Related Function Documentation

◆ Engine

friend class Engine
friend

Definition at line 32 of file Entity.h.

◆ EntityHierarchy

friend class EntityHierarchy
friend

Definition at line 33 of file Entity.h.

◆ ParticleSystemGroup

friend class ParticleSystemGroup
friend

Definition at line 34 of file Entity.h.

◆ SceneConnector

friend class SceneConnector
friend

Definition at line 35 of file Entity.h.

Member Data Documentation

◆ RENDERPASS_ALL

constexpr int RENDERPASS_ALL { 1 + 2 + 4 + 8 + 16 }
staticconstexpr

Definition at line 57 of file Entity.h.

◆ RENDERPASS_MAX

constexpr int RENDERPASS_MAX { 5 }
staticconstexpr

Definition at line 56 of file Entity.h.


The documentation for this class was generated from the following file: