XII Release 0.1.0
Loading...
Searching...
No Matches
xiiGameObject Class Referencefinal

This class represents an object inside the world. More...

#include <GameObject.h>

Classes

class  ChildIterator
 
class  ConstChildIterator
 Iterates over all children of one object. More...
 

Public Types

enum class  UpdateBehaviorIfStatic { None , UpdateImmediately }
 Defines update behavior for global transforms when changing the local transform on a static game object. More...
 

Public Member Functions

xiiGameObjectHandle GetHandle () const
 Returns a handle to this object.
 
void MakeDynamic ()
 Makes this object and all its children dynamic. Dynamic objects might move during runtime.
 
void MakeStatic ()
 Makes this object static. Static objects don't move during runtime.
 
bool IsDynamic () const
 Returns whether this object is dynamic.
 
bool IsStatic () const
 Returns whether this object is static.
 
void SetActiveFlag (bool bEnabled)
 Sets the 'active flag' of the game object, which affects its final 'active state'.
 
bool GetActiveFlag () const
 Checks whether the 'active flag' is set on this game object. Note that this does not mean that the game object is also in an 'active state'.
 
bool IsActive () const
 Checks whether this game object is in an active state.
 
void SetCreatedByPrefab ()
 Adds xiiObjectFlags::CreatedByPrefab to the object. See the flag for details.
 
bool WasCreatedByPrefab () const
 Checks whether the xiiObjectFlags::CreatedByPrefab flag is set on this object.
 
void SetName (xiiStringView sName)
 Sets the name to identify this object. Does not have to be a unique name.
 
void SetName (const xiiHashedString &sName)
 
xiiStringView GetName () const
 
const xiiHashedStringGetNameHashed () const
 
bool HasName (const xiiTempHashedString &sName) const
 
void SetGlobalKey (xiiStringView sGlobalKey)
 Sets the global key to identify this object. Global keys must be unique within a world.
 
void SetGlobalKey (const xiiHashedString &sGlobalKey)
 
xiiStringView GetGlobalKey () const
 
void EnableChildChangesNotifications ()
 Enables or disabled notification message 'xiiMsgChildrenChanged' when children are added or removed. The message is sent to this object and all its parent objects.
 
void DisableChildChangesNotifications ()
 
void EnableParentChangesNotifications ()
 Enables or disabled notification message 'xiiMsgParentChanged' when the parent changes. The message is sent to this object only.
 
void DisableParentChangesNotifications ()
 
void SetParent (const xiiGameObjectHandle &hParent, xiiTransformPreservation::Enum preserve=xiiTransformPreservation::PreserveGlobal)
 Sets the parent of this object to the given.
 
xiiGameObjectGetParent ()
 Gets the parent of this object or nullptr if this is a top-level object.
 
const xiiGameObjectGetParent () const
 Gets the parent of this object or nullptr if this is a top-level object.
 
void AddChild (const xiiGameObjectHandle &hChild, xiiTransformPreservation::Enum preserve=xiiTransformPreservation::PreserveGlobal)
 Adds the given object as a child object.
 
void AddChildren (const xiiArrayPtr< const xiiGameObjectHandle > &children, xiiTransformPreservation::Enum preserve=xiiTransformPreservation::PreserveGlobal)
 Adds the given objects as child objects.
 
void DetachChild (const xiiGameObjectHandle &hChild, xiiTransformPreservation::Enum preserve=xiiTransformPreservation::PreserveGlobal)
 Detaches the given child object from this object and makes it a top-level object.
 
void DetachChildren (const xiiArrayPtr< const xiiGameObjectHandle > &children, xiiTransformPreservation::Enum preserve=xiiTransformPreservation::PreserveGlobal)
 Detaches the given child objects from this object and makes them top-level objects.
 
xiiUInt32 GetChildCount () const
 Returns the number of children.
 
ChildIterator GetChildren ()
 Returns an iterator over all children of this object.
 
ConstChildIterator GetChildren () const
 Returns an iterator over all children of this object.
 
xiiGameObjectFindChildByName (const xiiTempHashedString &sName, bool bRecursive=true)
 Searches for a child object with the given name. Optionally traverses the entire hierarchy.
 
const xiiGameObjectFindChildByName (const xiiTempHashedString &sName, bool bRecursive=true) const
 Searches for a child object with the given name. Optionally traverses the entire hierarchy.
 
xiiGameObjectFindChildByPath (xiiStringView sPath)
 Searches for a child using a path. Every path segment represents a child with a given name.
 
