Class ModelComponent

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class ModelComponent : public RenderableComponent

Used to render static 3D models.

Subclassed by CPUParticlesComponent, DecalComponent, GridModelComponent, SpriteComponent

Public Functions

ModelComponent(Entity &owner, const JSON::json &data)
virtual ~ModelComponent()
bool preRender(float deltaMilliseconds)
void render(float viewDistance)
void setModelResourceFile(Ref<ModelResourceFile> newModel, const HashMap<String, String> &materialOverrides)
ModelResourceFile *getModelResourceFile() const
const Vector<Pair<Ref<BasicMaterialResourceFile>, Vector<Mesh>>> &getMeshes() const
bool setupData()

Perform setting up internal data needed from other components after they have been added to the owning entity.

JSON::json getJSON() const

Get JSON representation of the component data needed to re-construct component from memory.

void draw()

Expose the component data with ImGui.

Protected Functions

void assignBoundingBox()
void assignOverrides(Ref<ModelResourceFile> newModel, const HashMap<String, String> &materialOverrides)

Protected Attributes

Ref<ModelResourceFile> m_ModelResourceFile