IEntity

C++
struct IEntity {
  enum EEntityLoadFlags {
    EF_AUTO_PHYSICALIZE = 0x0001,
    EF_NO_STREAMING = 0x0002
  };
  enum EAttachmentFlags {
    ATTACHMENT_KEEP_TRANSFORMATION = BIT(0),
    ATTACHMENT_GEOMCACHENODE = BIT(1),
    ATTACHMENT_CHARACTERBONE = BIT(2)
  };
};
File

IEntity.h

Description

Interface to entity object.

IEntity::EAttachmentFlags Enumeration
C++
enum EAttachmentFlags {
  ATTACHMENT_KEEP_TRANSFORMATION = BIT(0),
  ATTACHMENT_GEOMCACHENODE = BIT(1),
  ATTACHMENT_CHARACTERBONE = BIT(2)
};
File

IEntity.h

Members
Members
Description
ATTACHMENT_KEEP_TRANSFORMATION = BIT(0)
Keeps world transformation of entity when attaching or detaching it.
ATTACHMENT_GEOMCACHENODE = BIT(1)
Attach to geom cache node
ATTACHMENT_CHARACTERBONE = BIT(2)
Attached to character bone
IEntity::EEntityLoadFlags Enumeration
C++
enum EEntityLoadFlags {
  EF_AUTO_PHYSICALIZE = 0x0001,
  EF_NO_STREAMING = 0x0002
};
File

IEntity.h

IEntity::~IEntity Destructor
C++
virtual ~IEntity();
IEntity::Activate Method
C++
virtual void Activate(bool bActive) = 0;
Description

Activates entity, if entity is active it will be updated every frame.

See Also
IEntity::AddEntityLink Method
C++
virtual IEntityLink* AddEntityLink(const char * sLinkName, EntityId entityId, EntityGUID entityGuid = 0) = 0;
IEntity::AddFlags Method
C++
virtual void AddFlags(uint32 flagsToAdd) = 0;
Parameters
Parameters
Description
uint32 flagsToAdd
Combination of bit flags to add.
Description

Adds flag/s to the current set of entity flags (logical OR).

IEntity::AttachChild Method
C++
virtual void AttachChild(IEntity * pChildEntity, const SChildAttachParams & attachParams = SChildAttachParams()) = 0;
Parameters
Parameters
Description
IEntity * pChildEntity
Child entity to attach.
const SChildAttachParams & attachParams = SChildAttachParams()
attachment parameters
Description

Attaches the child entity to this entity. The child entity will inherit all the transformation of the parent entity.

See Also
IEntity::CheckFlags Method
C++
virtual bool CheckFlags(uint32 flagsToCheck) const = 0;
Parameters
Parameters
Description
uint32 flagsToCheck
Combination of bit flags to check.
Description

Checks if the specified entity flag is set.

IEntity::ClearFlags Method
C++
virtual void ClearFlags(uint32 flagsToClear) = 0;
Parameters
Parameters
Description
uint32 flagsToClear
Combination of bit flags to remove.
Description

Removes flag/s from the current set of entity flags (logical AND NOT).

IEntity::CreateProxy Method
C++
virtual IEntityProxyPtr CreateProxy(EEntityProxy proxy) = 0;
Parameters
Parameters
Description
EEntityProxy proxy
Proxy interface identifier.
Returns

Valid pointer to the created entity proxy object, or NULL if creation failed.

Description

Creates a specified proxy in the entity.

IEntity::DebugDraw Method
C++
virtual void DebugDraw(const struct SGeometryDebugDrawInfo & info) = 0;
Description

Draw a debug view of this entity geometry

IEntity::DecKeepAliveCounter Method
C++
virtual void DecKeepAliveCounter() = 0;
IEntity::DetachAll Method
C++
virtual void DetachAll(int nDetachFlags = 0) = 0;
Parameters
Parameters
Description
int nDetachFlags = 0
Combination of the EAttachmentFlags flags.
Description

Detaches all the child entities attached to this entity.

See Also
IEntity::DetachThis Method
C++
virtual void DetachThis(int nDetachFlags = 0, int nWhyFlags = 0) = 0;
Parameters
Parameters
Description
int nDetachFlags = 0
Combination of the EAttachmentFlags flags.
Description

