Versions Compared

Key

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

class Enlighten::IPrecompInputMesh

    └>Geo::IGeoSerialisable
        └>Geo::IGeoReleasable

The standard precompute mesh input class.

Functions

NameDescription
AddFaces(const PrecompInputFace *, const PrecompInputFace *)

Copies all faces between [begin, end) into this object.

AddLinks(const Geo::IdxLink *, const Geo::IdxLink *)

Copies all index links between [begin, end) into this object.

AddLinksForIdenticalVertices(bool, bool, bool, bool)

Utility to generate links between identical vertices.

AddMaterialGuidMapping(Geo::GeoGuid, Geo::u32)

Add an explicit mapping from 128-bit material GUID to 32-bit material ID.

AddVertices(const PrecompInputVertex *, const PrecompInputVertex *)

Copies all vertices between [begin, end) into this object.

CalculateSurfaceArea()

Returns the world-space surface area of the mesh.

Clone()

Create a deep copy of this mesh.

Create()

Create a new empty IPrecompInputMesh.

GetFaceArray()

Read-only access to the faces.

GetFaceArray()

Modification access to the faces.

GetLinkArray()

Modification access to the link array.

GetLinkArray()

Read-only access to the link array.

GetMaterialGuidMappingsArray()

Read-only access to the material GUID to 32-bit material ID mapping array.

GetNumFaces()

How many faces in this mesh.

GetNumLinks()

How many links are in this mesh.

GetNumMaterialGuidMappings()

Gets the number of material GUID to 32-bit material ID mappings, as added by AddMaterialGuidMapping.

GetNumVertices()

How many vertices in this mesh.

GetVertexArray()

Read-only access to the vertices.

GetVertexArray()

Modification access to the vertices.

Load(IGeoInputStream &, Geo::u32)

Load an instance of this class from an IGeoInputStream.

Release()

Free this object that was created within the Enlighten libraries.

Save(IGeoStream &, Geo::u32)

Save an instance of this class to an IGeoStream.


Anchor
aed3ff8256627252bfe163698747ec0f4
aed3ff8256627252bfe163698747ec0f4

virtual bool Enlighten::IPrecompInputMesh::AddFaces

...

public: bool AddFaces
(
    const PrecompInputFace * begin,
    const PrecompInputFace * end
)

...

Copies all faces between [begin, end) into this object.

Parameters
[in]begin

A pointer to the first element to be added

[in]end

A pointer to an element one past the last entity (as standard STL syntax)

Returns

True if operation succeeded, false if there was not enough memory to satisfy request


Anchor
a1abc9b1d5c81a9ac56086fbb64b47f3a
a1abc9b1d5c81a9ac56086fbb64b47f3a

...

public: bool AddLinks
(
    const Geo::IdxLink * begin,
    const Geo::IdxLink * end
)

...

Copies all index links between [begin, end) into this object.

An IdxLink is a pair of vertex indices that denote that the two vertices should be considered to be part of the same group. By default Enlighten will treat triangles that share vertices as being in the same "triangle group" and treat as an item. Triangles that do not share vertices will be processed independently. IdxLinks allow you to add additional constraints to this. Please see the technical SDK documentation for further details and examples of this.

Parameters
[in]begin

A pointer to the first element to be added

[in]end

A pointer to an element one past the last entity (as standard STL syntax)

Returns

True if operation succeeded, false if there was not enough memory to satisfy request


Anchor
aaa76831e1589cb2cd9d9e64f6ac547b4
aaa76831e1589cb2cd9d9e64f6ac547b4

virtual bool Enlighten::IPrecompInputMesh::AddLinksForIdenticalVertices

...

public: bool AddLinksForIdenticalVertices
(
    bool comparePositions,
    bool compareNormals,
    bool compareChartUvs,
    bool compareAlbedoUvs
)

...

Utility to generate links between identical vertices.

