Overload  1.1
Game engine with editor
Public Types | Public Member Functions | List of all members
OvCore::ECS::Components::CModelRenderer Class Reference

#include <CModelRenderer.h>

Inheritance diagram for OvCore::ECS::Components::CModelRenderer:
OvCore::ECS::Components::AComponent OvCore::API::IInspectorItem OvCore::API::ISerializable

Public Types

enum  EFrustumBehaviour { EFrustumBehaviour::DISABLED = 0, EFrustumBehaviour::CULL_MODEL = 1, EFrustumBehaviour::CULL_MESHES = 2, EFrustumBehaviour::CULL_CUSTOM = 3 }
 

Public Member Functions

 CModelRenderer (ECS::Actor &p_owner)
 
std::string GetName () override
 
void SetModel (OvRendering::Resources::Model *p_model)
 
OvRendering::Resources::ModelGetModel () const
 
void SetFrustumBehaviour (EFrustumBehaviour p_boundingMode)
 
EFrustumBehaviour GetFrustumBehaviour () const
 
const OvRendering::Geometry::BoundingSphereGetCustomBoundingSphere () const
 
void SetCustomBoundingSphere (const OvRendering::Geometry::BoundingSphere &p_boundingSphere)
 
virtual void OnSerialize (tinyxml2::XMLDocument &p_doc, tinyxml2::XMLNode *p_node) override
 
virtual void OnDeserialize (tinyxml2::XMLDocument &p_doc, tinyxml2::XMLNode *p_node) override
 
virtual void OnInspector (OvUI::Internal::WidgetContainer &p_root) override
 
- Public Member Functions inherited from OvCore::ECS::Components::AComponent
 AComponent (ECS::Actor &p_owner)
 
virtual ~AComponent ()
 
virtual void OnAwake ()
 
virtual void OnStart ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void OnDestroy ()
 
virtual void OnUpdate (float p_deltaTime)
 
virtual void OnFixedUpdate (float p_deltaTime)
 
virtual void OnLateUpdate (float p_deltaTime)
 
virtual void OnCollisionEnter (Components::CPhysicalObject &p_otherObject)
 
virtual void OnCollisionStay (Components::CPhysicalObject &p_otherObject)
 
virtual void OnCollisionExit (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerEnter (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerStay (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerExit (Components::CPhysicalObject &p_otherObject)
 

Additional Inherited Members

- Public Attributes inherited from OvCore::ECS::Components::AComponent
ECS::Actorowner
 

Detailed Description

A ModelRenderer is necessary in combination with a MaterialRenderer to render a model in the world

Member Enumeration Documentation

◆ EFrustumBehaviour

Defines how the model renderer bounding sphere should be interpreted

Enumerator
DISABLED 
CULL_MODEL 
CULL_MESHES 
CULL_CUSTOM 

Constructor & Destructor Documentation

◆ CModelRenderer()

OvCore::ECS::Components::CModelRenderer::CModelRenderer ( ECS::Actor p_owner)

Constructor

Parameters
p_owner@project: Overload
Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

Member Function Documentation

◆ GetCustomBoundingSphere()

const OvRendering::Geometry::BoundingSphere & OvCore::ECS::Components::CModelRenderer::GetCustomBoundingSphere ( ) const

Returns the custom bounding sphere

◆ GetFrustumBehaviour()

OvCore::ECS::Components::CModelRenderer::EFrustumBehaviour OvCore::ECS::Components::CModelRenderer::GetFrustumBehaviour ( ) const

Returns the current bounding mode

◆ GetModel()

OvRendering::Resources::Model * OvCore::ECS::Components::CModelRenderer::GetModel ( ) const

Returns the current model

◆ GetName()

std::string OvCore::ECS::Components::CModelRenderer::GetName ( )
overridevirtual

Returns the name of the component

Implements OvCore::ECS::Components::AComponent.

◆ OnDeserialize()

void OvCore::ECS::Components::CModelRenderer::OnDeserialize ( tinyxml2::XMLDocument &  p_doc,
tinyxml2::XMLNode *  p_node 
)
overridevirtual

Deserialize the component

Parameters
p_doc
p_node

Implements OvCore::API::ISerializable.

◆ OnInspector()

void OvCore::ECS::Components::CModelRenderer::OnInspector ( OvUI::Internal::WidgetContainer p_root)
overridevirtual

Defines how the component should be drawn in the inspector

Parameters
p_root

Implements OvCore::API::IInspectorItem.

◆ OnSerialize()

void OvCore::ECS::Components::CModelRenderer::OnSerialize ( tinyxml2::XMLDocument &  p_doc,
tinyxml2::XMLNode *  p_node 
)
overridevirtual

Serialize the component

Parameters
p_doc
p_node

Implements OvCore::API::ISerializable.

◆ SetCustomBoundingSphere()

void OvCore::ECS::Components::CModelRenderer::SetCustomBoundingSphere ( const OvRendering::Geometry::BoundingSphere p_boundingSphere)

Sets the custom bounding sphere

Parameters
p_boundingSphere

◆ SetFrustumBehaviour()

void OvCore::ECS::Components::CModelRenderer::SetFrustumBehaviour ( EFrustumBehaviour  p_boundingMode)

Sets a bounding mode

Parameters
p_boundingMode

◆ SetModel()

void OvCore::ECS::Components::CModelRenderer::SetModel ( OvRendering::Resources::Model p_model)

Defines the model to use

Parameters
p_model

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