Language:
Discover
By Skill Level
By Category

UPaperTerrainComponent

Choose your OS:

Inheritance Hierarchy

Syntax

UCLASS ([BlueprintType](Programming/UnrealArchitecture/Reference/Classes/Specifiers/BlueprintType), Experimental)
class UPaperTerrainComponent : public UPrimitiveComponent

Remarks

The terrain visualization component for an associated spline component. This takes a 2D terrain material and instances sprite geometry along the spline path.

Variables

Name Description

Public variable UProperty

UPaperTerrainSp ...

 

AssociatedSpline

Public variable UProperty Category, EditAnywhere BlueprintReadOnly

bool

 

bClosedSpline

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadOnly

bool

 

bFilledSpline

Protected variable UProperty Transient duplicatetransient

UBodySetup *...

 

CachedBodySetup

Description of collision

Protected variable UProperty Category, EditAnywhere

float

 

CollisionThickness

The extrusion thickness of collision geometry when using a 3D collision domain

Protected variable

TArray < FPaperT ...

 

GeneratedSpriteGeometry

Public variable UProperty Category, EditAnywhere

int32

 

RandomSeed

Random seed used for choosing which spline meshes to use.

Protected variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

int32

 

ReparamStepsPerSegment

Number of steps per spline segment to place in the reparameterization table

Public variable UProperty Category, EditAnywhere

float

 

SegmentOverlapAmount

The overlap amount between segments

Protected variable UProperty Category, EditAnywhere

TEnumAsByte < ES ...

 

SpriteCollisionDomain

Collision domain (no collision, 2D (experimental), or 3D)

Protected variable UProperty Category, Interp BlueprintReadOnly

FLinearColor

 

TerrainColor

The color of the terrain (passed to the sprite material as a vertex color)

Public variable UProperty Category, EditAnywhere BlueprintReadOnly

UPaperTerrainMa ...

 

TerrainMaterial

The terrain material to apply to this component (set of rules for which sprites are used on different surfaces or the interior)

Constructors

Name Description

Public function

UPaperTerrainComponent

(
    const FObjectInitializer & ObjectIn...
)

UPaperTerrainComponent .

Functions

Name Description

Protected function

void

 

ConstrainSplinePointsToXZ()

Makes sure all spline points are constrained to the XZ plane.

Protected function

void

 

GenerateCollisionDataFromPolygon

(
    const TArray < FVector2D >& SplineP...,
    const TArray < float >& TerrainOffs...,
    const TArray < FVector2D >& Triangu...
)

Protected function

void

 

GenerateFillRenderDataFromPolygon

(
    const UPaperSprite * NewSprite,
    FSpriteDrawCallRecord & FillDrawCal...,
    const FVector2D & TextureSize,
    const TArray < FVector2D >& Triangu...
)

Protected function

FTransform

 

GetTransformAtDistance

(
    float InDistance
)

Protected function

void

 

InsertConvexCollisionDataFromPolygon

(
    const TArray < FVector2D >& ClosedP...
)

Protected function

void

 

OnSplineEdited()

Public function UFunction BlueprintCallable, Category

void

 

SetTerrainColor

(
    FLinearColor NewColor
)

End of UPrimitiveComponent interface.

Protected function

void

 

SpawnSegments

(
    const TArray < FTerrainSegment >& T...,
    bool bGenerateSegmentColliders
)

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

End of UActorComponent interface.

Public function Virtual

UBodySetup &...

 

GetBodySetup()

Return the BodySetup to use for this PrimitiveComponent (single body case)

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Overridden from UActorComponent

Name Description

Public function Virtual

const UObjec ...

 

AdditionalStatObject()

UObject interface.

Public function Virtual

void

 

OnRegister()

End of UObject interface.

Public function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostLoad()

WITH_EDITOR.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject serializer.

References

Module

Paper2D