This will append the link array with a set of links that link together bitwise identical vertices into the same tri group. The four boolean parameters control which elements of the vertices should be considered during the comparison. For example, if you have authored your chart UV and want to ensure that each authored chart becomes a tri group you should set compareChartUvs to true and all others to false so only comparisons of UV locations effects the joining.

All comparisons are bit-wise comparisons, and the generated links are appended onto any links that have already been added.

Note
titleNote

The behaviour of this system before links were exposed in the API was to compare on positions, normals and chart uvs but not albedo uvs. Setting this combination of bools will produce the same behaviour as previous versions.


Anchor
a17cb97d6d631102d1e3353a146c35809
a17cb97d6d631102d1e3353a146c35809

virtual bool Enlighten::IPrecompInputMesh::AddMaterialGuidMapping

...

public: bool AddMaterialGuidMapping
(
    Geo::GeoGuid guid,
    Geo::u32 materialId
)

...

Add an explicit mapping from 128-bit material GUID to 32-bit material ID.

The 32-bit material ID can then be set on a PrecompInputFace.m_AlbedoId and the material properties set at precompute time using the corresponding GUID.

Parameters
[in]guid

A 128-bit GUID

[in]materialId

A 32-bit material ID

Returns

True if mapping successfully added (or if the mapping already existed), false if the mapping could not be added as it would conflict with an existing mapping.


Anchor
a7ba1aa08f73c4d594a531ae12c5cc5c3
a7ba1aa08f73c4d594a531ae12c5cc5c3

virtual bool Enlighten::IPrecompInputMesh::AddVertices

...

public: bool AddVertices
(
    const PrecompInputVertex * begin,
    const PrecompInputVertex * end
)

...

Copies all vertices between [begin, end) into this object.

Parameters
[in]begin

A pointer to the first element to be added

[in]end

A pointer to an element one past the last entity (as standard STL syntax)

Returns

True if operation succeeded, false if there was not enough memory to satisfy request


Anchor
aa802a4e505c53594565417eddb5a4e3e
aa802a4e505c53594565417eddb5a4e3e

virtual float Enlighten::IPrecompInputMesh::CalculateSurfaceArea

...

public: float CalculateSurfaceArea() const

...

Returns the world-space surface area of the mesh.


Anchor
a3a1ab9f6ac2dfe1908b991feb6e525b2
a3a1ab9f6ac2dfe1908b991feb6e525b2

virtual IPrecompInputMesh* Enlighten::IPrecompInputMesh::Clone

...

public: IPrecompInputMesh * Clone() const

...

Create a deep copy of this mesh.


Anchor
af8d4bb42373645a017dd93f52f73f121
af8d4bb42373645a017dd93f52f73f121

static IPrecompInputMesh* Enlighten::IPrecompInputMesh::Create

...

public: IPrecompInputMesh * Create()

...

Create a new empty IPrecompInputMesh.


Anchor
aa16df4d18c151e99629604a619000705
aa16df4d18c151e99629604a619000705

virtual const PrecompInputFace* Enlighten::IPrecompInputMesh::GetFaceArray

...

public: const PrecompInputFace * GetFaceArray() const

...

Read-only access to the faces.


Anchor
a434726d2781b3b8d82a73efb343f8b69
a434726d2781b3b8d82a73efb343f8b69

virtual PrecompInputFace* Enlighten::IPrecompInputMesh::GetFaceArray

...

public: PrecompInputFace * GetFaceArray()

...

Modification access to the faces.


Anchor
ae5540b75a490bb26c41a636d5cec67b4
ae5540b75a490bb26c41a636d5cec67b4

virtual Geo::IdxLink* Enlighten::IPrecompInputMesh::GetLinkArray

...

public: Geo::IdxLink * GetLinkArray()

...

Modification access to the link array.


Anchor
ae612864b78fc604941b6236942e411f5
ae612864b78fc604941b6236942e411f5

