class TRenderableGetters

template<typename Derived, bool IsRenderProxy>

CRTP getter interface providing shared read access for both Renderable and RenderableProxy.

Public

Methods

GetMesh

MeshType GetMesh() const

Determines the mesh to render.

All sub-meshes of the mesh will be rendered, and you may set individual materials for each sub-mesh.

GetMaterial

MaterialType GetMaterial(u32 index) const

Returns the material used for rendering a sub-mesh with the specified index.

GetMaterials

const Vector<MaterialType> &GetMaterials() const

Determines all materials used for rendering this renderable.

Each of the materials is used for rendering a single sub-mesh. If number of materials is larger than number of sub-meshes, they will be ignored. If lower, the remaining materials will be removed.

GetWriteVelocity

bool GetWriteVelocity() const

If enabled this renderable will write per-pixel velocity information when rendered.

This is required for effects such as temporal anti-aliasing and motion blur, but comes with a minor performance overhead. If you are not using those effects you can disable this for a performance gain.

GetCullDistanceFactor

float GetCullDistanceFactor() const

Factor to be applied to the cull distance set in the camera's render settings.

GetLayer

u64 GetLayer() const

Determines the layer bitfield that controls whether a renderable is considered visible in a specific camera.

Renderable layer must match camera layer in order for the camera to render the component.

GetAnimType

RenderableAnimType GetAnimType() const

Returns the type of animation influencing this renderable, if any.

Private

Methods

GetData

const TRenderableData<IsRenderProxy> &GetData() const