Loading...
Searching...
No Matches
hellfire::MeshComponent Class Referencefinal

#include <MeshComponent.h>

Inheritance diagram for hellfire::MeshComponent:
Collaboration diagram for hellfire::MeshComponent:

Public Member Functions

 MeshComponent ()=default
 
 MeshComponent (std::shared_ptr< Mesh > mesh)
 
void set_mesh (std::shared_ptr< Mesh > mesh)
 
std::shared_ptr< Meshget_mesh () const
 
bool has_mesh () const
 
void set_mesh_asset (AssetID id)
 
AssetID get_mesh_asset () const
 
void set_source (const MeshSource source, MeshInternalType type=MeshInternalType::NONE)
 
MeshSource get_source () const
 
- Public Member Functions inherited from hellfire::Component
virtual ~Component ()=default
 
Entityget_owner () const
 
virtual void on_added (Entity *owner)
 
virtual void on_removed ()
 

Public Attributes

bool is_wireframe = false
 

Private Attributes

std::shared_ptr< Meshmesh_
 
MeshSource source_ = MeshSource::EXTERNAL
 
MeshInternalType internal_type = MeshInternalType::NONE
 
AssetID mesh_asset_id_ = INVALID_ASSET_ID
 

Detailed Description

Definition at line 23 of file MeshComponent.h.

Constructor & Destructor Documentation

◆ MeshComponent() [1/2]

hellfire::MeshComponent::MeshComponent ( )
default

◆ MeshComponent() [2/2]

hellfire::MeshComponent::MeshComponent ( std::shared_ptr< Mesh mesh)
inlineexplicit

Definition at line 26 of file MeshComponent.h.

Member Function Documentation

◆ get_mesh()

std::shared_ptr< Mesh > hellfire::MeshComponent::get_mesh ( ) const
inline

Definition at line 29 of file MeshComponent.h.

◆ get_mesh_asset()

AssetID hellfire::MeshComponent::get_mesh_asset ( ) const
inline

Definition at line 34 of file MeshComponent.h.

◆ get_source()

MeshSource hellfire::MeshComponent::get_source ( ) const
inline

Definition at line 40 of file MeshComponent.h.

◆ has_mesh()

bool hellfire::MeshComponent::has_mesh ( ) const
inline

Definition at line 30 of file MeshComponent.h.

◆ set_mesh()

void hellfire::MeshComponent::set_mesh ( std::shared_ptr< Mesh mesh)
inline

Definition at line 28 of file MeshComponent.h.

◆ set_mesh_asset()

void hellfire::MeshComponent::set_mesh_asset ( AssetID  id)
inline

Definition at line 32 of file MeshComponent.h.

◆ set_source()

void hellfire::MeshComponent::set_source ( const MeshSource  source,
MeshInternalType  type = MeshInternalType::NONE 
)
inline

Definition at line 36 of file MeshComponent.h.

Member Data Documentation

◆ internal_type

MeshInternalType hellfire::MeshComponent::internal_type = MeshInternalType::NONE
private

Definition at line 46 of file MeshComponent.h.

◆ is_wireframe

bool hellfire::MeshComponent::is_wireframe = false

Definition at line 42 of file MeshComponent.h.

◆ mesh_

std::shared_ptr<Mesh> hellfire::MeshComponent::mesh_
private

Definition at line 44 of file MeshComponent.h.

◆ mesh_asset_id_

AssetID hellfire::MeshComponent::mesh_asset_id_ = INVALID_ASSET_ID
private

Definition at line 47 of file MeshComponent.h.

◆ source_

MeshSource hellfire::MeshComponent::source_ = MeshSource::EXTERNAL
private

Definition at line 45 of file MeshComponent.h.


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