|
|
using | vertex_type = VertexType |
| |
|
using | index_type = IndexType |
| |
|
using | VertexContainerType = MeshSettingsType::VertexContainerType |
| |
|
using | IndexContainerType = MeshSettingsType::IndexContainerType |
| |
|
|
constexpr AABB | getPrimitiveBoundingBox (size_t primitive) const noexcept |
| | Generate bounding box for the specified primitive.
|
| |
| template<typename F > |
| constexpr AABB | getPrimitiveBoundingBox (size_t primitive, F &&predicate) const noexcept |
| | Generate bounding box for the specified primitive containing vertices matching a predicate.
|
| |
|
constexpr AABB | getBoundingBox () const noexcept |
| | Generate englobing mesh bounding box.
|
| |
|
constexpr void | flipFaces () |
| |
|
constexpr const std::vector< glm::uvec3 > | getTriangles () const |
| | Get groups of 3 indices that form triangles.
|
| |
|
constexpr void | generateNormals () |
| | Generate mesh normals from vertices positions.
|
| |
|
constexpr void | generateTangents () |
| | Compute Tangents using mikkTSpace.
|
| |
|
| template<typename PrimitiveType > |
| static Mesh | generateFromPrimitives (std::span< const PrimitiveType > primitives) |
| | Generate a mesh from primitives.
|
| |
|
|
VertexContainerType | vertices |
| |
|
IndexContainerType | indices |
| |
|
MeshSettingsType::PrimitivesContainerType | primitives = {} |
| |
◆ generateFromPrimitives()
template<typename VertexType = Vertex, typename IndexType = uint32_t, typename MeshSettingsType = DefaultMeshSettings<VertexType, IndexType>>
template<typename PrimitiveType >
| static Mesh oe::scene::Mesh< VertexType, IndexType, MeshSettingsType >::generateFromPrimitives |
( |
std::span< const PrimitiveType > |
primitives | ) |
|
|
inlinestatic |
Generate a mesh from primitives.
Concatenate all vertices / indices and generate the primitives list
- Todo:
- make another function (mergeVertices()) to merge equal vertices used across different primitive (using
VertexType::operator= for comparison)
◆ getPrimitiveBoundingBox()
template<typename VertexType = Vertex, typename IndexType = uint32_t, typename MeshSettingsType = DefaultMeshSettings<VertexType, IndexType>>
template<typename F >
| constexpr AABB oe::scene::Mesh< VertexType, IndexType, MeshSettingsType >::getPrimitiveBoundingBox |
( |
size_t |
primitive, |
|
|
F && |
predicate |
|
) |
| const |
|
inlineconstexprnoexcept |
Generate bounding box for the specified primitive containing vertices matching a predicate.
- Parameters
-
| predicate | A function with a vertex as parameter that should return true if the vertex should be considered in the bbox |
The documentation for this struct was generated from the following file: