![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MarchingCubes.h>
Inheritance diagram for UE::Geometry::FMarchingCubes:Classes | |
| struct | FGridCell |
| struct | FIndexedVertex |
Public Attributes | |
| TFunction< double(TVector< double >)> | Implicit |
| double | IsoValue = 0 |
| TAxisAlignedBox3< double > | Bounds |
| double | CubeSize = 0.1 |
| bool | bParallelCompute = true |
| bool | bEnableValueCaching = true |
| int | SafetyMaxDimension = 4096 |
| ERootfindingModes | RootMode = ERootfindingModes::SingleLerp |
| int | RootModeSteps = 5 |
| TFunction< bool(void)> | CancelF = []() { return false; } |
| FVector3i | CellDimensions |
Public Attributes inherited from UE::Geometry::FMeshShapeGenerator | |
| TArray< FVector3d > | Vertices |
| TArray< FVector2f > | UVs |
| TArray< int > | UVParentVertex |
| TArray< FVector3f > | Normals |
| TArray< int > | NormalParentVertex |
| TArray< FIndex3i > | Triangles |
| TArray< FIndex3i > | TriangleUVs |
| TArray< FIndex3i > | TriangleNormals |
| TArray< int > | TrianglePolygonIDs |
| bool | bReverseOrientation = false |
Protected Attributes | |
| FAxisAlignedBox3i | GridBounds |
| FAxisAlignedBox3i | LastGridBounds |
| const int64 | EDGE_X = int64(1) << 60 |
| const int64 | EDGE_Y = int64(1) << 61 |
| const int64 | EDGE_Z = int64(1) << 62 |
| const int64 | NumEdgeVertexSections = 64 |
| TArray< TMap< int64, int > > | EdgeVertexSections |
| TArray< FCriticalSection > | EdgeVertexSectionLocks |
| FBlockedDenseGrid3f | BlockedCornerValuesGrid |
| bool | parallel_mesh_access = false |
| FBlockedDenseGrid3i | BlockedDoneCells |
| std::atomic< int32 > | VertexCounter |
| int64 | NumVertexSections = 64 |
| TArray< FCriticalSection > | VertexSectionLocks |
| TArray< TArray< FIndexedVertex > > | VertexSectionLists |
| int64 | NumTriangleSections = 64 |
| TArray< FCriticalSection > | TriangleSectionLocks |
| TArray< TArray< FIndex3i > > | TriangleSectionLists |
Static Protected Attributes | |
| static GEOMETRYCORE_API const uint8 | EdgeIndices [12][2] |
| static GEOMETRYCORE_API const uint16 | EdgeTable [256] |
| static GEOMETRYCORE_API const uint64 | TriTable [256] |
Additional Inherited Members | |
Static Public Member Functions inherited from UE::Geometry::FMeshShapeGenerator | |
| static FVector3d | BilinearInterp (const FVector3d &v00, const FVector3d &v10, const FVector3d &v11, const FVector3d &v01, double tx, double ty) |
| static FVector2d | BilinearInterp (const FVector2d &v00, const FVector2d &v10, const FVector2d &v11, const FVector2d &v01, double tx, double ty) |
| static FVector2f | BilinearInterp (const FVector2f &v00, const FVector2f &v10, const FVector2f &v11, const FVector2f &v01, float tx, float ty) |
| static FVector3i | LinearInterp (const FVector3i &a, const FVector3i &b, double t) |
|
inline |
|
inlinevirtual |
|
inlineprotected |
add triangle to mesh, with locking if we are computing in parallel
|
inlineprotected |
add vertex to mesh, with locking if we are computing in parallel
|
inlineprotected |
|
inlineprotected |
Populate FMeshShapeGenerator data structures from accumulated vertex/triangle sets
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
root-find the intersection along edge from f(P1)=ValP1 to f(P2)=ValP2
|
inlineprotected |
|
inlineoverridevirtual |
Run MC algorithm and generate Output mesh
Implements UE::Geometry::FMeshShapeGenerator.
|
inlineprotected |
fully sequential version, no threading
|
inlineprotected |
fully sequential version, no threading
|
inlineprotected |
parallel seed evaluation
|
inlineprotected |
processing z-slabs of cells in parallel
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
compute 3D corner-positions and field values for cell at index
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
find edge crossings and generate triangles for this cell
|
inlineprotected |
Reset internal mesh-assembly data structures
|
inlineprotected |
|
inline |
If true, code will assume that Implicit() is expensive enough that it is worth it to cache evaluations when possible. For something simple like evaluation of an SDF defined by a discrete grid, this is generally not worth the overhead.
|
protected |
|
protected |
| TAxisAlignedBox3<double> UE::Geometry::FMarchingCubes::Bounds |
bounding-box we will mesh inside of. We use the min-corner and the width/height/depth, but do not clamp vertices to stay within max-corner, we may spill one cell over
Use multi-threading? Generally a good idea unless problem is very small or you are multi-threading at a higher level (which may be more efficient)
if this function returns true, we should abort calculation
| FVector3i UE::Geometry::FMarchingCubes::CellDimensions |
| double UE::Geometry::FMarchingCubes::CubeSize = 0.1 |
Length of edges of cubes that are marching. currently, # of cells along axis = (int)(bounds_dimension / CellSize) + 1
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
this is the function we will evaluate
| double UE::Geometry::FMarchingCubes::IsoValue = 0 |
mesh surface will be at this isovalue. Normally 0 unless you want offset surface or field is not a distance-field.
|
protected |
|
protected |
|
protected |
|
protected |
| ERootfindingModes UE::Geometry::FMarchingCubes::RootMode = ERootfindingModes::SingleLerp |
Which rootfinding method will be used to converge on surface along edges
| int UE::Geometry::FMarchingCubes::RootModeSteps = 5 |
number of iterations of rootfinding method (ignored for SingleLerp)
| int UE::Geometry::FMarchingCubes::SafetyMaxDimension = 4096 |
Max number of cells on any dimension; if exceeded, CubeSize will be automatically increased to fix
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |