Open CASCADE Technology  7.1.0.beta
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...
 
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...
 

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

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

Constructor & Destructor Documentation

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

Creates empty 3D distance field.

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

Releases resources of 3D distance field.

Member Function Documentation

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

Builds 3D distance field from BVH geometry.

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.

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

Returns maximum corner of voxel grid.

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

Returns minimum corner of voxel grid.

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

Returns size of voxel grid in X dimension.

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

Returns size of voxel grid in Y dimension.

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

Returns size of voxel grid in Z dimension.

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

Returns packed voxel data.

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.

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.

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

Returns size of single voxel.

Field Documentation

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

Enables/disables signing of distance field.

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

Maximum corner of voxel grid.

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

Minimum corner of voxel grid.

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

Size of voxel grid in X dimension.

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

Size of voxel grid in Y dimension.

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

Size of voxel grid in Z dimension.

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

Size of voxel grid in maximum dimension.

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

Array of voxels.

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: