Hymn to Beauty
C++ 3D Engine
Component::Mesh Class Reference

Component providing geometry to an entity. More...

#include <Mesh.hpp>

Inheritance diagram for Component::Mesh:
Component::SuperComponent

Public Member Functions

 Mesh ()
 Create new mesh. More...
 
 ~Mesh () override
 Destructor. More...
 
void Serialize (Json::Value &node, bool load) override
 Save or load component values to/from JSON. More...
 
- Public Member Functions inherited from Component::SuperComponent
 SuperComponent ()
 Create new SuperComponent. More...
 
virtual ~SuperComponent ()
 Destructor. More...
 
void Kill ()
 Kill the component, will be removed at the end of the frame. More...
 
bool IsKilled () const
 Get whether component has been killed. More...
 

Public Attributes

Geometry::Modelmodel = nullptr
 Geometry data. More...
 
uint32_t layerMask = 1u
 Bitmask of which layers to render to. More...
 
- Public Attributes inherited from Component::SuperComponent
Entityentity = nullptr
 Pointer to which entity this component corresponds. More...
 

Detailed Description

Component providing geometry to an entity.

Constructor & Destructor Documentation

◆ Mesh()

Mesh::Mesh ( )

Create new mesh.

◆ ~Mesh()

Mesh::~Mesh ( )
override

Destructor.

Member Function Documentation

◆ Serialize()

void Mesh::Serialize ( Json::Value &  node,
bool  load 
)
overridevirtual

Save or load component values to/from JSON.

Parameters
nodeThe JSON node to save to or load from.
loadWhether to load (otherwise saves).

Implements Component::SuperComponent.

Member Data Documentation

◆ layerMask

uint32_t Component::Mesh::layerMask = 1u

Bitmask of which layers to render to.

◆ model

Geometry::Model* Component::Mesh::model = nullptr

Geometry data.

Default: nullptr


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