29 template<
typename MeshType>
40 CellMidPoint = {CellSize / 2.0f, CellSize / 2.0f, CellSize / 2.0f};
50 GridOrigin = WindingGrid.
GridOrigin + CellMidPoint;
65 const FVector3i OccupancyIndex(Occupancy.ToIndex(OccupancyId));
66 const int32 Count = Algo::CountIf(CornerOffsets, [&WindingGrid, OccupancyIndex](FVector3i CornerOffset)
68 const FVector3i CornerIndex(OccupancyIndex + CornerOffset);
69 return WindingGrid.GetValue(CornerIndex) >= WindingGrid.WindingIsoValue;
107 return { FMath::FloorToInt(
PP.X / CellSize),
108 FMath::FloorToInt(
PP.Y / CellSize),
109 FMath::FloorToInt(
PP.Z / CellSize) };
116 return {
float(
Index.X) * CellSize + GridOrigin.X + CellMidPoint.X,
117 float(
Index.Y) * CellSize + GridOrigin.Y + CellMidPoint.Y,
118 float(
Index.Z) * CellSize + GridOrigin.Z + CellMidPoint.Z};
126 return {P - CellMidPoint, P + CellMidPoint};
#define ensure( InExpression)
Definition AssertionMacros.h:464
void ParallelFor(int32 Num, TFunctionRef< void(int32)> Body, bool bForceSingleThread, bool bPumpRenderingThread=false)
Definition ParallelFor.h:481
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define FVector
Definition IOSSystemIncludes.h:8
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
Definition DenseGrid3.h:23
bool IsValidIndex(const FVector3i &Index) const
Definition DenseGrid3.h:50
int Size() const
Definition DenseGrid3.h:45
Definition FastWinding.h:316
Definition MeshAABBTree3.h:61
Definition MeshWindingNumberGrid.h:35
FVector3i Dimensions() const
Definition MeshWindingNumberGrid.h:117
FVector3f GridOrigin
Definition MeshWindingNumberGrid.h:67
void Compute()
Definition MeshWindingNumberGrid.h:80
Definition ParametricSurfaceData.h:18
U16 Index
Definition radfft.cpp:71
Definition OccupancyGrid3.h:20
FBox3f GetCellBoxFromIndex(const FVector3i &Index) const
Definition OccupancyGrid3.h:123
EDomain
An enum representing a voxel's classification.
Definition OccupancyGrid3.h:23
@ Boundary
The point in the occupancy grid is completely on the exterior of the given mesh.
@ Interior
The point in the occupancy grid includes a mesh boundary.
const TDenseGrid3< EDomain > & GetOccupancyStateGrid() const
Returns a reference to the occupancy grid.
Definition OccupancyGrid3.h:130
FOccupancyGrid3(const MeshType &InMesh, const int32 InVoxelResolution)
Definition OccupancyGrid3.h:30
float GetCellSize() const
Definition OccupancyGrid3.h:136
FVector3i GetCellIndexFromPoint(const FVector &InPoint) const
Definition OccupancyGrid3.h:102
FVector3f GetCellCenterFromIndex(const FVector3i &Index) const
Definition OccupancyGrid3.h:114
Definition IntVectorTypes.h:252
RealType MaxDim() const
Definition BoxTypes.h:598