Foundation
Loading...
Searching...
No Matches
Classes | Functions | Variables
Mesh.hpp File Reference
#include <Core/Container.hpp>
#include <Math/Math.hpp>
#include "Metadata.hpp"
#include "Precompute.hpp"
#include "Serialization.hpp"

Go to the source code of this file.

Classes

struct  FVertex
 
struct  FQVertex
 
struct  FLODGroup
 
struct  FMeshlet
 
struct  FEmissiveMeshlet
 
struct  FSerializedMeshLOD
 
struct  FSerializedMesh
 
struct  FImportedMesh
 
struct  FImportedMesh::LOD
 
struct  FImportedMesh::DAG
 

Functions

void CoordinateSystem (float3 n, float3 &b1, float3 &b2)
 
float2 PackUnitOctahedralSnorm (float3 v)
 
float3 UnpackUnitOctahedralSnorm (float2 v)
 
float PackUnitCircleSnorm (float2 v)
 
float2 UnpackUnitCircleSnorm (float v)
 
void RecomputeNormals (Span< FVertex > verts, Span< const uint32_t > indices)
 Recomputes smooth per-vertex normals from positions over an indexed triangle list.
 

Variables

constexpr uint32_t kMeshletMaxVertices = 64
 
constexpr uint32_t kMeshletMaxTriangles = 96
 

Function Documentation

◆ CoordinateSystem()

void CoordinateSystem ( float3  n,
float3 b1,
float3 b2 
)

◆ PackUnitCircleSnorm()

float PackUnitCircleSnorm ( float2  v)

◆ PackUnitOctahedralSnorm()

float2 PackUnitOctahedralSnorm ( float3  v)

◆ RecomputeNormals()

void RecomputeNormals ( Span< FVertex verts,
Span< const uint32_t >  indices 
)

Recomputes smooth per-vertex normals from positions over an indexed triangle list.

Area-weighted face-normal accumulation, then normalize. Needed after POSITION-only morph deformation (which moves vertices without supplying normals); run it on the morphed vertices before packing/skinning so shading matches the deformed surface. Tangents are left as-is (re-projected onto the new normal frame by FQVertex::PackTBN).

◆ UnpackUnitCircleSnorm()

float2 UnpackUnitCircleSnorm ( float  v)

◆ UnpackUnitOctahedralSnorm()

float3 UnpackUnitOctahedralSnorm ( float2  v)

Variable Documentation

◆ kMeshletMaxTriangles

constexpr uint32_t kMeshletMaxTriangles = 96
constexpr

◆ kMeshletMaxVertices

constexpr uint32_t kMeshletMaxVertices = 64
constexpr