Detach this entity from the parent entity (assumes that this entity is the child entity).

See Also
IEntity::EnablePhysics Method
C++
virtual void EnablePhysics(bool enable) = 0;
Description

Enable/Disable physics by flag.

IEntity::FreeSlot Method
C++
virtual void FreeSlot(int nIndex) = 0;
Description

Frees slot at specified index.

IEntity::GetAI Method
C++
virtual IAIObject* GetAI() = 0;
IEntity::GetAIObjectID Method
C++
virtual tAIObjectID GetAIObjectID() const = 0;
IEntity::GetArchetype Method
C++
virtual IEntityArchetype* GetArchetype() = 0;
Description

Retrieves the entity archetype. Entity archetype contain definition for entity script properties. Return: Pointer to the entity archetype interface.

IEntity::GetCharacter Method
C++
virtual ICharacterInstance* GetCharacter(int nSlot) = 0;
Parameters
Parameters
Description
int nSlot
Index of the slot.
Returns

Character pointer or NULL if character with this slot does not exist.

Description

Fast method to get the character at the specified slot.

IEntity::GetChild Method
C++
virtual IEntity* GetChild(int nIndex) const = 0;
Parameters
Parameters
Description
int nIndex
Index of the child entity, must be 0 <= nIndex < GetChildCount().
Return
Pointer to the child entity interface.
Description

Retrieves the attached child entity by index.

See Also
IEntity::GetChildCount Method
C++
virtual int GetChildCount() const = 0;
Description

Retrieves the number of attached child entities.

See Also
IEntity::GetClass Method
C++
virtual IEntityClass* GetClass() const = 0;
Description

Retrieves the entity class pointer. Entity class defines entity type, what script it will use, etc... Return: Pointer to the entity class interface.

IEntity::GetEntityLinks Method
C++
virtual IEntityLink* GetEntityLinks() = 0;
Description

Gets pointer to the first entity link.

IEntity::GetEntityTextDescription Method
C++
virtual const char* GetEntityTextDescription() const = 0;
Description

Returns textual description of entity for logging.

IEntity::GetFlags Method
C++
virtual uint32 GetFlags() const = 0;
Description

Gets current entity flags.

IEntity::GetFlagsExtended Method
C++
virtual uint32 GetFlagsExtended() const = 0;
Description

Gets current entity EEntityFlagsExtended flags.

IEntity::GetForwardDir Method
C++
virtual const Vec3& GetForwardDir() const = 0;
Description

Helper function to retrieve world space forward dir

See Also
IEntity::GetGeomCacheRenderNode Method
C++
virtual IGeomCacheRenderNode* GetGeomCacheRenderNode(int nSlot) = 0;
Parameters
Parameters
Description
int nSlot
Index of the slot.
Returns

IGeomCacheRenderNode pointer or NULL if stat object with this slot does not exist.

Description

Fast method to get the geom cache render cache at the specified slot.

IEntity::GetGuid Method
C++
virtual EntityGUID GetGuid() const = 0;
Description

Retrieves the globally unique identifier of this entity assigned to it by the Entity System. EntityGuid is guaranteed to be the same when saving/loading entity, it is also same in the editor and in the game. Return: The entity globally unique identifier.

IEntity::GetId Method
C++
virtual EntityId GetId() const = 0;
Description

Retrieves the runtime unique identifier of this entity assigned to it by the Entity System. EntityId may not be the same when saving/loading entity. EntityId is mostly used in runtime for fast and unique identification of entities.. Return: The entity ID.

IEntity::GetLocalBounds Method
C++
virtual void GetLocalBounds(AABB & bbox) const = 0;
Parameters
Parameters
Description
AABB & bbox
Output parameter for the bounding box.
Description

Retrieves the entity axis aligned bounding box in the local entity space.

See Also

GetLocalBounds

IEntity::GetLocalTM Method
C++
virtual Matrix34 GetLocalTM() const = 0;
Description

Retrieves the entity transformation matrix in the local entity space.

See Also

SetWorldTM,GetWorldTM,SetLocalTM,GetLocalTM Return: Local space transformation matrix.

IEntity::GetMaterial Method
C++
virtual IMaterial* GetMaterial() = 0;
Returns

