Thrive
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
thrive::OgreSceneNodeComponent Class Reference

A component for a Ogre scene nodes. More...

#include <scene_node_system.h>

Inheritance diagram for thrive::OgreSceneNodeComponent:
thrive::Component

Classes

struct  Transform
 Properties. More...
 

Public Member Functions

void load (const StorageContainer &storage) override
 Loads the component. More...
 
StorageContainer storage () const override
 Serializes the component. More...
 
void playAnimation (std::string name, bool loop)
 Sets the current animation to be played. More...
 
void stopAnimation (std::string name)
 Stops a specific animation. More...
 
void stopAllAnimations ()
 Stops all animations playing on this sceneNode.
 
void setAnimationSpeed (float factor)
 Sets the speed for all animations for this scenenode. More...
 
void attachObject (Ogre::MovableObject *obj)
 Attaches a MovableObject to the underlying scenenode. More...
 
void attachSoundListener ()
 Attaches the sound-listener to the underlying scenenode, having the sound perspective move with it.
 
- Public Member Functions inherited from thrive::Component
virtual ~Component ()=0
 Destructor.
 
bool isVolatile () const
 A volatile component is not serialized during a save. More...
 
EntityId owner () const
 The entity this component belongs to. More...
 
void setVolatile (bool isVolatile)
 Sets the volatile flag. More...
 
void setOwner (EntityId owner)
 Sets the component's owner. More...
 
virtual ComponentTypeId typeId () const =0
 The component's type id.
 
virtual std::string typeName () const =0
 The component's type name.
 

Static Public Member Functions

static luabind::scope luaBindings ()
 Lua bindings. More...
 
- Static Public Member Functions inherited from thrive::Component
static luabind::scope luaBindings ()
 Lua bindings. More...
 

Public Attributes

TouchableValue< Ogre::String > m_meshName
 The name of the mesh to attach to this scene node.
 
TouchableValue< EntityId > m_parentId = NULL_ENTITY
 The entity id of the parent scene node.
 
Transform m_transform
 Transform.
 
Ogre::SceneNode * m_sceneNode = nullptr
 Pointer to the underlying Ogre::SceneNode.
 
Ogre::Entity * m_entity = nullptr
 Pointer to the underlying Ogre::Entity.
 
TouchableValue< bool > m_visible = true
 Whether the scenenode is visible.
 
TouchableValue< std::string > m_planeTexture
 Whether the scenenode is a simple plane.
 

Friends

class OgreUpdateSceneNodeSystem
 

Detailed Description

A component for a Ogre scene nodes.

Member Function Documentation

void OgreSceneNodeComponent::attachObject ( Ogre::MovableObject *  obj)

Attaches a MovableObject to the underlying scenenode.

Note that this will not transfer across serialization so should prefer to be used in initialization

Parameters
objObject to attach
void OgreSceneNodeComponent::load ( const StorageContainer &  storage)
overridevirtual

Loads the component.

Parameters
storage

Implements thrive::Component.

luabind::scope OgreSceneNodeComponent::luaBindings ( )
static

Lua bindings.

Exposes:

Returns
void OgreSceneNodeComponent::playAnimation ( std::string  name,
bool  loop 
)

Sets the current animation to be played.

Parameters
nameName of the animation to play
loopIf true the animation will loop indefinitely
void OgreSceneNodeComponent::setAnimationSpeed ( float  factor)

Sets the speed for all animations for this scenenode.

Parameters
factorFactor to multiply the speed by. 1.0 is normal speed.
void OgreSceneNodeComponent::stopAnimation ( std::string  name)

Stops a specific animation.

Parameters
nameName of the animation to stop
StorageContainer OgreSceneNodeComponent::storage ( ) const
overridevirtual

Serializes the component.

Returns

Implements thrive::Component.


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