class render::RenderableProxy

Contains data and functionality for the render-side representation of a Renderable object.

Public

Methods

GetBounds

Bounds GetBounds() const

Gets world bounds of the mesh rendered by this object.

SetRendererId

void SetRendererId(PackedRendererId id)

Sets an ID that can be used for uniquely identifying this object by the renderer.

GetRendererId

PackedRendererId GetRendererId() const

Retrieves an ID that can be used for uniquely identifying this object by the renderer.

GetAnimationId

u64 GetAnimationId() const

Returns the identifier of the animation, if this object is animated using skeleton or blend shape animation.

UpdateAnimationBuffers

void UpdateAnimationBuffers(const EvaluatedAnimationData &animData)

Updates internal animation buffers from the contents of the provided animation data object.

Does nothing if renderable is not affected by animation.

GetBoneMatrixBuffer

const SPtr<GpuBuffer> &GetBoneMatrixBuffer() const

Returns the GPU buffer containing element's bone matrices, if it has any.

GetPreviousBoneMatrixBuffer

const SPtr<GpuBuffer> &GetPreviousBoneMatrixBuffer() const

Returns the GPU buffer containing element's bone matrices for the previous frame, if it has any.

GetMorphShapeBuffer

const SPtr<GpuBuffer> &GetMorphShapeBuffer() const

Returns the vertex buffer containing element's morph shape vertices, if it has any.

GetMorphVertexDescription

const SPtr<VertexDescription> &GetMorphVertexDescription() const

Returns vertex declaration used for rendering meshes containing morph shape information.

GetWorldTransformMatrix

Matrix4 GetWorldTransformMatrix() const

Returns the transform matrix that is applied to the object when its being rendered.

GetWorldTransformMatrixWithoutScale

Matrix4 GetWorldTransformMatrixWithoutScale() const

Returns the transform matrix that is applied to the object when its being rendered.

This transform matrix does not include scale values.

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.

Protected

Methods

GetRenderableData

const TRenderableData<true> &GetRenderableData() const

Returns the renderable data.

Used by the CRTP getter interface.

CreateAnimationBuffers

void CreateAnimationBuffers()

Creates any buffers required for renderable animation.

Should be called whenever animation properties change.

Fields

mData

TRenderableData<true> mData

Renderable data (mesh, materials, layer, etc.).

mRendererId

PackedRendererId mRendererId

mAnimationId

u64 mAnimationId

mMorphShapeVersion

u32 mMorphShapeVersion

mBoneMatrixBuffer

SPtr<GpuBuffer> mBoneMatrixBuffer

mPreviousBoneMatrixBuffer

SPtr<GpuBuffer> mPreviousBoneMatrixBuffer

mMorphShapeBuffer

SPtr<GpuBuffer> mMorphShapeBuffer

mMorphVertexDescription

SPtr<VertexDescription> mMorphVertexDescription

mTransform

Transform mTransform

mWorldTransformMatrix

Matrix4 mWorldTransformMatrix

mWorldTransformMatrixWithoutScale

Matrix4 mWorldTransformMatrixWithoutScale