const xiiGameObjectFindChildByPath (xiiStringView sPath) const
 Const overload of FindChildByPath()
 
xiiGameObjectSearchForChildByNameSequence (xiiStringView sObjectSequence, const xiiRTTI *pExpectedComponent=nullptr)
 Searches for a child similar to FindChildByName() but allows to search for multiple names in a sequence.
 
const xiiGameObjectSearchForChildByNameSequence (xiiStringView sObjectSequence, const xiiRTTI *pExpectedComponent=nullptr) const
 Const overload of SearchForChildByNameSequence()
 
void SearchForChildrenByNameSequence (xiiStringView sObjectSequence, const xiiRTTI *pExpectedComponent, xiiHybridArray< xiiGameObject *, 8 > &out_objects)
 Same as SearchForChildByNameSequence but returns ALL matches, in case the given path could mean multiple objects.
 
xiiWorldGetWorld ()
 
const xiiWorldGetWorld () const
 
void SetLocalPosition (xiiVec3 vPosition)
 Changes the position of the object local to its parent.
 
xiiVec3 GetLocalPosition () const
 
void SetLocalRotation (xiiQuat qRotation)
 
xiiQuat GetLocalRotation () const
 
void SetLocalScaling (xiiVec3 vScaling)
 
xiiVec3 GetLocalScaling () const
 
void SetLocalUniformScaling (float fScaling)
 
float GetLocalUniformScaling () const
 
xiiTransform GetLocalTransform () const
 
void SetGlobalPosition (const xiiVec3 &vPosition)
 
xiiVec3 GetGlobalPosition () const
 
void SetGlobalRotation (const xiiQuat &qRotation)
 
xiiQuat GetGlobalRotation () const
 
void SetGlobalScaling (const xiiVec3 &vScaling)
 
xiiVec3 GetGlobalScaling () const
 
void SetGlobalTransform (const xiiTransform &transform)
 
xiiTransform GetGlobalTransform () const
 
xiiTransform GetLastGlobalTransform () const
 Last frame's global transform (only valid if XII_GAMEOBJECT_VELOCITY is set, otherwise the same as GetGlobalTransform())
 
void SetLocalPosition (const xiiSimdVec4f &vPosition, UpdateBehaviorIfStatic updateBehavior=UpdateBehaviorIfStatic::UpdateImmediately)
 
const xiiSimdVec4fGetLocalPositionSimd () const
 
void SetLocalRotation (const xiiSimdQuat &qRotation, UpdateBehaviorIfStatic updateBehavior=UpdateBehaviorIfStatic::UpdateImmediately)
 
const xiiSimdQuatGetLocalRotationSimd () const
 
void SetLocalScaling (const xiiSimdVec4f &vScaling, UpdateBehaviorIfStatic updateBehavior=UpdateBehaviorIfStatic::UpdateImmediately)
 
const xiiSimdVec4fGetLocalScalingSimd () const
 
void SetLocalUniformScaling (const xiiSimdFloat &fScaling, UpdateBehaviorIfStatic updateBehavior=UpdateBehaviorIfStatic::UpdateImmediately)
 
xiiSimdFloat GetLocalUniformScalingSimd () const
 
xiiSimdTransform GetLocalTransformSimd () const
 
void SetGlobalPosition (const xiiSimdVec4f &vPosition)
 
const xiiSimdVec4fGetGlobalPositionSimd () const
 
void SetGlobalRotation (const xiiSimdQuat &qRotation)
 
const xiiSimdQuatGetGlobalRotationSimd () const
 
void SetGlobalScaling (const xiiSimdVec4f &vScaling)
 
const xiiSimdVec4fGetGlobalScalingSimd () const
 
void SetGlobalTransform (const xiiSimdTransform &transform)
 
const xiiSimdTransformGetGlobalTransformSimd () const
 
const xiiSimdTransformGetLastGlobalTransformSimd () const
 
xiiVec3 GetGlobalDirForwards () const
 Returns the 'forwards' direction of the world's xiiCoordinateSystem, rotated into the object's global space.
 
xiiVec3 GetGlobalDirRight () const
 Returns the 'right' direction of the world's xiiCoordinateSystem, rotated into the object's global space.
 
xiiVec3 GetGlobalDirUp () const
 Returns the 'up' direction of the world's xiiCoordinateSystem, rotated into the object's global space.
 
void UpdateGlobalTransform ()
 Updates the global transform immediately. Usually this done during the world update after the "Post-async" phase.
 
void EnableStaticTransformChangesNotifications ()
 Enables or disabled notification message 'xiiMsgTransformChanged' when this object is static and its transform changes. The notification message is sent to this object and thus also to all its components.
 
void DisableStaticTransformChangesNotifications ()
 
xiiBoundingBoxSphere GetLocalBounds () const
 
xiiBoundingBoxSphere GetGlobalBounds () const
 
const xiiSimdBBoxSphereGetLocalBoundsSimd () const
 
const xiiSimdBBoxSphereGetGlobalBoundsSimd () const
 
void UpdateLocalBounds ()
 Invalidates the local bounds and sends a message to all components so they can add their bounds.
 
void UpdateGlobalBounds ()
 Updates the global bounds immediately. Usually this done during the world update after the "Post-async" phase. Note that this function does not ensure that the global transform is up-to-date. Use UpdateGlobalTransformAndBounds if you want to update both.
 
void UpdateGlobalTransformAndBounds ()
 Updates the global transform and bounds immediately. Usually this done during the world update after the "Post-async" phase.
 
xiiSpatialDataHandle GetSpatialData () const
 Returns a handle to the internal spatial data.
 
void EnableComponentChangesNotifications ()
 Enables or disabled notification message 'xiiMsgComponentsChanged' when components are added or removed. The message is sent to this object and all its parent objects.
 
void DisableComponentChangesNotifications ()
 
template<typename T>
bool TryGetComponentOfBaseType (T *&out_pComponent)
 Tries to find a component of the given base type in the objects components list and returns the first match.
 
template<typename T>
bool TryGetComponentOfBaseType (const T *&out_pComponent) const
 Tries to find a component of the given base type in the objects components list and returns the first match.
 
bool TryGetComponentOfBaseType (const xiiRTTI *pType, xiiComponent *&out_pComponent)
 Tries to find a component of the given base type in the objects components list and returns the first match.
 
bool TryGetComponentOfBaseType (const xiiRTTI *pType, const xiiComponent *&out_pComponent) const
 Tries to find a component of the given base type in the objects components list and returns the first match.
 
template<typename T>
void TryGetComponentsOfBaseType (xiiDynamicArray< T * > &out_components)
 Tries to find components of the given base type in the objects components list and returns all matches.
 
template<typename T>
void TryGetComponentsOfBaseType (xiiDynamicArray< const T * > &out_components) const
 Tries to find components of the given base type in the objects components list and returns all matches.
 
void TryGetComponentsOfBaseType (const xiiRTTI *pType, xiiDynamicArray< xiiComponent * > &out_components)
 Tries to find components of the given base type in the objects components list and returns all matches.
 
void TryGetComponentsOfBaseType (const xiiRTTI *pType, xiiDynamicArray< const xiiComponent * > &out_components) const
 Tries to find components of the given base type in the objects components list and returns all matches.
 
xiiArrayPtr< xiiComponent *const > GetComponents ()
 Returns a list of all components attached to this object.
 
xiiArrayPtr< const xiiComponent *const > GetComponents () const
 Returns a list of all components attached to this object.
 
xiiUInt16 GetComponentVersion () const
 Returns the current version of components attached to this object. This version is increased whenever components are added or removed and can be used for cache validation.
 
bool SendMessage (xiiMessage &ref_msg)
 Sends a message to all components of this object.
 
bool SendMessage (xiiMessage &ref_msg) const
 Sends a message to all components of this object.
 
bool SendMessageRecursive (xiiMessage &ref_msg)
 Sends a message to all components of this object and then recursively to all children.
 
bool SendMessageRecursive (xiiMessage &ref_msg) const
 Sends a message to all components of this object and then recursively to all children.
 
void PostMessage (const xiiMessage &msg, xiiTime delay, xiiObjectMsgQueueType::Enum queueType=xiiObjectMsgQueueType::NextFrame) const
 Queues the message for the given phase. The message is processed after the given delay in the corresponding phase.
 
void PostMessageRecursive (const xiiMessage &msg, xiiTime delay, xiiObjectMsgQueueType::Enum queueType=xiiObjectMsgQueueType::NextFrame) const
 Queues the message for the given phase. The message is processed after the given delay in the corresponding phase.
 
bool SendEventMessage (xiiMessage &ref_msg, const xiiComponent *pSenderComponent)
 Delivers a xiiEventMessage to the closest (parent) object containing a xiiEventMessageHandlerComponent.
 
