Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Enlighten::IPrecompMeshValidation

An interface containing methods for analyzing meshes.

Functions

NameDescription
~IPrecompMeshValidation()

Protected to avoid accidental deletion.

CheckForDetailMeshWarnings()

Check the current mesh for warnings, assuming it is to be used as a detail mesh and thus does not need valid UVs.

CheckForErrors()

Check the current mesh for errors.

CheckForWarnings()

Check the current mesh for warnings, assuming it is to be used as a target mesh and thus must have valid UVs.

Create(const IPrecompInputMesh *)

Create a new mesh validation object allocated on the heap to validate the given mesh.

Create(const IPrecompInputMesh *, Geo::IGeoProgressProxy *, PrecompMeshIdentifier)

Create a new mesh validation object allocated on the heap to validate the given mesh.

Release()

Delete this instance.

ValidateAllVertsUsed(IndexArray &)

Check that all vertices in the current mesh are actually part of a triangle.

ValidateMeshDegeneracy()

Check that the mesh is not empty or entirely topologically degenerate.

ValidateTriangleNormalHalfSpaceCriteria(IndexArray &)

Check that all triangles have vertex normals all on one side of the geometric normal of that triangle.

ValidateTriangleVertexIndices(IndexArray &)

Check the current mesh for triangle vertex indices that are out of bounds.

ValidateUVDegeneracy(IndexArray &, const float)

Check that all triangles have an absolute UV area greater than the given epsilon.

ValidateVertexChartUVs(IndexArray &)

Check that all vertex ChartUVs are within [0,1]x[0,1] the precompute can proceed in this case but the IPrecompInputGeometry RadiosityPixelDensity will not have a well defined basis.

ValidateVertexNormals(IndexArray &)

Check that all vertex normals have been normalized.

ValidateVertexValues(IndexArray &)

Check the current mesh for non-finite vertex position, normal and uv values.

Enums

NameDescription
ErrorCases

Error case bit flags.

WarningCases

Warning case bit flags.

Typedefs

NameDescription
Geo::GeoArray< Geo::s32 > IndexArray

Collection of vertex indices.


Anchor
a507e44e03cb965dc17c1238ed701dd15
a507e44e03cb965dc17c1238ed701dd15

virtual Enlighten::IPrecompMeshValidation::~IPrecompMeshValidation

...

protected: virtual ~IPrecompMeshValidation()

...

Protected to avoid accidental deletion.


Anchor
a959efa7d84b072b6e4f0146d12efe37f
a959efa7d84b072b6e4f0146d12efe37f

virtual Geo::s32 Enlighten::IPrecompMeshValidation::CheckForDetailMeshWarnings

...

public: Geo::s32 CheckForDetailMeshWarnings()

...

Check the current mesh for warnings, assuming it is to be used as a detail mesh and thus does not need valid UVs.

Returns

the bitwise or of any relevant WarningCases detected in this mesh.


Anchor
a7a6235478eb4cf6ee5a08dc8b07c9bbb
a7a6235478eb4cf6ee5a08dc8b07c9bbb

virtual Geo::s32 Enlighten::IPrecompMeshValidation::CheckForErrors

...

public: Geo::s32 CheckForErrors()

...

Check the current mesh for errors.

Returns

the bitwise or of any ErrorCases detected in this mesh.


Anchor
a54e9d44fe6b97fb02c9005bcb884568e
a54e9d44fe6b97fb02c9005bcb884568e

virtual Geo::s32 Enlighten::IPrecompMeshValidation::CheckForWarnings

...

public: Geo::s32 CheckForWarnings()

...

Check the current mesh for warnings, assuming it is to be used as a target mesh and thus must have valid UVs.

Returns

the bitwise or of any WarningCases detected in this mesh.


Anchor
ac0777552631b7a9a98d68ec4b62b4749
ac0777552631b7a9a98d68ec4b62b4749

static IPrecompMeshValidation* Enlighten::IPrecompMeshValidation::Create

...

public: IPrecompMeshValidation * Create
(
    const IPrecompInputMesh * aMesh
)

...

Create a new mesh validation object allocated on the heap to validate the given mesh.

Ownership of the object belongs to the caller it is your responsibility to delete this object using Release(). You can optionally pass an IGeoProgressProxy which will receive any errors found via the ReportError() method. The PrecompMeshIdentifier struct identifies the Geom and Mesh identifiers which will be included in the error payloads.


Anchor
a2b54651a58519d6f2bb3002b4f1a3e52
a2b54651a58519d6f2bb3002b4f1a3e52

static IPrecompMeshValidation* Enlighten::IPrecompMeshValidation::Create

...

public: IPrecompMeshValidation * Create
(
    const IPrecompInputMesh * aMesh,
    Geo::IGeoProgressProxy * m_ProgressProxy,
    PrecompMeshIdentifier meshIdentifier
)

...

Create a new mesh validation object allocated on the heap to validate the given mesh.

Ownership of the object belongs to the caller it is your responsibility to delete this object using Release(). You can optionally pass an IGeoProgressProxy which will receive any errors found via the ReportError() method. The PrecompMeshIdentifier struct identifies the Geom and Mesh identifiers which will be included in the error payloads.


Anchor
ad952d55c89366a3280541427e72ea00b
ad952d55c89366a3280541427e72ea00b

virtual void Enlighten::IPrecompMeshValidation::Release

...

public: void Release()

...

Delete this instance.


Anchor
aa196ea73cb1cf2717d6906f87d59792f
aa196ea73cb1cf2717d6906f87d59792f

virtual bool Enlighten::IPrecompMeshValidation::ValidateAllVertsUsed

...

public: bool ValidateAllVertsUsed
(
    IndexArray & badVerts
) const

...

Check that all vertices in the current mesh are actually part of a triangle.

