UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LandscapeSplineControlPoint.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5// for FLandscapeSplineInterpPoint
6
7#include "CoreMinimal.h"
9#include "UObject/Object.h"
10#include "Misc/Guid.h"
12
13#include "LandscapeSplineControlPoint.generated.h"
14
17class UStaticMesh;
18
19USTRUCT()
21{
23
25
31
32 bool operator == (const FLandscapeSplineConnection& rhs) const
33 {
34 return Segment == rhs.Segment && End == rhs.End;
35 }
36
37 // Segment connected to this control point
38 UPROPERTY()
40
41 // Which end of the segment is connected to this control point
42 UPROPERTY()
44
45 LANDSCAPE_API FLandscapeSplineSegmentConnection& GetNearConnection() const;
46 LANDSCAPE_API FLandscapeSplineSegmentConnection& GetFarConnection() const;
47};
48
49UCLASS(Within=LandscapeSplinesComponent,autoExpandCategories=LandscapeSplineControlPoint,MinimalAPI)
51{
53
54// Directly editable data:
56 UPROPERTY(EditAnywhere, Category=LandscapeSpline)
57 FVector Location;
58
60 UPROPERTY(EditAnywhere, Category=LandscapeSpline)
62
64 UPROPERTY(EditAnywhere, Category=LandscapeSpline, meta = (DisplayName = "Half-Width"))
65 float Width;
66
68 UPROPERTY(EditAnywhere, Category = LandscapeSpline)
69 float LayerWidthRatio = 1.f;
70
72 UPROPERTY(EditAnywhere, Category=LandscapeSpline)
73 float SideFalloff;
74
75 UPROPERTY(EditAnywhere, Category = LandscapeSpline, meta=(UIMin = 0, ClampMin = 0, UIMax = 1, ClampMax = 1))
76 float LeftSideFalloffFactor = 1.f;
77
78 UPROPERTY(EditAnywhere, Category = LandscapeSpline, meta = (UIMin = 0, ClampMin = 0, UIMax = 1, ClampMax = 1))
79 float RightSideFalloffFactor = 1.f;
80
81 UPROPERTY(EditAnywhere, Category = LandscapeSpline, meta = (UIMin = 0, ClampMin = 0, UIMax = 1, ClampMax = 1))
82 float LeftSideLayerFalloffFactor = 0.5f;
83
84 UPROPERTY(EditAnywhere, Category = LandscapeSpline, meta = (UIMin = 0, ClampMin = 0, UIMax = 1, ClampMax = 1))
85 float RightSideLayerFalloffFactor = 0.5f;
86
88 UPROPERTY(EditAnywhere, Category=LandscapeSpline)
89 float EndFalloff;
90
91#if WITH_EDITORONLY_DATA
93 UPROPERTY(EditAnywhere, Category=LandscapeSpline, meta=(DisplayName="Mesh Vertical Offset"))
95
100 UPROPERTY(EditAnywhere, Category=LandscapeDeformation)
101 FName LayerName;
102
104 UPROPERTY(EditAnywhere, Category=LandscapeDeformation)
106
108 UPROPERTY(EditAnywhere, Category=LandscapeDeformation)
110
112 UPROPERTY(EditAnywhere, Category=Mesh)
114
116 UPROPERTY(EditAnywhere, Category=Mesh)
117 TArray<TObjectPtr<UMaterialInterface>> MaterialOverrides;
118
120 UPROPERTY(EditAnywhere, Category=Mesh)
121 FVector MeshScale;
122
123 UPROPERTY()
125
126 UPROPERTY()
128
130 UPROPERTY(EditAnywhere, Category=Mesh)
131 uint32 bCastShadow:1;
132
134 UPROPERTY(EditAnywhere, Category = Mesh, AdvancedDisplay)
135 uint8 bHiddenInGame : 1;
136
138 UPROPERTY(EditAnywhere, Category = Mesh, AdvancedDisplay)
140
142 UPROPERTY(EditAnywhere, Category=Mesh, AdvancedDisplay, meta=(DisplayName="Max Draw Distance"))
143 float LDMaxDrawDistance;
144
153 UPROPERTY(EditAnywhere, Category=Mesh, AdvancedDisplay)
154 int32 TranslucencySortPriority;
155
157 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Mesh, meta = (DisplayName = "Render CustomDepth Pass"))
158 uint8 bRenderCustomDepth : 1;
159
161 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Mesh, meta = (editcondition = "bRenderCustomDepth"))
162 ERendererStencilMask CustomDepthStencilWriteMask;
163
165 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Mesh, meta = (UIMin = "0", UIMax = "255", editcondition = "bRenderCustomDepth", DisplayName = "CustomDepth Stencil Value"))
166 int32 CustomDepthStencilValue;
167
172 UPROPERTY(EditAnywhere, Category = VirtualTexture, meta = (DisplayName = "Draw in Virtual Textures"))
173 TArray<TObjectPtr<URuntimeVirtualTexture>> RuntimeVirtualTextures;
174
176 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = VirtualTexture, meta = (DisplayName = "Virtual Texture LOD Bias", UIMin = "-7", UIMax = "8"))
177 int32 VirtualTextureLodBias = 0;
178
184 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = VirtualTexture, meta = (DisplayName = "Virtual Texture Skip Mips", UIMin = "0", UIMax = "7"))
185 int32 VirtualTextureCullMips = 0;
186
188 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = VirtualTexture, meta = (DisplayName = "Max Draw Distance in Main Pass"))
189 float VirtualTextureMainPassMaxDrawDistance = 0.f;
190
192 UPROPERTY(EditAnywhere, Category = VirtualTexture, meta = (DisplayName = "Draw in Main Pass"))
193 ERuntimeVirtualTextureMainPassType VirtualTextureRenderPassType = ERuntimeVirtualTextureMainPassType::Exclusive;
194
196 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Collision, meta = (ShowOnlyInnerProperties))
197 FBodyInstance BodyInstance;
198
199protected:
201 uint32 bSelected : 1;
202
204 uint32 bNavDirty : 1;
205#endif
206
207// Procedural data:
208public:
209 UPROPERTY(TextExportTransient)
211
214 UPROPERTY()
216
218 UPROPERTY()
219 FBox Bounds;
220
222 UPROPERTY(TextExportTransient)
224
225#if WITH_EDITORONLY_DATA
227 UPROPERTY(TextExportTransient, NonPIEDuplicateTransient)
229
231 UPROPERTY(TextExportTransient, NonPIEDuplicateTransient)
233#endif
234
235public:
236 const FBox& GetBounds() const { return Bounds; }
237 const TArray<FLandscapeSplineInterpPoint>& GetPoints() const { return Points; }
238
239#if WITH_EDITOR
240 bool SupportsForeignSplineMesh() const;
241
242 // Get the name of the best connection point (socket) to use for a particular destination
243 virtual FName GetBestConnectionTo(FVector Destination) const;
244
245 // Get the location and rotation of a connection point (socket) in spline space
246 virtual void GetConnectionLocalLocationAndRotation(FName SocketName, OUT FVector& OutLocation, OUT FRotator& OutRotation) const;
247
248 // Get the location and rotation of a connection point (socket) in spline space
249 virtual void GetConnectionLocationAndRotation(FName SocketName, OUT FVector& OutLocation, OUT FRotator& OutRotation) const;
250
251 bool IsSplineSelected() const { return bSelected; }
252 virtual void SetSplineSelected(bool bInSelected);
253
255 virtual void AutoCalcRotation(bool bAlwaysRotateForward);
256
258 virtual void AutoFlipTangents();
259
260 virtual void AutoSetConnections(bool bIncludingValid);
261
263
265 virtual void UpdateSplinePoints(bool bUpdateCollision = true, bool bUpdateAttachedSegments = true, bool bUpdateMeshLevel = false);
266
268 virtual void UpdateSplineMeshSelectionState();
269
271 virtual void DeleteSplinePoints();
272
273 const TSoftObjectPtr<UWorld>& GetForeignWorld() const { return ForeignWorld; }
274 FGuid GetModificationKey() const { return ModificationKey; }
275
276 LANDSCAPE_API FName GetCollisionProfileName() const;
277#endif // WITH_EDITOR
278
279 //~ Begin UObject Interface
280 virtual void Serialize(FArchive& Ar) override;
281 virtual void PostLoad() override;
282#if WITH_EDITOR
283 virtual void PostEditUndo() override;
284 virtual void PostDuplicate(bool bDuplicateForPIE) override;
285 virtual void PostEditImport() override;
286 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
287 //~ End UObject Interface
288#endif // WITH_EDITOR
289
295
296 friend class FLandscapeToolSplines;
297 friend class ULandscapeInfo;
298};
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define OUT
Definition Platform.h:897
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
ERendererStencilMask
Definition PrimitiveComponent.h:103
ERuntimeVirtualTextureMainPassType
Definition RuntimeVirtualTextureEnum.h:58
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition NameTypes.h:617
Definition Array.h:670
Definition UnrealString.h.inl:34
Definition ControlPointMeshComponent.h:12
Definition LandscapeInfo.h:109
Definition LandscapeSplineControlPoint.h:51
LANDSCAPE_API ULandscapeSplinesComponent * GetOuterSafe() const
const TArray< FLandscapeSplineInterpPoint > & GetPoints() const
Definition LandscapeSplineControlPoint.h:237
LANDSCAPE_API ULandscapeSplinesComponent * GetOuterChecked() const
const FBox & GetBounds() const
Definition LandscapeSplineControlPoint.h:236
Definition LandscapeSplineSegment.h:195
Definition LandscapeSplinesComponent.h:103
Definition Object.h:95
virtual void PostDuplicate(bool bDuplicateForPIE)
Definition Object.h:538
virtual void PostEditImport()
Definition Object.h:686
Definition StaticMesh.h:593
Definition VirtualTextureRecreate.cpp:16
Definition BodyInstance.h:320
Definition Guid.h:109
Definition LandscapeSplineControlPoint.h:21
FLandscapeSplineConnection(ULandscapeSplineSegment *InSegment, int32 InEnd)
Definition LandscapeSplineControlPoint.h:26
Definition LandscapeSplineSegment.h:23
Definition LandscapeSplineSegment.h:98
Definition UnrealType.h:6865
Definition ObjectPtr.h:488
Definition SoftObjectPtr.h:174