bool SendEventMessage (xiiMessage &ref_msg, const xiiComponent *pSenderComponent) const
 Delivers a xiiEventMessage to the closest (parent) object containing a xiiEventMessageHandlerComponent.
 
void PostEventMessage (xiiMessage &ref_msg, const xiiComponent *pSenderComponent, xiiTime delay, xiiObjectMsgQueueType::Enum queueType=xiiObjectMsgQueueType::NextFrame) const
 Delivers a xiiEventMessage to the closest (parent) object containing a xiiEventMessageHandlerComponent.
 
const xiiTagSetGetTags () const
 Returns the tag set associated with this object.
 
void SetTags (const xiiTagSet &tags)
 Sets the tag set associated with this object.
 
void SetTag (const xiiTag &tag)
 Adds the given tag to the object's tags.
 
void RemoveTag (const xiiTag &tag)
 Removes the given tag from the object's tags.
 
bool HasTag (const xiiTempHashedString &sTagName) const
 Checks whether this object has the given tag.
 
const xiiUInt16 & GetTeamID () const
 Returns the 'team ID' that was given during creation (/see xiiGameObjectDesc)
 
void SetTeamID (xiiUInt16 uiId)
 Changes the team ID for this object and all children recursively.
 
xiiUInt32 GetStableRandomSeed () const
 Returns a random value that is chosen once during object creation and remains stable even throughout serialization.
 
void SetStableRandomSeed (xiiUInt32 uiSeed)
 Overwrites the object's random seed value.
 
xiiVisibilityState::Enum GetVisibilityState (xiiUInt32 uiNumFramesBeforeInvisible=5) const
 Retrieves a state describing how visible the object is.
 
template<typename T>
XII_ALWAYS_INLINE bool TryGetComponentOfBaseType (T *&out_pComponent)
 
template<typename T>
XII_ALWAYS_INLINE bool TryGetComponentOfBaseType (const T *&out_pComponent) const
 

Friends

class xiiWorld
 
class xiiInternal::WorldData
 
class xiiMemoryUtils
 
class xiiComponentManagerBase
 
class xiiGameObjectTest
 

Detailed Description

This class represents an object inside the world.

Game objects only consists of hierarchical data like transformation and a list of components. You cannot derive from the game object class. To add functionality to an object you have to attach components to it. To create an object instance call CreateObject on the world. Never store a direct pointer to an object but store an xiiGameObjectHandle instead.

See also
xiiWorld
xiiComponent
xiiGameObjectHandle

Member Enumeration Documentation

◆ UpdateBehaviorIfStatic

Defines update behavior for global transforms when changing the local transform on a static game object.

Enumerator
None 

Only sets the local transform, does not update.

UpdateImmediately 

Updates the hierarchy underneath the object immediately.

Member Function Documentation

◆ FindChildByPath()

xiiGameObject * xiiGameObject::FindChildByPath ( xiiStringView sPath)

Searches for a child using a path. Every path segment represents a child with a given name.

Paths are separated with single slashes: / When an empty path is given, 'this' is returned. When on any part of the path the next child cannot be found, nullptr is returned. This function expects an exact path to the destination. It does not search the full hierarchy for the next child, as SearchChildByNameSequence() does.

◆ GetActiveFlag()

XII_ALWAYS_INLINE bool xiiGameObject::GetActiveFlag ( ) const

Checks whether the 'active flag' is set on this game object. Note that this does not mean that the game object is also in an 'active state'.

See also
IsActive(), SetActiveFlag()

◆ GetStableRandomSeed()

XII_ALWAYS_INLINE xiiUInt32 xiiGameObject::GetStableRandomSeed ( ) const

Returns a random value that is chosen once during object creation and remains stable even throughout serialization.

This value is intended to be used for choosing random variations of components. For instance, if a component has two different meshes it can use for variation, this seed should be used to decide which one to use.

The stable random seed can also be set from the outside, which is what the editor does, to assign a truly stable seed value. Therefore, each object placed in the editor will always have the same seed value, and objects won't change their appearance on every run of the game.

The stable seed is also propagated through prefab instances, such that every prefab instance gets a different value, but in a deterministic fashion.

◆ GetTeamID()

const xiiUInt16 & xiiGameObject::GetTeamID ( ) const
inline

Returns the 'team ID' that was given during creation (/see xiiGameObjectDesc)

It is automatically passed on to objects created by this object. This makes it possible to identify which player or team an object belongs to.

