|
utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
|
The Primitive class represents a basic geometric shape that can be rendered in the graphics application. More...
#include <headers/utility/graphic/primitive.hpp>


Public Member Functions | |
| Primitive (const std::vector< Mesh > &meshes) | |
| Constructs a Primitive object with the specified meshes. | |
| Primitive (const Primitive &)=delete | |
| Deleted copy constructor for Primitive. | |
| ~Primitive ()=default | |
| Default destructor for Primitive. | |
| void | addMesh (const Mesh &mesh) |
| Add a mesh to the primitive. | |
| Primitive & | operator= (const Primitive &)=delete |
| Deleted copy assignment operator for Primitive. | |
Public Member Functions inherited from utility::graphic::Renderable | |
| Renderable (const PoseF &pose, const Color32Bit &color) | |
| Default constructor for Renderable. | |
| virtual | ~Renderable ()=default |
| Virtual destructor for Renderable. | |
| Renderable & | setPose (const PoseF &pose) |
| Set the text pose. | |
| void | setPose (PoseF &&pose) |
| Set the text pose. | |
| const PoseF & | getPose (void) const |
| Get the text pose. | |
| glm::mat4 | getModelMatrix (void) const |
| Get the object-to-world model matrix of this renderable. | |
| Renderable & | setColor (const graphic::Color32Bit &color) |
| Set the text color. | |
| void | setColor (graphic::Color32Bit &&color) |
| Set the text color. | |
| const graphic::Color32Bit & | getColor (void) const |
| Get the text color.]. | |
| std::vector< std::shared_ptr< Mesh > > | getMeshes () const |
| Get the meshes associated with this renderable object. | |
Additional Inherited Members | |
Protected Attributes inherited from utility::graphic::Renderable | |
| std::vector< std::shared_ptr< Mesh > > | _meshes |
| Meshes associated with this renderable object. | |
| Color32Bit | _color |
| Text RGBA color. | |
| PoseF | _pose |
| World pose (position and orientation) of the text. | |
The Primitive class represents a basic geometric shape that can be rendered in the graphics application.
The Primitive class serves as a base class for simple geometric shapes such as cubes, spheres, and planes. It provides a common interface and properties for these shapes, allowing for consistent handling and rendering within the graphics application. The Primitive class can be extended to create specific types of primitives with additional properties and behaviors as needed.
Definition at line 26 of file primitive.hpp.
| utility::graphic::Primitive::Primitive | ( | const std::vector< Mesh > & | meshes | ) |
Constructs a Primitive object with the specified meshes.
| meshes | A vector of Mesh objects representing the geometry of the primitive. |
This constructor initializes the Primitive object with the provided meshes, which define the geometry of the primitive for rendering. The meshes are stored internally and can be accessed or modified as needed for rendering or further processing.
Definition at line 12 of file primitive.cpp.

| void utility::graphic::Primitive::addMesh | ( | const Mesh & | mesh | ) |
Add a mesh to the primitive.
| mesh | The Mesh object representing the geometry to be added to the primitive. |
This method appends the provided mesh to the internal list of meshes of the primitive, allowing for dynamic construction of the primitive geometry. The added mesh will be included in the rendering of the primitive, and it can be used to create more complex shapes by combining multiple meshes together.
Definition at line 20 of file primitive.cpp.