Pointer to custom material interface or NULL if custom material not set.

Description

Retrieves a custom material set to the entity.

IEntity::GetMemoryUsage Method
C++
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
IEntity::GetName Method
C++
virtual const char* GetName() const = 0;
Returns

Name of the entity.

Description

Gets entity name.

See Also
IEntity::GetParent Method
C++
virtual IEntity* GetParent() const = 0;
Description

Retrieves the parent of this entity.

See Also

GetChild,DetachThis Return: Pointer to the parent entity interface, or NULL if this entity does not have a parent.

IEntity::GetParentAttachPointWorldTM Method
C++
virtual Matrix34 GetParentAttachPointWorldTM() const = 0;
Description

Retrieves the TM of the point this entity is attached to if it has a parent Note that this can be different from GetParent()->GetWorldTM() when the attachment point is not the pivot. Return: World space matrix of the parent attachment transform

IEntity::GetParticleEmitter Method
C++
virtual IParticleEmitter* GetParticleEmitter(int nSlot) = 0;
Parameters
Parameters
Description
int nSlot
Index of the slot.
Returns

IParticleEmitter pointer or NULL if stat object with this slot does not exist.

Description

Fast method to get the particle em at the specified slot.

IEntity::GetPhysics Method
C++
virtual IPhysicalEntity* GetPhysics() const = 0;
Description

Returns a physical entity assigned to an entity.

IEntity::GetPos Method
C++
virtual const Vec3& GetPos() const = 0;
Description

Retrieves the entity local space position.

See Also
IEntity::GetProxy Method
C++
virtual IEntityProxy* GetProxy(EEntityProxy proxy) const = 0;
Parameters
Parameters
Description
EEntityProxy proxy
Proxy interface identifier.
Return
Valid pointer to the requested entity proxy object, or NULL if such proxy not exist.
Description

Entity Proxies Interfaces access functions. ///////////////////////////////////////////////////////////////////////

Retrieves a pointer to the specified proxy interface in the entity.

IEntity::GetRotation Method
C++
virtual const Quat& GetRotation() const = 0;
Description

Retrieves the entity local space rotation quaternion.

See Also
IEntity::GetScale Method
C++
virtual const Vec3& GetScale() const = 0;
Description

Retrieves the entity local space scale.

See Also
IEntity::GetScriptTable Method
C++
IScriptTable* GetScriptTable() const;
Description

Easy Script table access.

Inline implementation.

IEntity::GetSlotCameraSpacePos Method
C++
virtual void GetSlotCameraSpacePos(int nSlot, Vec3 & cameraSpacePos) const = 0;
Description

Gets camera space position of the object slot.

IEntity::GetSlotCount Method
C++
virtual int GetSlotCount() const = 0;
Description

Gets number of allocated object slots in the entity.

IEntity::GetSlotFlags Method
C++
virtual uint32 GetSlotFlags(int nSlot) const = 0;
Parameters
Parameters
Description
int nSlot
Index of the slot.
Returns

The slot flags, or 0 if specified slot is not valid.

Description

Retrieves the flags of the specified slot.

IEntity::GetSlotInfo Method
C++
virtual bool GetSlotInfo(int nIndex, SEntitySlotInfo & slotInfo) const = 0;
Parameters
Parameters
Description
int nIndex
Index of required slot.
SEntitySlotInfo & slotInfo
Output variable where description of the slot will be written.
Description

Gets object slot information.

IEntity::GetSlotLocalTM Method
C++
virtual const Matrix34& GetSlotLocalTM(int nSlot, bool bRelativeToParent) const = 0;
Parameters
Parameters
Description
int nSlot
Index of required slot.
bool bRelativeToParent
flag specifying whether the local transformation matrix is relative to the parent slot or the entity
Description

Returns local transformation matrix relative to host entity transformation matrix of the object slot.

IEntity::GetSlotWorldTM Method
C++
virtual const Matrix34& GetSlotWorldTM(int nSlot) const = 0;
Description

Returns world transformation matrix of the object slot.

IEntity::GetStatObj Method
C++
virtual IStatObj* GetStatObj(int nSlot) = 0;
Parameters
Parameters
Description
int nSlot
Index of the slot; | with ENTITY_SLOT_ACTUAL to disable compound statobj handling.
Returns

