Open CASCADE Technology  7.7.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
BVH_DistanceField< T, N > Class Template Reference

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...
 
Standard_Boolean IsParallel () const
 Returns parallel flag. More...
 
void SetParallel (const Standard_Boolean isParallel)
 Set parallel flag contolling possibility of parallel execution. 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...
 
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_VecNtVoxelSize () const
 Returns size of single voxel. More...
 
const BVH_VecNtCornerMin () const
 Returns minimum corner of voxel grid. More...
 
const BVH_VecNtCornerMax () 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...
 
Standard_Boolean myIsParallel
 

Detailed Description

template<class T, int N>
class BVH_DistanceField< T, N >

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).

Member Typedef Documentation

◆ BVH_VecNt

template<class T , int N>
typedef BVH::VectorType<T, N>::Type BVH_DistanceField< T, N >::BVH_VecNt

Constructor & Destructor Documentation

◆ BVH_DistanceField()

template<class T , int N>
BVH_DistanceField< T, N >::BVH_DistanceField ( const Standard_Integer  theMaximumSize,
const Standard_Boolean  theComputeSign 
)

Creates empty 3D distance field.

◆ ~BVH_DistanceField()

template<class T , int N>
virtual BVH_DistanceField< T, N >::~BVH_DistanceField ( )
virtual

Releases resources of 3D distance field.

Member Function Documentation

◆ Build()

template<class T , int N>
Standard_Boolean BVH_DistanceField< T, N >::Build ( BVH_Geometry< T, N > &  theGeometry)

Builds 3D distance field from BVH geometry.

◆ BuildSlices()

template<class T , int N>
void BVH_DistanceField< T, N >::BuildSlices ( BVH_Geometry< T, N > &  theGeometry,
const Standard_Integer  theStartZ,
const Standard_Integer  theFinalZ 
)
protected

Performs building of distance field for the given Z slices.

◆ CornerMax()

template<class T , int N>
const BVH_VecNt& BVH_DistanceField< T, N >::CornerMax ( ) const
inline

Returns maximum corner of voxel grid.

◆ CornerMin()

template<class T , int N>
const BVH_VecNt& BVH_DistanceField< T, N >::CornerMin ( ) const
inline

Returns minimum corner of voxel grid.

◆ DimensionX()

template<class T , int N>
Standard_Integer BVH_DistanceField< T, N >::DimensionX ( ) const
inline

Returns size of voxel grid in X dimension.

◆ DimensionY()

template<class T , int N>
Standard_Integer BVH_DistanceField< T, N >::DimensionY ( ) const
inline

Returns size of voxel grid in Y dimension.

◆ DimensionZ()

template<class T , int N>
Standard_Integer BVH_DistanceField< T, N >::DimensionZ ( ) const
inline

Returns size of voxel grid in Z dimension.

◆ IsParallel()

template<class T , int N>
Standard_Boolean BVH_DistanceField< T, N >::IsParallel ( ) const
inline

Returns parallel flag.

◆ PackedData()

template<class T , int N>
const T* BVH_DistanceField< T, N >::PackedData ( ) const
inline

Returns packed voxel data.

◆ SetParallel()

template<class T , int N>
void BVH_DistanceField< T, N >::SetParallel ( const Standard_Boolean  isParallel)
inline

Set parallel flag contolling possibility of parallel execution.

◆ Voxel() [1/2]

template<class T , int N>
T& BVH_DistanceField< T, N >::Voxel ( const Standard_Integer  theX,
const Standard_Integer  theY,
const Standard_Integer  theZ 
)
inline

Returns distance value for the given voxel.

◆ Voxel() [2/2]

template<class T , int N>
T BVH_DistanceField< T, N >::Voxel ( const Standard_Integer  theX,
const Standard_Integer  theY,
const Standard_Integer  theZ 
) const
inline

Returns distance value for the given voxel.

◆ VoxelSize()

template<class T , int N>
const BVH_VecNt& BVH_DistanceField< T, N >::VoxelSize ( ) const
inline

Returns size of single voxel.

Field Documentation

◆ myComputeSign

template<class T , int N>
Standard_Boolean BVH_DistanceField< T, N >::myComputeSign
protected

Enables/disables signing of distance field.

◆ myCornerMax

template<class T , int N>
BVH_VecNt BVH_DistanceField< T, N >::myCornerMax
protected

Maximum corner of voxel grid.

◆ myCornerMin

template<class T , int N>
BVH_VecNt BVH_DistanceField< T, N >::myCornerMin
protected

Minimum corner of voxel grid.

◆ myDimensionX

template<class T , int N>
Standard_Integer BVH_DistanceField< T, N >::myDimensionX
protected

Size of voxel grid in X dimension.

◆ myDimensionY

template<class T , int N>
Standard_Integer BVH_DistanceField< T, N >::myDimensionY
protected

Size of voxel grid in Y dimension.

◆ myDimensionZ

template<class T , int N>
Standard_Integer BVH_DistanceField< T, N >::myDimensionZ
protected

Size of voxel grid in Z dimension.

◆ myIsParallel

template<class T , int N>
Standard_Boolean BVH_DistanceField< T, N >::myIsParallel
protected

◆ myMaximumSize

template<class T , int N>
Standard_Integer BVH_DistanceField< T, N >::myMaximumSize
protected

Size of voxel grid in maximum dimension.

◆ myVoxelData

template<class T , int N>
T* BVH_DistanceField< T, N >::myVoxelData
protected

Array of voxels.

◆ myVoxelSize

template<class T , int N>
BVH_VecNt BVH_DistanceField< T, N >::myVoxelSize
protected

Size of single voxel.


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