Skip to main content

Renderable Class

Abstract base class for objects that can be rendered by the rendering system. More...

Declaration

class helios::rendering::Renderable { ... }

Derived Classes

classMeshRenderable

Represents a renderable object that combines a shared prototype with instance-specific overrides. More...

classTextRenderable

High-level text component that can be attached to game objects. More...

Public Constructors Index

Renderable ()=default

Default constructor. More...

Renderable (const Renderable &)=delete

Deleted copy constructor. More...

Renderable (Renderable &&) noexcept=default

Move constructor. More...

Public Destructor Index

~Renderable ()=default

Virtual destructor for proper cleanup of derived classes. More...

Public Operators Index

Renderable &operator= (const Renderable &)=delete

Deleted copy assignment operator. More...

Renderable &operator= (Renderable &&) noexcept=default

Move assignment operator. More...

Public Member Functions Index

const helios::math::aabbf &localAABB () const noexcept=0

Returns the local-space axis-aligned bounding box of this renderable. More...

voidwriteUniformValues (helios::rendering::shader::UniformValueMap &uniformValueMap) const noexcept=0

Writes object-specific uniform values to a uniform value map. More...

voidemit (RenderQueue &renderQueue, helios::rendering::shader::UniformValueMap &objectUniformValues, helios::rendering::shader::UniformValueMap &materialUniformValues) const =0

Emits render commands to the render queue. More...

Description

Abstract base class for objects that can be rendered by the rendering system.

A `Renderable` represents any visual entity that can submit render commands to the rendering pipeline. Concrete implementations define how the object emits itself to a `RenderQueue` and how uniform values are written for shader consumption.

Subclasses must implement:

  • `localAABB()`: Returns the local-space axis-aligned bounding box.
  • `writeUniformValues()`: Writes object-specific uniform values to a uniform map.
  • `emit()`: Submits render commands to the render queue.
See Also

helios::rendering::RenderQueue

See Also

helios::rendering::RenderPrototype

Definition at line 40 of file Renderable.ixx.

Public Constructors

Renderable()

helios::rendering::Renderable::Renderable ()
default

Default constructor.

Definition at line 55 of file Renderable.ixx.

Referenced by operator=, operator=, Renderable and Renderable.

Renderable()

helios::rendering::Renderable::Renderable (const Renderable &)
delete

Deleted copy constructor.

Renderables are non-copyable to prevent accidental duplication of GPU resources.

Definition at line 62 of file Renderable.ixx.

Reference Renderable.

Renderable()

helios::rendering::Renderable::Renderable (Renderable &&)
noexcept default

Move constructor.

Allows transfer of ownership of rendering resources.

Definition at line 76 of file Renderable.ixx.

Reference Renderable.

Public Destructor

~Renderable()

virtual helios::rendering::Renderable::~Renderable ()
virtual default

Virtual destructor for proper cleanup of derived classes.

Definition at line 50 of file Renderable.ixx.

Public Operators

operator=()

Renderable & helios::rendering::Renderable::operator= (const Renderable &)
delete

Deleted copy assignment operator.

Renderables are non-copyable to prevent accidental duplication of GPU resources.

Definition at line 69 of file Renderable.ixx.

Reference Renderable.

operator=()

Renderable & helios::rendering::Renderable::operator= (Renderable &&)
noexcept default

Move assignment operator.

Allows transfer of ownership of rendering resources.

Definition at line 83 of file Renderable.ixx.

Reference Renderable.

Public Member Functions

emit()

virtual void helios::rendering::Renderable::emit (RenderQueue & renderQueue, helios::rendering::shader::UniformValueMap & objectUniformValues, helios::rendering::shader::UniformValueMap & materialUniformValues)

Emits render commands to the render queue.

This method is called during the render traversal to submit this renderable's draw commands to the render queue. The render queue collects and potentially sorts these commands for efficient GPU execution.

Parameters
renderQueue

The render queue to emit commands to.

objectUniformValues

Uniform values specific to this object instance (e.g., model matrix, object ID).

materialUniformValues

Uniform values for the material properties (e.g., colors, textures, shader parameters).

Definition at line 120 of file Renderable.ixx.

Reference emit.

Referenced by emit.

localAABB()

virtual const helios::math::aabbf & helios::rendering::Renderable::localAABB ()
nodiscard noexcept

Returns the local-space axis-aligned bounding box of this renderable.

The AABB is used for visibility culling, collision detection, and spatial queries. It represents the bounds of the renderable in its local coordinate system before any world transformations are applied.

Returns

A const reference to the local-space AABB.

Definition at line 94 of file Renderable.ixx.

Reference localAABB.

Referenced by localAABB.

writeUniformValues()

virtual void helios::rendering::Renderable::writeUniformValues (helios::rendering::shader::UniformValueMap & uniformValueMap)
noexcept

Writes object-specific uniform values to a uniform value map.

This method allows the renderable to contribute its own uniform values (such as material properties or custom shader parameters) to the rendering pipeline.

Parameters
uniformValueMap

The uniform value map to write values to.

Definition at line 105 of file Renderable.ixx.

Reference writeUniformValues.

Referenced by writeUniformValues.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.