StatObj pointer or NULL if stat object with this slot does not exist.

Description

Fast method to get the static object at the specified slot.

IEntity::GetUpdatePolicy Method
C++
virtual EEntityUpdatePolicy GetUpdatePolicy() const = 0;
Description

Retrieves the entity update policy.

See Also
IEntity::GetWorldAngles Method
C++
virtual Ang3 GetWorldAngles() const = 0;
Description

Helper function to retrieve world space entity orientation angles.

See Also
IEntity::GetWorldBounds Method
C++
virtual void GetWorldBounds(AABB & bbox) const = 0;
Parameters
Parameters
Description
AABB & bbox
Output parameter for the bounding box.
Description

Retrieves the entity axis aligned bounding box in the world space.

See Also
IEntity::GetWorldPos Method
C++
virtual Vec3 GetWorldPos() const = 0;
Description

Helper function to retrieve world space entity position.

See Also
IEntity::GetWorldRotation Method
C++
virtual Quat GetWorldRotation() const = 0;
Description

Helper function to retrieve world space entity orientation quaternion

See Also
IEntity::GetWorldTM Method
C++
virtual const Matrix34& GetWorldTM() const = 0;
Description

Retrieves the entity transformation matrix in the world space.

See Also

SetWorldTM,GetWorldTM,SetLocalTM,GetLocalTM Return: World space transformation matrix (Include transformations of all parent entities).

IEntity::HandleVariableChange Method
C++
virtual bool HandleVariableChange(const char* szVarName, const void* pVarData) = 0;
Description

LiveCreate entity manipulation /////////////////////////////////////////////////////////////////////// Process the LiveCreate message with a variable change, return true if handled This function is used as low-latency update vs updating the whole entity

IEntity::HasAI Method
C++
virtual bool HasAI() const = 0;
IEntity::Hide Method
C++
virtual void Hide(bool bHide) = 0;
Parameters
Parameters
Description
bool bHide
if true hide the entity, is false unhides it.
Description

Hides this entity, makes it invisible and disable its physics.

See Also
IEntity::IncKeepAliveCounter Method
C++
virtual void IncKeepAliveCounter() = 0;
Description

Increase/or decrease KeepAliveCounter, used as a refcount to prevent deletion when deferring some events(like physics collisions which can refer these entities)

IEntity::InvalidateTM Method
C++
virtual void InvalidateTM(int nWhyFlags = 0, bool bRecalcPhyBounds = false) = 0;
Description

Invalidates the entity's and all its children's transformation matrices!

IEntity::Invisible Method
C++
virtual void Invisible(bool bInvisible) = 0;
Description

Makes the entity invisible and disable its physics. Different from hide in that the entity is still updated.

IEntity::IsActive Method
C++
virtual bool IsActive() const = 0;
Description

Check if the entity is active now.

See Also
IEntity::IsFromPool Method
C++
virtual bool IsFromPool() const = 0;
Description

Returns if the entity is from an entity pool.

IEntity::IsGarbage Method
C++
virtual bool IsGarbage() const = 0;
Returns

True if entity marked for deletion, false otherwise.

Description

Checks if this entity was marked for deletion. If this function returns true, it will be deleted on next frame, and it is pointless to perform any operations on such entity.

IEntity::IsHidden Method
C++
virtual bool IsHidden() const = 0;
Description

Checks if the entity is hidden.

See Also
IEntity::IsInitialized Method
C++
virtual bool IsInitialized() const = 0;
Description

Returns true if entity is completely initialized.

IEntity::IsInvisible Method
C++
virtual bool IsInvisible() const = 0;
Description

Checks if the entity is invisible.

See Also
IEntity::IsKeptAlive Method
C++
virtual bool IsKeptAlive() const = 0;
IEntity::IsLoadedFromLevelFile Method
C++
virtual bool IsLoadedFromLevelFile() const = 0;
Description

Returns true if this entity was loaded from level file Returns false for entities created dynamically

IEntity::IsParentAttachmentValid Method
C++
virtual bool IsParentAttachmentValid() const = 0;
Description

Checks if the matrix returned by GetParentAttachPointWorldTM is valid E.g. it would return false if a geometry cache frame isn't loaded yet Return: World space matrix of the parent attachment transform

IEntity::IsPrePhysicsActive Method
C++
virtual bool IsPrePhysicsActive() = 0;
Description

Check if the entity is active now.

See Also
IEntity::IsSlotValid Method
C++
virtual bool IsSlotValid(int nIndex) const = 0;
Parameters
Parameters
Description
int nIndex
Index of required slot.
Description

Working with Slots. ///////////////////////////////////////////////////////////////////////

Check if the slot with specified index exist.

IEntity::KillTimer Method
C++
virtual void KillTimer(int nTimerId) = 0;
Parameters
Parameters
Description
int nTimerId
Timer ID of the timer started for this entity.
Description

Stops already started entity timer with this id.

See Also
IEntity::LoadCharacter Method
C++
virtual int LoadCharacter(int nSlot, const char * sFilename, int nLoadFlags = 0) = 0;
Description

Loads character to the specified slot, or to next available slot. If same character is already loaded in this slot, operation is ignored. If this slot number is occupied by different kind of object it is overwritten. Return: Slot id where the object was loaded, or -1 if loading failed.

IEntity::LoadGeometry Method
C++
virtual int LoadGeometry(int nSlot, const char * sFilename, const char * sGeomName = NULL, int nLoadFlags = 0) = 0;
Description

Loads static geometry to the specified slot, or to next available slot. If same object is already loaded in this slot, operation is ignored. If this slot number is occupied by different kind of object it is overwritten with static object. nLoadFlags - @see ELoadFlags Return: Slot id where the object was loaded, or -1 if loading failed.

IEntity::LoadLight Method
C++
virtual int LoadLight(int nSlot, CDLight * pLight) = 0;
Description

Loads a light source to the specified slot, or to next available slot. Return: Slot id where the light source was loaded, or -1 if loading failed.

IEntity::LoadParticleEmitter Method
C++
virtual int LoadParticleEmitter(int nSlot, IParticleEffect* pEffect, SpawnParams const* params = NULL, bool bPrime = false, bool bSerialize = false) = 0;
Description

Loads a new particle emitter to the specified slot, or to next available slot. If same character is already loaded in this slot, operation is ignored. If this slot number is occupied by different kind of object it is overwritten. Return: Slot id where the particle emitter was loaded, or -1 if loading failed.

IEntity::MoveSlot Method
C++
virtual void MoveSlot(IEntity * targetIEnt, int nSlot) = 0;
Parameters
Parameters
Description
IEntity * targetIEnt
entity to receive the new slot info
int nSlot
Index of the slot.
Returns

None.

Description

Moves the contents of a render slot from one entity to another, will also move any associated physics.

IEntity::Physicalize Method
C++
virtual void Physicalize(SEntityPhysicalizeParams & params) = 0;
Description

Physics.

IEntity::PhysicalizeSlot Method
C++
virtual int PhysicalizeSlot(int slot, SEntityPhysicalizeParams & params) = 0;
IEntity::PrePhysicsActivate Method
C++
virtual void PrePhysicsActivate(bool bActive) = 0;
Description

Activates entity, if entity is active it will be updated every frame.

See Also
IEntity::RegisterComponent Method
C++
virtual void RegisterComponent(IComponentPtr pComponent, const int flags) = 0;
Parameters
Parameters
Description
IComponentPtr pComponent
the target component.
const int flags
IComponent contains the relevent flags to control registration behaviour.
Description

Register or unregisters a component with the entity.

IEntity::RegisterInAISystem Method
C++
virtual bool RegisterInAISystem(const AIObjectParams & params) = 0;
IEntity::RemoveAllEntityLinks Method
C++
virtual void RemoveAllEntityLinks() = 0;
IEntity::RemoveEntityLink Method
C++
virtual void RemoveEntityLink(IEntityLink* pLink) = 0;
IEntity::ResetKeepAliveCounter Method
C++
virtual void ResetKeepAliveCounter() = 0;
IEntity::SendEvent Method
C++
virtual bool SendEvent(SEntityEvent & event) = 0;
Parameters
Parameters
Description
SEntityEvent & event
Event description (event id, parameters).
Description

Sends event to the entity.

