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

#include <CMaterialRenderer.h>

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

Public Types

using MaterialList = std::array< OvCore::Resources::Material *, MAX_MATERIAL_COUNT >
 
using MaterialField = std::array< std::array< OvUI::Widgets::AWidget *, 3 >, MAX_MATERIAL_COUNT >
 

Public Member Functions

 CMaterialRenderer (ECS::Actor &p_owner)
 
std::string GetName () override
 
void FillWithMaterial (OvCore::Resources::Material &p_material)
 
void SetMaterialAtIndex (uint8_t p_index, OvCore::Resources::Material &p_material)
 
OvCore::Resources::MaterialGetMaterialAtIndex (uint8_t p_index)
 
void RemoveMaterialAtIndex (uint8_t p_index)
 
void RemoveMaterialByInstance (OvCore::Resources::Material &p_instance)
 
void RemoveAllMaterials ()
 
void UpdateMaterialList ()
 
void SetUserMatrixElement (uint32_t p_row, uint32_t p_column, float p_value)
 
float GetUserMatrixElement (uint32_t p_row, uint32_t p_column) const
 
const OvMaths::FMatrix4GetUserMatrix () const
 
const MaterialListGetMaterials () const
 
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 component that handle a material list, necessary for model rendering

Member Typedef Documentation

◆ MaterialField

◆ MaterialList

Constructor & Destructor Documentation

◆ CMaterialRenderer()

OvCore::ECS::Components::CMaterialRenderer::CMaterialRenderer ( 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

◆ FillWithMaterial()

void OvCore::ECS::Components::CMaterialRenderer::FillWithMaterial ( OvCore::Resources::Material p_material)

Fill the material renderer with the given material

Parameters
p_material

◆ GetMaterialAtIndex()

OvCore::Resources::Material * OvCore::ECS::Components::CMaterialRenderer::GetMaterialAtIndex ( uint8_t  p_index)

Returns the material to use at index

Parameters
p_index

◆ GetMaterials()

const OvCore::ECS::Components::CMaterialRenderer::MaterialList & OvCore::ECS::Components::CMaterialRenderer::GetMaterials ( ) const

Returns the materials

◆ GetName()

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

Returns the name of the component

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

◆ GetUserMatrix()

const OvMaths::FMatrix4 & OvCore::ECS::Components::CMaterialRenderer::GetUserMatrix ( ) const

Returns the user matrix

◆ GetUserMatrixElement()

float OvCore::ECS::Components::CMaterialRenderer::GetUserMatrixElement ( uint32_t  p_row,
uint32_t  p_column 
) const

Returns an element of the user matrix

Parameters
p_row
p_column

◆ OnDeserialize()

void OvCore::ECS::Components::CMaterialRenderer::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::CMaterialRenderer::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::CMaterialRenderer::OnSerialize ( tinyxml2::XMLDocument &  p_doc,
tinyxml2::XMLNode *  p_node 
)
overridevirtual

Serialize the component

Parameters
p_doc
p_node

Implements OvCore::API::ISerializable.

◆ RemoveAllMaterials()

void OvCore::ECS::Components::CMaterialRenderer::RemoveAllMaterials ( )

Remove every materials

◆ RemoveMaterialAtIndex()

void OvCore::ECS::Components::CMaterialRenderer::RemoveMaterialAtIndex ( uint8_t  p_index)

Remove the material at index

Parameters
p_index

◆ RemoveMaterialByInstance()

void OvCore::ECS::Components::CMaterialRenderer::RemoveMaterialByInstance ( OvCore::Resources::Material p_instance)

Remove the material by instance

Parameters
p_instance

◆ SetMaterialAtIndex()

void OvCore::ECS::Components::CMaterialRenderer::SetMaterialAtIndex ( uint8_t  p_index,
OvCore::Resources::Material p_material 
)

Defines the material to use for the given index

Parameters
p_index
p_material

◆ SetUserMatrixElement()

void OvCore::ECS::Components::CMaterialRenderer::SetUserMatrixElement ( uint32_t  p_row,
uint32_t  p_column,
float  p_value 
)

Defines an element of the user matrix

Parameters
p_row
p_column
p_value

◆ UpdateMaterialList()

void OvCore::ECS::Components::CMaterialRenderer::UpdateMaterialList ( )

Update the material list by fetching model information


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