This is the documentation for Enlighten.

class Geo AtlasMeshChart

class Geo::AtlasMeshChart

A chart consists of a connected region of the mesh, which has a mapping into a single connected region in UV space.

Functions

Name Description
AtlasMeshChart()

Default constructor initialising an empty chart not associated with a mesh.

AtlasMeshChart(AtlasMesh *, const GeoArray< s32 > &)

Construct a chart from a list of mesh triangles.

CopyForNewMesh(const AtlasMeshChart &, AtlasMesh *)

Create a copy of existing chart information for the new mesh.

Get3DArea()

Return the area taken by the 3D mesh spanned by this chart.

GetMesh()

Obtain the mesh that this chart is part of.

GetMesh()

Obtain the mesh that this chart is part of.

GetTriangleCount()

Return the number of triangles that make up this chart.

GetTriangleIndex(s32)

Returns the mesh index for the triangle.

GetUVArea()

Return the area taken in the UV atlas.

GetVertexCount()

Obtain the number of vertices that make up the triangles in this chart.

GetVertexIndex(s32)

Obtain the mesh index for a vertex given the chart index for it.

GetVertexIndexInChart(s32)

Obtain the chart index for vertex given the mesh index for it.

RemakeUVChart(float, bool, bool *)

Create a 2D parametrisation of the 3D submesh represented by the chart.

RescaleUVChart(float)

Rescale the chart to make 2D area match 3D area.


Geo::AtlasMeshChart::AtlasMeshChart


public: AtlasMeshChart()


Default constructor initialising an empty chart not associated with a mesh.


Geo::AtlasMeshChart::AtlasMeshChart


public: AtlasMeshChart
(
    AtlasMesh * mesh,
    const GeoArray< s32 > & triangles
)


Construct a chart from a list of mesh triangles.


static AtlasMeshChart* Geo::AtlasMeshChart::CopyForNewMesh


public: AtlasMeshChart * CopyForNewMesh
(
    const AtlasMeshChart & chart,
    AtlasMesh * newMesh
)


Create a copy of existing chart information for the new mesh.


float Geo::AtlasMeshChart::Get3DArea


public: float Get3DArea() const


Return the area taken by the 3D mesh spanned by this chart.


AtlasMesh* Geo::AtlasMeshChart::GetMesh


public: AtlasMesh * GetMesh()


Obtain the mesh that this chart is part of.


const AtlasMesh* Geo::AtlasMeshChart::GetMesh


public: const AtlasMesh * GetMesh() const


Obtain the mesh that this chart is part of.


s32 Geo::AtlasMeshChart::GetTriangleCount


public: s32 GetTriangleCount() const


Return the number of triangles that make up this chart.


s32 Geo::AtlasMeshChart::GetTriangleIndex


public: s32 GetTriangleIndex
(
    s32 chartTriangleIndex
) const


Returns the mesh index for the triangle.


float Geo::AtlasMeshChart::GetUVArea


public: float GetUVArea() const


Return the area taken in the UV atlas.


s32 Geo::AtlasMeshChart::GetVertexCount


public: s32 GetVertexCount() const


Obtain the number of vertices that make up the triangles in this chart.

Returns

The number of vertices contained in the chart.


s32 Geo::AtlasMeshChart::GetVertexIndex


public: s32 GetVertexIndex
(
    s32 chartVertexIndex
) const


Obtain the mesh index for a vertex given the chart index for it.

Returns

The index that this vertex has in the mesh.

Parameters
[in] chartVertexIndex

The chart index for the vertex.


s32 Geo::AtlasMeshChart::GetVertexIndexInChart


public: s32 GetVertexIndexInChart
(
    s32 meshVertexIndex
) const


Obtain the chart index for vertex given the mesh index for it.

Returns

The chart index for the vertex, or -1 if it is not in the chart.

Parameters
[in] meshVertexIndex

The mesh index for the vertex.


bool Geo::AtlasMeshChart::RemakeUVChart


public: bool RemakeUVChart
(
    float meshArea,
    bool forceLSCM,
    bool * parametised
)


Create a 2D parametrisation of the 3D submesh represented by the chart.

Parameters
[in] meshArea

- The surface area of the entire mesh

[in] forceLSCM

- Whether to use only the LSCM method

[out] parametised

- Whether the parametisation completed without errors


bool Geo::AtlasMeshChart::RescaleUVChart


public: bool RescaleUVChart
(
    float meshArea
)


Rescale the chart to make 2D area match 3D area.

Parameters
[in] meshArea

- The surface area of the entire mesh