Skip to main content

MeshRenderCommand Class

DTO for storing rendering-specific command information to be passed to the RenderQueue. More...

Declaration

class helios::rendering::mesh::MeshRenderCommand { ... }

Public Constructors Index

MeshRenderCommand (const MeshRenderCommand &)=delete

Prevent copying. A MeshRenderCommand is not intended to be copied. More...

MeshRenderCommand (MeshRenderCommand &&) noexcept=default

Default move constructor. More...

MeshRenderCommand (const helios::rendering::RenderPrototype *renderPrototype, const helios::rendering::shader::UniformValueMap &objectUniformValues, const helios::rendering::shader::UniformValueMap &materialUniformValues) noexcept

Constructs a new `MeshRenderCommand`. More...

Public Destructor Index

~MeshRenderCommand ()=default

Default destructor. More...

Public Operators Index

MeshRenderCommand &operator= (const MeshRenderCommand &)=delete

Prevent copy assignment. A MeshRenderCommand is not intended to be copied. More...

MeshRenderCommand &operator= (MeshRenderCommand &&) noexcept=default

Default move assignment. More...

Public Member Functions Index

const helios::rendering::RenderPrototype *renderPrototype () const noexcept

Returns the RenderPrototype associated with this command. More...

const helios::rendering::shader::UniformValueMap &objectUniformValues () const noexcept

Returns a const ref to this command's UniformValueMap for the object. More...

const helios::rendering::shader::UniformValueMap &materialUniformValues () const noexcept

Returns a const ref to this command's UniformValueMap for the material. More...

Private Member Attributes Index

const helios::rendering::RenderPrototype *renderPrototype_

A non-owning raw pointer to the RenderPrototype to be used. More...

helios::rendering::shader::UniformValueMapobjectUniformValues_

An owning, unique pointer to the uniform values specific for the object to be rendered. This map contains uniforms that change per object instance, such as the world transformation matrix. More...

helios::rendering::shader::UniformValueMapmaterialUniformValues_

An owning, unique pointer to the uniform values specific to the material of the object to be rendered. This map contains uniforms related to the surface properties of a material. More...

Description

DTO for storing rendering-specific command information to be passed to the RenderQueue.

A `MeshRenderCommand` encapsulates all data needed to render a single mesh instance:

  • A reference to the `RenderPrototype` (mesh + material)
  • Object-specific uniform values (e.g., model matrix)
  • Material-specific uniform values (e.g., colors, textures)

## Ownership Model

  • **RenderPrototype:** Non-owning raw pointer. The caller must ensure that the `RenderPrototype` remains valid for the lifetime of this command (typically within a single frame).
  • **UniformValueMaps:** Owned by the command. Moved into the command on construction.

## Design

  • **Move-Only:** Commands are non-copyable to prevent accidental duplication during render queue processing.
  • **Single-Frame Lifetime:** Commands are typically created during scene traversal and consumed by the renderer within the same frame.
See Also

RenderQueue

See Also

MeshRenderer

See Also

RenderPrototype

Definition at line 42 of file MeshRenderCommand.ixx.

Public Constructors

MeshRenderCommand()

helios::rendering::mesh::MeshRenderCommand::MeshRenderCommand (const MeshRenderCommand &)
delete

Prevent copying. A MeshRenderCommand is not intended to be copied.

Definition at line 68 of file MeshRenderCommand.ixx.

Reference MeshRenderCommand.

Referenced by MeshRenderCommand, MeshRenderCommand, MeshRenderCommand, operator=, operator= and ~MeshRenderCommand.

MeshRenderCommand()

helios::rendering::mesh::MeshRenderCommand::MeshRenderCommand (MeshRenderCommand &&)
noexcept default

Default move constructor.

Definition at line 79 of file MeshRenderCommand.ixx.

Reference MeshRenderCommand.

MeshRenderCommand()

helios::rendering::mesh::MeshRenderCommand::MeshRenderCommand (const helios::rendering::RenderPrototype * renderPrototype, const helios::rendering::shader::UniformValueMap & objectUniformValues, const helios::rendering::shader::UniformValueMap & materialUniformValues)
inline noexcept