IEntity::Serialize Method
C++
virtual void Serialize(TSerialize serializer, int nFlags = 0) = 0;
Parameters
Parameters
Description
TSerialize serializer
Serialization context class, provides all the information needed to properly serialize entity contents.
int nFlags = 0
Additional custom serialization flags.
Description

Saves or loads entity parameters to/from stream using serialization context class.

IEntity::SerializeXML Method
C++
virtual void SerializeXML(XmlNodeRef & entityNode, bool bLoading) = 0;
Description

Serializes entity parameters to/from XML.

IEntity::SetAIObjectID Method
C++
virtual void SetAIObjectID(tAIObjectID id) = 0;
IEntity::SetCharacter Method
C++
virtual int SetCharacter(ICharacterInstance * pCharacter, int nSlot) = 0;
Parameters
Parameters
Description
ICharacterInstance * pCharacter
A pointer to character instance.
int nSlot
Index of a slot, or -1 if a new slot need to be allocated.
Returns

An integer which refers to the slot index which used.

Description

Sets character instance of a slot, and creates slot if necessary.

IEntity::SetFlags Method
C++
virtual void SetFlags(uint32 flags) = 0;
Parameters
Parameters
Description
uint32 flags
Flag values which are defined in EEntityFlags.
Description

Sets entity flags, completely replaces all flags which are already set in the entity.

IEntity::SetFlagsExtended Method
C++
virtual void SetFlagsExtended(uint32 flags) = 0;
Parameters
Parameters
Description
uint32 flags
Extended flag values which are defined in EEntityFlagsExtended.
Description

Sets entity flags, completely replaces all flags which are already set in the entity.

IEntity::SetLocalTM Method
C++
virtual void SetLocalTM(const Matrix34 & tm, int nWhyFlags = 0) = 0;
Parameters
Parameters
Description
const Matrix34 & tm
Local space transformation matrix (Non unifrorm scale is not supported).
Description

Sets entity transformation matrix in the local entity space.

See Also
IEntity::SetMaterial Method
C++
virtual void SetMaterial(IMaterial * pMaterial) = 0;
Parameters
Parameters
Description
IMaterial * pMaterial
Pointer to custom material interface.
Description

Assigns a custom material to the entity.

IEntity::SetName Method
C++
virtual void SetName(const char * sName) = 0;
Parameters
Parameters
Description
const char * sName
New name for the entity.
Description

Changes the entity name. Entity name does not have to be unique, but for the sake of easier finding entities by name it is better to not assign same name to different entities.

See Also
IEntity::SetParentSlot Method
C++
virtual bool SetParentSlot(int nParentIndex, int nChildIndex) = 0;
Parameters
Parameters
Description
int nParentIndex
Index of the parent slot (Child slot will be attached to this one).
int nChildIndex
Index of the child slot.
Description

Attaches child slot to the parent slot. This will form hierarchical transformation relationship between object slots.

IEntity::SetParticleEmitter Method
C++
virtual int SetParticleEmitter(int nSlot, IParticleEmitter* pEmitter, bool bSerialize = false) = 0;
IEntity::SetPhysicsState Method
C++
virtual void SetPhysicsState(XmlNodeRef & physicsState) = 0;
IEntity::SetPos Method
C++
virtual void SetPos(const Vec3 & vPos, int nWhyFlags = 0, bool bRecalcPhyBounds = false, bool bForce = false) = 0;
Description

Sets the entity local space position.

See Also
IEntity::SetPosRotScale Method
C++
virtual void SetPosRotScale(const Vec3 & vPos, const Quat & qRotation, const Vec3 & vScale, int nWhyFlags = 0) = 0;
Description

Sets the entity position,rotation and scale at once.

See Also
IEntity::SetProxy Method
C++
virtual void SetProxy(EEntityProxy proxy, IEntityProxyPtr pProxy) = 0;
Parameters
Parameters
Description
EEntityProxy proxy
Proxy interface identifier.
IEntityProxyPtr pProxy
Pointer to the Proxy interface.
Description

Replaces the specified proxy interface in the entity.

IEntity::SetRotation Method
C++
virtual void SetRotation(const Quat & qRotation, int nWhyFlags = 0) = 0;
Description

Sets the entity local space rotation quaternion.

