Skip to main content

TextRenderCommand Class

Immutable command object for rendering a single piece of text. More...

Declaration

class helios::rendering::text::TextRenderCommand { ... }

Public Constructors Index

TextRenderCommand (const TextRenderCommand &)=delete

Deleted copy constructor. More...

TextRenderCommand (TextRenderCommand &&) noexcept=default

Move constructor. More...

TextRenderCommand (const helios::rendering::text::TextMesh *textMesh, const helios::rendering::text::TextRenderPrototype *textRenderPrototype, const helios::rendering::shader::UniformValueMap &objectUniformValues, const helios::rendering::shader::UniformValueMap &materialUniformValues) noexcept

Constructs a text render command. More...

Public Destructor Index

~TextRenderCommand ()=default

Default destructor. More...

Public Operators Index

TextRenderCommand &operator= (const TextRenderCommand &)=delete

Deleted copy assignment operator. More...

TextRenderCommand &operator= (TextRenderCommand &&) noexcept=default

Move assignment operator. More...

Public Member Functions Index

const helios::rendering::text::TextRenderPrototype *textRenderPrototype () const noexcept

Returns the render prototype. More...

const helios::rendering::text::TextMesh *textMesh () const noexcept

Returns the text mesh containing vertex data. More...

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

Returns the text-specific uniform values. More...

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

Returns the material-specific uniform values. More...

Private Member Attributes Index

const helios::rendering::text::TextRenderPrototype *textRenderPrototype_

Non-owning pointer to the render prototype. More...

helios::rendering::shader::UniformValueMapobjectUniformValues_

Uniform values specific to this text instance. More...

helios::rendering::shader::UniformValueMapmaterialUniformValues_

Material/text-specific uniform values (e.g., color). More...

const helios::rendering::text::TextMesh *textMesh_

Non-owning pointer to the text mesh containing vertex data. More...

Description

Immutable command object for rendering a single piece of text.

`TextRenderCommand` is a low-level, move-only object that encapsulates all data needed to render text in a single frame. It is created from a `TextRenderable` and consumed by the `TextRenderer`.

## Design

  • **Immutable:** Once created, the command cannot be modified.
  • **Move-only:** Copy operations are deleted to prevent accidental duplication.
  • **Self-contained:** Contains all uniform values needed for rendering.

## Data Flow

``` TextRenderableTextRenderCommandRenderQueueTextRenderer ```

See Also

TextRenderable

See Also

TextRenderer

See Also

TextMesh

Definition at line 46 of file TextRenderCommand.ixx.

Public Constructors

TextRenderCommand()

helios::rendering::text::TextRenderCommand::TextRenderCommand (const TextRenderCommand &)
delete

Deleted copy constructor.

TextRenderCommand is move-only to prevent accidental duplication.

Definition at line 80 of file TextRenderCommand.ixx.

Reference TextRenderCommand.

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

TextRenderCommand()

helios::rendering::text::TextRenderCommand::TextRenderCommand (TextRenderCommand &&)
noexcept default

Move constructor.

Definition at line 92 of file TextRenderCommand.ixx.

Reference TextRenderCommand.

TextRenderCommand()

helios::rendering::text::TextRenderCommand::TextRenderCommand (const helios::rendering::text::TextMesh * textMesh, const helios::rendering::text::TextRenderPrototype * textRenderPrototype, const helios::rendering::shader::UniformValueMap & objectUniformValues, const helios::rendering::shader::UniformValueMap & materialUniformValues)
inline noexcept

Constructs a text render command.

Parameters
text

The text string to render.

textRenderPrototype

Non-owning pointer to the prototype (must outlive this command).

drawProperties

Position, scale, and font selection.

textUniformValues

Uniform values for the text shader.

Precondition

`textRenderPrototype` must not be null.

Definition at line 114 of file TextRenderCommand.ixx.

117 const helios::rendering::shader::UniformValueMap& objectUniformValues,
118 const helios::rendering::shader::UniformValueMap& materialUniformValues
119 ) noexcept :
120 textMesh_(textMesh),
121 textRenderPrototype_(textRenderPrototype),
122 objectUniformValues_(objectUniformValues),
123 materialUniformValues_(materialUniformValues) {
124
125 assert(textRenderPrototype_ && "TextRenderPrototype must not be null");
126
127 }

