Saga3D API Documentation  1.0-RC4
saga::scene::ISceneNodeAnimatorFactory Class Referenceabstract

Interface for dynamic creation of scene node animators. More...

#include <ISceneNodeAnimatorFactory.h>

Public Member Functions

virtual ISceneNodeAnimatorcreateSceneNodeAnimator (ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode *target)=0
 creates a scene node animator based on its type id More...
 
virtual ISceneNodeAnimatorcreateSceneNodeAnimator (const char *typeName, ISceneNode *target)=0
 creates a scene node animator based on its type name More...
 
virtual std::uint32_t getCreatableSceneNodeAnimatorTypeCount () const =0
 returns amount of scene node animator types this factory is able to create More...
 
virtual ESCENE_NODE_ANIMATOR_TYPE getCreateableSceneNodeAnimatorType (std::uint32_t idx) const =0
 returns type of a creatable scene node animator type More...
 
virtual const char * getCreateableSceneNodeAnimatorTypeName (std::uint32_t idx) const =0
 returns type name of a creatable scene node animator type More...
 
virtual const char * getCreateableSceneNodeAnimatorTypeName (ESCENE_NODE_ANIMATOR_TYPE type) const =0
 returns type name of a creatable scene node animator type More...
 

Detailed Description

Interface for dynamic creation of scene node animators.

To be able to add custom scene node animators to Irrlicht and to make it possible for the scene manager to save and load those external animators, simply implement this interface and register it in you scene manager via ISceneManager::registerNodeAnimatorFactory. Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to increase the reference counter of the scene node manager. This is not necessary because the scene node manager will grab() the factory anyway, and otherwise cyclic references will be created and the scene manager and all its nodes won't get deallocated.

Definition at line 27 of file ISceneNodeAnimatorFactory.h.

Member Function Documentation

◆ createSceneNodeAnimator() [1/2]

virtual ISceneNodeAnimator* saga::scene::ISceneNodeAnimatorFactory::createSceneNodeAnimator ( const char *  typeName,
ISceneNode target 
)
pure virtual

creates a scene node animator based on its type name

Parameters
typeNameType of the scene node animator to add.
targetTarget scene node of the new animator.
Returns
Returns pointer to the new scene node animator or null if not successful. You need to drop this pointer after calling this, see IReferenceCounted::drop() for details.

◆ createSceneNodeAnimator() [2/2]

virtual ISceneNodeAnimator* saga::scene::ISceneNodeAnimatorFactory::createSceneNodeAnimator ( ESCENE_NODE_ANIMATOR_TYPE  type,
ISceneNode target 
)
pure virtual

creates a scene node animator based on its type id

Parameters
typeType of the scene node animator to add.
targetTarget scene node of the new animator.
Returns
Returns pointer to the new scene node animator or null if not successful. You need to drop this pointer after calling this, see IReferenceCounted::drop() for details.

◆ getCreatableSceneNodeAnimatorTypeCount()

virtual std::uint32_t saga::scene::ISceneNodeAnimatorFactory::getCreatableSceneNodeAnimatorTypeCount ( ) const
pure virtual

returns amount of scene node animator types this factory is able to create

◆ getCreateableSceneNodeAnimatorType()

virtual ESCENE_NODE_ANIMATOR_TYPE saga::scene::ISceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorType ( std::uint32_t  idx) const
pure virtual

returns type of a creatable scene node animator type

Parameters
idxIndex of scene node animator type in this factory. Must be a value between 0 and getCreatableSceneNodeTypeCount()

◆ getCreateableSceneNodeAnimatorTypeName() [1/2]

virtual const char* saga::scene::ISceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorTypeName ( ESCENE_NODE_ANIMATOR_TYPE  type) const
pure virtual

returns type name of a creatable scene node animator type

Parameters
typeType of scene node animator.
Returns
: Returns name of scene node animator type if this factory can create the type, otherwise 0.

◆ getCreateableSceneNodeAnimatorTypeName() [2/2]

virtual const char* saga::scene::ISceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorTypeName ( std::uint32_t  idx) const
pure virtual

returns type name of a creatable scene node animator type

Parameters
idxIndex of scene node animator type in this factory. Must be a value between 0 and getCreatableSceneNodeAnimatorTypeCount()

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