Anvil Engine
Loading...
Searching...
No Matches
MeshComponent Class Reference

#include <MeshComponent.h>

Inheritance diagram for MeshComponent:
IComponent

Public Member Functions

 MeshComponent (AMesh *mesh)
void OnInit (AEntity *owner) override
void OnUpdate (float dt) override
void OnRender (AShader *shader) override
Public Member Functions inherited from IComponent
virtual ~IComponent ()
 Virtual destructor for the IComponent class. Ensures proper cleanup of derived class objects when deleted through a base class pointer.

Additional Inherited Members

Public Attributes inherited from IComponent
AEntitym_owner = nullptr
 Pointer to the entity that owns this component. This allows the component to access its parent entity and other components attached to it.

Constructor & Destructor Documentation

◆ MeshComponent()

MeshComponent::MeshComponent ( AMesh * mesh)
inline

Member Function Documentation

◆ OnInit()

void MeshComponent::OnInit ( AEntity * owner)
inlineoverridevirtual

Initialize the entity component with its owner

Parameters
ownerPointer to the AEntity that owns this component

Implements IComponent.

◆ OnRender()

void MeshComponent::OnRender ( AShader * shader)
inlineoverridevirtual

Renders the mesh component using the specified shader

Parameters
shaderThe shader program to use for rendering

Implements IComponent.

◆ OnUpdate()

void MeshComponent::OnUpdate ( float dt)
inlineoverridevirtual

Called once per frame to update the game state

Parameters
dtThe time elapsed since the last update in seconds

Implements IComponent.


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