Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
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 int theMaximumSize, const bool theComputeSign)
 Creates empty 3D distance field.
 
virtual ~BVH_DistanceField ()
 Releases resources of 3D distance field.
 
bool Build (BVH_Geometry< T, N > &theGeometry)
 Builds 3D distance field from BVH geometry.
 
bool IsParallel () const
 Returns parallel flag.
 
void SetParallel (const bool isParallel)
 Set parallel flag controlling possibility of parallel execution.
 
const T * PackedData () const
 Returns packed voxel data.
 
T & Voxel (const int theX, const int theY, const int theZ)
 Returns distance value for the given voxel.
 
Voxel (const int theX, const int theY, const int theZ) const
 Returns distance value for the given voxel.
 
int DimensionX () const
 Returns size of voxel grid in X dimension.
 
int DimensionY () const
 Returns size of voxel grid in Y dimension.
 
int DimensionZ () const
 Returns size of voxel grid in Z dimension.
 
const BVH_VecNtVoxelSize () const
 Returns size of single voxel.
 
const BVH_VecNtCornerMin () const
 Returns minimum corner of voxel grid.
 
const BVH_VecNtCornerMax () const
 Returns maximum corner of voxel grid.
 

Protected Member Functions

void BuildSlices (BVH_Geometry< T, N > &theGeometry, const int theStartZ, const int theFinalZ)
 Performs building of distance field for the given Z slices.
 

Protected Attributes

T * myVoxelData
 Array of voxels.
 
BVH_VecNt myVoxelSize
 Size of single voxel.
 
BVH_VecNt myCornerMin
 Minimum corner of voxel grid.
 
BVH_VecNt myCornerMax
 Maximum corner of voxel grid.
 
int myDimensionX
 Size of voxel grid in X dimension.
 
int myDimensionY
 Size of voxel grid in Y dimension.
 
int myDimensionZ
 Size of voxel grid in Z dimension.
 
int myMaximumSize
 Size of voxel grid in maximum dimension.
 
bool myComputeSign
 Enables/disables signing of distance field.
 
bool 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 int theMaximumSize,
const bool 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>
bool 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 int theStartZ,
const int 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>
int BVH_DistanceField< T, N >::DimensionX ( ) const
inline

Returns size of voxel grid in X dimension.

◆ DimensionY()

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

Returns size of voxel grid in Y dimension.

◆ DimensionZ()

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

Returns size of voxel grid in Z dimension.

◆ IsParallel()

template<class T , int N>
bool 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 bool isParallel)
inline

Set parallel flag controlling possibility of parallel execution.

◆ Voxel() [1/2]

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

Returns distance value for the given voxel.

◆ Voxel() [2/2]

template<class T , int N>
T BVH_DistanceField< T, N >::Voxel ( const int theX,
const int theY,
const int 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>
bool 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>
int BVH_DistanceField< T, N >::myDimensionX
protected

Size of voxel grid in X dimension.

◆ myDimensionY

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

Size of voxel grid in Y dimension.

◆ myDimensionZ

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

Size of voxel grid in Z dimension.

◆ myIsParallel

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

◆ myMaximumSize

template<class T , int N>
int 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: