UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LandscapeSplineSegment.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "UObject/Object.h"
8#include "Misc/Guid.h"
12#include "LandscapeSplineSegment.generated.h"
13
15class UStaticMesh;
16
17//Forward declarations
20
21USTRUCT()
23{
25
26
27 UPROPERTY()
29
31 UPROPERTY()
33
35 UPROPERTY()
37
39 UPROPERTY()
40 FVector FalloffLeft;
41
43 UPROPERTY()
44 FVector FalloffRight;
45
47 UPROPERTY()
48 FVector LayerLeft;
49
51 UPROPERTY()
52 FVector LayerRight;
53
55 UPROPERTY()
56 FVector LayerFalloffLeft;
57
59 UPROPERTY()
60 FVector LayerFalloffRight;
61
62
64 UPROPERTY()
65 float StartEndFalloff;
66
71 , FalloffLeft(ForceInitToZero)
72 , FalloffRight(ForceInitToZero)
73 , LayerLeft(ForceInitToZero)
74 , LayerRight(ForceInitToZero)
75 , LayerFalloffLeft(ForceInitToZero)
76 , LayerFalloffRight(ForceInitToZero)
77 , StartEndFalloff(0.0f)
78 {
79 }
80
94};
95
96USTRUCT()
98{
100
101 // Control point connected to this end of the segment
102 UPROPERTY()
104
105 // Tangent length of the connection
106 UPROPERTY(EditAnywhere, Category=LandscapeSplineSegmentConnection)
107 float TangentLen;
108
109 // Socket on the control point that we are connected to
110 UPROPERTY(EditAnywhere, Category=LandscapeSplineSegmentConnection)
111 FName SocketName;
112
114 : ControlPoint(nullptr)
115 , TangentLen(0.0f)
116 , SocketName(NAME_None)
117 {
118 }
119};
120
121// Deprecated
122UENUM()
129
130USTRUCT()
132{
134
135
136 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshEntry)
138
140 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshEntry, AdvancedDisplay)
142
144 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshEntry, meta=(DisplayName="Center Horizontally"))
145 uint32 bCenterH:1;
146
148 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshEntry, AdvancedDisplay, meta=(DisplayName="Center Adjust"))
149 FVector2D CenterAdjust;
150
152 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshEntry)
153 uint32 bScaleToWidth:1;
154
156 UPROPERTY(EditAnywhere, Category = LandscapeSplineMeshEntry, meta = (EditCondition = "bScaleToWidth"))
157 uint32 bNoZScaling:1;
158
160 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshEntry)
162
164 UPROPERTY()
166
168 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshEntry)
169 TEnumAsByte<ESplineMeshAxis::Type> ForwardAxis;
170
172 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshEntry)
174
176 Mesh(nullptr),
177 MaterialOverrides(),
178 bCenterH(true),
179 CenterAdjust(0, 0),
180 bScaleToWidth(true),
181 bNoZScaling(false),
182 Scale(1,1,1),
183 Orientation_DEPRECATED(LSMO_YUp),
184 ForwardAxis(ESplineMeshAxis::X),
185 UpAxis(ESplineMeshAxis::Z)
186 {
187 }
188
189 bool IsValid() const;
190};
191
192
195{
197
198// Directly editable data:
199 UPROPERTY(EditAnywhere, EditFixedSize, Category=LandscapeSplineSegment)
201
202#if WITH_EDITORONLY_DATA
207 UPROPERTY(EditAnywhere, Category=LandscapeDeformation)
208 FName LayerName;
209
211 UPROPERTY(EditAnywhere, Category=LandscapeDeformation)
213
215 UPROPERTY(EditAnywhere, Category=LandscapeDeformation)
217
219 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshes)
221
222 UPROPERTY()
224
225 UPROPERTY()
227
229 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshes)
230 uint32 bCastShadow:1;
231
233 UPROPERTY(EditAnywhere, Category = LandscapeSplineMeshes, AdvancedDisplay)
234 uint32 bHiddenInGame : 1;
235
237 UPROPERTY(EditAnywhere, Category = LandscapeSplineMeshes, AdvancedDisplay)
239
241 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshes, AdvancedDisplay)
242 int32 RandomSeed;
243
245 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshes, AdvancedDisplay, meta=(DisplayName="Max Draw Distance"))
246 float LDMaxDrawDistance;
247
256 UPROPERTY(EditAnywhere, Category=LandscapeSplineMeshes, AdvancedDisplay)
257 int32 TranslucencySortPriority;
258
260 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = LandscapeSplineMeshes, meta = (DisplayName = "Render CustomDepth Pass"))
261 uint8 bRenderCustomDepth : 1;
262
264 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = LandscapeSplineMeshes, meta = (editcondition = "bRenderCustomDepth"))
265 ERendererStencilMask CustomDepthStencilWriteMask;
266
268 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = LandscapeSplineMeshes, meta = (UIMin = "0", UIMax = "255", editcondition = "bRenderCustomDepth", DisplayName = "CustomDepth Stencil Value"))
269 int32 CustomDepthStencilValue;
270
275 UPROPERTY(EditAnywhere, Category = VirtualTexture, meta = (DisplayName = "Draw in Virtual Textures"))
276 TArray<TObjectPtr<URuntimeVirtualTexture>> RuntimeVirtualTextures;
277
279 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = VirtualTexture, meta = (DisplayName = "Virtual Texture LOD Bias", UIMin = "-7", UIMax = "8"))
280 int32 VirtualTextureLodBias = 0;
281
287 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = VirtualTexture, meta = (DisplayName = "Virtual Texture Skip Mips", UIMin = "0", UIMax = "7"))
288 int32 VirtualTextureCullMips = 0;
289
291 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = VirtualTexture, meta = (DisplayName = "Max Draw Distance in Main Pass"))
292 float VirtualTextureMainPassMaxDrawDistance = 0.f;
293
295 UPROPERTY(EditAnywhere, Category = VirtualTexture, meta = (DisplayName = "Draw in Main Pass"))
296 ERuntimeVirtualTextureMainPassType VirtualTextureRenderPassType = ERuntimeVirtualTextureMainPassType::Exclusive;
297
299 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Collision, meta = (ShowOnlyInnerProperties))
300 FBodyInstance BodyInstance;
301
302protected:
304 uint32 bSelected : 1;
305
307 uint32 bNavDirty : 1;
308#endif
309
310// Procedural data:
311protected:
313 UPROPERTY()
315
317 UPROPERTY()
319
321 UPROPERTY()
322 FBox Bounds;
323
325 UPROPERTY(TextExportTransient)
327
328#if WITH_EDITORONLY_DATA
330 UPROPERTY(TextExportTransient, NonPIEDuplicateTransient)
332
334 UPROPERTY(TextExportTransient, NonPIEDuplicateTransient)
336#endif
337
338public:
339 const FBox& GetBounds() const { return Bounds; }
340 const TArray<FLandscapeSplineInterpPoint>& GetPoints() const { return Points; }
341
342#if WITH_EDITOR
343 bool SupportsForeignSplineMesh() const;
344
345 bool IsSplineSelected() const { return bSelected; }
346 virtual void SetSplineSelected(bool bInSelected);
347
348 virtual void AutoFlipTangents();
349
352
353 virtual void UpdateSplinePoints(bool bUpdateCollision = true, bool bUpdateMeshLevel = false);
354 virtual void UpdateSplineMeshSelectionState();
356 virtual void DeleteSplinePoints();
357
358 LANDSCAPE_API FName GetCollisionProfileName() const;
359
361 FGuid GetModificationKey() const { return ModificationKey; }
362#endif
363
364 virtual void FindNearest(const FVector& InLocation, float& t, FVector& OutLocation, FVector& OutTangent);
365
367 LANDSCAPE_API FFloatInterval GetKeyInterval() const;
368
370 LANDSCAPE_API FVector Evaluate(const float Key, const FVector& Default = FVector::ZeroVector) const;
371
372 //~ Begin UObject Interface
373 virtual void Serialize(FArchive& Ar) override;
374 virtual void PostLoad() override;
375#if WITH_EDITOR
376 virtual void PostEditUndo() override;
377 virtual void PostDuplicate(bool bDuplicateForPIE) override;
378 virtual void PostEditImport() override;
379 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
380#endif // WITH_EDITOR
381protected:
382 virtual void PostInitProperties() override;
383private:
384 void UpdateMeshCollisionProfile(USplineMeshComponent* MeshComponent);
385public:
386 //~ End UObject Interface
387
393
394 friend class FLandscapeToolSplines;
395 friend class ULandscapeInfo;
396};
@ ForceInitToZero
Definition CoreMiscDefines.h:156
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
#define X(Name, Desc)
Definition FormatStringSan.h:47
LandscapeSplineMeshOrientation
Definition LandscapeSplineSegment.h:124
@ LSMO_YUp
Definition LandscapeSplineSegment.h:126
@ LSMO_MAX
Definition LandscapeSplineSegment.h:127
@ LSMO_XUp
Definition LandscapeSplineSegment.h:125
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
#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 EnumAsByte.h:22
Definition UnrealString.h.inl:34
Definition LandscapeInfo.h:109
Definition LandscapeSplineControlPoint.h:51
Definition LandscapeSplineSegment.h:195
LANDSCAPE_API ULandscapeSplinesComponent * GetOuterChecked() const
const FBox & GetBounds() const
Definition LandscapeSplineSegment.h:339
LANDSCAPE_API ULandscapeSplinesComponent * GetOuterSafe() const
const TArray< FLandscapeSplineInterpPoint > & GetPoints() const
Definition LandscapeSplineSegment.h:340
Definition LandscapeSplinesComponent.h:103
Definition MaterialInterface.h:296
Definition Object.h:95
Definition StaticMesh.h:593
Definition SplineMeshComponent.h:25
FExpressionResult Evaluate(const CharType *InExpression, const TTokenDefinitions< CharType > &InTokenDefinitions, const FExpressionGrammar &InGrammar, const TIOperatorEvaluationEnvironment< CharType > &InEnvironment)
Definition ExpressionParser.cpp:728
Definition VirtualTextureRecreate.cpp:16
@ false
Definition radaudio_common.h:23
Definition BodyInstance.h:320
Definition Guid.h:109
Definition LandscapeSplineSegment.h:23
FLandscapeSplineInterpPoint(FVector InCenter, FVector InLeft, FVector InRight, FVector InFalloffLeft, FVector InFalloffRight, FVector InLayerLeft, FVector InLayerRight, FVector InLayerFalloffLeft, FVector InLayerFalloffRight, float InStartEndFalloff)
Definition LandscapeSplineSegment.h:81
Definition LandscapeSplineSegment.h:132
Definition LandscapeSplineSegment.h:98
Definition UnrealType.h:6865
Definition ObjectPtr.h:488
static CORE_API const TVector< double > ZeroVector
Definition Vector.h:79