3 #include "engine/component.h"
4 #include "engine/system.h"
5 #include "engine/touchable.h"
6 #include "luabind/object.hpp"
9 #include <OgreVector3.h>
10 #include <OgreQuaternion.h>
35 COMPONENT(OgreSceneNode)
63 Ogre::Vector3
scale = {1, 1, 1};
156 Ogre::MovableObject* obj
211 Ogre::MovableObject* obj
214 std::vector<std::pair<std::string, bool>> m_animationsToStart;
215 std::vector<std::string> m_animationsToHalt;
216 bool m_animationChange =
false;
217 bool m_fullAnimationHalt =
false;
218 float m_animationSpeedFactor = 1.0f;
220 static bool s_soundListenerAttached;
241 static luabind::scope
268 void update(
int,
int)
override;
272 struct Implementation;
273 std::unique_ptr<Implementation> m_impl;
292 static luabind::scope
319 void update(
int,
int)
override;
323 struct Implementation;
324 std::unique_ptr<Implementation> m_impl;
342 static luabind::scope
369 void update(
int,
int)
override;
374 struct Implementation;
375 std::unique_ptr<Implementation> m_impl;
Creates scene nodes for new OgreSceneNodeComponents.
Definition: scene_node_system.h:229
void load(const StorageContainer &storage) override
Loads the component.
Definition: scene_node_system.cpp:138
Removes scene nodes for removed OgreSceneNodeComponents.
Definition: scene_node_system.h:280
Helper class for keeping track of changing data.
Definition: touchable.h:18
TouchableValue< Ogre::String > m_meshName
The name of the mesh to attach to this scene node.
Definition: scene_node_system.h:168
void init(GameState *gameState) override
Initializes the system.
Definition: scene_node_system.cpp:250
void shutdown() override
Shuts the system down.
Definition: scene_node_system.cpp:428
Transform m_transform
Transform.
Definition: scene_node_system.h:179
Base class for components.
Definition: component.h:31
void attachObject(Ogre::MovableObject *obj)
Attaches a MovableObject to the underlying scenenode.
Definition: scene_node_system.cpp:197
void init(GameState *gameState) override
Initializes the system.
Definition: scene_node_system.cpp:418
static luabind::scope luaBindings()
Lua bindings.
Definition: scene_node_system.cpp:389
A system handles one specific part of the game.
Definition: system.h:23
TouchableValue< EntityId > m_parentId
The entity id of the parent scene node.
Definition: scene_node_system.h:173
void update(int, int) override
Removes stale scene nodes.
Definition: scene_node_system.cpp:354
Ogre::SceneNode * m_sceneNode
Pointer to the underlying Ogre::SceneNode.
Definition: scene_node_system.h:185
~OgreUpdateSceneNodeSystem()
Destructor.
Definition: scene_node_system.cpp:414
A component for a Ogre scene nodes.
Definition: scene_node_system.h:34
void shutdown() override
Shuts the system down.
Definition: scene_node_system.cpp:346
Definition: bullet_to_ogre_system.h:5
void setAnimationSpeed(float factor)
Sets the speed for all animations for this scenenode.
Definition: scene_node_system.cpp:176
StorageContainer storage() const override
Serializes the component.
Definition: scene_node_system.cpp:154
Definition: bullet_ogre_conversion.h:6
~OgreRemoveSceneNodeSystem()
Destructor.
Definition: scene_node_system.cpp:329
GameState * gameState() const
Returns the system's game state.
Definition: system.cpp:183
static luabind::scope luaBindings()
Lua bindings.
Definition: scene_node_system.cpp:303
OgreUpdateSceneNodeSystem()
Constructor.
Definition: scene_node_system.cpp:408
Represents a distinct set of active systems and entities.
Definition: game_state.h:41
void stopAllAnimations()
Stops all animations playing on this sceneNode.
Definition: scene_node_system.cpp:191
Definition: debug_drawing.h:8
TouchableValue< bool > m_visible
Whether the scenenode is visible.
Definition: scene_node_system.h:196
void update(int, int) override
Updates the scene nodes.
Definition: scene_node_system.cpp:437
TouchableValue< std::string > m_planeTexture
Whether the scenenode is a simple plane.
Definition: scene_node_system.h:201
void update(int, int) override
Adds new scene nodes.
Definition: scene_node_system.cpp:269
Ogre::Entity * m_entity
Pointer to the underlying Ogre::Entity.
Definition: scene_node_system.h:190
static luabind::scope luaBindings()
Lua bindings.
Definition: scene_node_system.cpp:224
void init(GameState *gameState) override
Initializes the system.
Definition: scene_node_system.cpp:333
static luabind::scope luaBindings()
Lua bindings.
Definition: scene_node_system.cpp:106
void playAnimation(std::string name, bool loop)
Sets the current animation to be played.
Definition: scene_node_system.cpp:167
void shutdown() override
Shuts the system down.
Definition: scene_node_system.cpp:261
OgreRemoveSceneNodeSystem()
Constructor.
Definition: scene_node_system.cpp:323
~OgreAddSceneNodeSystem()
Destructor.
Definition: scene_node_system.cpp:246
void stopAnimation(std::string name)
Stops a specific animation.
Definition: scene_node_system.cpp:183
Updates scene node transformations.
Definition: scene_node_system.h:330
OgreAddSceneNodeSystem()
Constructor.
Definition: scene_node_system.cpp:240
void attachSoundListener()
Attaches the sound-listener to the underlying scenenode, having the sound perspective move with it...
Definition: scene_node_system.cpp:212
A key-value storage for serialization.
Definition: serialization.h:36