UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::FOccupancyGrid3 Struct Reference

#include <OccupancyGrid3.h>

Public Types

enum class  EDomain : int32 { Exterior , Boundary , Interior }
 An enum representing a voxel's classification. More...
 

Public Member Functions

template<typename MeshType >
 FOccupancyGrid3 (const MeshType &InMesh, const int32 InVoxelResolution)
 
FVector3i GetCellIndexFromPoint (const FVector &InPoint) const
 
FVector3f GetCellCenterFromIndex (const FVector3i &Index) const
 
FBox3f GetCellBoxFromIndex (const FVector3i &Index) const
 
const TDenseGrid3< EDomain > & GetOccupancyStateGrid () const
 Returns a reference to the occupancy grid.

 
float GetCellSize () const
 

Detailed Description

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.

Member Enumeration Documentation

◆ EDomain

An enum representing a voxel's classification.

Enumerator
Exterior 
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.

The point in the occupancy grid is completely on the interior of the given mesh.

Constructor & Destructor Documentation

◆ FOccupancyGrid3()

template<typename MeshType >
UE::Geometry::FOccupancyGrid3::FOccupancyGrid3 ( const MeshType &  InMesh,
const int32  InVoxelResolution 
)
inline

Member Function Documentation

◆ GetCellBoxFromIndex()

FBox3f UE::Geometry::FOccupancyGrid3::GetCellBoxFromIndex ( const FVector3i Index) const
inline

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.

◆ GetCellCenterFromIndex()

FVector3f UE::Geometry::FOccupancyGrid3::GetCellCenterFromIndex ( const FVector3i Index) const
inline

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.

◆ GetCellIndexFromPoint()

FVector3i UE::Geometry::FOccupancyGrid3::GetCellIndexFromPoint ( const FVector InPoint) const
inline

Given a point in space, return a computed index into the occupancy grid. If the point is outside of the mesh's bounding box, the given index will be outside the range of the occupancy grid. To check for validity, test against the occupancy grid's extents as returned by GetOccupancy.

◆ GetCellSize()

float UE::Geometry::FOccupancyGrid3::GetCellSize ( ) const
inline

◆ GetOccupancyStateGrid()

const TDenseGrid3< EDomain > & UE::Geometry::FOccupancyGrid3::GetOccupancyStateGrid ( ) const
inline

Returns a reference to the occupancy grid.


The documentation for this struct was generated from the following file: