-
首页
-
C4D R23.110 C++ SDK
VoxelizationInterface Class Reference
#include <voxelization.h>
详细描述
VoxelizationInterface
provides a class for building up a voxelization of different kinds of index based mesh data structures.
公共成员函数
|
MAXON_METHOD
Result
<
Bool
>
|
Init
(
PolygonObject
*polyObject,
Int32
voxelResolution,
Int32
minResolution,
BaseArray
<
Range
<
向量
>> &polyRanges, const
向量
*pointOverride=nullptr,
Bool
precise=false)
|
MAXON_METHOD
Result
<
Bool
>
|
Init
(
PolygonObject
*polyObject,
BaseArray
<
Int32
> &polyIslands,
Int32
voxelResolution,
Int32
minResolution,
BaseArray
<
Range
<
向量
>> &polyRanges, const
向量
*pointOverride=nullptr)
|
MAXON_METHOD
Result
<
Bool
>
|
Init
(const
ConvexHullData
*hull,
Int32
voxelResolution,
Int32
minResolution,
BaseArray
<
Range
<
向量
>> &polyRanges)
|
MAXON_METHOD
Result
<
Bool
>
|
Init
(const
BaseArray
<
BaseArray
<
Int32
>> &facePoints, const
BaseArray
<
向量
> &points,
Int32
voxelResolution,
Int32
minResolution,
BaseArray
<
Range
<
向量
>> &polyRanges)
|
MAXON_METHOD
Result
< void >
|
GetClosestPolys
(const
向量
pos,
BaseBitSet
<> &voxelPolys, const
BaseBitSet
<> *polyFilter=nullptr) const
|
MAXON_METHOD
Result
< void >
|
GetIntersectingIndices
(const
Range
<
向量
> &toTestBox,
BaseArray
<
Int32
> &indexList) const
|
MAXON_METHOD
Result
< void >
|
GetIntersectingIndicesPrecise
(const
Range
<
向量
> &toTestBox, const
BaseArray
<
Range
<
向量
>> &polyRanges,
BaseArray
<
Int32
> &indexList) const
|
MAXON_METHOD
Result
<
Bool
>
|
GetIntersectingIndices
(const
向量
&point,
BaseArray
<
Int32
> &indexList) const
|
const
MAXON_METHOD
Range
<
向量
> &
|
GetBoundingBox
() const
|
MAXON_METHOD
Range
<
IntVector32
>
|
GetVoxelRangesFromBoundingBox
(const
Range
<
向量
> &boundingBox) const
|
MAXON_METHOD
Bool
|
IsInitialized
() const
|
成员函数文档编制
◆
MAXON_INTERFACE()
◆
Init()
[1/4]
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.
|
-
返回
-
True if the voxelization was properly initialized, false otherwise.
◆
Init()
[2/4]
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.
|
-
返回
-
True if the voxelization was properly initialized, false otherwise.
◆
Init()
[3/4]
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.
|
-
返回
-
True if the voxelization was properly initialized, false otherwise.
◆
Init()
[4/4]
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.
|
-
返回
-
True if the voxelization was properly initialized, false otherwise.
◆
GetClosestPolys()
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.
|
-
返回
-
OK on success.
◆
GetIntersectingIndices()
[1/2]
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.
|
-
返回
-
OK on success.
◆
GetIntersectingIndicesPrecise()
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.
|
-
返回
-
OK on success.
◆
GetIntersectingIndices()
[2/2]
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.
|
-
返回
-
True if the point was inside of a voxel, false otherwise.
◆
GetBoundingBox()
Retrieve the bounding box of the voxelization.
-
返回
-
The bounding box as range of all voxels of this voxelization.
◆
GetVoxelRangesFromBoundingBox()
Retrieve the voxel ranges for a passed bounding box.
-
返回
-
A voxel range bounding box with minimum and maximum indices in each dimension.
◆
IsInitialized()
Retrieve the initialization state of the voxelization.
-
返回
-
True if the voxelization is initialized, false otherwise.