OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

boundBox Class Reference

A bounding box defined in terms of the points at its extremities. More...

Inheritance diagram for boundBox:
Collaboration diagram for boundBox:

List of all members.


Public Member Functions

 boundBox ()
 Construct null, setting points to zero.
 boundBox (const point &min, const point &max)
 Construct from components.
 boundBox (const pointField &, const bool doReduce=true)
 Construct as the bounding box of the given pointField.
 boundBox (const tmp< pointField > &, const bool doReduce=true)
 Construct as the bounding box of the given temporary pointField.
 boundBox (Istream &)
 Construct from Istream.
const pointmin () const
 Minimum describing the bounding box.
const pointmax () const
 Maximum describing the bounding box.
pointmin ()
 Minimum describing the bounding box, non-const access.
pointmax ()
 Maximum describing the bounding box, non-const access.
point midpoint () const
 The midpoint of the bounding box.
vector span () const
 The bounding box span (from minimum to maximum).
scalar mag () const
 The magnitude of the bounding box span.
scalar minDim () const
 Smallest length/height/width dimension.
scalar maxDim () const
 Largest length/height/width dimension.
scalar avgDim () const
 Average length/height/width dimension.
bool overlaps (const boundBox &bb) const
 Overlaps/touches boundingBox?
bool contains (const point &pt) const
 Contains point? (inside or on edge).
bool containsInside (const point &pt) const
 Contains point? (inside only).

Static Public Attributes

static const scalar great
 The great value used for greatBox and invertedBox.
static const boundBox greatBox
 A very large boundBox: min/max == -/+ VGREAT.
static const boundBox invertedBox
 A very large inverted boundBox: min/max == +/- VGREAT.

Friends

bool operator== (const boundBox &a, const boundBox &b)
bool operator!= (const boundBox &a, const boundBox &b)
Istreamoperator>> (Istream &is, boundBox &)
Ostreamoperator<< (Ostream &os, const boundBox &)

Detailed Description

A bounding box defined in terms of the points at its extremities.

Definition at line 46 of file boundBox.H.


Constructor & Destructor Documentation

boundBox (  )  [inline]

Construct null, setting points to zero.

Definition at line 78 of file boundBox.H.

boundBox ( const point min,
const point max 
) [inline]

Construct from components.

Definition at line 85 of file boundBox.H.

boundBox ( const pointField points,
const bool  doReduce = true 
)

Construct as the bounding box of the given pointField.

Does parallel communication (doReduce = true)

Definition at line 79 of file boundBox.C.

References Foam::reduce().

Here is the call graph for this function:

boundBox ( const tmp< pointField > &  points,
const bool  doReduce = true 
)

Construct as the bounding box of the given temporary pointField.

Does parallel communication (doReduce = true)

Definition at line 88 of file boundBox.C.

boundBox ( Istream is  ) 

Construct from Istream.

Definition at line 98 of file boundBox.C.

References tmp< T >::clear(), and points.

Here is the call graph for this function:


Member Function Documentation

point& min (  )  [inline]

Minimum describing the bounding box, non-const access.

Definition at line 124 of file boundBox.H.

point& max (  )  [inline]

Maximum describing the bounding box, non-const access.

Definition at line 130 of file boundBox.H.

point midpoint (  )  const [inline]

The midpoint of the bounding box.

Definition at line 136 of file boundBox.H.

Referenced by searchableBox::findNearestOnEdge(), treeBoundBox::subBbox(), and treeBoundBox::subOctant().

Here is the caller graph for this function:

vector span (  )  const [inline]

The bounding box span (from minimum to maximum).

Definition at line 142 of file boundBox.H.

scalar mag (  )  const [inline]

The magnitude of the bounding box span.

Definition at line 148 of file boundBox.H.

scalar minDim (  )  const [inline]

Smallest length/height/width dimension.

Definition at line 154 of file boundBox.H.

scalar maxDim (  )  const [inline]

Largest length/height/width dimension.

Definition at line 160 of file boundBox.H.

scalar avgDim (  )  const [inline]

Average length/height/width dimension.

Definition at line 166 of file boundBox.H.

Referenced by treeBoundBox::corner(), and boundaryMesh::getNearest().

Here is the caller graph for this function:

bool overlaps ( const boundBox bb  )  const [inline]

Overlaps/touches boundingBox?

Definition at line 175 of file boundBox.H.

bool contains ( const point pt  )  const [inline]

Contains point? (inside or on edge).

Reimplemented in treeBoundBox.

Definition at line 186 of file boundBox.H.

bool containsInside ( const point pt  )  const [inline]

Contains point? (inside only).

Definition at line 197 of file boundBox.H.


Friends And Related Function Documentation

bool operator== ( const boundBox a,
const boundBox b 
) [friend]

Definition at line 210 of file boundBox.H.

bool operator!= ( const boundBox a,
const boundBox b 
) [friend]

Definition at line 215 of file boundBox.H.

Istream& operator>> ( Istream is,
boundBox  
) [friend]

Ostream& operator<< ( Ostream os,
const boundBox  
) [friend]


Member Data Documentation

const Foam::scalar great [static]

The great value used for greatBox and invertedBox.

Reimplemented in treeBoundBox.

Definition at line 66 of file boundBox.H.

const Foam::boundBox greatBox [static]

A very large boundBox: min/max == -/+ VGREAT.

Reimplemented in treeBoundBox.

Definition at line 69 of file boundBox.H.

const Foam::boundBox invertedBox [static]

A very large inverted boundBox: min/max == +/- VGREAT.

Reimplemented in treeBoundBox.

Definition at line 72 of file boundBox.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd