Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
eng::MeshComponent Class Referenceabstract

#include <MeshComponent.h>

+ Inheritance diagram for eng::MeshComponent:
+ Collaboration diagram for eng::MeshComponent:

Public Member Functions

 MeshComponent ()=default
 
 MeshComponent (const std::shared_ptr< Material > &material, const std::shared_ptr< Mesh > &mesh)
 
void LoadProperties (const nlohmann::json &json) override
 
void Update (float deltaTime) override
 
void SetMaterial (const std::shared_ptr< Material > &material)
 
void SetMesh (const std::shared_ptr< Mesh > &mesh)
 
virtual void Init ()
 
virtual size_t GetTypeId () const =0
 
GameObjectGetOwner ()
 

Static Public Member Functions

template<typename T >
static size_t StaticTypeId ()
 

Protected Attributes

GameObjectm_owner = nullptr
 

Detailed Description

Definition at line 11 of file MeshComponent.h.

Constructor & Destructor Documentation

◆ MeshComponent() [1/2]

eng::MeshComponent::MeshComponent ( )
default

◆ MeshComponent() [2/2]

eng::MeshComponent::MeshComponent ( const std::shared_ptr< Material > &  material,
const std::shared_ptr< Mesh > &  mesh 
)

Definition at line 10 of file MeshComponent.cpp.

Member Function Documentation

◆ GetOwner()

GameObject * eng::Component::GetOwner ( )
inherited

Definition at line 15 of file Component.cpp.

References eng::Component::m_owner.

Referenced by Update(), and eng::SpriteComponent::Update().

◆ GetTypeId()

virtual size_t eng::Component::GetTypeId ( ) const
pure virtualinherited

◆ Init()

void eng::Component::Init ( )
virtualinherited

Reimplemented in eng::PhysicsComponent, and eng::PlayerControllerComponent.

Definition at line 11 of file Component.cpp.

Referenced by eng::GameObject::AddComponent().

◆ LoadProperties()

void eng::MeshComponent::LoadProperties ( const nlohmann::json &  json)
overridevirtual

◆ SetMaterial()

void eng::MeshComponent::SetMaterial ( const std::shared_ptr< Material > &  material)

Definition at line 116 of file MeshComponent.cpp.

References material.

Referenced by LoadProperties().

◆ SetMesh()

void eng::MeshComponent::SetMesh ( const std::shared_ptr< Mesh > &  mesh)

Definition at line 121 of file MeshComponent.cpp.

References mesh.

Referenced by LoadProperties().

◆ StaticTypeId()

template<typename T >
static size_t eng::Component::StaticTypeId ( )
inlinestaticinherited

Definition at line 26 of file Component.h.

◆ Update()

Member Data Documentation

◆ m_owner


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