#include <voxelization.h>

VoxelizationInterface provides a class for building up a voxelization of different kinds of index based mesh data structures.
Public Member Functions | |
| MAXON_METHOD Result< Bool > | Init (PolygonObject *polyObject, Int32 voxelResolution, Int32 minResolution, BaseArray< Range< Vector >> &polyRanges, const Vector *pointOverride=nullptr, Bool precise=false) | 
| MAXON_METHOD Result< Bool > | Init (PolygonObject *polyObject, BaseArray< Int32 > &polyIslands, Int32 voxelResolution, Int32 minResolution, BaseArray< Range< Vector >> &polyRanges, const Vector *pointOverride=nullptr) | 
| MAXON_METHOD Result< Bool > | Init (const ConvexHullData *hull, Int32 voxelResolution, Int32 minResolution, BaseArray< Range< Vector >> &polyRanges) | 
| MAXON_METHOD Result< Bool > | Init (const BaseArray< BaseArray< Int32 >> &facePoints, const BaseArray< Vector > &points, Int32 voxelResolution, Int32 minResolution, BaseArray< Range< Vector >> &polyRanges) | 
| MAXON_METHOD Result< void > | GetClosestPolys (const Vector pos, BaseBitSet<> &voxelPolys, const BaseBitSet<> *polyFilter=nullptr) const | 
| MAXON_METHOD Result< void > | GetIntersectingIndices (const Range< Vector > &toTestBox, BaseArray< Int32 > &indexList) const | 
| MAXON_METHOD Result< void > | GetIntersectingIndicesPrecise (const Range< Vector > &toTestBox, const BaseArray< Range< Vector >> &polyRanges, BaseArray< Int32 > &indexList) const | 
| MAXON_METHOD Result< Bool > | GetIntersectingIndices (const Vector &point, BaseArray< Int32 > &indexList) const | 
| const MAXON_METHOD Range< Vector > & | GetBoundingBox () const | 
| MAXON_METHOD Range< IntVector32 > | GetVoxelRangesFromBoundingBox (const Range< Vector > &boundingBox) const | 
| MAXON_METHOD Bool | IsInitialized () const | 
Private Member Functions | |
| MAXON_INTERFACE (VoxelizationInterface, MAXON_REFERENCE_NORMAL, "net.maxon.geom.interface.voxelization") | |
      
  | 
  private | 
