ALCCSectionPlane: 3DGS Section Plane
Section plane Actor that cuts an LCC scene with a plane and keeps one side of it.
| Module | LCC4UnrealRuntime |
| Header | Tools/LCCSectionPlane.h |
| Parent class | AVolume |
| Panel display name | LCC Section Plane |
#include "Tools/LCCSectionPlane.h"
For the usage steps, a demonstration, and the property panel description, see Scene Editing - Section Planes. This page only lists the interfaces.
The editor shows an arrow component indicating the plane orientation, and the side the arrow points to is Upside.
Properties
| Property | Type | Description |
|---|---|---|
bEnabled | bool | Whether it takes part in sectioning |
Mode | ESectionType | Upside cuts away what is above the plane, Downside cuts away what is below |
Up and down are relative to the orientation of the plane itself, not to world coordinates. Rotating the section plane gives a section in any direction. For the meaning of the values see ESectionType.
Neither property 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.
Section 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/LCCSectionPlane.h"
#include "LCCComponentBase.h"
ALCCSectionPlane* AMyTool::CreateSectionPlane(
ULCCComponentBase* Component, const FVector& Location, const FRotator& Rotation)
{
ALCCSectionPlane* Plane = GetWorld()->SpawnActor<ALCCSectionPlane>(
ALCCSectionPlane::StaticClass(), Location, Rotation);
if (!Plane)
{
return nullptr;
}
Plane->Mode = ESectionType::Upside; // cut away what is above the plane
Plane->bEnabled = true;
Component->AddSectionPlane(Plane);
return Plane;
}
A few common configurations:
| Effect | Location and rotation | Mode |
|---|---|---|
| Top-down view of a building interior | A given height, FRotator::ZeroRotator | Upside |
| Vertical section to view a facade | FRotator(0, 0, 90) to make the plane vertical | Upside |
| Keep only the middle layer | One plane above and one below | Downside for the lower bound, Upside for the upper bound |
Moving the section plane produces a layer-by-layer reveal animation; just change the position every frame:
FVector Loc = SectionPlane->GetActorLocation();
Loc.Z = FMath::FInterpTo(Loc.Z, TargetHeight, DeltaTime, 1.0f);
SectionPlane->SetActorLocation(Loc);
Property changes are equally direct:
SectionPlane->bEnabled = false;
For the Blueprint nodes see Scene Editing - Blueprint Methods.
Notes
- Sectioning only affects rendering, not collision. A sectioned-away part can still be hit by a ray and still blocks a character.
UpsideandDownsideare relative to the orientation of the plane itself. After a rotation, confirm which side is "up" again; looking at the arrow in the editor is the most direct way.- The Z scale is set to 0.01 at construction (a thin slice), and changing the scale in the editor is forced back to that value. A runtime scale change is not subject to this constraint, but normally needs no change.
- The number of section planes in effect at once is limited, to 50 without a license; the extras do not take part in rendering and a warning is logged. Section planes and clipping volumes share this quota. For licensing see Editions and Licensing.
- Destroying a section plane only triggers one render update and does not remove the element from the
SectionPlanesarray of the Component, leaving a stale pointer in the array (skipped automatically during rendering). To keep the array clean, callRemoveSectionPlanebefore destroying.
See Also
- Scene Editing: full usage description
- ALCCClippingVolume: clipping with a bounded volume
- ULCCComponentBase:
AddSectionPlaneandRemoveSectionPlane