Constructs a new `MeshRenderCommand`.

Initializes this command with a non-owning pointer to the render prototype and takes ownership of the provided `UniformValueMaps`.

Parameters
renderPrototype

A raw pointer to the `RenderPrototype` to be associated with this command. Must remain valid for the lifetime of this command.

objectUniformValues

A `UniformValueMap` containing all uniform values for the rendered object.

materialUniformValues

A `UniformValueMap` containing all uniform values for the material.

Definition at line 102 of file MeshRenderCommand.ixx.

106 ) noexcept :
107 renderPrototype_(renderPrototype),
108 objectUniformValues_(objectUniformValues),
109 materialUniformValues_(materialUniformValues) { }

References materialUniformValues, MeshRenderCommand, objectUniformValues and renderPrototype.

Public Destructor

~MeshRenderCommand()

helios::rendering::mesh::MeshRenderCommand::~MeshRenderCommand ()
default

Default destructor.

Definition at line 89 of file MeshRenderCommand.ixx.

Reference MeshRenderCommand.

Public Operators

operator=()

MeshRenderCommand & helios::rendering::mesh::MeshRenderCommand::operator= (const MeshRenderCommand &)
delete

Prevent copy assignment. A MeshRenderCommand is not intended to be copied.

Definition at line 74 of file MeshRenderCommand.ixx.

Reference MeshRenderCommand.

operator=()

MeshRenderCommand & helios::rendering::mesh::MeshRenderCommand::operator= (MeshRenderCommand &&)
noexcept default

Default move assignment.

Definition at line 84 of file MeshRenderCommand.ixx.

Reference MeshRenderCommand.

Public Member Functions

materialUniformValues()

const helios::rendering::shader::UniformValueMap & helios::rendering::mesh::MeshRenderCommand::materialUniformValues ()
inline nodiscard noexcept

Returns a const ref to this command's UniformValueMap for the material.

Returns

A const ref to this command's UniformValueMap for the material.

Definition at line 135 of file MeshRenderCommand.ixx.

136 return materialUniformValues_;
137 }

Referenced by MeshRenderCommand.

objectUniformValues()

const helios::rendering::shader::UniformValueMap & helios::rendering::mesh::MeshRenderCommand::objectUniformValues ()
inline nodiscard noexcept

Returns a const ref to this command's UniformValueMap for the object.

Returns

A const ref to this command's UniformValueMap for the object.

Definition at line 126 of file MeshRenderCommand.ixx.

127 return objectUniformValues_;
128 }

Referenced by MeshRenderCommand.

renderPrototype()

const helios::rendering::RenderPrototype * helios::rendering::mesh::MeshRenderCommand::renderPrototype ()
inline nodiscard noexcept

Returns the RenderPrototype associated with this command.

Returns

A raw pointer to this command's RenderPrototype. May be `nullptr` if no prototype was provided.

Definition at line 117 of file MeshRenderCommand.ixx.

117 [[nodiscard]] const helios::rendering::RenderPrototype* renderPrototype() const noexcept {
118 return renderPrototype_;
119 }

Referenced by MeshRenderCommand.

Private Member Attributes

materialUniformValues_

helios::rendering::shader::UniformValueMap helios::rendering::mesh::MeshRenderCommand::materialUniformValues_

An owning, unique pointer to the uniform values specific to the material of the object to be rendered. This map contains uniforms related to the surface properties of a material.

Definition at line 61 of file MeshRenderCommand.ixx.

objectUniformValues_

helios::rendering::shader::UniformValueMap helios::rendering::mesh::MeshRenderCommand::objectUniformValues_

An owning, unique pointer to the uniform values specific for the object to be rendered. This map contains uniforms that change per object instance, such as the world transformation matrix.

Definition at line 55 of file MeshRenderCommand.ixx.

renderPrototype_

const helios::rendering::RenderPrototype* helios::rendering::mesh::MeshRenderCommand::renderPrototype_

A non-owning raw pointer to the RenderPrototype to be used.

The caller must ensure the `RenderPrototype` outlives this command.

Definition at line 48 of file MeshRenderCommand.ixx.

48 const helios::rendering::RenderPrototype* renderPrototype_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.