Leviathan  0.8.0.0
Leviathan game engine
Leviathan::RenderNode Class Reference

Entity has an Ogre scene node. More...

#include <Components.h>

+ Inheritance diagram for Leviathan::RenderNode:

Public Member Functions

DLLEXPORT RenderNode (Ogre::SceneManager *scene)
 
DLLEXPORT RenderNode (const Test::TestComponentCreation &test)
 Test version that doesn't need a valid scene manager. More...
 
DLLEXPORT void Release (Ogre::SceneManager *worldsscene)
 Gracefully releases while world is still valid. More...
 
 REFERENCE_HANDLE_UNCOUNTED_TYPE (RenderNode)
 
- Public Member Functions inherited from Leviathan::Component
 Component (COMPONENT_TYPE type)
 
 Component (const Component &)=delete
 
Componentoperator= (const Component &)=delete
 

Public Attributes

Ogre::SceneNode * Node = nullptr
 
bool Hidden = false
 Sets objects attached to the node to be hidden or visible. More...
 
Float3 Scale = Float3(1, 1, 1)
 Sets the scale of the node. More...
 
- Public Attributes inherited from Leviathan::Component
bool Marked
 
const COMPONENT_TYPE Type
 Type of this component, used for network serialization. More...
 

Static Public Attributes

static constexpr auto TYPE = COMPONENT_TYPE::RenderNode
 

Detailed Description

Entity has an Ogre scene node.

Note
By default this is not marked. If you change Hidden set as marked to update Node state

Definition at line 73 of file Components.h.

Constructor & Destructor Documentation

◆ RenderNode() [1/2]

DLLEXPORT RenderNode::RenderNode ( Ogre::SceneManager *  scene)

Definition at line 25 of file Components.cpp.

25  : Component(TYPE)
26 {
27  Marked = false;
28 
29  // TODO: allow for static render nodes
30  Node = scene->getRootSceneNode(Ogre::SCENE_DYNAMIC)
31  ->createChildSceneNode(Ogre::SCENE_DYNAMIC);
32 
33  // Node = scene->createSceneNode();
34 }
Component(COMPONENT_TYPE type)
Definition: Component.h:55
Ogre::SceneNode * Node
Definition: Components.h:85
static constexpr auto TYPE
Definition: Components.h:93

◆ RenderNode() [2/2]

DLLEXPORT RenderNode::RenderNode ( const Test::TestComponentCreation &  test)

Test version that doesn't need a valid scene manager.

Definition at line 43 of file Components.cpp.

43  : Component(TYPE)
44 {
45  Marked = false;
46  Node = nullptr;
47 }
Component(COMPONENT_TYPE type)
Definition: Component.h:55
Ogre::SceneNode * Node
Definition: Components.h:85
static constexpr auto TYPE
Definition: Components.h:93

Member Function Documentation

◆ REFERENCE_HANDLE_UNCOUNTED_TYPE()

Leviathan::RenderNode::REFERENCE_HANDLE_UNCOUNTED_TYPE ( RenderNode  )

◆ Release()

DLLEXPORT void RenderNode::Release ( Ogre::SceneManager *  worldsscene)

Gracefully releases while world is still valid.

Definition at line 36 of file Components.cpp.

37 {
38 
39  worldsscene->destroySceneNode(Node);
40  Node = nullptr;
41 }
Ogre::SceneNode * Node
Definition: Components.h:85

Member Data Documentation

◆ Hidden

bool Leviathan::RenderNode::Hidden = false

Sets objects attached to the node to be hidden or visible.

Definition at line 88 of file Components.h.

◆ Node

Ogre::SceneNode* Leviathan::RenderNode::Node = nullptr

Definition at line 85 of file Components.h.

◆ Scale

Float3 Leviathan::RenderNode::Scale = Float3(1, 1, 1)

Sets the scale of the node.

Definition at line 91 of file Components.h.

◆ TYPE

constexpr auto Leviathan::RenderNode::TYPE = COMPONENT_TYPE::RenderNode
static

Definition at line 93 of file Components.h.


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