![]() |
Lysa
0.0
Lysa 3D Engine
|
A mesh composed by multiple Surface and an indexes collection of Vertex
Inheritance diagram for Mesh:Public Member Functions | |
| Mesh (const std::vector< Vertex > &vertices, const std::vector< uint32 > &indices, const std::vector< MeshSurface > &surfaces, const std::string &name) | |
| Mesh (const std::string &name) | |
| ~Mesh () override | |
| unique_id | getSurfaceMaterial (const uint32 surfaceIndex) const |
| void | setSurfaceMaterial (uint32 surfaceIndex, unique_id material) |
| std::vector< MeshSurface > & | getSurfaces () |
| const std::vector< MeshSurface > & | getSurfaces () const |
| std::vector< Vertex > & | getVertices () |
| std::vector< uint32 > & | getIndices () |
| const std::vector< Vertex > & | getVertices () const |
| const std::vector< uint32 > & | getIndices () const |
| const AABB & | getAABB () const |
| bool | operator== (const Mesh &other) const |
| auto | getVerticesIndex () const |
| auto | getIndicesIndex () const |
| auto | getSurfacesIndex () const |
| auto & | getMaterials () |
| const auto & | getMaterials () const |
| auto | isUploaded () const |
| void | buildAABB () |
| constexpr const std::string & | getName () const |
Public Member Functions inherited from ManagedResource | |
| ManagedResource () = default | |
| ManagedResource (UniqueResource &) = delete | |
| ManagedResource & | operator= (ManagedResource &) = delete |
Public Member Functions inherited from Resource | |
| bool | operator== (const Resource &other) const |
| Resource () = default | |
| Resource (const unique_id id) | |
| virtual | ~Resource () = default |
Protected Attributes | |
| const std::string | name |
| AABB | localAABB |
| std::vector< Vertex > | vertices |
| std::vector< uint32 > | indices |
| std::vector< MeshSurface > | surfaces {} |
| std::unordered_set< unique_id > | materials {} |
Additional Inherited Members | |
Public Attributes inherited from ManagedResource | |
| uint32 | refCounter {0} |
Public Attributes inherited from Resource | |
| unique_id | id {INVALID_ID} |
| Mesh | ( | const std::vector< Vertex > & | vertices, |
| const std::vector< uint32 > & | indices, | ||
| const std::vector< MeshSurface > & | surfaces, | ||
| const std::string & | name | ||
| ) |
Creates a Mesh from vertices
| vertices | Vertices |
| indices | Indexes of vertices |
| surfaces | Surfaces |
| name |
|
inline |
|
override |
| void buildAABB | ( | ) |
|
inline |
Returns the local space axis aligned bounding box
|
inline |
Return all the vertices indexes
|
inline |
Return all the vertices indexes
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
Returns the material for a given surface
| surfaceIndex | Zero-based index of the surface |
|
inline |
Returns all the Surfaces
|
inline |
Returns all the Surfaces
|
inline |
|
inline |
Returns all the vertices
|
inline |
Returns all the vertices
|
inline |
|
inline |
| bool operator== | ( | const Mesh & | other | ) | const |
Changes the material of a given surface. Warning: this will update the data in memory only but not the node in the scene. If the material needs a different pipeline, the change will not appear. Use MeshInstance::setSurfaceMaterialOverride instead.
| surfaceIndex | Zero-based index of the Surface |
| material | New material for the Surface |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |