Leviathan  0.8.0.0
Leviathan game engine
Leviathan::Model Class Reference

Entity has a model. More...

#include <Components.h>

+ Inheritance diagram for Leviathan::Model:

Public Member Functions

DLLEXPORT Model (Ogre::SceneManager *scene, Ogre::SceneNode *parent, const std::string &meshname)
 
DLLEXPORT void Release (Ogre::SceneManager *scene)
 Destroys GraphicalObject. More...
 
 REFERENCE_HANDLE_UNCOUNTED_TYPE (Model)
 
- Public Member Functions inherited from Leviathan::Component
 Component (COMPONENT_TYPE type)
 
 Component (const Component &)=delete
 
Componentoperator= (const Component &)=delete
 

Public Attributes

Ogre::Item * GraphicalObject = nullptr
 The entity that has this model's mesh loaded. 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::Model
 

Detailed Description

Entity has a model.

Definition at line 224 of file Components.h.

Constructor & Destructor Documentation

◆ Model()

DLLEXPORT Model::Model ( Ogre::SceneManager *  scene,
Ogre::SceneNode *  parent,
const std::string &  meshname 
)

Definition at line 812 of file Components.cpp.

813  :
814  Component(TYPE)
815 {
816  GraphicalObject = scene->createItem(meshname);
817  GraphicalObject->setRenderQueueGroup(DEFAULT_RENDER_QUEUE);
818  parent->attachObject(GraphicalObject);
819 }
Component(COMPONENT_TYPE type)
Definition: Component.h:55
constexpr auto DEFAULT_RENDER_QUEUE
Definition: EntityCommon.h:16
Ogre::Item * GraphicalObject
The entity that has this model&#39;s mesh loaded.
Definition: Components.h:235
static constexpr auto TYPE
Definition: Components.h:237

Member Function Documentation

◆ REFERENCE_HANDLE_UNCOUNTED_TYPE()

Leviathan::Model::REFERENCE_HANDLE_UNCOUNTED_TYPE ( Model  )

◆ Release()

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

Destroys GraphicalObject.

Definition at line 821 of file Components.cpp.

822 {
823 
824  scene->destroyItem(GraphicalObject);
825 }
Ogre::Item * GraphicalObject
The entity that has this model&#39;s mesh loaded.
Definition: Components.h:235

Member Data Documentation

◆ GraphicalObject

Ogre::Item* Leviathan::Model::GraphicalObject = nullptr

The entity that has this model's mesh loaded.

Definition at line 235 of file Components.h.

◆ TYPE

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

Definition at line 237 of file Components.h.


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