| MAXON_METHOD Result<Bool> Init | ( | PolygonObject * | polyObject, | 
| Int32 | voxelResolution, | ||
| Int32 | minResolution, | ||
| BaseArray< Range< Vector >> & | polyRanges, | ||
| const Vector * | pointOverride = nullptr,  | 
        ||
| Bool | precise = false  | 
        ||
| ) | 
Initializes the voxelization with a polygon object.
| [in] | polyObject | Pointer to the polygon object to be added to the voxelization. | 
| [in] | voxelResolution | The voxel resolution of the largest dimension. | 
| [in] | minResolution | The minimal resolution of either dimension. | 
| [out] | polyRanges | Calculated bounding boxes for every polygon. | 
| [in] | pointOverride | Override option for the polygon points. If not nullptr, these points will be used for the polygon vertices. | 
| [in] | precise | If true, only the voxels touching a polygon will hold the specific polygon index. If false, all voxels touching the polygon AABB will hold the polygon index. | 
| MAXON_METHOD Result<Bool> Init | ( | PolygonObject * | polyObject, | 
| BaseArray< Int32 > & | polyIslands, | ||
| Int32 | voxelResolution, | ||
| Int32 | minResolution, | ||
| BaseArray< Range< Vector >> & | polyRanges, | ||
| const Vector * | pointOverride = nullptr  | 
        ||
| ) | 
Initializes the voxelization with a polygon object.
| [in] | polyObject | Pointer to the polygon object to be added to the voxelization. | 
| [in] | polyIslands | A list of polygon indices. Only those polygons will be added to the voxelization. | 
| [in] | voxelResolution | The voxel resolution of the largest dimension. | 
| [in] | minResolution | The minimal resolution of either dimension. | 
| [out] | polyRanges | Calculated bounding boxes for every polygon. | 
| [in] | pointOverride | Override option for the polygon points. If not nullptr, these points will be used for the polygon vertices. | 
| MAXON_METHOD Result<Bool> Init | ( | const ConvexHullData * | hull, | 
| Int32 | voxelResolution, | ||
| Int32 | minResolution, | ||
| BaseArray< Range< Vector >> & | polyRanges | ||
| ) | 
Initializes the voxelization with a convex hull data struct.
| [in] | hull | The convex hull data to be added to the voxelization. | 
| [in] | voxelResolution | The voxel resolution of the largest dimension. | 
| [in] | minResolution | The minimal resolution of either dimension. | 
| [out] | polyRanges | Calculated bounding boxes for every polygon. | 
| MAXON_METHOD Result<Bool> Init | ( | const BaseArray< BaseArray< Int32 >> & | facePoints, | 
| const BaseArray< Vector > & | points, | ||
| Int32 | voxelResolution, | ||
| Int32 | minResolution, | ||
| BaseArray< Range< Vector >> & | polyRanges | ||
| ) | 
Initializes the voxelization with a list of polygon indices and points.
| [in] | facePoints | A list of list holding the point indices for each polygon. | 
| [in] | points | The vertex positions. | 
| [in] | voxelResolution | The voxel resolution of the largest dimension. | 
| [in] | minResolution | The minimal resolution of either dimension. | 
| [out] | polyRanges | Calculated bounding boxes for every polygon. | 
| MAXON_METHOD Result<void> GetClosestPolys | ( | const Vector | pos, | 
| BaseBitSet<> & | voxelPolys, | ||
| const BaseBitSet<> * | polyFilter = nullptr  | 
        ||
| ) | const | 
Retrieve the polygon indices of the closest polygons to a point in space.
| [in] | pos | The position in space to test for. | 
| [out] | voxelPolys | A bitset with the closest polygon indices set. | 
| [in] | polyFilter | An optional bitset with polygon indices set that should be respected. if nullptr all initialized polygons can be found. | 
| MAXON_METHOD Result<void> GetIntersectingIndices | ( | const Range< Vector > & | toTestBox, | 
| BaseArray< Int32 > & | indexList | ||
| ) | const | 
Retrieve the polygon indices of all polygons stored in voxels overlappint a axis-aligned bounding box.
| [in] | toTestBox | The bounding box to find the polygon indices for. | 
| [out] | indexList | A list of polygon indices that are stored in voxels overlapping the passed bounding box. | 
| MAXON_METHOD Result<void> GetIntersectingIndicesPrecise | ( | const Range< Vector > & | toTestBox, | 
| const BaseArray< Range< Vector >> & | polyRanges, | ||
| BaseArray< Int32 > & | indexList | ||
| ) | const | 
Retrieve the polygon indices of all polygons stored in voxels overlapping a axis-aligned bounding box.
| [in] | toTestBox | The bounding box to find the polygon indices for. | 
| [in] | polyRanges | The bounding box for each polygon. This list can be retrieved from the initialization of the voxelization. | 
| [out] | indexList | A list of polygon indices that are stored in voxels overlapping the passed bounding box. | 
| MAXON_METHOD Result<Bool> GetIntersectingIndices | ( | const Vector & | point, | 
| BaseArray< Int32 > & | indexList | ||
| ) | const | 
Retrieve the polygon indices of all polygons stored in the voxel that contains the passed point.
| [in] | point | The point to find the polygon indices for. | 
| [out] | indexList | A list of polygon indices that are stored in voxel containing the passed point. | 
| const MAXON_METHOD Range<Vector>& GetBoundingBox | ( | ) | const | 
Retrieve the bounding box of the voxelization.
| MAXON_METHOD Range<IntVector32> GetVoxelRangesFromBoundingBox | ( | const Range< Vector > & | boundingBox | ) | const | 
Retrieve the voxel ranges for a passed bounding box.
| MAXON_METHOD Bool IsInitialized | ( | ) | const | 
Retrieve the initialization state of the voxelization.