12#define LANDSCAPE_VALIDATE_DATA_ACCESS 1
13#define LANDSCAPE_ZSCALE (1.0f/128.0f)
14#define LANDSCAPE_INV_ZSCALE 128.0f
16#define LANDSCAPE_XYOFFSET_SCALE UE_DEPRECATED_MACRO(5.7, "RetopologizeTool/XYOffset deprecated with the removal of non-edit layer landscapes") (1.0f/256.f)
17#define LANDSCAPE_INV_XYOFFSET_SCALE UE_DEPRECATED_MACRO(5.7, "RetopologizeTool/XYOffset deprecated with the removal of non-edit layer landscapes") 256.f
19#define LANDSCAPE_VISIBILITY_THRESHOLD (2.0f/3.0f)
21class ULandscapeComponent;
41 Color.R = Height >> 8;
42 Color.G = Height & 255;
64class ULandscapeComponent;
96 if( MipInfo ==
nullptr )
105 if( (*MipInfo)[MipLevel].MipData.Num() == 0 )
107 verify(
Texture->Source.GetMipData((*MipInfo)[MipLevel].MipData, MipLevel) );
109 (*MipInfo)[MipLevel].LockCount++;
111 return (*MipInfo)[MipLevel].MipData.GetData();
119 if ((*MipInfo)[MipLevel].LockCount <= 0)
121 (*MipInfo)[MipLevel].LockCount--;
122 if( (*MipInfo)[MipLevel].LockCount == 0 )
124 check( (*MipInfo)[MipLevel].MipData.Num() != 0 );
125 (*MipInfo)[MipLevel].MipData.Empty();
164 SubX = (
CompX-1) % (SubsectionSizeVerts - 1) + 1;
165 SubY = (
CompY-1) % (SubsectionSizeVerts - 1) + 1;
202 return TexelY * ComponentNumSubsections * SubsectionSizeVerts +
TexelX;
211 float GetScaleFactor()
const
213 return (
float)ComponentSizeQuads / (
float)(ComponentSizeVerts - 1);
218 const float ScaleFactor = GetScaleFactor();
230#if LANDSCAPE_VALIDATE_DATA_ACCESS
257 const int32 MipLevel = 0;
260 int32 ComponentSizeQuads = 0;
261 int32 ComponentSizeVerts = 0;
262 int32 SubsectionSizeVerts = 0;
263 int32 ComponentNumSubsections = 0;
297#if LANDSCAPE_VALIDATE_DATA_ACCESS
301 check(LocalX >=0 && LocalY >=0 && LocalX < ComponentSizeVerts && LocalY < ComponentSizeVerts);
310 UE_DEPRECATED(5.7,
"RetopologizeTool/XYOffset deprecated with the removal of non-edit layer landscapes")
323 return GetHeight(
X,
Y );
342 FColor*
Data = GetHeightData( LocalX, LocalY );
391 ULandscapeComponent*
Component =
nullptr;
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define check(expr)
Definition AssertionMacros.h:314
#define verify(expr)
Definition AssertionMacros.h:319
@ ForceInit
Definition CoreMiscDefines.h:155
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define FVector
Definition IOSSystemIncludes.h:8
#define LANDSCAPE_ZSCALE
Definition LandscapeDataAccess.h:13
#define LANDSCAPE_INV_ZSCALE
Definition LandscapeDataAccess.h:14
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
CORE_API bool IsInParallelGameThread()
Definition ThreadingBase.cpp:207
CORE_API bool IsInGameThread()
Definition ThreadingBase.cpp:185
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
UE_NODEBUG UE_FORCEINLINE_HINT bool Find(const ElementType &Item, SizeType &Index) const
Definition Array.h:1302
Definition UnrealString.h.inl:34
Definition LandscapeLayerInfoObject.h:60
Definition Texture2D.h:26
GeometryCollection::Facades::FMuscleActivationData Data
Definition MuscleActivationConstraints.h:15
Definition LandscapeDataAccess.h:25
FORCEINLINE FColor PackHeight(uint16 Height)
Definition LandscapeDataAccess.h:38
constexpr float MidValue
Definition LandscapeDataAccess.h:27
FORCEINLINE FVector UnpackNormal(const FColor &InHeightmapSample)
Definition LandscapeDataAccess.h:52
constexpr int32 MaxValue
Definition LandscapeDataAccess.h:26
FORCEINLINE float UnpackHeight(const FColor &InHeightmapSample)
Definition LandscapeDataAccess.h:46
FORCEINLINE float GetLocalHeight(uint16 Height)
Definition LandscapeDataAccess.h:28
FORCEINLINE uint16 GetTexHeight(float Height)
Definition LandscapeDataAccess.h:33
const FName VertexIndex("VertexIndex")
Definition MeshAttributes.h:28
static constexpr UE_FORCEINLINE_HINT T Square(const T A)
Definition UnrealMathUtility.h:578
T X
Definition Vector.h:62