Renderable
Renderable extends Node with the interface the renderer needs to issue a draw call: a Geometry, a Material, and bounding volumes used for visibility culling. It is the common base for all drawable node types, such as Mesh, InstancedMesh, and Billboard.
This class is not instantiated directly. Use one of the concrete renderable types, or derive from it to implement a custom drawable.
INFO
Derives from Node and inherits all public properties and methods.
Properties
cast_shadow bool
When true this object casts shadows onto shadow receivers.
bool cast_shadow {false};frustum_culled bool
When true this object participates in view frustum culling.
bool frustum_culled {true};receive_shadow bool
When true this object receives shadows from shadow casters.
bool receive_shadow {false};render_order int
Explicit draw-order override within a render pass.
Objects with a lower value are drawn first. Objects that share a value fall back to the pass's distance-based sort: front-to-back for opaque objects and back-to-front for transparent ones. Useful for layering objects that render without depth testing.
int render_order {0};Functions
Returns the object's bounding box.
Defaults to the bounding box of the object's geometry. Subclasses override this when their effective bounds differ, such as InstancedMesh.
virtual Box3 Renderable::BoundingBox();Returns the object's bounding sphere.
Defaults to the bounding sphere of the object's geometry. Subclasses override this when their effective bounds differ.
virtual Sphere Renderable::BoundingSphere();CanRender() bool
Returns true if this object has everything it needs to be drawn.
Checks that the object has a geometry with vertex positions, a material, and that the material type is compatible with the node type.
bool Renderable::CanRender() const;Returns the geometry used to draw this object.
virtual std::shared_ptr<Geometry> Renderable::GetGeometry() const=0;Returns the material used to draw this object.
virtual std::shared_ptr<Material> Renderable::GetMaterial() const=0;GetNodeType() Node::Type virtual
Identifies this node as Node::Type::Renderable.
Type vglx::Renderable::GetNodeType() const override;InFrustum() bool
Returns true if this object's world-space bounds intersect the frustum.
bool Renderable::InFrustum(const Frustum& frustum);| Parameter | Description |
|---|---|
| frustum | Frustum to test against in world space. |
IsRenderable() bool virtual
Returns true, identifying this node as renderable.
bool Renderable::IsRenderable() const override;