utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
primitive.cpp
1/*
2** ETIB PROJECT, 2026
3** xider
4** File description:
5** primitive
6*/
7
8#include <utility/graphic/primitive.hpp>
9
10namespace utility::graphic
11{
12 Primitive::Primitive(const std::vector<Mesh> &meshes)
14 {
15 for (const auto &mesh: meshes) {
16 addMesh(mesh);
17 }
18 }
19
20 void Primitive::addMesh(const Mesh &mesh)
21 {
22 _meshes.push_back(std::make_shared<Mesh>(mesh));
23 }
24} // namespace utility::graphic
The Mesh class represents a 3D mesh used for rendering in a graphics application.
Definition mesh.hpp:25
Primitive(const std::vector< Mesh > &meshes)
Constructs a Primitive object with the specified meshes.
Definition primitive.cpp:12
void addMesh(const Mesh &mesh)
Add a mesh to the primitive.
Definition primitive.cpp:20
The Renderable class represents an object that can be rendered in the graphics application.
std::vector< std::shared_ptr< Mesh > > _meshes
Meshes associated with this renderable object.