本文整理汇总了C++中Chart::isDisk方法的典型用法代码示例。如果您正苦于以下问题:C++ Chart::isDisk方法的具体用法?C++ Chart::isDisk怎么用?C++ Chart::isDisk使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chart
的用法示例。
在下文中一共展示了Chart::isDisk方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parameterizeCharts
void Atlas::parameterizeCharts()
{
ParameterizationQuality globalParameterizationQuality;
// Paramterize the charts.
uint diskCount = 0;
const uint chartCount = m_chartArray.count();
for (uint i = 0; i < chartCount; i++)\
{
Chart * chart = m_chartArray[i];
bool isValid = false;
if (chart->isDisk())
{
diskCount++;
ParameterizationQuality chartParameterizationQuality;
if (chart->faceCount() == 1) {
computeSingleFaceMap(chart->unifiedMesh());
chartParameterizationQuality = ParameterizationQuality(chart->unifiedMesh());
}
else {
computeOrthogonalProjectionMap(chart->unifiedMesh());
ParameterizationQuality orthogonalQuality(chart->unifiedMesh());
computeLeastSquaresConformalMap(chart->unifiedMesh());
ParameterizationQuality lscmQuality(chart->unifiedMesh());
// If the orthogonal projection produces better results, just use that. @@ Make sure the orthogonal map is valid has no overlaps.
/*if (orthogonalQuality.rmsStretchMetric() < lscmQuality.rmsStretchMetric()) {
computeOrthogonalProjectionMap(chart->unifiedMesh());
chartParameterizationQuality = orthogonalQuality;
}
else*/ {
chartParameterizationQuality = lscmQuality;
}
// If conformal map failed,
// @@ Experiment with other parameterization methods.
//computeCircularBoundaryMap(chart->unifiedMesh());
//computeConformalMap(chart->unifiedMesh());
//computeNaturalConformalMap(chart->unifiedMesh());
//computeGuidanceGradientMap(chart->unifiedMesh());
}
//ParameterizationQuality chartParameterizationQuality(chart->unifiedMesh());
isValid = chartParameterizationQuality.isValid();
if (!isValid)
{
nvDebug("*** Invalid parameterization.\n");
#if 0
// Dump mesh to inspect problem:
static int pieceCount = 0;
StringBuilder fileName;
fileName.format("invalid_chart_%d.obj", pieceCount++);
exportMesh(chart->unifiedMesh(), fileName.str());
#endif
}
// @@ Check that parameterization quality is above a certain threshold.
// @@ Detect boundary self-intersections.
globalParameterizationQuality += chartParameterizationQuality;
}
if (!isValid)
{
//nvDebugBreak();
// @@ Run the builder again, but only on this chart.
//AtlasBuilder builder(chart->chartMesh());
}
// Transfer parameterization from unified mesh to chart mesh.
chart->transferParameterization();
}
nvDebug(" Parameterized %d/%d charts.\n", diskCount, chartCount);
nvDebug(" RMS stretch metric: %f\n", globalParameterizationQuality.rmsStretchMetric());
nvDebug(" MAX stretch metric: %f\n", globalParameterizationQuality.maxStretchMetric());
nvDebug(" RMS conformal metric: %f\n", globalParameterizationQuality.rmsConformalMetric());
nvDebug(" RMS authalic metric: %f\n", globalParameterizationQuality.maxAuthalicMetric());
}