Versions Compared

Key

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

class Enlighten::MaterialGuids

Storage of mappings between "old" u64 material IDs and "new" instance, mesh and material GUIDs.

This class is optionally included in ClusterAlbedoWorkspaceMaterialData and is used for setting material properties using GUIDs.

Classes

NameDescription
Enlighten::MaterialGuids::GeometryInfo

Stored data for a geometry.

Enlighten::MaterialGuids::InstanceInfo

Stored data for an instance.

Enlighten::MaterialGuids::MaterialGuidMapping

Stored data for a material-guid mapping.

Enlighten::MaterialGuids::MeshInfo

Stored data for a mesh.

Functions

NameDescription
ConvertEndian(Geo::EConvertEndianMode)

Convert the endian-ness of this MaterialGuids.

ConvertIdsAndIdxsToGuids(Geo::u16, Geo::u16, Geo::GeoGuid &, Geo::GeoGuid &)

Converts a given instance ID and mesh index to instance GUID and mesh GUID.

ConvertIdsAndIdxsToGuids(Geo::u16, Geo::u16, Geo::u32, Geo::GeoGuid &, Geo::GeoGuid &, Geo::GeoGuid &)

Converts a given instance ID, mesh index and material ID to instance GUID, mesh GUID and material GUID.

GetGeometries()

Raw access to the geometries array.

GetGeometries()

Raw access to the geometries array.

GetInstanceGuids(Geo::GeoGuid *)

Gets number of instances. If pointer is non-null will fill in the array with their guids.

GetInstances()

Raw access to the instances array.

GetInstances()

Raw access to the instances array.

GetMaterialGuidMappings()

Raw access to the material GUID mappings array.

GetMaterialGuidMappings()

Raw access to the material GUID mappings array.

GetMaterialGuids(const Geo::GeoGuid &, const Geo::GeoGuid &, Geo::GeoGuid *)

Gets number of materials in the given instance and mesh (or all if GeoGuid::Invalid). If pointer is non-null will fill in the array with their guids.

GetMaterialIdsFromGuids(const Geo::GeoGuid &, const Geo::GeoGuid &, const Geo::GeoGuid &, Geo::u64 *, Geo::s32 &, Geo::u64 &)

Fills in array of material IDs and a 64-bit mask specifying which bits need to mask, given instance, mesh and material GUIDs any of which can be GeoGuid::Invalid for "all".

GetMeshes()

Raw access to the meshes array.

GetMeshes()

Raw access to the meshes array.

GetMeshGuids(const Geo::GeoGuid &, Geo::GeoGuid *)

Gets number of meshes in the given instance (or all if GeoGuid::Invalid). If pointer is non-null will fill in the array with their guids.

Variables

NameDescription
Geo::u32 m_GeometriesOffset

Array of GeometryInfo (x m_NumGeometries)

Geo::u32 m_InstancesOffset

Array of InstanceInfo (x m_NumInstances). Should be sorted by instance Guid to speed up lookups.

Geo::u32 m_MaterialGuidMappingsOffset

Array of MaterialGuidMapping (x m_NumMaterialGuidMappings). This contains the material guid mappings for all the meshes concatenated together in one big array. Each sub-array (per-mesh) should be sorted by material Guid to speed up lookups.

Geo::u32 m_MeshesOffset

Array of MeshInfo (x m_NumMeshes). This contains the MeshInfo for all the geometries concatenated together in one big array. Each sub-array (per geometry) should be sorted by mesh guid to speed up lookups.

Geo::s32 m_NumGeometries

Number of geometries.

Geo::s32 m_NumInstances

Number of instances.

Geo::s32 m_NumMaterialGuidMappings

Total number of material Guid -> u32 material id mappings across all meshes.

Geo::s32 m_NumMaterialInstances

Total uses of materials by all instances.

Geo::s32 m_NumMeshes

Total number of meshes (summed across all Geometries)

Geo::u32 m_ObjectSize

Size of this object (in bytes).


Anchor
a0ee8f9414d177a7373b4537449c79a92
a0ee8f9414d177a7373b4537449c79a92

void Enlighten::MaterialGuids::ConvertEndian

...

public: void ConvertEndian
(
    Geo::EConvertEndianMode mode
)

...

Convert the endian-ness of this MaterialGuids.


Anchor
ab6c55ec0182c964e0f9130e9988b5192
ab6c55ec0182c964e0f9130e9988b5192

bool Enlighten::MaterialGuids::ConvertIdsAndIdxsToGuids

...

public: bool ConvertIdsAndIdxsToGuids
(
    Geo::u16 instanceId,
    Geo::u16 meshIdx,
    Geo::GeoGuid & outInstanceGuid,
    Geo::GeoGuid & outMeshGuid
) const

...

Converts a given instance ID and mesh index to instance GUID and mesh GUID.


Anchor
a0f51876bb86dc8820b208524e2b36cd7
a0f51876bb86dc8820b208524e2b36cd7

bool Enlighten::MaterialGuids::ConvertIdsAndIdxsToGuids

...

