constuint32_t*faceMaterialData=nullptr;// Optional. Faces with different materials won't be assigned to the same chart. Must be indexCount / 3 in length.
uint32_tvertexCount=0;
uint32_tvertexStride=0;
constvoid*vertexUvData=nullptr;
uint32_tindexCount=0;
constvoid*indexData=nullptr;// optional
int32_tindexOffset=0;// optional. Add this offset to all indices.
IndexFormat::EnumindexFormat=IndexFormat::UInt16;
constuint32_t*faceMaterialData=nullptr;// Optional. Faces with different materials won't be assigned to the same chart. Must be indexCount / 3 in length.
boolrotateCharts=true;
};
...
...
@@ -170,24 +172,31 @@ struct ChartOptions
floatmaxBoundaryLength=0.0f;// Don't grow charts to have a longer boundary than this. 0 means no limit.
// Weights determine chart growth. Higher weights mean higher cost for that metric.
floatproxyFitMetricWeight=2.0f;// Angle between face and average chart normal.
floatroundnessMetricWeight=0.01f;
floatstraightnessMetricWeight=6.0f;
floatnormalSeamMetricWeight=4.0f;// If > 1000, normal seams are fully respected.
floattextureSeamMetricWeight=0.5f;
floatnormalDeviationWeight=2.0f;// Angle between face and average chart normal.
floatroundnessWeight=0.01f;
floatstraightnessWeight=6.0f;
floatnormalSeamWeight=4.0f;// If > 1000, normal seams are fully respected.
floattextureSeamWeight=0.5f;
floatmaxThreshold=2.0f;// If total of all metrics * weights > maxThreshold, don't grow chart. Lower values result in more charts.
floatmaxCost=2.0f;// If total of all metrics * weights > maxCost, don't grow chart. Lower values result in more charts.
uint32_tmaxIterations=1;// Number of iterations of the chart growing and seeding phases. Higher values result in better charts.
};
// Call after all AddMesh calls. Can be called multiple times to recompute charts with different options.
// Equivalent to calling ComputeCharts, ParameterizeCharts and PackCharts in sequence. Can be called multiple times to regenerate with different options.