◆ GetVisibilityState()

xiiVisibilityState::Enum xiiGameObject::GetVisibilityState ( xiiUInt32 uiNumFramesBeforeInvisible = 5) const

Retrieves a state describing how visible the object is.

An object may be invisible, fully visible, or indirectly visible (through shadows or reflections). This can be used to adjust the update logic of objects. An invisible object may stop updating entirely. An indirectly visible object may reduce its update rate.

Parameters
uiNumFramesBeforeInvisibleUsed to treat an object that was visible and just became invisible as visible for a few more frames.

◆ IsActive()

XII_ALWAYS_INLINE bool xiiGameObject::IsActive ( ) const

Checks whether this game object is in an active state.

The active state is determined by the active state of the parent game object and the 'active flag' of this game object. Only if the parent game object is active (and thus all of its parent objects as well) and this game object has the active flag set, will this game object be active.

See also
xiiGameObject::SetActiveFlag(), xiiComponent::IsActive()

◆ PostEventMessage()

void xiiGameObject::PostEventMessage ( xiiMessage & ref_msg,
const xiiComponent * pSenderComponent,
xiiTime delay,
xiiObjectMsgQueueType::Enum queueType = xiiObjectMsgQueueType::NextFrame ) const

Delivers a xiiEventMessage to the closest (parent) object containing a xiiEventMessageHandlerComponent.

Regular SendMessage() and PostMessage() send a message directly to the target object (and all attached components). SendMessageRecursive() and PostMessageRecursive() send a message 'down' the graph to the target object and all children.

In contrast, SendEventMessage() / PostEventMessage() bubble the message 'up' the graph. They do so by inspecting the chain of parent objects for the existence of a xiiEventMessageHandlerComponent (typically a script component). If such a component is found, the message is delivered to it directly, and no other component. If it is found, but does not handle this type of message, the message is discarded and NOT tried to be delivered to anyone else.

If no such component is found in all parent objects, the message is delivered to one xiiEventMessageHandlerComponent instances that is set to 'handle global events' (typically used for level-logic scripts), no matter where in the graph it resides. If multiple global event handler component exist that handle the same message type, the result is non-deterministic.