public: bool ConvertIdsAndIdxsToGuids
(
    Geo::u16 instanceId,
    Geo::u16 meshIdx,
    Geo::u32 materialId,
    Geo::GeoGuid & outInstanceGuid,
    Geo::GeoGuid & outMeshGuid,
    Geo::GeoGuid & outMaterialGuid
) const

...

Converts a given instance ID, mesh index and material ID to instance GUID, mesh GUID and material GUID.


Anchor
a8c9afd3704793741fcc5778e94978c35
a8c9afd3704793741fcc5778e94978c35

const GeometryInfo* Enlighten::MaterialGuids::GetGeometries

...

public: const GeometryInfo * GetGeometries() const

...

Raw access to the geometries array.


Anchor
a6501d6e8be9aa3dae328d773acdae09d
a6501d6e8be9aa3dae328d773acdae09d

GeometryInfo* Enlighten::MaterialGuids::GetGeometries

...

public: GeometryInfo * GetGeometries()

...

Raw access to the geometries array.


Anchor
a2e040766c1ef6c5b7cbeb1cb6d07922a
a2e040766c1ef6c5b7cbeb1cb6d07922a

Geo::s32 Enlighten::MaterialGuids::GetInstanceGuids

...

public: Geo::s32 GetInstanceGuids
(
    Geo::GeoGuid * pInstanceGuids
) const

...

Gets number of instances. If pointer is non-null will fill in the array with their guids.


Anchor
a584b48ec53abd857bdbee00b1f72e2fe
a584b48ec53abd857bdbee00b1f72e2fe

const InstanceInfo* Enlighten::MaterialGuids::GetInstances

...

public: const InstanceInfo * GetInstances() const

...

Raw access to the instances array.


Anchor
ad054fe43493ef98ec6c9c02531ae2d55
ad054fe43493ef98ec6c9c02531ae2d55

InstanceInfo* Enlighten::MaterialGuids::GetInstances

...

public: InstanceInfo * GetInstances()

...

Raw access to the instances array.


Anchor
a9033604ab33e92f576f41848d4b7c520
a9033604ab33e92f576f41848d4b7c520

const MaterialGuidMapping* Enlighten::MaterialGuids::GetMaterialGuidMappings

...

public: const MaterialGuidMapping * GetMaterialGuidMappings() const

...

Raw access to the material GUID mappings array.


Anchor
ac38bd12e207e7f2b7ebdd3c1a62dfd04
ac38bd12e207e7f2b7ebdd3c1a62dfd04

MaterialGuidMapping* Enlighten::MaterialGuids::GetMaterialGuidMappings

...

public: MaterialGuidMapping * GetMaterialGuidMappings()

...

Raw access to the material GUID mappings array.


Anchor
ad1fb80281098841c141c24fbb7549c27
ad1fb80281098841c141c24fbb7549c27

Geo::s32 Enlighten::MaterialGuids::GetMaterialGuids

...

public: Geo::s32 GetMaterialGuids
(
    const Geo::GeoGuid & instanceGuid,
    const Geo::GeoGuid & meshGuid,
    Geo::GeoGuid * pMaterialGuids
) const

...

Gets number of materials in the given instance and mesh (or all if GeoGuid::Invalid). If pointer is non-null will fill in the array with their guids.


Anchor
a770126cf1496b7a6849bde44535aefce
a770126cf1496b7a6849bde44535aefce

bool Enlighten::MaterialGuids::GetMaterialIdsFromGuids

...

public: bool GetMaterialIdsFromGuids
(
    const Geo::GeoGuid & instanceGuid,
    const Geo::GeoGuid & meshGuid,
    const Geo::GeoGuid & materialGuid,
    Geo::u64 * pMaterialIds,
    Geo::s32 & outNumMaterialIds,
    Geo::u64 & outMask
) const

...

Fills in array of material IDs and a 64-bit mask specifying which bits need to mask, given instance, mesh and material GUIDs any of which can be GeoGuid::Invalid for "all".

pMaterialIds should be pre-allocated and have at least as many elements as the number of material uses in the system (this is a conservative estimate)


Anchor
a6c67c4038b09af887bfbc1690c48652f
a6c67c4038b09af887bfbc1690c48652f

const MeshInfo* Enlighten::MaterialGuids::GetMeshes

...

public: const MeshInfo * GetMeshes() const

...

Raw access to the meshes array.


Anchor
a318f5ead1cf0ccc5169aa22b8fbf48d7
a318f5ead1cf0ccc5169aa22b8fbf48d7

MeshInfo* Enlighten::MaterialGuids::GetMeshes

...

public: MeshInfo * GetMeshes()

...

Raw access to the meshes array.


Anchor
acacbbd3ed2179262837b2163ab799eb0
acacbbd3ed2179262837b2163ab799eb0

Geo::s32 Enlighten::MaterialGuids::GetMeshGuids

...

public: Geo::s32 GetMeshGuids
(
    const Geo::GeoGuid & instanceGuid,
    Geo::GeoGuid * pMeshGuids
) const

...

Gets number of meshes in the given instance (or all if GeoGuid::Invalid). If pointer is non-null will fill in the array with their guids.