UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SurfacicSampling.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Core/Types.h"
6#include "Geo/GeoEnum.h"
7#include "Geo/GeoPoint.h"
8#include "Math/Point.h"
9
10namespace UE::CADKernel
11{
12
14{
15 bool bWithNormals = false;
19
21 {
22 return Points3D.Num();
23 }
24
26 {
29 if (bWithNormals)
30 {
31 Normals.SetNum(Number);
32 }
33 }
34
36 {
39 if (bWithNormals)
40 {
41 Normals.Empty(Number);
42 }
43 }
44
46 {
47 for (FVector3f& Normal : Normals)
48 {
49 Normal.Normalize();
50 }
51 }
52
53 void Set2DCoordinates(const FCoordinateGrid& Coordinates)
54 {
55 Reserve(Coordinates.Count());
56 for (double VCoord : Coordinates[EIso::IsoV])
57 {
58 for (double UCoord : Coordinates[EIso::IsoU])
59 {
61 }
62 }
63 }
64};
65
66} // ns UE::CADKernel
@ Normal
Definition AndroidInputInterface.h:116
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
Definition Array.h:670
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_FORCEINLINE_HINT SizeType Emplace(ArgsType &&... Args)
Definition Array.h:2561
void SetNum(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2308
void Empty(SizeType Slack=0)
Definition Array.h:2273
Definition CADEntity.cpp:23
@ IsoV
Definition GeoEnum.h:68
@ IsoU
Definition GeoEnum.h:67
Definition GeoPoint.h:103
Definition SurfacicSampling.h:14
void Reserve(int32 Number)
Definition SurfacicSampling.h:35
bool bWithNormals
Definition SurfacicSampling.h:15
void SetNum(int32 Number)
Definition SurfacicSampling.h:25
void Set2DCoordinates(const FCoordinateGrid &Coordinates)
Definition SurfacicSampling.h:53
TArray< FVector > Points3D
Definition SurfacicSampling.h:17
TArray< FVector3f > Normals
Definition SurfacicSampling.h:18
int32 Count()
Definition SurfacicSampling.h:20
TArray< FVector2d > Points2D
Definition SurfacicSampling.h:16
void NormalizeNormals()
Definition SurfacicSampling.h:45