![]() |
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< std::shared_ptr< MeshSurface >> &surfaces, const std::string &name="Mesh") | |
| Mesh (const std::string &name="Mesh") | |
| const std::shared_ptr< Material > & | getSurfaceMaterial (const uint32 surfaceIndex) const |
| void | setSurfaceMaterial (uint32 surfaceIndex, const std::shared_ptr< Material > &material) |
| std::vector< std::shared_ptr< MeshSurface > > & | getSurfaces () |
| 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 () |
| auto | isUploaded () const |
| void | upload () |
| void | buildAABB () |
Public Member Functions inherited from Resource | |
| Resource (const std::string &name) | |
| auto | getId () const |
| const auto & | getName () const |
| bool | operator== (const Resource &other) const |
| bool | operator< (const Resource &other) const |
| bool | operator> (const Resource &other) const |
| virtual std::shared_ptr< Resource > | duplicate () const |
Public Member Functions inherited from Object | |
| void | connect (const Signal::signal &name, const Signal::Handler &handler) |
| void | connect (const Signal::signal &name, const std::function< void ()> &handler) |
| void | emit (const Signal::signal &name, void *params=nullptr) |
| virtual std::string | toString () const |
| Object () = default | |
| virtual | ~Object () = default |
Protected Attributes | |
| AABB | localAABB |
| std::vector< Vertex > | vertices |
| std::vector< uint32 > | indices |
| std::vector< std::shared_ptr< MeshSurface > > | surfaces {} |
| std::unordered_set< std::shared_ptr< Material > > | materials {} |
Friends | |
| bool | operator== (const std::shared_ptr< Mesh > &a, const std::shared_ptr< Mesh > &b) |
| bool | operator< (const std::shared_ptr< Mesh > &a, const std::shared_ptr< Mesh > &b) |
| Mesh | ( | const std::vector< Vertex > & | vertices, |
| const std::vector< uint32 > & | indices, | ||
| const std::vector< std::shared_ptr< MeshSurface >> & | surfaces, | ||
| const std::string & | name = "Mesh" |
||
| ) |
| Mesh | ( | const std::string & | name = "Mesh" | ) |
| 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 |
Returns the material for a given surface
| surfaceIndex | Zero-based index of the surface |
|
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::setSurfaceMaterial instead.
| surfaceIndex | Zero-based index of the Surface |
| material | New material for the Surface |
| void upload | ( | ) |
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |