Renderable¶
Inherited: NativeBehaviour
Description¶
Note: This class must be a superclass only and shouldn’t be created manually.
Public Methods¶
void |
applyBlendShapeWeights (Mesh & mesh, Mesh & instance, const std::vector<float> & weights) |
bound () |
|
bool |
isCulled (const Frustum & frustum, const Matrix4 & viewProjection) |
Material * |
material () const |
materialInstance (int index) |
|
Mesh * |
meshToDraw () |
void |
setLod (uint32_t lod) |
void |
setMaterial (Material * material) |
void |
setMaterialsList (const std::list<Material *> & materials) |
Static Methods¶
void |
filterByLayer (const Renderable::RenderList & in, Renderable::GroupList & out, int layer) |
void |
group (const Renderable::GroupList & in, Renderable::GroupList & out) |
Methods Description¶
Applies current blend shape weights to the mesh instance vertices.
AABBox Renderable::bound ()
Returns a bound box of the renderable object.
void Renderable::filterByLayer (Renderable::RenderList & in, Renderable::GroupList & out, int layer)
Filters out an in renderable components by it’s material layer.
void Renderable::group (Renderable::GroupList & in, Renderable::GroupList & out)
Groups elements from in list into out rendering instances.
bool Renderable::isCulled (Frustum & frustum, Matrix4 & viewProjection)
Returns true if current renderable fails frustum culling test; otherwise returns true; Parameter viewProjection used to project bounding box to screen space for LOD calculation.
Material * Renderable::material () const
Returns a first instantiated Material assigned to this Renderable.
See also setMaterial().
MaterialInstance * Renderable::materialInstance (int index)
Returns a Material instance with index assigned to this Renderable.
Mesh * Renderable::meshToDraw ()
Returns a mesh which will be drawn.
void Renderable::setLod (uint32_t lod)
Sets current lod level.
void Renderable::setMaterial (Material * material)
Creates a new instance of material and assigns it.
See also material().
void Renderable::setMaterialsList (*> & materials)
Creates a new instances for the list materials and assigns it.