Choose your operating system:
Windows
macOS
Linux
| FMassLODBaseLogic
|
Module |
|
Header |
/Engine/Plugins/Runtime/MassGameplay/Source/MassLOD/Public/MassLODCalculator.h |
Include |
#include "MassLODCalculator.h" |
template<typename FLODLogic>
struct TMassLODCalculator : public FMassLODBaseLogic
Helper struct to calculate LOD for each agent and maximize count per LOD Requires TViewerInfoFragment fragment collected by the TMassLODCollector. Stores information in TLODFragment fragment.
Name | Description | ||
---|---|---|---|
|
TStaticArray< f... |
BaseBucketSize |
The size of each subdivision per LOD (LOD Size/MaxBucketsPerLOD) |
|
TStaticArray< f... |
BaseLODDistance |
LOD distances |
|
float |
BufferHysteresisOnDistanceRatio |
Ratio for Buffer Distance Hysteresis |
|
TStaticArray< i... |
LODMaxCount |
MaxCount total |
|
TStaticArray< i... |
LODMaxCountPerViewer |
MaxCount total per viewers |
|
float |
MaxLODDistance |
Maximum LOD Distance |
|
RuntimeData |
Runtime data for LOD calculation |
|
|
RuntimeDataPerViewer |
Runtime data for each viewer specific LOD calculation, used only when bMaximizeCountPerViewer is true |
|
|
TStaticArray< f... |
VisibleBucketSize |
|
|
float |
VisibleDistanceToFrustum |
How far away from frustum does this entities are considered visible |
|
float |
VisibleDistanceToFrustumWithHysteresis |
Once visible how much further than distance to frustum does the entities need to be before being consider not visible |
|
TStaticArray< f... |
VisibleLODDistance |
Name | Description | ||
---|---|---|---|
|
float |
AccumulateCountInRuntimeData ( |
|
|
AdjustDistancesFromCount() |
Adjust LOD distances by clamping them to respect the maximum LOD count true if any LOD distances clamping was done |
|
|
AdjustDistancesFromCountForRuntimeData ( |
||
|
AdjustLODFromCount ( |
Adjust LOD from newly adjusted distances, only needed to be called when AdjustDistancesFromCount return true, called for each entity chunks Use next method when FLODLogic::bStoreInfoPerViewer is enabled Context of the chunk execution ViewersInfoList is the source information fragment for LOD calculation LODList is the fragment where calculation are stored |
|
|
AdjustLODFromCount ( |
Adjust LOD from newly adjusted distances, only needed to be called when AdjustDistancesFromCount return true, called for each entity chunks Use this version when FLODLogic::bStoreInfoPerViewer is enabled It calculates a LOD per viewer and needs information per viewer via PerViewerInfoList fragments Context of the chunk execution ViewersInfoList is the source information fragment for LOD calculation LODList is the fragment where calculation are stored PerViewerInfoList is the Per viewer source information |
|
|
CalculateLOD ( |
Calculate LOD, called for each entity chunks Use next method when FLODLogic::bStoreInfoPerViewer is enabled Context of the chunk execution ViewersInfoList is the source information fragment for LOD calculation LODList is the fragment where calculation are stored |
|
|
CalculateLOD ( |
Calculate LOD, called for each entity chunks Use this version when FLODLogic::bStoreInfoPerViewer is enabled It calculates a LOD per viewer and needs information per viewer via PerViewerInfoList fragments Context of the chunk execution ViewersInfoList is the source information fragment for LOD calculation LODList is the fragment where calculation are stored PerViewerInfoList is the Per viewer source information |
|
|
CalculateVisibility ( |
||
|
EMassLOD::Ty... |
ComputeLODFromSettings ( |
|
|
DebugDisplayLOD ( |
Debug draw the current state of each agent as a color coded square Context of the chunk execution LODList is the fragment where calculation are stored LocationList is the fragment transforms of the entities World where the debug display should be drawn |
|
|
ForceOffLOD ( |
Turn Off all LOD, called for each entity chunks Context of the chunk execution LODList is the fragment where calculation are stored |
|
|
Initialize |
Initializes the LOD calculator, needed to be called once at initialization time InBaseLODDistance distances used to calculate LOD InBufferHysteresisOnFOVRatio distance hysteresis used to calculate LOD InLODMaxCount the maximum count for each LOD InLODMaxCountPerViewer the maximum count for each LOD per viewer (Only when FLODLogic::bMaximizeCountPerViewer is enabled) InVisibleDistanceToFrustum is the distance from the frustum to start considering this entity is visible (Only when FLODLogic::bDoVisibilityLogic is enabled) InVisibleDistanceToFrustumHysteresis once visible, what extra distance the entity need to be before considered not visible anymore (Only when FLODLogic::bDoVisibilityLogic is enabled) InVisibleLODDistance the maximum count for each LOD per viewer (Only when FLODLogic::bDoVisibilityLogic is enabled) |
|
|
PrepareExecution ( |
Prepares execution for the current frame, needed to be called before every execution Viewers is the array of all the known viewers |
Name |
Description |
|
---|---|---|
|
FMassLODRuntimeData |