This is the documentation for Enlighten.

class Enlighten ProbeSetManagerVoxel

class Enlighten::ProbeSetManagerVoxel

    └>Enlighten::IProbeSetManager

Probe Set Manager Voxel class Implementation of the IProbeSetManager interface class This implementation is based on a voxel grid acceleration data structure.

The scene is being voxelised, for each voxel we store an array of probe sets that intersect that voxel. Then at run time for a given point we can retrieve the voxel this point is in, and therefore all the probe sets that may be needed for interpolation.

To assign probe sets to voxels we do not need any run time data for the probe sets. Only their geometrical properties are needed (bounding box, resolution). At run time ProbeSetManagerVoxel keeps track (via MarkProbeSetAsLoaded and MarkProbeSetAsUnLoaded methods) of which probe sets have their run time data loaded, and uses only those ones for interpolation.

During interpolation each probe sets gets a weight (based on where it is in relation to the query point), that maximum weight that a given probe set can get is limited by the MaxWeight that can be set using SetMaxWeightForProbeSet method. This mechanism allows for LOD switching (given probe set can has its maximum weight gradually decreased to 0 and when it reaches 0 it can be unloaded and a different LOD probe set loaded)

Classes

Name Description
Enlighten::ProbeSetManagerVoxel::ProbeSetIndicesComparitor

a utility struct to be used with std::sort, order based on probes density

Enlighten::ProbeSetManagerVoxel::ProbeSetProps

Helper struct describing a probe set properties.

Enlighten::ProbeSetManagerVoxel::Voxel

Helper struct describing a voxel.

Variables

Name Description
void * m_InternalMemory

internal memory used by the class - needs to be provided by the user. Has to be at least 4-bytes aligned.

bool m_IsInitialised

is the manager in an initialised state

float m_MaxVolumeForVoxelisationInVoxelVolumes

if a volume of given probe set divided by the voxel volume is greater than this threshold, then that probe set will not be voxelised

Geo::u16 * m_NotVoxelisedProbeSetPropsIndices

pointer to an array that holds indices to (m_ProbeSetProps) of ProbeSets that were too big to be voxelised

Geo::u16 m_NumNotVoxalisedProbeSets

number of not voxelised Probe Sets

Geo::u16 m_NumProbeSets

total number of Probe Sets under management (both voxelised and not)

ProbeSetProps * m_ProbeSetProps

pointer to an array of ProbeSetProps objects, after Initialise() this is sorted by the Guids of the ProbeSets Indices in Voxel::m_ProbeSetPropsIndices are indices into this array.

size_t m_SizeOfInternalMemory

size of the external memory provided by the user.

Geo::u32 m_TotalNumOfOccupiedVoxels

Number of occupied voxels.

Voxel * m_Voxels

pointer to an array that holds all the voxels (sorted by their coordinates)

Geo::v128 m_VoxelSize

Voxel size.

Functions

Name Description
CalculateInternalMemoryRequirement(Geo::v128, float, RadProbeSetMetaData const *const *, Geo::u16)

Method to calculate the upper limit on memory needed by the Probe Set Manager.

ConstructExpandedNonAABBVolume(Enlighten::RadProbeSetMetaData const &)

Return an expanded bounding volume constructed from given meta data.

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

For a given Probe Set guid, find an index into m_ProbeSetProps array.

GetInternalMemory()

Get the internal memory storage.

GetInterpolationInputSet(Geo::u32)

Get an interpolation set that corresponds to given index - this index needs to be comaptible with ProbeInterpolant::m_ProbeSetIndex filled by the GetProbeInterpolants(...) method.

GetInterpolationInputSet(Geo::u32)

Get an interpolation set that corresponds to given index.

GetInterpolationInputSet(Geo::GeoGuid)

Get an interpolation set that corresponds to given guid.

GetMaxWeightForProbeSet(Geo::GeoGuid const &, float &)

Get the maximum weight for a given Probe Set.

GetMaxWeightForProbeSet(Geo::GeoGuid const &, float &)

Set a maximum interpolation weight for the given Probe Set.

GetNotVoxelisedProbeSetProps(Geo::s32)