References materialUniformValues, objectUniformValues, textMesh, TextRenderCommand and textRenderPrototype.

Public Destructor

~TextRenderCommand()

helios::rendering::text::TextRenderCommand::~TextRenderCommand ()
default

Default destructor.

Definition at line 102 of file TextRenderCommand.ixx.

Reference TextRenderCommand.

Public Operators

operator=()

TextRenderCommand & helios::rendering::text::TextRenderCommand::operator= (const TextRenderCommand &)
delete

Deleted copy assignment operator.

TextRenderCommand is move-only to prevent accidental duplication.

Definition at line 87 of file TextRenderCommand.ixx.

Reference TextRenderCommand.

operator=()

TextRenderCommand & helios::rendering::text::TextRenderCommand::operator= (TextRenderCommand &&)
noexcept default

Move assignment operator.

Definition at line 97 of file TextRenderCommand.ixx.

Reference TextRenderCommand.

Public Member Functions

materialUniformValues()

const helios::rendering::shader::UniformValueMap & helios::rendering::text::TextRenderCommand::materialUniformValues ()
inline nodiscard noexcept

Returns the material-specific uniform values.

Contains values such as text color and other material properties.

Returns

Reference to the material uniform value map.

Definition at line 165 of file TextRenderCommand.ixx.

166 return materialUniformValues_;
167 }

Referenced by TextRenderCommand.

objectUniformValues()

const helios::rendering::shader::UniformValueMap & helios::rendering::text::TextRenderCommand::objectUniformValues ()
inline nodiscard noexcept

Returns the text-specific uniform values.

Returns

Reference to the uniform value map.

Definition at line 154 of file TextRenderCommand.ixx.

155 return objectUniformValues_;
156 }

Referenced by TextRenderCommand.

textMesh()

const helios::rendering::text::TextMesh * helios::rendering::text::TextRenderCommand::textMesh ()
inline nodiscard noexcept

Returns the text mesh containing vertex data.

The mesh provides access to the pre-computed glyph vertices for rendering.

Returns

Non-owning pointer to the text mesh.

Definition at line 145 of file TextRenderCommand.ixx.

145 [[nodiscard]] const helios::rendering::text::TextMesh* textMesh() const noexcept {
146 return textMesh_;
147 }

Referenced by TextRenderCommand.

textRenderPrototype()

const helios::rendering::text::TextRenderPrototype * helios::rendering::text::TextRenderCommand::textRenderPrototype ()
inline nodiscard noexcept

Returns the render prototype.

Returns

Non-owning pointer to the prototype.

Definition at line 134 of file TextRenderCommand.ixx.

135 return textRenderPrototype_;
136 }

Referenced by TextRenderCommand.

Private Member Attributes

materialUniformValues_

helios::rendering::shader::UniformValueMap helios::rendering::text::TextRenderCommand::materialUniformValues_

Material/text-specific uniform values (e.g., color).

Definition at line 63 of file TextRenderCommand.ixx.

objectUniformValues_

helios::rendering::shader::UniformValueMap helios::rendering::text::TextRenderCommand::objectUniformValues_

Uniform values specific to this text instance.

Definition at line 58 of file TextRenderCommand.ixx.

textMesh_

const helios::rendering::text::TextMesh* helios::rendering::text::TextRenderCommand::textMesh_

Non-owning pointer to the text mesh containing vertex data.

The text mesh must remain valid for the lifetime of this command.

Definition at line 70 of file TextRenderCommand.ixx.

textRenderPrototype_

const helios::rendering::text::TextRenderPrototype* helios::rendering::text::TextRenderCommand::textRenderPrototype_

Non-owning pointer to the render prototype.

The prototype must remain valid for the lifetime of this command.

Definition at line 53 of file TextRenderCommand.ixx.

53 const helios::rendering::text::TextRenderPrototype* textRenderPrototype_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.