Foundation
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
Mesh.cpp File Reference
#include <meshoptimizer.h>
#include <clusterlod.h>
#include <Math/Quantize.hpp>
#include "Mesh.hpp"
#include <cmath>

Classes

struct  DAGCluster
 

Macros

#define CLUSTERLOD_IMPLEMENTATION
 

Functions

void buildOrthonormalBasis (float3 n, float3 &b1, float3 &b2)
 
float2 packUnitOctahedralSnorm (float3 v)
 
float3 unpackUnitOctahedralSnorm (float2 v)
 
float packUnitCircleSnorm (float2 v)
 
float2 unpackUnitCircleSnorm (float v)
 
template<typename Vertex , typename Index >
void OptimizeVertexIndex (Vector< Vertex > &vertices, Vector< Index > &indices)
 
template<typename Vertex , typename Index >
float GenerateLOD (Vector< Index > &outIndices, Span< const Vertex > vertices, Span< const Index > indices, const float lodScale)
 
template<typename Vertex , typename Index >
void BuildMeshlets (Vector< FMeshlet > &outMeshlet, Vector< Index > &outMeshletVertices, Vector< uint8_t > &outMeshletTriangles, Span< const Vertex > vertices, Span< const Index > indices)
 

Variables

constexpr float EPS = 1e-6
 

Macro Definition Documentation

◆ CLUSTERLOD_IMPLEMENTATION

#define CLUSTERLOD_IMPLEMENTATION

Function Documentation

◆ BuildMeshlets()

template<typename Vertex , typename Index >
void BuildMeshlets ( Vector< FMeshlet > &  outMeshlet,
Vector< Index > &  outMeshletVertices,
Vector< uint8_t > &  outMeshletTriangles,
Span< const Vertex >  vertices,
Span< const Index >  indices 
)

◆ buildOrthonormalBasis()

void buildOrthonormalBasis ( float3  n,
float3 &  b1,
float3 &  b2 
)

◆ GenerateLOD()

template<typename Vertex , typename Index >
float GenerateLOD ( Vector< Index > &  outIndices,
Span< const Vertex >  vertices,
Span< const Index >  indices,
const float  lodScale 
)

◆ OptimizeVertexIndex()

template<typename Vertex , typename Index >
void OptimizeVertexIndex ( Vector< Vertex > &  vertices,
Vector< Index > &  indices 
)

◆ packUnitCircleSnorm()

float packUnitCircleSnorm ( float2  v)

◆ packUnitOctahedralSnorm()

float2 packUnitOctahedralSnorm ( float3  v)

◆ unpackUnitCircleSnorm()

float2 unpackUnitCircleSnorm ( float  v)

◆ unpackUnitOctahedralSnorm()

float3 unpackUnitOctahedralSnorm ( float2  v)

Variable Documentation

◆ EPS

constexpr float EPS = 1e-6
constexpr