Class RenderableComponent

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class RenderableComponent : public Component

Base class for all components related to rendering.

Subclassed by AnimatedModelComponent, ModelComponent

Public Functions

virtual ~RenderableComponent()
void setVisible(bool enabled)
bool isVisible() const
virtual bool preRender(float deltaMilliseconds)
virtual void render(float viewDistance)
virtual void postRender()
virtual bool addAffectingStaticLight(SceneID id)
virtual void removeAffectingStaticLight(SceneID id)
virtual void setMaterialOverride(MaterialResourceFile *oldMaterial, Ref<MaterialResourceFile> newMaterial)
Ref<MaterialResourceFile> getMaterialOverride(MaterialResourceFile *material)
unsigned int getRenderPass() const
bool setupData()

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

bool setupEntities()

Perform setting up operations which are possible only after all entities have been set up.

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

RenderableComponent(Entity &owner, const JSON::json &data)
float getLODFactor(float viewDistance)

Protected Attributes

bool m_IsVisible
unsigned int m_RenderPass
bool m_LODEnable
float m_LODBias
float m_LODDistance
HashMap<MaterialResourceFile *, Ref<MaterialResourceFile>> m_MaterialOverrides
Vector<SceneID> m_AffectingStaticLightIDs
Vector<int> m_AffectingStaticLights
Microsoft::WRL::ComPtr<ID3D11Buffer> m_PerModelCB