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

INTERP_KERNEL.BoundingBox Class Reference

Class representing the bounding box of a number of points. More...

#include <BoundingBox.hxx>

Public Types

enum  BoxCoord {
  XMIN = 0, YMIN = 1, ZMIN = 2, XMAX = 3,
  YMAX = 4, ZMAX = 5
}
 

Enumeration representing the six coordinates that define the bounding box.

More...

Public Member Functions

 BoundingBox (const double **pts, const unsigned numPts)
 Constructor creating box from an array of the points corresponding to the vertices of the element.
 BoundingBox (const BoundingBox &box1, const BoundingBox &box2)
 Constructor creating box from union of two boxes, resulting in a box that encloses both of them.
 ~BoundingBox ()
 Destructor.
bool isDisjointWith (const BoundingBox &box) const
 Determines if the intersection with a given box is empty.
void setCoordinate (const BoxCoord coord, double value)
 Sets a coordinate of the box to a given value.
double getCoordinate (const BoxCoord coord) const
 Gets a coordinate of the box.
void updateWithPoint (const double *pt)
 Updates the bounding box to include a given point.
void dumpCoords () const
 Prints the coordinates of the box to std.cout.

Private Member Functions

bool isValid () const
 Checks if the box is valid, which it is if its minimum coordinates are smaller than its maximum coordinates in all directions.
 BoundingBox (const BoundingBox &box)
 disallow copying
BoundingBoxoperator= (const BoundingBox &box)
 disallow assignment

Private Attributes

double_coords
 Vector containing the coordinates of the box interlaced in the order XMIN, YMIN, ZMIN, XMAX, YMAX, ZMAX.

Detailed Description

Class representing the bounding box of a number of points.


Member Enumeration Documentation

Enumeration representing the six coordinates that define the bounding box.

Enumerator:
XMIN 
YMIN 
ZMIN 
XMAX 
YMAX 
ZMAX 

Constructor & Destructor Documentation

dn46 SALOME series6x631 MED Mandriva2010 MED_SRC src INTERP_KERNEL BoundingBox cxx INTERP_KERNEL.BoundingBox::BoundingBox ( const double **  pts,
const unsigned  numPts 
)

Constructor creating box from an array of the points corresponding to the vertices of the element.

Each point is represented by an array of three doubles.

Parameters:
ptsarray of points
numPtsnumber of vertices
INTERP_KERNEL.BoundingBox::BoundingBox ( const BoundingBox box1,
const BoundingBox box2 
)

Constructor creating box from union of two boxes, resulting in a box that encloses both of them.

Parameters:
box1the first box
box2the second box

References INTERP_KERNEL.BoundingBox._coords.

INTERP_KERNEL.BoundingBox::~BoundingBox ( )

Destructor.

References INTERP_KERNEL.BoundingBox._coords.

INTERP_KERNEL.BoundingBox.BoundingBox ( const BoundingBox box) [private]

disallow copying


Member Function Documentation

bool INTERP_KERNEL.BoundingBox::isDisjointWith ( const BoundingBox box) const

Determines if the intersection with a given box is empty.

Parameters:
boxBoundingBox with which intersection is tested
Returns:
true if intersection between boxes is empty, false if not

References INTERP_KERNEL.BoundingBox._coords, INTERP_KERNEL.BoundingBox.getCoordinate(), INTERP_KERNEL.BoundingBox.XMIN, and INTERP_KERNEL.BoundingBox.ZMIN.

void INTERP_KERNEL.BoundingBox::setCoordinate ( const BoxCoord  coord,
double  value 
)

Sets a coordinate of the box to a given value.

Parameters:
coordcoordinate to set
valuenew value for coordinate

References INTERP_KERNEL.BoundingBox._coords, and batchmode_medcorba_test.value.

double INTERP_KERNEL.BoundingBox::getCoordinate ( const BoxCoord  coord) const

Gets a coordinate of the box.

Parameters:
coordcoordinate to get
Returns:
value of coordinate

References INTERP_KERNEL.BoundingBox._coords.

void INTERP_KERNEL.BoundingBox::updateWithPoint ( const double pt)

Updates the bounding box to include a given point.

Parameters:
ptpoint to be included

References INTERP_KERNEL.BoundingBox._coords, INTERP_KERNEL.BoundingBox.XMIN, and INTERP_KERNEL.BoundingBox.ZMIN.

void INTERP_KERNEL.BoundingBox::dumpCoords ( ) const
bool INTERP_KERNEL.BoundingBox::isValid ( ) const [private]

Checks if the box is valid, which it is if its minimum coordinates are smaller than its maximum coordinates in all directions.

Returns:
true if the box is valid, false if not

References INTERP_KERNEL.BoundingBox._coords, INTERP_KERNEL.BoundingBox.XMIN, and INTERP_KERNEL.BoundingBox.ZMIN.

BoundingBox& INTERP_KERNEL.BoundingBox.operator= ( const BoundingBox box) [private]

disallow assignment


Field Documentation

Vector containing the coordinates of the box interlaced in the order XMIN, YMIN, ZMIN, XMAX, YMAX, ZMAX.

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