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)
- 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
 Type of this component, used for network serialization. More...

Static Public Attributes

static constexpr auto TYPE = COMPONENT_TYPE::ManualObject

Detailed Description

Definition at line 485 of file Components.h.

Constructor & Destructor Documentation

◆ ManualObject()

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

Definition at line 316 of file Components.cpp.

316  : Component(TYPE)
317 {
318  Object = scene->createManualObject();
319  Object->setRenderQueueGroup(DEFAULT_RENDER_QUEUE);
320 }
Component(COMPONENT_TYPE type)
Definition: Component.h:54
Definition: EntityCommon.h:16
static constexpr auto TYPE
Definition: Components.h:501
Ogre::ManualObject * Object
Definition: Components.h:493

Member Function Documentation


Leviathan::ManualObject::REFERENCE_HANDLE_UNCOUNTED_TYPE ( ManualObject  )

◆ Release()

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

Definition at line 322 of file Components.cpp.

323 {
324  if(Object) {
326  scene->destroyManualObject(Object);
327  Object = nullptr;
328  }
330  CreatedMesh.clear();
331 }
std::string CreatedMesh
Definition: Components.h:499
Ogre::ManualObject * Object
Definition: Components.h:493

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

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

Definition at line 499 of file Components.h.

◆ Object

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

Definition at line 493 of file Components.h.


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

Definition at line 501 of file Components.h.

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