This documents an old version of bs::framework. Click here to see the latest release.
CBone Class Reference

Description

Component that maps animation for specific bone also be applied to the SceneObject this component is attached to.

The component will attach to the first found parent Animation component.

Inherits Component.

Methods

 CBone (const HSceneObject &parent)
 
void setBoneName (const String &name)
 Determines the name of the bone the component is referencing. More...
 
const StringgetBoneName () const
 Determines the name of the bone the component is referencing. More...
 
RTTITypeBasegetRTTI () const override
 Returns an interface you can use to access class' Run Time Type Information. More...
 
Internal
void _setParent (const HAnimation &animation, bool isInternal=false)
 Changes the parent animation of this component. More...
 
- Methods inherited from Component
const HSceneObjectsceneObject () const
 Returns the SceneObject this Component is assigned to. More...
 
const HSceneObjectSO () const
 Returns the SceneObject this Component is assigned to. More...
 
const HComponentgetHandle () const
 Returns a handle to this object. More...
 
virtual void update ()
 Called once per frame. More...
 
virtual void fixedUpdate ()
 Called at fixed time intervals (e.g. More...
 
virtual bool calculateBounds (Bounds &bounds)
 Calculates bounds of the visible contents represented by this component (for example a mesh for Renderable). More...
 
virtual bool typeEquals (const Component &other)
 Checks if this and the provided component represent the same type. More...
 
void destroy (bool immediate=false)
 Removes the component from parent SceneObject and deletes it. More...
 
RTTITypeBasegetRTTI () const override
 Returns an interface you can use to access class' Run Time Type Information. More...
 
virtual void _instantiate ()
 Construct any resources the component needs before use. More...
 
void setNotifyFlags (TransformChangedFlags flags)
 Sets new flags that determine when is onTransformChanged called. More...
 
TransformChangedFlags _getNotifyFlags () const
 Gets the currently assigned notify flags. More...
 
- Methods inherited from GameObject
UINT64 getInstanceId () const
 Returns the unique instance ID of the GameObject. More...
 
UINT32 getLinkId () const
 Returns an ID that identifies a link between this object and its equivalent in the linked prefab. More...
 
const StringgetName () const
 Gets the name of the object. More...
 
void setName (const String &name)
 Sets the name of the object. More...
 
RTTITypeBasegetRTTI () const override
 Returns an interface you can use to access class' Run Time Type Information. More...
 
void _setIsDestroyed ()
 Marks the object as destroyed. More...
 
bool _getIsDestroyed () const
 Checks if the object has been destroyed. More...
 
void _setLinkId (UINT32 id)
 Changes the prefab link ID for this object. More...
 
virtual void _setInstanceData (GameObjectInstanceDataPtr &other)
 Replaces the instance data with another objects instance data. More...
 
virtual GameObjectInstanceDataPtr _getInstanceData () const
 Returns instance data that identifies this GameObject and is used for referencing by game object handles. More...
 
- Methods inherited from IReflectable
bool isDerivedFrom (RTTITypeBase *base)
 Returns true if current RTTI class is derived from base (Or if it is the same type as base). More...
 
UINT32 getTypeId () const
 Returns an unique type identifier of the class. More...
 
const StringgetTypeName () const
 Returns the type name of the class. More...
 

Static methods

static RTTITypeBasegetRTTIStatic ()
 
- Static methods inherited from Component
static RTTITypeBasegetRTTIStatic ()
 
- Static methods inherited from GameObject
static RTTITypeBasegetRTTIStatic ()
 
- Static methods inherited from IReflectable
static UnorderedMap< UINT32, RTTITypeBase * > & getAllRTTITypes ()
 Returns all available RTTI types. More...
 
static SPtr< IReflectablecreateInstanceFromTypeId (UINT32 rttiTypeId)
 Creates an empty instance of a class from a type identifier. More...
 
static void _registerRTTIType (RTTITypeBase *rttiType)
 Called by each type implementing RTTITypeBase, on program load. More...
 
static RTTITypeBase_getRTTIfromTypeId (UINT32 rttiTypeId)
 Returns class' RTTI type from type id. More...
 
static bool _isTypeIdDuplicate (UINT32 typeId)
 Checks if the provided type id is unique. More...
 
static void _checkForCircularReferences ()
 Iterates over all RTTI types and reports any circular references (for example one type having a field referencing another type, and that type having a field referencing the first type). More...
 
static RTTITypeBasegetRTTIStatic ()
 Returns an interface you can use to access class' Run Time Type Information. More...
 

Method documentation

◆ _setParent()

void _setParent ( const HAnimation animation,
bool  isInternal = false 
)

Changes the parent animation of this component.

Parameters
[in]animationNew animation parent, can be null.
[in]isInternalIf true the bone will just be changed internally, but parent animation will not be notified.

◆ destroyInternal()

void destroyInternal
overrideprotected

Destroys this component.

Parameters
[in]handleGame object handle this this object.
[in]immediateIf true, the object will be deallocated and become unusable right away. Otherwise the deallocation will be delayed to the end of frame (preferred method).
Note
Unlike destroy(), does not remove the component from its parent.

◆ getBoneName()

const String& getBoneName ( ) const

Determines the name of the bone the component is referencing.

◆ getRTTI()

RTTITypeBase* getRTTI ( ) const
overridevirtual

Returns an interface you can use to access class' Run Time Type Information.

Note

You must derive your own version of RTTITypeBase, in which you may encapsulate all reflection specific operations.

Implements IReflectable.

◆ onDestroyed()

void onDestroyed ( )
overrideprotectedvirtual

Called once just before the component is destroyed.

Called regardless of the state the component is in.

Reimplemented from Component.

◆ onDisabled()

void onDisabled ( )
overrideprotectedvirtual

Called every time a component is placed into the Stopped state.

This includes component destruction if component wasn't already in Stopped state during destruction. When called during destruction it is called before onDestroyed.

Reimplemented from Component.

◆ onEnabled()

void onEnabled ( )
overrideprotectedvirtual

Called every time a component leaves the Stopped state.

This includes component creation if requirements for leaving the Stopped state are met. When called during creation it is called after onInitialized.

Reimplemented from Component.

◆ onTransformChanged()

void onTransformChanged ( TransformChangedFlags  flags)
overrideprotectedvirtual

Called when the component's parent scene object has changed.

Not called if the component is in Stopped state. Also only called if necessary notify flags are set via _setNotifyFlags().

Reimplemented from Component.

◆ setBoneName()

void setBoneName ( const String name)

Determines the name of the bone the component is referencing.