The Joe Engine
Joe's engine programming playground
JoeEngine::JEMaterialComponentManager Class Reference

The Material Component Manager class. More...

#include <MaterialComponentManager.h>

Inheritance diagram for JoeEngine::JEMaterialComponentManager:
JoeEngine::JEComponentManager

Public Member Functions

 JEMaterialComponentManager ()=default
 Default constructor. More...
 
virtual ~JEMaterialComponentManager ()=default
 Destructor (default). More...
 
void Update (JEEngineInstance *engineInstance) override
 Update material components. More...
 
void AddNewComponent (uint32_t entityID) override
 Add new material component. More...
 
void RemoveComponent (uint32_t entityID) override
 Remove material component. More...
 
MaterialComponentGetComponent (uint32_t entityID) const
 Get material component. More...
 
void SetComponent (uint32_t entityID, MaterialComponent newComp)
 Set material component. More...
 
const PackedArray< MaterialComponent > & GetComponentList () const
 Get list of material components. More...
 
- Public Member Functions inherited from JoeEngine::JEComponentManager
 JEComponentManager ()=default
 Default constructor. More...
 
virtual ~JEComponentManager ()=default
 Destructor (default). More...
 

Detailed Description

The Material Component Manager class.

Contains all material components in a packed array of data. The material system is in progress and this class may change in the near future.

See also
JEEngineInstance

Constructor & Destructor Documentation

◆ JEMaterialComponentManager()

JoeEngine::JEMaterialComponentManager::JEMaterialComponentManager ( )
default

Default constructor.

No specific behavior.

◆ ~JEMaterialComponentManager()

virtual JoeEngine::JEMaterialComponentManager::~JEMaterialComponentManager ( )
virtualdefault

Destructor (default).

Member Function Documentation

◆ AddNewComponent()

void JoeEngine::JEMaterialComponentManager::AddNewComponent ( uint32_t  entityID)
overridevirtual

Add new material component.

Adds a new, default-constructed material component to the packed array of material components at the specified entity index. Overrides purely virtual function declared in JEComponentManager.

Parameters
entityIDthe id of the entity to add the material component to

Implements JoeEngine::JEComponentManager.

◆ GetComponent()

MaterialComponent * JoeEngine::JEMaterialComponentManager::GetComponent ( uint32_t  entityID) const

Get material component.

Gets the material component attached to the entity ID.

Parameters
entityIDthe entity ID whose material component to return
Returns
pointer to the material component attached to the entity ID

◆ GetComponentList()

const PackedArray< MaterialComponent > & JoeEngine::JEMaterialComponentManager::GetComponentList ( ) const

Get list of material components.

Gets the member list of mesh components.

Returns
the list of mesh components.

◆ RemoveComponent()

void JoeEngine::JEMaterialComponentManager::RemoveComponent ( uint32_t  entityID)
overridevirtual

Remove material component.

Removes the material component from the list of material components at the specified entity index. Overrides purely virtual function declared in JEComponentManager.

Parameters
entityIDthe id of the entity to remove the material component from

Implements JoeEngine::JEComponentManager.

◆ SetComponent()

void JoeEngine::JEMaterialComponentManager::SetComponent ( uint32_t  entityID,
MaterialComponent  newComp 
)

Set material component.

Sets the material component already attached to the entityID to the new component.

Parameters
entityIDthe entity ID whose material component to set
newCompthe new material component

◆ Update()

void JoeEngine::JEMaterialComponentManager::Update ( JEEngineInstance engineInstance)
overridevirtual

Update material components.

Updates all stored material components. Currently, updating material components does nothing. Overrides purely virtual function declared in JEComponentManager.

Parameters
engineInstancea reference to the current JEEngineInstance object if needed for certain API calls

Implements JoeEngine::JEComponentManager.


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