Navigation
API > API/Runtime > API/Runtime/GeometryCore
Sample mesh occupancy in a voxel grid by using the mesh's winding number, on voxel corners, to determine whether the voxel is fully contained within the interior of the mesh, touches the mesh's boundary, or is fully contained on the exterior of the mesh.
| Name | FOccupancyGrid3 |
| Type | struct |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Spatial/OccupancyGrid3.h |
| Include Path | #include "Spatial/OccupancyGrid3.h" |
Syntax
struct FOccupancyGrid3
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FOccupancyGrid3
(
const MeshType& InMesh, |
Spatial/OccupancyGrid3.h |
Enums
Public
| Name | Remarks |
|---|---|
| EDomain | An enum representing a voxel's classification. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CellMidPoint | FVector3f | This value is the offset from the lowest coordinate of a winding number grid's cell's box, to its mid-point. | Spatial/OccupancyGrid3.h | |
| CellSize | float | The size of each cell, applies to all dimensions. | Spatial/OccupancyGrid3.h | |
| GridOrigin | FVector3f | The origin of the occupancy grid. | Spatial/OccupancyGrid3.h | |
| Occupancy | TDenseGrid3< EDomain > | The dense grid that contains the occupancy state of the mesh within each voxel. | Spatial/OccupancyGrid3.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FBox3f GetCellBoxFromIndex
(
const FVector3i& Index |
Given an index into the occupancy grid, returns the bbox that represents the cell in the winding number grid, from which the occupancy got computed. | Spatial/OccupancyGrid3.h | |
FVector3f GetCellCenterFromIndex
(
const FVector3i& Index |
Given an index into the occupancy grid, returns the midpoint of the bbox that represents the matching cell in the winding number grid, from which the occupancy got computed. | Spatial/OccupancyGrid3.h | |
FVector3i GetCellIndexFromPoint
(
const FVector& InPoint |
Given a point in space, return a computed index into the occupancy grid. | Spatial/OccupancyGrid3.h | |
float GetCellSize() |
Returns the size of the cell. The cell size is uniform on each axis. | Spatial/OccupancyGrid3.h | |
const TDenseGrid3< EDomain > & GetOccupancyStateGrid() |
Returns a reference to the occupancy grid. | Spatial/OccupancyGrid3.h |