See Also
IEntity::SetScale Method
C++
virtual void SetScale(const Vec3 & vScale, int nWhyFlags = 0) = 0;
Description

Sets the entity local space scale.

See Also
IEntity::SetSlotCameraSpacePos Method
C++
virtual void SetSlotCameraSpacePos(int nSlot, const Vec3 & cameraSpacePos) = 0;
Description

Sets camera space position of the object slot.

IEntity::SetSlotFlags Method
C++
virtual void SetSlotFlags(int nSlot, uint32 nFlags) = 0;
Parameters
Parameters
Description
int nSlot
Index of the slot, if -1 apply to all existing slots.
uint32 nFlags
Flags to set.
Description

Sets the flags of the specified slot.

IEntity::SetSlotLocalTM Method
C++
virtual void SetSlotLocalTM(int nSlot, const Matrix34 & localTM, int nWhyFlags = 0) = 0;
Description

Sets local transformation matrix of the object slot.

IEntity::SetSlotMaterial Method
C++
virtual void SetSlotMaterial(int nSlot, IMaterial * pMaterial) = 0;
Parameters
Parameters
Description
int nSlot
Index of the slot, if -1 assign this material to all existing slots.
IMaterial * pMaterial
Pointer to custom material interface.
Description

Assigns a custom material to the specified object slot.

IEntity::SetStatObj Method
C++
virtual int SetStatObj(IStatObj * pStatObj, int nSlot, bool bUpdatePhysics, float mass = -1.0f) = 0;
Parameters
Parameters
Description
IStatObj * pStatObj
pointer to the new static object
int nSlot
Index of a slot, or -1 if a new slot need to be allocated; | with ENTITY_SLOT_ACTUAL to disable compound statobj handling
float mass = -1.0f
new mass of the slot, negative value to keep the current
Return
An integer which refer to the slot index which used
Description

Sets static object of a slot, creates slot if necessary

IEntity::SetTimer Method
C++
virtual void SetTimer(int nTimerId, int nMilliSeconds) = 0;
Parameters
Parameters
Description
int nTimerId
Timer ID, multiple timers with different IDs are possible.
int nMilliSeconds
Timer timeout time in milliseconds.
Description

Starts the entity timer, entity timers are owned by entity, every entity can have it`s own independent timers, so TimerId must not be unique across multiple entities. When timer finishes entity system will signal to the entity *once* with an event ENTITY_EVENT_TIME. Multiple timers can be started simultaneously with different timer ids. If some timer is not yet finished and another timer with the same timerID is set, the new one will override old timer, and old timer will not send finish event.

See Also
IEntity::SetUpdatePolicy Method
C++
virtual void SetUpdatePolicy(EEntityUpdatePolicy eUpdatePolicy) = 0;
Parameters
Parameters
Description
EEntityUpdatePolicy eUpdatePolicy
Update policy, one of EEntityUpdatePolicy enums.
Description

Changes the entity update policy. Update policy of entity defines the automatic activation rules for the entity. Ex. When physical object becomes awaken it will activate the entity, and when will go to sleep again will deactivate it. Or entity can become active every time that it becomes visible, and deactivated when goes out of view. There are multiple such predefined update policies exist, consider EEntityUpdatePolicy enum.

See Also
IEntity::SetWorldTM Method
C++
virtual void SetWorldTM(const Matrix34 & tm, int nWhyFlags = 0) = 0;
Parameters
Parameters
Description
const Matrix34 & tm
World space transformation matrix (Non unifrorm scale is not supported).
Description

Sets entity transformation matrix in the world space.

See Also
IEntity::ShouldUpdateCharacter Method
C++
virtual bool ShouldUpdateCharacter(int nSlot) const = 0;
Parameters
Parameters
Description
int nSlot
Index of the slot.
Returns

Returns true if character is to be updated.

Description

Returns true if character is to be updated.

IEntity::UnmapAttachedChild Method
C++
virtual IEntity * UnmapAttachedChild(int & partId) = 0;
Description

Returns an attached child entity that corresponds to the physical part partId set partId to the child's partId.

IEntity::UnphysicalizeSlot Method
C++
virtual void UnphysicalizeSlot(int slot) = 0;
IEntity::UpdateSlotPhysics Method
C++
virtual void UpdateSlotPhysics(int slot) = 0;