Parameters
msgThe message to deliver.
senderComponentThe component that triggered the event in the first place. May be nullptr. If not null, this information is stored in msg as xiiEventMessage::m_hSenderObject and xiiEventMessage::m_hSenderComponent. This information is used to pass through more contextual information for the event handler. For instance, a trigger component would pass through itself. A projectile component sending a 'take damage event' to the hit object, would also pass through itself (the projectile) such that the handling code can detect which object was responsible for the damage (and using the xiiGameObject's team-ID, it can detect which player fired the projectile).
queueTypeIn which update phase to deliver the message.
delayAn optional delay before delivering the message.

◆ SearchForChildByNameSequence()

xiiGameObject * xiiGameObject::SearchForChildByNameSequence ( xiiStringView sObjectSequence,
const xiiRTTI * pExpectedComponent = nullptr )

Searches for a child similar to FindChildByName() but allows to search for multiple names in a sequence.

The names in the sequence are separated with slashes. For example, calling this with "a/b" will first search the entire hierarchy below this object for a child named "a". If that is found, the search continues from there for a child called "b". If such a child is found and pExpectedComponent != nullptr, it is verified that the object contains a component of that type. If it doesn't the search continues (including back-tracking).

◆ SendEventMessage() [1/2]

bool xiiGameObject::SendEventMessage ( xiiMessage & ref_msg,
const xiiComponent * pSenderComponent )

Delivers a xiiEventMessage to the closest (parent) object containing a xiiEventMessageHandlerComponent.

Regular SendMessage() and PostMessage() send a message directly to the target object (and all attached components). SendMessageRecursive() and PostMessageRecursive() send a message 'down' the graph to the target object and all children.

In contrast, SendEventMessage() / PostEventMessage() bubble the message 'up' the graph. They do so by inspecting the chain of parent objects for the existence of a xiiEventMessageHandlerComponent (typically a script component). If such a component is found, the message is delivered to it directly, and no other component. If it is found, but does not handle this type of message, the message is discarded and NOT tried to be delivered to anyone else.

If no such component is found in all parent objects, the message is delivered to one xiiEventMessageHandlerComponent instances that is set to 'handle global events' (typically used for level-logic scripts), no matter where in the graph it resides. If multiple global event handler component exist that handle the same message type, the result is non-deterministic.

Parameters
msgThe message to deliver.
senderComponentThe component that triggered the event in the first place. May be nullptr. If not null, this information is stored in msg as xiiEventMessage::m_hSenderObject and xiiEventMessage::m_hSenderComponent. This information is used to pass through more contextual information for the event handler. For instance, a trigger component would pass through itself. A projectile component sending a 'take damage event' to the hit object, would also pass through itself (the projectile) such that the handling code can detect which object was responsible for the damage (and using the xiiGameObject's team-ID, it can detect which player fired the projectile).

◆ SendEventMessage() [2/2]

bool xiiGameObject::SendEventMessage ( xiiMessage & ref_msg,
const xiiComponent * pSenderComponent ) const

Delivers a xiiEventMessage to the closest (parent) object containing a xiiEventMessageHandlerComponent.

Regular SendMessage() and PostMessage() send a message directly to the target object (and all attached components). SendMessageRecursive() and PostMessageRecursive() send a message 'down' the graph to the target object and all children.

In contrast, SendEventMessage() / PostEventMessage() bubble the message 'up' the graph. They do so by inspecting the chain of parent objects for the existence of a xiiEventMessageHandlerComponent (typically a script component). If such a component is found, the message is delivered to it directly, and no other component. If it is found, but does not handle this type of message, the message is discarded and NOT tried to be delivered to anyone else.

If no such component is found in all parent objects, the message is delivered to one xiiEventMessageHandlerComponent instances that is set to 'handle global events' (typically used for level-logic scripts), no matter where in the graph it resides. If multiple global event handler component exist that handle the same message type, the result is non-deterministic.

Parameters
msgThe message to deliver.
senderComponentThe component that triggered the event in the first place. May be nullptr. If not null, this information is stored in msg as xiiEventMessage::m_hSenderObject and xiiEventMessage::m_hSenderComponent. This information is used to pass through more contextual information for the event handler. For instance, a trigger component would pass through itself. A projectile component sending a 'take damage event' to the hit object, would also pass through itself (the projectile) such that the handling code can detect which object was responsible for the damage (and using the xiiGameObject's team-ID, it can detect which player fired the projectile).

◆ SendMessage() [1/2]

XII_ALWAYS_INLINE bool xiiGameObject::SendMessage ( xiiMessage & ref_msg)

Sends a message to all components of this object.

Returns true, if there was any recipient for this type of message.

◆ SendMessage() [2/2]

XII_ALWAYS_INLINE bool xiiGameObject::SendMessage ( xiiMessage & ref_msg) const

Sends a message to all components of this object.

Returns true, if there was any recipient for this type of message.

◆ SendMessageRecursive() [1/2]

XII_ALWAYS_INLINE bool xiiGameObject::SendMessageRecursive ( xiiMessage & ref_msg)

Sends a message to all components of this object and then recursively to all children.

Returns true, if there was any recipient for this type of message.

◆ SendMessageRecursive() [2/2]

XII_ALWAYS_INLINE bool xiiGameObject::SendMessageRecursive ( xiiMessage & ref_msg) const

Sends a message to all components of this object and then recursively to all children.

Returns true, if there was any recipient for this type of message.

◆ SetActiveFlag()

void xiiGameObject::SetActiveFlag ( bool bEnabled)

Sets the 'active flag' of the game object, which affects its final 'active state'.

The active flag affects the 'active state' of the game object and all its children and attached components. When a game object does not have the active flag, it is switched to 'inactive'. The same happens for all its children and all components attached to those game objects. Thus removing the active flag from a game object recursively deactivates the entire sub-tree of objects and components.

When the active flag is set on a game object, and all of its parent nodes have the flag set as well, then the active state will be set to true on it and all its children and attached components.

See also
IsActive(), xiiComponent::SetActiveFlag()

◆ SetLocalPosition()

XII_ALWAYS_INLINE void xiiGameObject::SetLocalPosition ( xiiVec3 vPosition)

Changes the position of the object local to its parent.

Note
The rotation of the object itself does not affect the final global position! The local position is always in the space of the parent object. If there is no parent, local position and global position are identical.

◆ SetStableRandomSeed()

XII_ALWAYS_INLINE void xiiGameObject::SetStableRandomSeed ( xiiUInt32 uiSeed)

Overwrites the object's random seed value.

See GetStableRandomSeed() for details.

It should not be necessary to manually change this value, unless you want to make the seed deterministic according to a custom rule.


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