class Enlighten MaterialGuids

This is the documentation for Enlighten.

class Enlighten MaterialGuids

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

Name

Description

Name

Description

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

Name

Description

Name

Description

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

Name

Description

Name

Description

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).