Foundation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
FImportedMesh Struct Reference

#include <Mesh.hpp>

Classes

struct  DAG
 
struct  LOD
 

Public Member Functions

 FImportedMesh (Allocator *alloc)
 
void Optimize ()
 Optimize vertex reuse with meshoptimizer.
 
void SimplifyLOD (int levels, float scale)
 Creates N LOD levels, iteratively scaling down by 'scale' factor and populates lods index data.
 
void ClusterizeDAG ()
 Partitions the clusters of LOD levels into a DAG.
 
void Quantize ()
 Quantizes vertex data into more compact representation Fills quantizedVertices with quantized data from rawVertices.
 
void Dequantize ()
 Dequantizes quantized vertex back into full precision representation Fills rawVertices with dequantized data from quantizedVertices.
 
bool EnsureQuantized ()
 Prepares quantized GPU data buffers from possibly full-precision, or compressed data.
 
bool IsQuantized () const
 
bool EnsureRaw ()
 Prepares full-precision data for CPU access.
 
bool IsRaw () const
 
size_t CalculateQuantizedBound (bool lod, bool dag) const
 Returns a lower bound estimate of the size of the quantized mesh data. The size is conservative in that it's 100% accurate only when the data is written sequentially, without alignment requirements.
 

Public Attributes

Vector< FVertexvertices
 
Vector< FQVertexverticesQuantized
 
Vector< FSkinBindingskin
 
Vector< float3 > morphPositions
 
uint32_t morphTargetCount {0}
 
Vector< LODlods
 
struct FImportedMesh::DAG dag
 

Constructor & Destructor Documentation

◆ FImportedMesh()

FImportedMesh::FImportedMesh ( Allocator alloc)

Member Function Documentation

◆ CalculateQuantizedBound()

size_t FImportedMesh::CalculateQuantizedBound ( bool  lod,
bool  dag 
) const

Returns a lower bound estimate of the size of the quantized mesh data. The size is conservative in that it's 100% accurate only when the data is written sequentially, without alignment requirements.

Note
This is ONLY valid when EnsureQuantized is true.

◆ ClusterizeDAG()

void FImportedMesh::ClusterizeDAG ( )

Partitions the clusters of LOD levels into a DAG.

◆ Dequantize()

void FImportedMesh::Dequantize ( )

Dequantizes quantized vertex back into full precision representation Fills rawVertices with dequantized data from quantizedVertices.

◆ EnsureQuantized()

bool FImportedMesh::EnsureQuantized ( )

Prepares quantized GPU data buffers from possibly full-precision, or compressed data.

Returns
true when quantized and other buffers are available to be uploaded

◆ EnsureRaw()

bool FImportedMesh::EnsureRaw ( )

Prepares full-precision data for CPU access.

◆ IsQuantized()

bool FImportedMesh::IsQuantized ( ) const
inline

◆ IsRaw()

bool FImportedMesh::IsRaw ( ) const
inline

◆ Optimize()

void FImportedMesh::Optimize ( )

Optimize vertex reuse with meshoptimizer.

◆ Quantize()

void FImportedMesh::Quantize ( )

Quantizes vertex data into more compact representation Fills quantizedVertices with quantized data from rawVertices.

◆ SimplifyLOD()

void FImportedMesh::SimplifyLOD ( int  levels,
float  scale 
)

Creates N LOD levels, iteratively scaling down by 'scale' factor and populates lods index data.

Member Data Documentation

◆ dag

struct FImportedMesh::DAG FImportedMesh::dag

◆ lods

Vector<LOD> FImportedMesh::lods

◆ morphPositions

Vector<float3> FImportedMesh::morphPositions

◆ morphTargetCount

uint32_t FImportedMesh::morphTargetCount {0}

◆ skin

Vector<FSkinBinding> FImportedMesh::skin

◆ vertices

Vector<FVertex> FImportedMesh::vertices

◆ verticesQuantized

Vector<FQVertex> FImportedMesh::verticesQuantized

The documentation for this struct was generated from the following files: