Open CASCADE Technology
7.2.0
|
Tool object for building 3D distance field from the set of BVH triangulations. Distance field is a scalar field that measures the distance from a given point to some object, including optional information about the inside and outside of the structure. Distance fields are used as alternative surface representations (like polygons or NURBS). More...
#include <BVH_DistanceField.hxx>
Public Types | |
typedef BVH::VectorType< T, N >::Type | BVH_VecNt |
Public Member Functions | |
BVH_DistanceField (const Standard_Integer theMaximumSize, const Standard_Boolean theComputeSign) | |
Creates empty 3D distance field. More... | |
virtual | ~BVH_DistanceField () |
Releases resources of 3D distance field. More... | |
Standard_Boolean | Build (BVH_Geometry< T, N > &theGeometry) |
Builds 3D distance field from BVH geometry. More... | |
const T * | PackedData () const |
Returns packed voxel data. More... | |
T & | Voxel (const Standard_Integer theX, const Standard_Integer theY, const Standard_Integer theZ) |
Returns distance value for the given voxel. More... | |
T | Voxel (const Standard_Integer theX, const Standard_Integer theY, const Standard_Integer theZ) const |
Returns distance value for the given voxel. More... | |
Standard_Integer | DimensionX () const |
Returns size of voxel grid in X dimension. More... | |
Standard_Integer | DimensionY () const |
Returns size of voxel grid in Y dimension. More... | |
Standard_Integer | DimensionZ () const |
Returns size of voxel grid in Z dimension. More... | |
const BVH_VecNt & | VoxelSize () const |
Returns size of single voxel. More... | |
const BVH_VecNt & | CornerMin () const |
Returns minimum corner of voxel grid. More... | |
const BVH_VecNt & | CornerMax () const |
Returns maximum corner of voxel grid. More... | |
Protected Member Functions | |
void | BuildSlices (BVH_Geometry< T, N > &theGeometry, const Standard_Integer theStartZ, const Standard_Integer theFinalZ) |
Performs building of distance field for the given Z slices. More... | |
Protected Attributes | |
T * | myVoxelData |
Array of voxels. More... | |
BVH_VecNt | myVoxelSize |
Size of single voxel. More... | |
BVH_VecNt | myCornerMin |
Minimum corner of voxel grid. More... | |
BVH_VecNt | myCornerMax |
Maximum corner of voxel grid. More... | |
Standard_Integer | myDimensionX |
Size of voxel grid in X dimension. More... | |
Standard_Integer | myDimensionY |
Size of voxel grid in Y dimension. More... | |
Standard_Integer | myDimensionZ |
Size of voxel grid in Z dimension. More... | |
Standard_Integer | myMaximumSize |
Size of voxel grid in maximum dimension. More... | |
Standard_Boolean | myComputeSign |
Enables/disables signing of distance field. More... | |
Tool object for building 3D distance field from the set of BVH triangulations. Distance field is a scalar field that measures the distance from a given point to some object, including optional information about the inside and outside of the structure. Distance fields are used as alternative surface representations (like polygons or NURBS).
typedef BVH::VectorType<T, N>::Type BVH_DistanceField< T, N >::BVH_VecNt |
BVH_DistanceField< T, N >::BVH_DistanceField | ( | const Standard_Integer | theMaximumSize, |
const Standard_Boolean | theComputeSign | ||
) |
Creates empty 3D distance field.
|
virtual |
Releases resources of 3D distance field.
Standard_Boolean BVH_DistanceField< T, N >::Build | ( | BVH_Geometry< T, N > & | theGeometry | ) |
Builds 3D distance field from BVH geometry.
|
protected |
Performs building of distance field for the given Z slices.
|
inline |
Returns maximum corner of voxel grid.
|
inline |
Returns minimum corner of voxel grid.
|
inline |
Returns size of voxel grid in X dimension.
|
inline |
Returns size of voxel grid in Y dimension.
|
inline |
Returns size of voxel grid in Z dimension.
|
inline |
Returns packed voxel data.
|
inline |
Returns distance value for the given voxel.
|
inline |
Returns distance value for the given voxel.
|
inline |
Returns size of single voxel.
|
protected |
Enables/disables signing of distance field.
|
protected |
Maximum corner of voxel grid.
|
protected |
Minimum corner of voxel grid.
|
protected |
Size of voxel grid in X dimension.
|
protected |
Size of voxel grid in Y dimension.
|
protected |
Size of voxel grid in Z dimension.
|
protected |
Size of voxel grid in maximum dimension.
|
protected |
Array of voxels.
|
protected |
Size of single voxel.