Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::scene::ComplexMesh< V > Class Template Reference

Render agnostic mesh data with texcoords / normal / tangents. More...

#include <OxygenEngine/scene/mesh.h>

Inheritance diagram for oe::scene::ComplexMesh< V >:
[legend]
Collaboration diagram for oe::scene::ComplexMesh< V >:
[legend]

Classes

struct  MikkTSpaceUserData
 Struct used to convert data to generate tangents from MikkTSpace. More...
 

Public Member Functions

void generateSmoothNormals (uint32_t sub_mesh=0)
 Smooth mesh normals.
 
void optimizeVertices (uint32_t sub_mesh=0)
 Merge multiple duplicated vertices into one.
 
void generateTangents ()
 Generate tangents from texture coordinates.
 
void generateTexcoords ()
 Approximate texture coords based on vertex position.
 
- Public Member Functions inherited from oe::scene::SimpleMesh< V >
 SimpleMesh (const std::vector< V > &vertices, const std::vector< index_t > &indices={})
 
 SimpleMesh (const std::vector< V > &vertices, const std::vector< std::vector< index_t > > &mesh_indices)
 
uint32_t addSubMesh (const std::vector< oe::scene::index_t > &indices)
 
std::vector< V > & getVertices ()
 
const std::vector< V > & getVertices () const
 
AABB generateBoundingBoxFromPredicate (const std::function< bool(const V &)> &predicate)
 Generate a bounding box containing vertices matching a predicate.
 
- Public Member Functions inherited from oe::scene::CommonMesh
uint32_t getSubMeshCount () const
 
const std::vector< index_t > & getIndices (uint32_t sub_mesh=0) const
 
const AABBgetBoundingBox () const
 
void flipFaces ()
 
const std::vector< glm::uvec3 > getTriangles (uint32_t sub_mesh=0) const
 

Additional Inherited Members

- Public Types inherited from oe::scene::SimpleMesh< V >
using vertex_type = V
 
- Protected Attributes inherited from oe::scene::SimpleMesh< V >
std::vector< V > _vertices
 
- Protected Attributes inherited from oe::scene::CommonMesh
std::vector< std::vector< index_t > > _indices
 
AABB _aabb
 

Detailed Description

template<ComplexVertex V>
class oe::scene::ComplexMesh< V >

Render agnostic mesh data with texcoords / normal / tangents.

Member Function Documentation

◆ generateSmoothNormals()

template<ComplexVertex V>
void oe::scene::ComplexMesh< V >::generateSmoothNormals ( uint32_t  sub_mesh = 0)
inline

Smooth mesh normals.


The documentation for this class was generated from the following file: