Skip to content
TREN
Atlıhan Harita

LCC for UE User Manual · API Reference

ALCCClippingVolume: 3DGS Clipping Volume

Chapter 25.7 / 26Manual version v3.5.0English

Clipping volume Actor that clips away part of an LCC scene with a box or sphere volume.

ModuleLCC4UnrealRuntime
HeaderTools/LCCClippingVolume.h
Parent classAVolume
Panel display nameLCC Clipping Volume
#include "Tools/LCCClippingVolume.h"

For the usage steps, a demonstration, and the property panel description, see Scene Editing - Clipping Volumes. This page only lists the interfaces.

Properties

PropertyTypeDescription
bEnabledboolWhether it takes part in clipping
ModeEClipTypeInside clips away the inside of the volume, Outside clips away the outside
VolumeTypeEClipVolumeTypeBox for a box, Sphere for a sphere

For the meaning of the values see EClipType and EClipVolumeType.

None of the three properties has a Setter; assign them directly. A property or transform change at runtime takes effect on the next frame, with no need to notify the rendering side manually.

Methods

SetUpdateComponent / Refresh (deprecated)

UFUNCTION(BlueprintCallable, Category = "XGrids", meta = (DeprecatedFunction))
void SetUpdateComponent(ULCCComponentBase* Component);

UFUNCTION(BlueprintCallable, Category = "XGrids", meta = (DeprecatedFunction))
void Refresh();

Both methods are deprecated and implemented as no-ops; calling them has no effect and raises no error.

Clipping data is now read every frame, so property and transform changes are reflected in the image on the next frame. The older flow of binding with SetUpdateComponent first and calling Refresh() after each change is no longer needed.

Existing calls can simply be removed. In Blueprint these two nodes show a deprecation warning, and the replacement is to delete the node.

Runtime Creation

#include "Tools/LCCClippingVolume.h"
#include "LCCComponentBase.h"

ALCCClippingVolume* AMyTool::CreateBoxClip(
    ULCCComponentBase* Component, const FVector& Location, const FVector& Extent)
{
    ALCCClippingVolume* Volume = GetWorld()->SpawnActor<ALCCClippingVolume>(
        ALCCClippingVolume::StaticClass(), Location, FRotator::ZeroRotator);
    if (!Volume)
    {
        return nullptr;
    }

    Volume->VolumeType = EClipVolumeType::Box;
    Volume->Mode = EClipType::Inside;
    Volume->bEnabled = true;

    // the size of an AVolume is controlled through scaling
    Volume->SetActorScale3D(Extent / 100.0f);

    Component->AddClippingVolume(Volume);

    return Volume;
}

To toggle the clipping effect temporarily, do not add and remove array elements; changing bEnabled is lighter:

for (ALCCClippingVolume* Volume : MyVolumes)
{
    if (Volume)
    {
        Volume->bEnabled = bEnable;
    }
}

Moving a clipping volume at runtime for an animation only requires changing the transform:

// sweep the clipping volume across the scene
FVector Loc = ClipVolume->GetActorLocation();
Loc.X += 200.0f * DeltaTime;
ClipVolume->SetActorLocation(Loc);

For the Blueprint nodes see Scene Editing - Blueprint Methods.

Notes

  • Clipping only affects rendering, not collision. A clipped-away area can still be hit by a ray and still blocks a character.
  • Several clipping volumes acting at once are evaluated independently and their effects stack. Mixing Inside and Outside easily produces unexpected results.
  • The number of clipping volumes in effect at once is limited, to 50 without a license; the extras do not take part in rendering and a warning is logged. Clipping volumes and section planes share this quota. For licensing see Editions and Licensing.
  • Destroying a clipping volume only triggers one render update and does not remove the element from the ClippingVolumes array of the Component, leaving a stale pointer in the array (skipped automatically during rendering). To keep the array clean, call RemoveClippingVolume before destroying.

See Also

This chapter is from the official XGRIDS user manual. Official source (opens in a new tab) · Updated:

XGRIDS Türkiye

We're With You During Setup and in the Field

Atlıhan Harita provides training and technical support for device setup, firmware updates, software use, and field applications. Send us your question and our specialist will get back to you.

+90 216 546 0804