This is the documentation for Enlighten.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

class Enlighten::IPrecompMeshValidation

An interface containing methods for analyzing meshes.

Functions

Name Description
~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

Name Description
ErrorCases

Error case bit flags.

WarningCases

Warning case bit flags.

Typedefs

Name Description
Geo::GeoArray< Geo::s32 > IndexArray

Collection of vertex indices.


virtual Enlighten::IPrecompMeshValidation::~IPrecompMeshValidation


protected: virtual ~IPrecompMeshValidation()


Protected to avoid accidental deletion.


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.


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.


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.


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.


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.


virtual void Enlighten::IPrecompMeshValidation::Release


public: void Release()


Delete this instance.


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.


virtual bool Enlighten::IPrecompMeshValidation::ValidateMeshDegeneracy


public: bool ValidateMeshDegeneracy() const


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


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.


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.


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.


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.


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.


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.


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.


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.

  • No labels