Leviathan  0.8.0.0
Leviathan game engine
Leviathan::ManualObject Class Reference

#include <Components.h>

+ Inheritance diagram for Leviathan::ManualObject:

Public Member Functions

DLLEXPORT ManualObject (Ogre::SceneManager *scene)
 
DLLEXPORT void Release (Ogre::SceneManager *scene)
 
 REFERENCE_HANDLE_UNCOUNTED_TYPE (ManualObject)
 
- Public Member Functions inherited from Leviathan::Component
 Component (COMPONENT_TYPE type)
 
 Component (const Component &)=delete
 
Componentoperator= (const Component &)=delete
 

Public Attributes

Ogre::ManualObjectObject = nullptr
 
std::string CreatedMesh
 
- 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::ManualObject
 

Detailed Description

Definition at line 565 of file Components.h.

Constructor & Destructor Documentation

◆ ManualObject()

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

Definition at line 828 of file Components.cpp.

828  : Component(TYPE)
829 {
830  Object = scene->createManualObject();
831  Object->setRenderQueueGroup(DEFAULT_RENDER_QUEUE);
832 }
Component(COMPONENT_TYPE type)
Definition: Component.h:55
constexpr auto DEFAULT_RENDER_QUEUE
Definition: EntityCommon.h:16
static constexpr auto TYPE
Definition: Components.h:581
Ogre::ManualObject * Object
Definition: Components.h:573

Member Function Documentation

◆ REFERENCE_HANDLE_UNCOUNTED_TYPE()

Leviathan::ManualObject::REFERENCE_HANDLE_UNCOUNTED_TYPE ( ManualObject  )

◆ Release()

DLLEXPORT void ManualObject::Release ( Ogre::SceneManager *  scene)

Definition at line 834 of file Components.cpp.

835 {
836  if(Object) {
837 
838  scene->destroyManualObject(Object);
839  Object = nullptr;
840  }
841 
842  CreatedMesh.clear();
843 }
std::string CreatedMesh
Definition: Components.h:579
Ogre::ManualObject * Object
Definition: Components.h:573

Member Data Documentation

◆ CreatedMesh

std::string Leviathan::ManualObject::CreatedMesh

When not empty the ManualObject has been created into an actual mesh that needs to be destroyed on release

Note
The Object can be directly added to a scene so this may be empty even if the Object is created

Definition at line 579 of file Components.h.

◆ Object

Ogre::ManualObject* Leviathan::ManualObject::Object = nullptr

Definition at line 573 of file Components.h.

◆ TYPE

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

Definition at line 581 of file Components.h.


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