Open CASCADE Technology  7.5.0

BVH_Tools< T, N > Class Template Reference

Defines a set of static methods operating with points and bounding boxes. More...

#include <BVH_Tools.hxx>

Public Types

public types
typedef BVH::VectorType< T, N >::Type BVH_VecNt
 

Static Public Member Functions

Box-Box Square distance
static T BoxBoxSquareDistance (const BVH_Box< T, N > &theBox1, const BVH_Box< T, N > &theBox2)
 Computes Square distance between Axis aligned bounding boxes. More...
 
static T BoxBoxSquareDistance (const BVH_VecNt &theCMin1, const BVH_VecNt &theCMax1, const BVH_VecNt &theCMin2, const BVH_VecNt &theCMax2)
 Computes Square distance between Axis aligned bounding boxes. More...
 
Point-Box Square distance
static T PointBoxSquareDistance (const BVH_VecNt &thePoint, const BVH_Box< T, N > &theBox)
 Computes square distance between point and bounding box. More...
 
static T PointBoxSquareDistance (const BVH_VecNt &thePoint, const BVH_VecNt &theCMin, const BVH_VecNt &theCMax)
 Computes square distance between point and bounding box. More...
 
Point-Box projection
static BVH_VecNt PointBoxProjection (const BVH_VecNt &thePoint, const BVH_Box< T, N > &theBox)
 Computes projection of point on bounding box. More...
 
static BVH_VecNt PointBoxProjection (const BVH_VecNt &thePoint, const BVH_VecNt &theCMin, const BVH_VecNt &theCMax)
 Computes projection of point on bounding box. More...
 
Point-Triangle Square distance
static T PointTriangleSquareDistance (const BVH_VecNt &thePoint, const BVH_VecNt &theNode0, const BVH_VecNt &theNode1, const BVH_VecNt &theNode2)
 Computes square distance between point and triangle. More...
 
Ray-Box Intersection
static Standard_Boolean RayBoxIntersection (const BVH_Ray< T, N > &theRay, const BVH_Box< T, N > &theBox, T &theTimeEnter, T &theTimeLeave)
 Computes hit time of ray-box intersection. More...
 
static Standard_Boolean RayBoxIntersection (const BVH_Ray< T, N > &theRay, const BVH_VecNt &theBoxCMin, const BVH_VecNt &theBoxCMax, T &theTimeEnter, T &theTimeLeave)
 Computes hit time of ray-box intersection. More...
 
static Standard_Boolean RayBoxIntersection (const BVH_VecNt &theRayOrigin, const BVH_VecNt &theRayDirection, const BVH_Box< T, N > &theBox, T &theTimeEnter, T &theTimeLeave)
 Computes hit time of ray-box intersection. More...
 
static Standard_Boolean RayBoxIntersection (const BVH_VecNt &theRayOrigin, const BVH_VecNt &theRayDirection, const BVH_VecNt &theBoxCMin, const BVH_VecNt &theBoxCMax, T &theTimeEnter, T &theTimeLeave)
 Computes hit time of ray-box intersection. More...
 

Detailed Description

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

Defines a set of static methods operating with points and bounding boxes.

Template Parameters
TNumeric data type
NVector dimension

Member Typedef Documentation

◆ BVH_VecNt

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

Member Function Documentation

◆ BoxBoxSquareDistance() [1/2]

template<class T, int N>
static T BVH_Tools< T, N >::BoxBoxSquareDistance ( const BVH_Box< T, N > &  theBox1,
const BVH_Box< T, N > &  theBox2 
)
inlinestatic

Computes Square distance between Axis aligned bounding boxes.

◆ BoxBoxSquareDistance() [2/2]

template<class T, int N>
static T BVH_Tools< T, N >::BoxBoxSquareDistance ( const BVH_VecNt theCMin1,
const BVH_VecNt theCMax1,
const BVH_VecNt theCMin2,
const BVH_VecNt theCMax2 
)
inlinestatic

Computes Square distance between Axis aligned bounding boxes.

◆ PointBoxProjection() [1/2]

template<class T, int N>
static BVH_VecNt BVH_Tools< T, N >::PointBoxProjection ( const BVH_VecNt thePoint,
const BVH_Box< T, N > &  theBox 
)
inlinestatic

Computes projection of point on bounding box.

◆ PointBoxProjection() [2/2]

template<class T, int N>
static BVH_VecNt BVH_Tools< T, N >::PointBoxProjection ( const BVH_VecNt thePoint,
const BVH_VecNt theCMin,
const BVH_VecNt theCMax 
)
inlinestatic

Computes projection of point on bounding box.

◆ PointBoxSquareDistance() [1/2]

template<class T, int N>
static T BVH_Tools< T, N >::PointBoxSquareDistance ( const BVH_VecNt thePoint,
const BVH_Box< T, N > &  theBox 
)
inlinestatic

Computes square distance between point and bounding box.

◆ PointBoxSquareDistance() [2/2]

template<class T, int N>
static T BVH_Tools< T, N >::PointBoxSquareDistance ( const BVH_VecNt thePoint,
const BVH_VecNt theCMin,
const BVH_VecNt theCMax 
)
inlinestatic

Computes square distance between point and bounding box.

◆ PointTriangleSquareDistance()

template<class T, int N>
static T BVH_Tools< T, N >::PointTriangleSquareDistance ( const BVH_VecNt thePoint,
const BVH_VecNt theNode0,
const BVH_VecNt theNode1,
const BVH_VecNt theNode2 
)
inlinestatic

Computes square distance between point and triangle.

◆ RayBoxIntersection() [1/4]

template<class T, int N>
static Standard_Boolean BVH_Tools< T, N >::RayBoxIntersection ( const BVH_Ray< T, N > &  theRay,
const BVH_Box< T, N > &  theBox,
T &  theTimeEnter,
T &  theTimeLeave 
)
inlinestatic

Computes hit time of ray-box intersection.

◆ RayBoxIntersection() [2/4]

template<class T, int N>
static Standard_Boolean BVH_Tools< T, N >::RayBoxIntersection ( const BVH_Ray< T, N > &  theRay,
const BVH_VecNt theBoxCMin,
const BVH_VecNt theBoxCMax,
T &  theTimeEnter,
T &  theTimeLeave 
)
inlinestatic

Computes hit time of ray-box intersection.

◆ RayBoxIntersection() [3/4]

template<class T, int N>
static Standard_Boolean BVH_Tools< T, N >::RayBoxIntersection ( const BVH_VecNt theRayOrigin,
const BVH_VecNt theRayDirection,
const BVH_Box< T, N > &  theBox,
T &  theTimeEnter,
T &  theTimeLeave 
)
inlinestatic

Computes hit time of ray-box intersection.

◆ RayBoxIntersection() [4/4]

template<class T, int N>
static Standard_Boolean BVH_Tools< T, N >::RayBoxIntersection ( const BVH_VecNt theRayOrigin,
const BVH_VecNt theRayDirection,
const BVH_VecNt theBoxCMin,
const BVH_VecNt theBoxCMax,
T &  theTimeEnter,
T &  theTimeLeave 
)
inlinestatic

Computes hit time of ray-box intersection.


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