virtual const Geo::IdxLink* Enlighten::IPrecompInputMesh::GetLinkArray

...

public: const Geo::IdxLink * GetLinkArray() const

...

Read-only access to the link array.


Anchor
a9a472ea905d3c7890ab0d5fb5bfdabd3
a9a472ea905d3c7890ab0d5fb5bfdabd3

virtual const MaterialGuidMapping* Enlighten::IPrecompInputMesh::GetMaterialGuidMappingsArray

...

public: const MaterialGuidMapping * GetMaterialGuidMappingsArray() const

...

Read-only access to the material GUID to 32-bit material ID mapping array.


Anchor
ac7c78faffc1dcd1c69163166f7db4674
ac7c78faffc1dcd1c69163166f7db4674

virtual Geo::s32 Enlighten::IPrecompInputMesh::GetNumFaces

...

public: Geo::s32 GetNumFaces() const

...

How many faces in this mesh.


Anchor
aac0481b013992ef7dfd3c84a72edb54e
aac0481b013992ef7dfd3c84a72edb54e

...

public: Geo::s32 GetNumLinks() const

...

How many links are in this mesh.


Anchor
a462277f6c1c98b37ffe7b1a3ab3d0341
a462277f6c1c98b37ffe7b1a3ab3d0341

virtual Geo::s32 Enlighten::IPrecompInputMesh::GetNumMaterialGuidMappings

...

public: Geo::s32 GetNumMaterialGuidMappings() const

...

Gets the number of material GUID to 32-bit material ID mappings, as added by AddMaterialGuidMapping.


Anchor
a6d291c72973fedfeecc2296eb49571a8
a6d291c72973fedfeecc2296eb49571a8

virtual Geo::s32 Enlighten::IPrecompInputMesh::GetNumVertices

...

public: Geo::s32 GetNumVertices() const

...

How many vertices in this mesh.


Anchor
ae6ce17a482ec8b927c50fac9d00998cb
ae6ce17a482ec8b927c50fac9d00998cb

virtual const PrecompInputVertex* Enlighten::IPrecompInputMesh::GetVertexArray

...

public: const PrecompInputVertex * GetVertexArray() const

...

Read-only access to the vertices.


Anchor
a307555b473e92bc5f9542464f142d9e7
a307555b473e92bc5f9542464f142d9e7

virtual PrecompInputVertex* Enlighten::IPrecompInputMesh::GetVertexArray

...

public: PrecompInputVertex * GetVertexArray()

...

Modification access to the vertices.


Anchor
ae5fb810c8f4470cb3c9fcb16c6f7f7fe
ae5fb810c8f4470cb3c9fcb16c6f7f7fe

virtual bool Geo::IGeoSerialisable::Load

...

public: bool Load
(
    IGeoInputStream & stream,
    Geo::u32 section
)

...

Load an instance of this class from an IGeoInputStream.

The stream must be ready to read from. You can load sections of an object by passing a bitmask representing the desired sections rather than Iff::AllSectionsMask, which will load all sections. It is also safe to call this method on an object multiple times with different section arguments to load multiple parts.


Anchor
af6bdf30b42adde386c428e9dc2821eb9
af6bdf30b42adde386c428e9dc2821eb9

virtual void Geo::IGeoReleasable::Release

...

public: void Release()

...

Free this object that was created within the Enlighten libraries.

Expect this to behave in a similar way to calling 'delete(this)'


Anchor
a5b03439626a3dac9b9c27feb1a3978d3
a5b03439626a3dac9b9c27feb1a3978d3

virtual bool Geo::IGeoSerialisable::Save

...

public: bool Save
(
    IGeoStream & stream,
    Geo::u32 section
) const

...

Save an instance of this class to an IGeoStream.

The stream must be ready to write to. You can save sections of an object by passing a bitmask representing the desired sections rather than Iff::AllSectionsMask, which will save all sections that are available.