ULodGlspComponent C++ Extension APIs
ULodGlspComponent · API Reference
These APIs do not have Blueprint reflection markup. Use them for custom LOD scheduling, picking, or rendering integration.
LOD Calculation and Scheduling
| API | Description |
|---|---|
GetLevelFittedByProjectedVoxelError(...) | Selects LOD by projected voxel error in screen space. |
GetLevelFittedByScreenPixelQuality(...) | Selects LOD using allowed error = 4 / Quality and returns local units per pixel. |
GetLevelFittedAverageSplatScreenSize(...) | Selects LOD by average on-screen Splat radius. |
ChangeLevelWithView(...) | Accepts a shared view snapshot and controls whether dynamic filtering is allowed. |
NeedsDynamicFilterUpdate(...) | Returns whether the current level needs to be filtered again. |
InvalidateViewDependentLod() | Invalidates view-dependent LOD results. |
RequestExplicitLodReschedule() | Forces rescheduling even when the level has not changed. |
HasPendingExplicitLodReschedule() | Returns whether a forced reschedule is pending. |
IsTaskRunning() | Returns whether an LOD task is running. |
ShouldUseFullData() | Returns whether the current VR view uses full-data mode. |
IsDynamicV2ActiveForCurrentView() | Returns whether the current VR view uses Dynamic V2. |
Chunk, Resident Data, and Picking
| API | Description |
|---|---|
GetChunkBounds() | Returns the current Chunk's local bounds. |
GetChunkResourceName() | Returns the cached Chunk name or a fallback name. |
GetResidentRenderCenter(...) | Returns the alpha-weighted world-space center of resident Splats. |
GetResidentRenderRevision() | Returns the revision of the resident rendering data. |
RaycastSplats(...) | Finds the nearest hit in the current CPU-resident Splats. |
CopyResidentRenderSnapshot(...) | Copies the internal rendering snapshot; its byte layout is not a stable storage format. |
Internal SDK Collaboration
| API | Description |
|---|---|
GetSplatAssetInterface() | Returns the current asset through ISplatAsset. |
GetCollisionAsset() | Returns collision data associated with the asset. |
GetCollisionSourceFingerprint() | Returns the collision-source fingerprint. |
SupportsLodRenderFeatures() | Always returns true. |
HasExplicitSceneSurfaceProxy() | Returns the surface-proxy state supplied by the Actor. |
SetRenderFeatureSettings(...) | Receives rendering settings propagated from the Actor. |
C++ Example
Calculate and switch LOD using screen-pixel quality:
cpp
double LocalUnitsPerPixel = 0.0;
const int32 Lod = Chunk->GetLevelFittedByScreenPixelQuality(
CameraPosition,
ViewProjection,
ViewportSize,
Chunk->ScreenPixelQuality,
LocalUnitsPerPixel);
if (Lod != INDEX_NONE && !Chunk->IsTaskRunning())
{
Chunk->ChangeLevel(Lod);
}Test the current resident data:
cpp
FVector HitCenter;
float HitDistance = 0.0f;
const bool bHit = Chunk->RaycastSplats(
RayOrigin, RayDirection, 100000.0f, 1.0f,
HitCenter, HitDistance);Unreal lifecycle overrides and private functions are outside the documentation scope.