Geometry
Overview
Core geometry primitives used across all modules for spatial computation: circles, edges, polygons, rectangles, triangles, tiles, splines, Delaunay triangulation, Voronoi diagrams, MST, noise and visual effects.
FCCircle
Simple 2D circle defined by center and radius.
| Name | Description |
|---|---|
| center | FVector2D center position |
| radius | Circle radius (default 1.0) |
| pointInside | Returns true if a point is inside the circle (distance² ≤ radius²) |
FCEdge
2D line segment with index, width, and spatial query functions.
| Name | Description |
|---|---|
| a | Start point FVector2D |
| b | End point FVector2D |
| index | Edge identifier |
| width | Edge width (used for corridor influence zone) |
| triIndex | Array of triangle indices sharing this edge |
| length | Returns the edge length |
| isNeighbour | Returns true if two edges share a vertex |
| findNeighbourIn | Returns all edges in an array that share a vertex with this edge |
| isNextNeighbour | Returns true if this edge’s b equals the other’s a (clockwise order) |
| findNextNeighbourIn | Returns all next-neighbours in an array |
| intersectionWith | Computes the intersection point between two segments |
| pointOnEdgeWithDistance | Returns true if a point is within tolerance of the edge, outputs distance |
| breakEdge | Static: recursively subdivides edges with random midpoint displacement for organic shapes |
| closestEdge | Static: finds the closest edge to a point in an array |
| closestEdgeWithin | Static: returns all edges within a distance from a point |
| nearEdge | Static: finds the nearest edge within its influence width |
FCTriangle
2D triangle with circumscribed circle for Delaunay triangulation.
| Name | Description |
|---|---|
| a | First vertex FVector2D |
| b | Second vertex FVector2D |
| c | Third vertex FVector2D |
| index | Triangle identifier |
| edgeIndex | Array of edge indices forming this triangle |
| rayCC | Circumscribed circle radius |
| centerCC | Circumscribed circle center |
| toDelete | Marked for deletion during triangulation |
| isInCircle | Returns true if a point is inside the circumscribed circle |
| isCounterClockWise | Returns true if vertices are in counter-clockwise order |
| isInTriangle | Returns true if a point is inside the triangle |
| isNeighbour | Returns true if the triangle shares a given edge |
| oppositeVertex | Returns the vertex not on the given edge |
| hasVertex | Returns true if the triangle contains the given vertex |
FCPolygon
2D polygon defined by edges and vertices, with centroid and bounding radius.
| Name | Description |
|---|---|
| index | Polygon identifier |
| edgeMap | Map of edge index to FCEdge |
| pointArray | Ordered vertex array |
| centroid | Computed centroid (area-weighted) |
| radius | Maximum distance from centroid to any vertex |
| resize | Returns a resized copy using a transform function applied relative to centroid |
| pointInside | Ray-casting point-in-polygon test |
FCProceduralMeshData
Mesh data container used by worldmaker implementations for tile rendering.
| Name | Description |
|---|---|
| LOD | Level of detail for this tile |
| nbPointPerSide | Number of vertices per tile side |
| renderer | Whether this tile should be rendered |
| cellSize | Tile cell size (DynamicMesh only) |
| transform | Tile transform (DynamicMesh only) |
| verticeArray | Vertex positions (ProceduralMesh only) |
| normalArray | Vertex normals (ProceduralMesh only) |
| triangleArray | Triangle indices (ProceduralMesh only) |
| uvArray | UV coordinates (ProceduralMesh only) |
| verticeColorArray | Vertex colors (ProceduralMesh only) |
| tangentArray | Tangents (ProceduralMesh only) |
FCRectangle
2D axis-aligned rectangle with spatial queries, distance normalization and metadata.
| Name | Description |
|---|---|
| index | Rectangle identifier |
| a | Top-left corner |
| b | Bottom-right corner |
| aa | Top-right corner (computed) |
| bb | Bottom-left corner (computed) |
| center | Center point (computed) |
| extend | Half-extent from center to b |
| height | Rectangle height |
| width | Rectangle width |
| margin | Relaxation margin |
| maxValidSpawnDistanceFromCenter | Min of half-height and half-width |
| metadata | Optional UCAbstractRectangleMetadata attached to this rectangle |
| recalculateAll | Recomputes all derived properties from a and b |
| overlap | Returns true if two rectangles overlap (considering margins) |
| intersectAt | Finds the intersection point of an edge with the rectangle boundary |
| pointInside | Returns true if a point is inside (with optional tolerance) |
| pointToPercentage | Normalizes a point to [0,1] range within the rectangle |
| normalizeDistanceToCenterAsRectangle | Returns max of normalized X and Y distance (Chebyshev) |
| normalizeDistanceToCenterAsEllipse | Returns elliptical normalized distance (inscribed or circumscribed) |
| uniformRepartition | Distributes N points uniformly inside the rectangle |
| draw | Renders the rectangle as a ProceduralMesh section |
UCAbstractRectangleMetadata
Base UObject for metadata attached to rectangles. Extended by UCRoomMetadata and UCClusterMetadata.
| Name | Description |
|---|---|
| tag | FName tag identifying this rectangle |
| setOriginPtr | Sets the source rectangle pointer |
| getOriginPtr | Returns the source rectangle pointer |
| getOrigin | BlueprintCallable: returns a copy of the source rectangle |
CAlgoRelaxType
Enum defining the relaxation algorithm for rectangle spacing.
| Name | Description |
|---|---|
| FAST_LARGE | Fast relaxation with large displacement steps |
| SLOW_SMALL | Slow relaxation with small displacement steps, recalculates after each pair |
FCRectangulator
Collection of rectangles with relaxation, spatial queries and debug rendering.
| Name | Description |
|---|---|
| stream | Random stream for relaxation |
| rectangleMap | Map of index to FCRectangle |
| rectangleMapIndex | Ordered array of rectangle indices |
| closestRectangle | Finds the closest rectangle to a point, returns distance |
| pointInside | Returns true if a point is inside any rectangle, outputs the rectangle |
| relaxRoom | Iterative overlap relaxation. Returns true if any overlap was resolved |
| centerList | Returns an array of all rectangle centers |
| debugRectangle | Draws debug boxes and MST arrows |
FCTile
Hexagonal tile with axial/cube coordinate system and vertex computation.
| Name | Description |
|---|---|
| size | Tile radius (center to vertex) |
| q | Axial Q coordinate |
| r | Axial R coordinate |
| axial | FVector2D(q, r) |
| cube | FVector(q, r, -q-r) |
| pixel | World position computed from axial coordinates |
| a, b, c, d, e, f | Six vertex positions of the hexagon |
| recalculateAll | Recomputes all derived properties |
| vertexPosition | Returns the position of vertex at given side index (0-5) |
| hexCoordToPixel | Static: converts axial (q,r) to pixel position |
| pixelToHexCoord | Static: converts pixel position to axial coordinates (with rounding) |
| cubeToAxial | Static: converts cube to axial coordinates |
| axialToCube | Static: converts axial to cube coordinates |
| cubeRound | Static: rounds fractional cube coordinates to nearest hex |
| cubeRange | Static: returns all cube coordinates within a range |
UCSplinator
Spline renderer that converts edge arrays into spline curves with ISM or SplineMesh rendering.
| Name | Description |
|---|---|
| splineArray | Array of created USplineComponent |
| splineISM | UHierarchicalInstancedStaticMeshComponent for ISM-based rendering |
| splineMeshArray | Array of USplineMeshComponent for mesh-based rendering |
| clean | Destroys all spline components and ISMs |
| drawSpline | Converts an edge array into spline curves with ISM or SplineMesh rendering |
MstType
Enum defining MST corridor style.
| Name | Description |
|---|---|
| FLEX | Flexible corridors following Delaunay edges directly |
| STRAIGHT | L-shaped corridors with horizontal then vertical segments |
FCMstData
Minimum Spanning Tree computed from a Delaunay edge map.
| Name | Description |
|---|---|
| mst | Array of FCEdge forming the MST |
FCTriangleData
Delaunay triangulation result with triangle map, edge map, border extraction and MST building.
| Name | Description |
|---|---|
| triMap | Map of index to FCTriangle |
| edgeMap | Map of index to FCEdge |
| retrieveBorderEdgeAsPolygon | Returns the border edges as a FCPolygon |
| buildMST | Builds a FCMstData from the edge map |
FCVoronoiData
Voronoi diagram computed from a Delaunay mesh.
| Name | Description |
|---|---|
| polyMap | Map of point index to FCPolygon (Voronoi cells) |
FCTriangulator
Static utility for Delaunay triangulation, Voronoi diagrams and debug rendering.
| Name | Description |
|---|---|
| createTriangulation | Static: creates a FDelaunayMesh2 from a vertex array |
| makeDelaunay | Static: builds FCTriangleData from a mesh with optional triangle filter |
| debugDelaunay | Static: draws debug arrows for all Delaunay edges |
| makeVoronoi | Static: builds FCVoronoiData from a mesh with optional polygon filter |
| debugVoronoi | Static: draws debug arrows for Voronoi edges |
| debugVoronoi2 | Static: draws debug arrows and centroid points for Voronoi polygons |
FCNoiseStruct
Noise layer configuration for multi-octave procedural noise generation.
| Name | Description |
|---|---|
| enable | Enable this noise layer |
| description | Layer name for editor display |
| strenghAkaNoiseOutputScale | Output scale in meters (default 500) |
| octave | Number of octaves (1-8) |
| frequenceDeBase | Base frequency (default 0.001) |
| frequenceParOctave | Frequency multiplier per octave (default 2.0) |
| amplitudeParOctave | Amplitude multiplier per octave (default 0.5) |
| octaveDivisor | NONE or AMPLITUDE_SUM normalization |
| redistribution | Power curve exponent (default 1.0) |
| minValue | Minimum value clamp (BASE_POSITIVE only) |
| layerAsMask | Index of another layer used as mask (-1 = none) |
| noiseTransformEnum | BASE, BASE_POSITIVE, or RIDGED |
FCFastNoiseStruct
FastNoise library configuration wrapping UFastNoiseWrapper.
| Name | Description |
|---|---|
| enable | Enable noise generation (default false) |
| noiseType | EFastNoise_NoiseType (default SimplexFractal) |
| frequency | Base frequency (default 0.001) |
| interp | Interpolation method (default Quintic) |
| fractaltype | Fractal type (default FBM) |
| octaves | Number of octaves (default 3) |
| lacunarity | Lacunarity (default 2.0) |
| gain | Gain (default 0.5) |
| cellularJitter | Cellular jitter (default 0.45) |
| cellularDistanceFunction | Distance function (default Euclidean) |
| cellularReturnType | Return type (default CellValue) |
| fastNoiseWrapper | Transient: runtime UFastNoiseWrapper instance |
UCNoisator
Multi-layer noise generator with optional LRU cache. Combines FCFastNoiseStruct with an array of FCNoiseStruct layers. Supports 2D and 3D noise evaluation with masking, redistribution and multiple transform modes.
| Name | Description |
|---|---|
| noiseStructArray | Array of FCNoiseStruct layers |
| fastNoiseStruct | FCFastNoiseStruct configuration |
| cache | Optional TLruCache<FVector2D, float> for 2D results |
| instanciate | Static: creates and optionally registers a UCNoisator singleton |
| isEnable | Returns true if the fast noise struct is enabled |
| noiseValue (FVector2D) | Evaluates 2D noise at a point (cached if cache is set) |
| noiseValue (FVector) | Evaluates 3D noise at a point |
UCNoiseDataAsset
Data asset for noise configuration, editable in the Unreal Editor content browser.
| Name | Description |
|---|---|
| zoom | Preview zoom level |
| origin | Preview origin offset |
| colorMap | Array of FCColorLimit (lowerLimit + color) for preview coloring |
| fastNoiseStruct | FCFastNoiseStruct configuration |
| noiseStructArray | Array of FCNoiseStruct layers |
| EraseAndConvertToMinusOneType | Editor button: resets all layers to normalized [-1, 1] output |
ECAntiAliasingDefinition
Enum for anti-aliasing methods.
| Name | Description |
|---|---|
| NOAA | No anti-aliasing |
| FXAA | Fast approximate anti-aliasing |
| TAA | Temporal anti-aliasing |
| MSAAx2 | Multi-sample AA 2x (requires forward shading) |
| MSAAx4 | Multi-sample AA 4x (requires forward shading) |
| MSAAx8 | Multi-sample AA 8x (requires forward shading) |
| TSR | Temporal super resolution |
FCShadowDefinition
Shadow configuration applied to generated meshes and ISMs.
| Name | Description |
|---|---|
| bCastCinematicShadow | Cast cinematic shadow (default true) |
| bCastContactShadow | Cast contact shadow (default true) |
| bCastDynamicShadow | Cast dynamic shadow (default true) |
| bCastFarShadow | Cast far shadow (default true) |
| bCastHiddenShadow | Cast hidden shadow (default true) |
| bCastInsetShadow | Cast inset shadow (default true) |
| bCastStaticShadow | Cast static shadow (default true) |
| bCastVolumetricTranslucentShadow | Cast volumetric translucent shadow (default true) |
| bCastDistanceFieldIndirectShadow | Cast distance field indirect shadow (default true) |
| bCastShadowAsTwoSided | Cast shadow as two-sided (default true) |