mirror of
https://github.com/Relintai/mesh_utils.git
synced 2025-02-04 16:05:55 +01:00
Clean up 2 enums.
This commit is contained in:
parent
62f5f8f269
commit
9403f04cee
@ -4645,8 +4645,6 @@ static uint32_t s_planarRegionsCurrentVertex;
|
|||||||
struct ChartGeneratorType {
|
struct ChartGeneratorType {
|
||||||
enum Enum {
|
enum Enum {
|
||||||
OriginalUv,
|
OriginalUv,
|
||||||
Planar,
|
|
||||||
Clustered,
|
|
||||||
Piecewise
|
Piecewise
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -5644,10 +5642,6 @@ public:
|
|||||||
m_unifiedMesh->addFace(unifiedIndices);
|
m_unifiedMesh->addFace(unifiedIndices);
|
||||||
}
|
}
|
||||||
m_unifiedMesh->createBoundaries();
|
m_unifiedMesh->createBoundaries();
|
||||||
if (m_generatorType == segment::ChartGeneratorType::Planar) {
|
|
||||||
m_type = ChartType::Planar;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#if XA_CHECK_T_JUNCTIONS
|
#if XA_CHECK_T_JUNCTIONS
|
||||||
m_tjunctionCount = meshCheckTJunctions(*m_unifiedMesh);
|
m_tjunctionCount = meshCheckTJunctions(*m_unifiedMesh);
|
||||||
#if XA_DEBUG_EXPORT_OBJ_TJUNCTION
|
#if XA_DEBUG_EXPORT_OBJ_TJUNCTION
|
||||||
@ -5746,7 +5740,8 @@ public:
|
|||||||
m_unifiedMesh->texcoord(i) = Vector2(dot(m_basis.tangent, m_unifiedMesh->position(i)), dot(m_basis.bitangent, m_unifiedMesh->position(i)));
|
m_unifiedMesh->texcoord(i) = Vector2(dot(m_basis.tangent, m_unifiedMesh->position(i)), dot(m_basis.bitangent, m_unifiedMesh->position(i)));
|
||||||
XA_PROFILE_END(parameterizeChartsOrthogonal)
|
XA_PROFILE_END(parameterizeChartsOrthogonal)
|
||||||
// Computing charts checks for flipped triangles and boundary intersection. Don't need to do that again here if chart is planar.
|
// Computing charts checks for flipped triangles and boundary intersection. Don't need to do that again here if chart is planar.
|
||||||
if (m_type != ChartType::Planar && m_generatorType != segment::ChartGeneratorType::OriginalUv) {
|
|
||||||
|
if (m_generatorType != segment::ChartGeneratorType::OriginalUv) {
|
||||||
XA_PROFILE_START(parameterizeChartsEvaluateQuality)
|
XA_PROFILE_START(parameterizeChartsEvaluateQuality)
|
||||||
m_quality.computeBoundaryIntersection(m_unifiedMesh, boundaryGrid);
|
m_quality.computeBoundaryIntersection(m_unifiedMesh, boundaryGrid);
|
||||||
m_quality.computeFlippedFaces(m_unifiedMesh, nullptr);
|
m_quality.computeFlippedFaces(m_unifiedMesh, nullptr);
|
||||||
@ -5756,6 +5751,7 @@ public:
|
|||||||
if (!m_quality.boundaryIntersection && m_quality.flippedTriangleCount == 0 && m_quality.zeroAreaTriangleCount == 0 && m_quality.totalGeometricArea > 0.0f && m_quality.stretchMetric <= 1.1f && m_quality.maxStretchMetric <= 1.25f)
|
if (!m_quality.boundaryIntersection && m_quality.flippedTriangleCount == 0 && m_quality.zeroAreaTriangleCount == 0 && m_quality.totalGeometricArea > 0.0f && m_quality.stretchMetric <= 1.1f && m_quality.maxStretchMetric <= 1.25f)
|
||||||
m_type = ChartType::Ortho;
|
m_type = ChartType::Ortho;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_type == ChartType::LSCM) {
|
if (m_type == ChartType::LSCM) {
|
||||||
XA_PROFILE_START(parameterizeChartsLSCM)
|
XA_PROFILE_START(parameterizeChartsLSCM)
|
||||||
if (options.paramFunc) {
|
if (options.paramFunc) {
|
||||||
@ -7805,9 +7801,7 @@ void ComputeCharts(Atlas *atlas, ChartOptions options) {
|
|||||||
tJunctionCount += chart->tjunctionCount();
|
tJunctionCount += chart->tjunctionCount();
|
||||||
if (chart->tjunctionCount() > 0)
|
if (chart->tjunctionCount() > 0)
|
||||||
chartsWithTJunctionsCount++;
|
chartsWithTJunctionsCount++;
|
||||||
if (chart->type() == ChartType::Planar)
|
if (chart->type() == ChartType::Ortho)
|
||||||
planarChartsCount++;
|
|
||||||
else if (chart->type() == ChartType::Ortho)
|
|
||||||
orthoChartsCount++;
|
orthoChartsCount++;
|
||||||
else if (chart->type() == ChartType::LSCM)
|
else if (chart->type() == ChartType::LSCM)
|
||||||
lscmChartsCount++;
|
lscmChartsCount++;
|
||||||
@ -7840,9 +7834,7 @@ void ComputeCharts(Atlas *atlas, ChartOptions options) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
const char *type = "LSCM";
|
const char *type = "LSCM";
|
||||||
if (chart->type() == ChartType::Planar)
|
if (chart->type() == ChartType::Ortho)
|
||||||
type = "planar";
|
|
||||||
else if (chart->type() == ChartType::Ortho)
|
|
||||||
type = "ortho";
|
type = "ortho";
|
||||||
else if (chart->type() == ChartType::Piecewise)
|
else if (chart->type() == ChartType::Piecewise)
|
||||||
type = "piecewise";
|
type = "piecewise";
|
||||||
|
@ -40,7 +40,6 @@ Copyright NVIDIA Corporation 2006 -- Ignacio Castano <icastano@nvidia.com>
|
|||||||
namespace xatlas_mu {
|
namespace xatlas_mu {
|
||||||
|
|
||||||
enum class ChartType {
|
enum class ChartType {
|
||||||
Planar,
|
|
||||||
Ortho,
|
Ortho,
|
||||||
LSCM,
|
LSCM,
|
||||||
Piecewise,
|
Piecewise,
|
||||||
|
Loading…
Reference in New Issue
Block a user