Get the ProbeSetProps for a given not voxelised Probe Set.

GetNumNotVoxelisedProbeSets()

Some of the Probe Sets may be too big to undergo full voxelisation (i.e.

GetNumProbeSets()

Return the total (both voxelised and not voxelised) probe sets that are under management.

GetNumProbeSets()

Get the total number of Probe Sets under management.

GetNumVoxels()

Get the total number of occupied voxels.

GetProbeInterpolants(Geo::v128 const &, ProbeInterpolant *, Geo::s32, Geo::s32 &)

Retrieves the probes interpolants for a given point.

GetProbeInterpolants(Geo::v128 const &, ProbeInterpolant *, Geo::s32, Geo::s32 &, Geo::u32)

Retrieves the probes interpolants for a given point and specified LOD.

GetProbeInterpolants(Geo::v128 const &, ProbeInterpolant *, Geo::s32, Geo::s32 &)

Retrieves the probes interpolants for a given point.

GetProbeInterpolants(Geo::v128 const &, ProbeInterpolant *, Geo::s32, Geo::s32 &, Geo::u32)

Retrieves the probes interpolants for a given point and specified LOD.

GetProbeSetInterpolants(const Geo::v128 &, const Geo::u16 *, Geo::u16, ProbeInterpolant *, Geo::GeoPair< Geo::s32, bool > *, Geo::s32, Geo::s32 &)

Return Probe Set Interpolators.

GetProbeSetProps(Geo::s32)

Get the ProbeSetProps for a given index.

GetVoxel(Geo::u32)

Get the voxel for a given index.

GetVoxelSize()

Get voxel size used by the Probe Set Manager.

Initialise(Geo::v128, float, RadProbeSetMetaData const *const *, Geo::u16, size_t &)

Initialise the class, construct the internal acceleration data structure.

IsIndex1DensitySmallerThanIndex2Density(Geo::u16, Geo::u16)

Return true if Probe Set at index1 has smaller probe density than the one at index2.

IsInitialised()

Return an true if manager was successfully initialised.

MarkAllProbeSetsAsUnloaded()

Marks all Interpolation Input Sets as unloaded.

MarkAllProbeSetsAsUnloaded()

Mark all Interpolation Set as unloaded.

MarkProbeSetAsLoaded(Enlighten::InterpolationInputSet const &)

Mark given Interpolation Set as loaded, and provide run time data for it.

MarkProbeSetAsLoaded(Enlighten::InterpolationInputSet const &)

Marks given Interpolation Input Set as loaded.

MarkProbeSetAsUnloaded(Geo::GeoGuid const &)

Mark given Interpolation Set as unloaded.

MarkProbeSetAsUnloaded(Geo::GeoGuid const &)

Marks given Interpolation Input Set as unloaded.

OnAllLoadedProbeSetsArrayChanged(Enlighten::InterpolationInputSet const *, Geo::s32)

Allows the probe set manager a chance to observe the contiguous memory block in which the runtime stores all loaded input sets.

SetInternalMemory(void *, size_t)

Set the internal memory storage to an externally allocated mem pool.

SetMaxWeightForProbeSet(Geo::GeoGuid const &, float)

Set the maximum weight for a given Probe Set.

SetMaxWeightForProbeSet(Geo::GeoGuid const &, float)

Set a maximum interpolation weight for the given Probe Set.

ShouldNotVoxeliseVolume(float)

Return true if given volume is too big to be voxelised.


std::size_t Enlighten::ProbeSetManagerVoxel::CalculateInternalMemoryRequirement


public: std::size_t CalculateInternalMemoryRequirement
(
    Geo::v128 voxelSize,
    float maxVolumeThreshold,
    RadProbeSetMetaData const *const * probeSets,
    Geo::u16 numProbeSets
)


Method to calculate the upper limit on memory needed by the Probe Set Manager.

Parameters
[in] voxelSize

The size of the voxel (the smaller the voxel to more memory will be needed)

[in] maxVolumeThreshold

Maximum ratio of probe set volume to voxel volume for a probe set to be voxelised.

[in] probeSets

Array of geometrical descriptions of all the probe sets that will be under the management.

[in] numProbeSets

Number of entries in probeSets array.

Returns

The upper limit on memory needed to initialise the Probe Set Manager.


Geo::GeoNonAABoundingBox Enlighten::ProbeSetManagerVoxel::ConstructExpandedNonAABBVolume


public: Geo::GeoNonAABoundingBox ConstructExpandedNonAABBVolume
(
    Enlighten::RadProbeSetMetaData const & volumeMetaData
) const


Return an expanded bounding volume constructed from given meta data.

Returns

expanded bounding volume of the probe set


bool Enlighten::ProbeSetManagerVoxel::FindIndexIntoProbeSetPropsArray


protected: bool FindIndexIntoProbeSetPropsArray
(
    Geo::GeoGuid guid,
    Geo::u16 & index
) const


For a given Probe Set guid, find an index into m_ProbeSetProps array.

Since m_ProbeSetProbs is sorted by the Probe Set guids, so this is a OLog(n) operation.

Parameters
[in] guid

Guid of the Probe Set.

[out] index

Index of that Probe Set into the m_ProbeSetProps array.

Returns

TRUE if the Probe Set Manager is initialised and the Probe Set with guid is under its management, FALSE otherwise.


void* Enlighten::ProbeSetManagerVoxel::GetInternalMemory


public: void * GetInternalMemory() const


Get the internal memory storage.

Returns

the internal memory storage.


virtual Enlighten::InterpolationInputSet const* Enlighten::IProbeSetManager::GetInterpolationInputSet


public: Enlighten::InterpolationInputSet const * GetInterpolationInputSet
(
    Geo::u32 index
) const


Get an interpolation set that corresponds to given index - this index needs to be comaptible with ProbeInterpolant::m_ProbeSetIndex filled by the GetProbeInterpolants(...) method.

May return NULL is Probe Set that corresponds to index is unloaded. Note, however that none of the ProbeInterpolant::m_ProbeSetIndex indices returned from GetProbeInterpolants(...) should correspond to an unloaded Probe Sets.

Returns

The InterpolationI Input Set for a given index or NULL if that Probe Set in unloaded.


virtual Enlighten::InterpolationInputSet const* Enlighten::ProbeSetManagerVoxel::GetInterpolationInputSet


public: virtual Enlighten::InterpolationInputSet const * GetInterpolationInputSet
(
    Geo::u32 index
) const


Get an interpolation set that corresponds to given index.

This index is comaptible with ProbeInterpolant::m_ProbeSetIndex

Returns

InterpolationInputSet that corresponds to the given index. Can be NULL if the probe set for that index is not loaded. Note that none of the probe set indices returned from GetProbeInterpolants will correspond to unloaded probe sets.


Enlighten::InterpolationInputSet const* Enlighten::ProbeSetManagerVoxel::GetInterpolationInputSet


public: Enlighten::InterpolationInputSet const * GetInterpolationInputSet
(
    Geo::GeoGuid guid
) const


Get an interpolation set that corresponds to given guid.

Needs to perform a search. Scales as Log(N) [N - num of probe sets)

Returns

InterpolationInputSet that corresponds to the given guid. Can be NULL if the probe set for that guid is not loaded.


virtual bool Enlighten::ProbeSetManagerVoxel::GetMaxWeightForProbeSet


public: virtual bool GetMaxWeightForProbeSet
(
    Geo::GeoGuid const & probeSet,
    float & maxWeight
) const


Get the maximum weight for a given Probe Set.

Parameters
[in] probeSet

GUID of the Probe Set to retrieve the maximum weight for.

[out] maxWeight

The retrieved maximum weight.

Returns

TRUE if the input to this function is valid, Probe Set Manager is initialised and the probeSet probe set is under Probe Set Manager management, otherwise FALSE.


virtual bool Enlighten::IProbeSetManager::GetMaxWeightForProbeSet


public: bool GetMaxWeightForProbeSet
(
    Geo::GeoGuid const & probeSet,
    float & maxWeight
) const


Set a maximum interpolation weight for the given Probe Set.

. Needs to perform a search OLog(N). Where N is number of probe sets under management.

Parameters
[in] probeSet

The GUID of the Probe Set.

[out] maxWeight

New maximum interpolation weight.

Returns

TRUE if the Probe Set is under ProbeSetManager management, otherwise FALSE.


ProbeSetProps const& Enlighten::ProbeSetManagerVoxel::GetNotVoxelisedProbeSetProps


public: ProbeSetProps const & GetNotVoxelisedProbeSetProps
(
    Geo::s32 index
) const


Get the ProbeSetProps for a given not voxelised Probe Set.

The index used here is an index to m_NotVoxelisedProbeSetPropsIndices array which in turn holds indices to m_ProbeSetProps. This index is NOT compatible with what is being returned from GetProbeInterpolants in ProbeInterpolant::m_ProbeSetIndex.

Returns

ProbeSetProps for the requested not voxelised Probe Set index.


Geo::u16 Enlighten::ProbeSetManagerVoxel::GetNumNotVoxelisedProbeSets


public: Geo::u16 GetNumNotVoxelisedProbeSets() const


Some of the Probe Sets may be too big to undergo full voxelisation (i.e.

voxelising them would produce too many voxels. Those probe sets are stored in an additional array. This method returns the number of those not voxelised volumes. If for a given point in space no voxel in the m_Voxels can be found, then not voxelised probe sets should be used for interpolation. If however a voxel is found, then there is no need to check the not voxelised sets as the Voxel::m_ProbeSetPropsIndices contains not voxelised volumes too.

Returns

Number of not voxelised Probe Sets.


virtual Geo::s32 Enlighten::ProbeSetManagerVoxel::GetNumProbeSets


public: virtual Geo::s32 GetNumProbeSets() const


Return the total (both voxelised and not voxelised) probe sets that are under management.

Returns

total number of probe sets under management.


virtual Geo::s32 Enlighten::IProbeSetManager::GetNumProbeSets


public: Geo::s32 GetNumProbeSets() const


Get the total number of Probe Sets under management.

Returns

the total number of Probe Sets under management.


Geo::s32 Enlighten::ProbeSetManagerVoxel::GetNumVoxels


public: Geo::s32 GetNumVoxels() const


Get the total number of occupied voxels.

Returns

Number of occupied voxels.


virtual bool Enlighten::ProbeSetManagerVoxel::GetProbeInterpolants


public: virtual bool GetProbeInterpolants
(
    Geo::v128 const & point,
    ProbeInterpolant * interpolants,
    Geo::s32 numMaxInterpolants,
    Geo::s32 & numUsedInterpolants
) const


Retrieves the probes interpolants for a given point.

Parameters
[in] point

Location used for the interpolation.

[out] interpolants

Output probe interpolants.

[in] numMaxInterpolants

Size of the output interpolants array.

[out] numUsedInterpolants

Number of interpolants actually used.

Returns

TRUE if the input to this function is valid, Probe Set Manager is initialised and the interpolation is successful (including the case where the point is outside all voxels, in which case numUsedInterpolants will be set to zero), otherwise FALSE.


virtual bool Enlighten::ProbeSetManagerVoxel::GetProbeInterpolants


public: virtual bool GetProbeInterpolants
(
    Geo::v128 const & point,
    ProbeInterpolant * interpolants,
    Geo::s32 numMaxInterpolants,
    Geo::s32 & numUsedInterpolants,
    Geo::u32 lod
) const


Retrieves the probes interpolants for a given point and specified LOD.

Only loaded Probe Sets are considered for interpolation. Note: This method will produce incorrect results because the ProbeSetManagerVoxel ProbeSetManager does not support LOD. Implicitly uses calls method above and issues a warning.

Parameters
[in] point

Location used for the interpolation.

[out] interpolants

Output probe interpolants.

[in] numMaxInterpolants

Size of the output interpolants array.

[out] numUsedInterpolants

Number of interpolants actually used.

[in] lod

This parameter is ignored since this ProbeSetManager does not support probe LOD.

Returns

TRUE if the input to this function is valid and the interpolation is successful, otherwise FALSE.


virtual bool Enlighten::IProbeSetManager::GetProbeInterpolants


public: bool GetProbeInterpolants
(
    Geo::v128 const & point,
    ProbeInterpolant * interpolants,
    Geo::s32 numMaxInterpolants,
    Geo::s32 & numUsedInterpolants
) const


Retrieves the probes interpolants for a given point.

Only loaded Probe Sets are considered for interpolation.

Parameters
[in] point

Location used for the interpolation.

[out] interpolants

Output probe interpolants.

[in] numMaxInterpolants

Size of the output interpolants array.

[out] numUsedInterpolants

Number of interpolants actually used.

Returns

TRUE if the input to this function is valid and the interpolation is successful, otherwise FALSE.


virtual bool Enlighten::IProbeSetManager::GetProbeInterpolants


public: bool GetProbeInterpolants
(
    Geo::v128 const & point,
    ProbeInterpolant * interpolants,
    Geo::s32 numMaxInterpolants,
    Geo::s32 & numUsedInterpolants,
    Geo::u32 lod
) const


Retrieves the probes interpolants for a given point and specified LOD.

Only loaded Probe Sets are considered for interpolation. This interface is only supported to enable Transparency and Contributing Probe when using Probe LOD with PPPI.

Parameters
[in] point

Location used for the interpolation.

[out] interpolants

Output probe interpolants.

[in] numMaxInterpolants

Size of the output interpolants array.

[out] numUsedInterpolants

Number of interpolants actually used.

[in] lod

The LOD to select which interpolants should be returned.

Returns

TRUE if the input to this function is valid and the interpolation is successful, otherwise FALSE.


bool Enlighten::ProbeSetManagerVoxel::GetProbeSetInterpolants


protected: bool GetProbeSetInterpolants
(
    const Geo::v128 & point,
    const Geo::u16 * probeSetsPropsSubsetIndices,
    Geo::u16 numSubsetIndices,
    ProbeInterpolant * interpolators,
    Geo::GeoPair< Geo::s32, bool > * pointInsideInnerVolume,
    Geo::s32 numMaxInterpolants,
    Geo::s32 & numUsedInterpolants
) const


Return Probe Set Interpolators.

The weights of the probe sets depend on the position of the query point in respect, to the bounding volumes of the Probe Sets.

Parameters
[in] point

The query point.

[in] probeSetsPropsSubsetIndices

Array of Probe Sets to consider. This is an array of indices into m_ProbeSetProps array. Only Probe Sets present in this array will be considered for interpolation.

[in] numSubsetIndices

Number of entries in probeSetsPropsSubsetIndices.

[out] interpolators

Probe interpolants with m_ProbeSetIndex and m_Weight set to an index into m_ProbeSetProps array and the weight of that Probe Set.

[out] pointInsideInnerVolume

an array that holds pairs of ProbeSet index and bool, where bool tells if "point" is inside inner volume of the Probe Set.

[in] numMaxInterpolants

Maximum number of Probe Sets to consider for interpolation.

[out] numUsedInterpolants

Number of used Probe Sets (number rof valid entries in interpolators array)

Returns

TRUE if the Probe Set Manager is initialised and Probe Sets for a given point can be retrieved, FALSE otherwise.


ProbeSetProps const& Enlighten::ProbeSetManagerVoxel::GetProbeSetProps


public: ProbeSetProps const & GetProbeSetProps
(
    Geo::s32 index
) const


Get the ProbeSetProps for a given index.

That index is an index to m_ProbeSetProps array, which holds ProbeSetsProps sorted by their Guids. That index is also the index which is returned in ProbeInterpolant::m_ProbeSetIndex by the GetProbeInterpolants method.

Parameters
[in] index

The index of the Probe Set for which the ProbeSetProps is requested.

Returns

ProbeSetProps for the requested Probe Set index.


Voxel const& Enlighten::ProbeSetManagerVoxel::GetVoxel


public: Voxel const & GetVoxel
(
    Geo::u32 index
) const


Get the voxel for a given index.

Voxels are stored in the m_Voxels and are sorted by their coordiantes.

Returns

Voxel at the given index.


Geo::v128 const& Enlighten::ProbeSetManagerVoxel::GetVoxelSize


public: Geo::v128 const & GetVoxelSize() const


Get voxel size used by the Probe Set Manager.

Returns

Number of occupied voxels.


bool Enlighten::ProbeSetManagerVoxel::Initialise


public: bool Initialise
(
    Geo::v128 voxelSize,
    float maxVolumeThreshold,
    RadProbeSetMetaData const *const * probeSets,
    Geo::u16 numProbeSets,
    size_t & memUsed
)


Initialise the class, construct the internal acceleration data structure.

Before calling this method the required internal memory needs to be allocated and set (via SetInternalMemory). Upper limit on required memory can be obtained via CalculateIntermalMemoryRequirement. Inputs to this method have to be the same as inputs to CalculateInternalMemoryRequirement.

This method will also return the actual amount of memory used in memUsed variable. This can be used to reinitialise the class with less memory.

Parameters
[in] voxelSize

The size of the voxel (the smaller the voxel to more memory will be needed)

[in] maxVolumeThreshold

Maximum ratio of probe set volume to voxel volume for a probe set to be voxelised.

[in] probeSets

Array of geometrical descriptions of all the probe sets that will be under the management.

[in] numProbeSets

Number of entries in probeSets array.

[out] memUsed

Actual memory used.

Returns

TRUE if initialisation was successful, FALSE otherwise.


bool Enlighten::ProbeSetManagerVoxel::IsIndex1DensitySmallerThanIndex2Density


protected: bool IsIndex1DensitySmallerThanIndex2Density
(
    Geo::u16 index1,
    Geo::u16 index2
) const


Return true if Probe Set at index1 has smaller probe density than the one at index2.

Ties are broken by the Probe Set guids.

Parameters
[in] index1

[in] index2

Returns

TRUE if Probe Set at index1 has smaller probe density than the one at index2. FALSE, otherwise.


bool Enlighten::ProbeSetManagerVoxel::IsInitialised


public: bool IsInitialised() const


Return an true if manager was successfully initialised.

Returns

true if manager was successfully initialised


virtual bool Enlighten::IProbeSetManager::MarkAllProbeSetsAsUnloaded


public: bool MarkAllProbeSetsAsUnloaded()


Marks all Interpolation Input Sets as unloaded.

Unloaded input sets are not used for interpolation.

Returns

TRUE if the InterpolationInputSet is under ProbeSetManager management and can be marked as unloaded, otherwise FALSE.


virtual bool Enlighten::ProbeSetManagerVoxel::MarkAllProbeSetsAsUnloaded


public: virtual bool MarkAllProbeSetsAsUnloaded()


Mark all Interpolation Set as unloaded.

Returns

TRUE if the input to this function is valid, Probe Set Manager is initialised, otherwise FALSE.


virtual bool Enlighten::ProbeSetManagerVoxel::MarkProbeSetAsLoaded


public: virtual bool MarkProbeSetAsLoaded
(
    Enlighten::InterpolationInputSet const & loadedProbeSet
)


Mark given Interpolation Set as loaded, and provide run time data for it.

The loadedProbeSet needs to be valid and needs to have valid RadProbeSetCore pointer.

Parameters
[in] loadedProbeSet

Interpoaltion Set to be marked as loaded.

Returns

TRUE if the input to this function is valid, Probe Set Manager is initialised and the loadedProbeSet probe set is under Probe Set Manager management, otherwise FALSE.


virtual bool Enlighten::IProbeSetManager::MarkProbeSetAsLoaded


public: bool MarkProbeSetAsLoaded
(
    Enlighten::InterpolationInputSet const & loadedProbeSet
)


Marks given Interpolation Input Set as loaded.

Only loaded input sets are used for interpolation.

Parameters
[in] loadedProbeSet

The Interpolation Input Set to be marked as loaded. It has to contain a valid RadProbeSetCore field.

Returns

TRUE if the InterpolationInputSet is under ProbeSetManager management and can be marked as loaded, otherwise FALSE.


virtual bool Enlighten::ProbeSetManagerVoxel::MarkProbeSetAsUnloaded


public: virtual bool MarkProbeSetAsUnloaded
(
    Geo::GeoGuid const & unloadedProbeSet
)


Mark given Interpolation Set as unloaded.

This probe set will not be used for interpolation until it is marked as loaded again.

Parameters
[in] unloadedProbeSet

GUID of the Probe Set to be marked as unloaded.

Returns

TRUE if the input to this function is valid, Probe Set Manager is initialised and the unloadedProbeSet probe set is under Probe Set Manager management, otherwise FALSE.


virtual bool Enlighten::IProbeSetManager::MarkProbeSetAsUnloaded


public: bool MarkProbeSetAsUnloaded
(
    Geo::GeoGuid const & unloadedProbeSet
)


Marks given Interpolation Input Set as unloaded.

Unloaded input sets are not used for interpolation.

Parameters
[in] unloadedProbeSet

The GUID of the Probe Set to be marked as unloaded.

Returns

TRUE if the InterpolationInputSet is under ProbeSetManager management and can be marked as unloaded, otherwise FALSE.


virtual void Enlighten::IProbeSetManager::OnAllLoadedProbeSetsArrayChanged


public: virtual void OnAllLoadedProbeSetsArrayChanged
(
    Enlighten::InterpolationInputSet const * allLoadedProbeSets,
    Geo::s32 numLoadedProbeSets
)


Allows the probe set manager a chance to observe the contiguous memory block in which the runtime stores all loaded input sets.

The manager can then use this knowledge to speed up other operations as needed (e.g. if the manager's implementation of GetProbeInterpolants() uses the variant of Enlighten::GetProbeInterpolants() supporting multiple probe sets). Note that multiple load and unload notifications (as noted by MarkProbeSetAsLoaded and MarkProbeSetAsUnloaded, respectively) may be batched into a single call to this function.

Parameters
[in] allLoadedProbeSets

Starting address of the input set array managed by the runtime.

[in] numLoadedProbeSets

Size of the input set array.


void Enlighten::ProbeSetManagerVoxel::SetInternalMemory


public: void SetInternalMemory
(
    void * mem,
    size_t memSize
)


Set the internal memory storage to an externally allocated mem pool.

Needs to be called before Initialise(). Setting new memory location requires object reinitialisation.

Parameters
[in] mem

Pointer to memory pool. Needs to have at least 4-bytes alignment.

[in] memSize

The size of the memory pool.


virtual bool Enlighten::ProbeSetManagerVoxel::SetMaxWeightForProbeSet


public: virtual bool SetMaxWeightForProbeSet
(
    Geo::GeoGuid const & probeSet,
    float maxWeight
)


Set the maximum weight for a given Probe Set.

Parameters
[in] probeSet

GUID of the Probe Set to set the maximum weight for.

[in] maxWeight

The maximum weight - should be a float between 0.0 and 1.0.

Returns

TRUE if the input to this function is valid, Probe Set Manager is initialised and the probeSet probe set is under Probe Set Manager management, otherwise FALSE.


virtual bool Enlighten::IProbeSetManager::SetMaxWeightForProbeSet


public: bool SetMaxWeightForProbeSet
(
    Geo::GeoGuid const & probeSet,
    float maxWeight
)


Set a maximum interpolation weight for the given Probe Set.

Needs to perform a search OLog(N). Where N is number of probe sets under management.

Parameters
[in] probeSet

The GUID of the Probe Set.

[in] maxWeight

New maximum interpolation weight. Has to be a value between 0.0 and 1.0

Returns

TRUE if the Probe Set is under ProbeSetManager management, otherwise FALSE.


bool Enlighten::ProbeSetManagerVoxel::ShouldNotVoxeliseVolume


protected: bool ShouldNotVoxeliseVolume
(
    float volume
) const


Return true if given volume is too big to be voxelised.

Not voxelised volumes are stored in a separate list. GetProbeInterpolants method checks (O(N)) the list of all not voxelised volumes if it does not find a voxel information for a given query point. Having more not voxelised volumes decreases the memory usage but increases interpolation time. In general big volumes (that would result in a lot of voxels) should be left not voxelised (e.g. if there is one huge volume that covers the whole scene)

Parameters
[in] volume

Returns

TRUE if given volume should not be voxelised. FALSE, otherwise.