Vertices that are not part of any triangle will not be processed and will retain their original UV values on output.

Parameters
[out]badVerts

Indices of unused vertices.


Anchor
a6e93c7555bf5f188f9f89a59a762a8a6
a6e93c7555bf5f188f9f89a59a762a8a6

virtual bool Enlighten::IPrecompMeshValidation::ValidateMeshDegeneracy

...

public: bool ValidateMeshDegeneracy() const

...

Check that the mesh is not empty or entirely topologically degenerate.


Anchor
ad7713e024423cd5dcf630a322f4028ac
ad7713e024423cd5dcf630a322f4028ac

virtual bool Enlighten::IPrecompMeshValidation::ValidateTriangleNormalHalfSpaceCriteria

...

public: bool ValidateTriangleNormalHalfSpaceCriteria
(
    IndexArray & badTris
) const

...

Check that all triangles have vertex normals all on one side of the geometric normal of that triangle.

The precompute can proceed in this case but you may get undesirable mesh simplification results.

Parameters
[out]badTris

Indices of badly formed triangles.


Anchor
a63c0b276243632ee8cf97174b4f5a7e5
a63c0b276243632ee8cf97174b4f5a7e5

virtual bool Enlighten::IPrecompMeshValidation::ValidateTriangleVertexIndices

...

public: bool ValidateTriangleVertexIndices
(
    IndexArray & badTris
) const

...

Check the current mesh for triangle vertex indices that are out of bounds.

Returns

true if all triangles are valid.

Parameters
[out]badTris

Bad triangle indices will be pushed onto this list.


Anchor
a32d80a3f289d653f6c8b0f9d69b2f9ca
a32d80a3f289d653f6c8b0f9d69b2f9ca

virtual bool Enlighten::IPrecompMeshValidation::ValidateUVDegeneracy

...

public: bool ValidateUVDegeneracy
(
    IndexArray & badTris,
    const float epsilon
) const

...

Check that all triangles have an absolute UV area greater than the given epsilon.

Parameters
[out]badTris

a list of triangles with an absolute UV areas less than epsilon.

[in]epsilon

minimum area.


Anchor
a9b36c63f007d45608457df50d216dd62
a9b36c63f007d45608457df50d216dd62

virtual bool Enlighten::IPrecompMeshValidation::ValidateVertexChartUVs

...

public: bool ValidateVertexChartUVs
(
    IndexArray & badVerts
) const

...

Check that all vertex ChartUVs are within [0,1]x[0,1] the precompute can proceed in this case but the IPrecompInputGeometry RadiosityPixelDensity will not have a well defined basis.

Parameters
[out]badVerts

Indices of verts with ChartUVs out of bounds.


Anchor
addd19f0f7c6e73f073998c39ee60d155
addd19f0f7c6e73f073998c39ee60d155

virtual bool Enlighten::IPrecompMeshValidation::ValidateVertexNormals

...

public: bool ValidateVertexNormals
(
    IndexArray & badVerts
) const

...

Check that all vertex normals have been normalized.

The precompute can proceed in this case but you have undesirable mesh simplification results and potentially odd looking radiosity.

Parameters
[out]badVerts

Indices of vertices with non unit length normals.


Anchor
af14d6bc6309a4f9d16b6f089c33e87a9
af14d6bc6309a4f9d16b6f089c33e87a9

virtual bool Enlighten::IPrecompMeshValidation::ValidateVertexValues

...

public: bool ValidateVertexValues
(
    IndexArray & badVerts
) const

...

Check the current mesh for non-finite vertex position, normal and uv values.

Returns

true if all vertices are valid.

Parameters
[out]badVerts

Bad vertex indices will be pushed onto this list.


Anchor
a81d6d92ea8f4325ba49f34b784749d4c
a81d6d92ea8f4325ba49f34b784749d4c

ErrorCases

...

public: enum ErrorCases
{
    NO_ERRORS = 0,
    VERTEX_INDEX_OUT_OF_BOUNDS = 1,
    NONFINITE_VERTEX_VALUES = 2,
    EMPTY_OR_ENTIRELY_DEGENERATE = 4
}

...

Error case bit flags.

enumerators
NO_ERRORS
VERTEX_INDEX_OUT_OF_BOUNDS

A triangle contains a vertex index outside of the vertex buffer.

NONFINITE_VERTEX_VALUES

A vertex value contains non-finite floating point values (NANs or INFs)

EMPTY_OR_ENTIRELY_DEGENERATE

The mesh was empty or entirely degenerate.


Anchor
a3c7b004c5d2f612648b4e97136331824
a3c7b004c5d2f612648b4e97136331824

WarningCases

...

public: enum WarningCases
{
    NO_WARNINGS = 0,
    UNUSED_VERTICES = 1,
    CHART_UVS_OUT_OF_RANGE = 2,
    VERTEX_NORMALS_OUTSIDE_HALFSPACE = 4,
    VERTEX_NORMALS_NOT_NORMALIZED = 8,
    DEGENERATE_TRIANGLE_CHART_UVS = 16,
    ERRORS_FOUND = 32
}

...

Warning case bit flags.

enumerators
NO_WARNINGS
UNUSED_VERTICES

There are vertices in a vertex buffer but they are not part of any triangle.

CHART_UVS_OUT_OF_RANGE

Chart UVs out of range.

VERTEX_NORMALS_OUTSIDE_HALFSPACE

A triangle exists whose vertex normals are not all on the same side of that triangle as defined by the triangles geometric normal.

VERTEX_NORMALS_NOT_NORMALIZED

There exists an unnormalized vertex normal.

DEGENERATE_TRIANGLE_CHART_UVS

There exist uv degenerate triangles in the mesh.

ERRORS_FOUND

Errors were found and so warning cases could not be checked.