Version: 6.3.1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

INTERP_KERNEL.DirectedBoundingBox Class Reference

Class representing the bounding box of a number of points with box axes parallel to principal axes of inertia of points. More...

#include <DirectedBoundingBox.hxx>

Public Member Functions

 DirectedBoundingBox ()
 Creates empty box intended to further initalization via setData()
 DirectedBoundingBox (const double *pts, const unsigned numPts, const unsigned dim)
 Creates bounding box of a mesh.
 DirectedBoundingBox (const double **pts, const unsigned numPts, const unsigned dim)
 Creates bounding box of an element.
void enlarge (const double tol)
 Enlarge box size by given value.
bool isDisjointWith (const DirectedBoundingBox &box) const
 Test if this box intersects with the other.
bool isDisjointWith (const double *box) const
 Test if this box intersects with an non-directed box.
bool isOut (const double *point) const
 Return true if given point is out of this box.
std::vector< doublegetData () const
 Return array of internal data.
void setData (const double *data)
 Initializes self with data retrieved via getData()

Static Public Member Functions

static int dataSize (int dim)
 Return size of internal data returned by getData() depending on space dim.

Private Member Functions

void addPointToBox (const double *coord)
 Update box extremities.
void toLocalCS (const double *p, double *pLoc) const
 Compute eigenvectors of inertia tensor.
void fromLocalCS (const double *p, double *pGlob) const
 Convert point coordinates from local coordinate system of the box to global CS.
bool isLocalOut (const double *pLoc) const
 Test point in local CS against box extremities.
void getCorners (std::vector< double > &corners, const double *minmax) const
 Return coordinates of corners of bounding box.

Private Attributes

unsigned _dim
std::vector< double_axes
 principal axes of inertia in full interlace
std::vector< double_minmax
 pairs of min an max coordinates along the axes

Detailed Description

Class representing the bounding box of a number of points with box axes parallel to principal axes of inertia of points.


Constructor & Destructor Documentation

INTERP_KERNEL.DirectedBoundingBox::DirectedBoundingBox ( )

Creates empty box intended to further initalization via setData()

INTERP_KERNEL.DirectedBoundingBox::DirectedBoundingBox ( const double pts,
const unsigned  numPts,
const unsigned  dim 
)

Creates bounding box of a mesh.

Parameters:
pts- coordinates of points in full interlace
numPts- number of points in the mesh
dim- space dimension

References __DMP, __MYID, INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, INTERP_KERNEL.DirectedBoundingBox._minmax, and INTERP_KERNEL.DirectedBoundingBox.addPointToBox().

INTERP_KERNEL.DirectedBoundingBox::DirectedBoundingBox ( const double **  pts,
const unsigned  numPts,
const unsigned  dim 
)

Creates bounding box of an element.

Parameters:
pts- coordinates of points of element
numPts- number of points in the element
dim- space dimension

References __DMP, __MYID, INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, INTERP_KERNEL.DirectedBoundingBox._minmax, and INTERP_KERNEL.DirectedBoundingBox.addPointToBox().


Member Function Documentation

void INTERP_KERNEL.DirectedBoundingBox::enlarge ( const double  tol)

Enlarge box size by given value.

References __MAX, __MIN, and INTERP_KERNEL.DirectedBoundingBox._dim.

bool INTERP_KERNEL.DirectedBoundingBox::isDisjointWith ( const DirectedBoundingBox box) const
bool INTERP_KERNEL.DirectedBoundingBox::isDisjointWith ( const double box) const

Test if this box intersects with an non-directed box.

Return values:
bool- true if there is no intersection

< empty box with CS == this->_axes

< initailized _minmax

References INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, INTERP_KERNEL.DirectedBoundingBox._minmax, INTERP_KERNEL.DirectedBoundingBox.addPointToBox(), INTERP_KERNEL.DirectedBoundingBox.fromLocalCS(), and INTERP_KERNEL.DirectedBoundingBox.getCorners().

bool INTERP_KERNEL.DirectedBoundingBox::isOut ( const double point) const
vector< double > INTERP_KERNEL.DirectedBoundingBox::getData ( ) const
void INTERP_KERNEL.DirectedBoundingBox::setData ( const double data)
int INTERP_KERNEL.DirectedBoundingBox::dataSize ( int  dim) [static]

Return size of internal data returned by getData() depending on space dim.

void INTERP_KERNEL.DirectedBoundingBox::addPointToBox ( const double coord) [private]
void INTERP_KERNEL.DirectedBoundingBox::toLocalCS ( const double p,
double pLoc 
) const [private]

Compute eigenvectors of inertia tensor.

Compute eigenvectors of inertia tensor

Convert point coordinates into local coordinate system of the box

References __AXIS, and INTERP_KERNEL.DirectedBoundingBox._dim.

void INTERP_KERNEL.DirectedBoundingBox::fromLocalCS ( const double p,
double pGlob 
) const [private]

Convert point coordinates from local coordinate system of the box to global CS.

References __AXIS, and INTERP_KERNEL.DirectedBoundingBox._dim.

bool INTERP_KERNEL.DirectedBoundingBox::isLocalOut ( const double pLoc) const [private]

Test point in local CS against box extremities.

References INTERP_KERNEL.DirectedBoundingBox._dim, and INTERP_KERNEL.DirectedBoundingBox._minmax.

void INTERP_KERNEL.DirectedBoundingBox::getCorners ( std::vector< double > &  corners,
const double minmax 
) const [private]

Return coordinates of corners of bounding box.

References INTERP_KERNEL.DirectedBoundingBox._dim.


Field Documentation

principal axes of inertia in full interlace

pairs of min an max coordinates along the axes

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS