Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

VPBoundingBox Class Reference

Axis aligned bounding box. More...

#include <vpboundingbox.h>

List of all members.

Public Member Functions

 VPBoundingBox ()
 Creates an uninitialized bounding box.
 VPBoundingBox (double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
 VPBoundingBox (const VPBoundingBox &box)
VPBoundingBoxoperator= (const VPBoundingBox &box)
void ProcessCenter ()
double GetGreaterX () const
double GetGreaterY () const
double GetGreaterZ () const
double GetGreaterEdge () const
 Returns the length of the greater edge.
void SetGreaterX (double v)
void SetGreaterY (double v)
void SetGreaterZ (double v)
double GetSmallerX () const
double GetSmallerY () const
double GetSmallerZ () const
void SetSmallerX (double v)
void SetSmallerY (double v)
void SetSmallerZ (double v)
void SetBoundingBox (double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
const VPPoint4DGetCenter () const
void ConditionalUpdate (double x, double y, double z)
 Updates the bounding box if any given coordinate is outside it.
void ConditionalUpdate (const VPPoint4D &point)
 Updates the bounding box if any given coordinate is outside it.
void MergeWith (const VPBoundingBox &box)
 Merges a bounding with another, expanding it.

Friends

std::ostream & operator<< (std::ostream &output, const VPBoundingBox &box)
 Output operator.


Detailed Description

Axis aligned bounding box.

FixMe: A detailed class description is needed here.

Definition at line 17 of file vpboundingbox.h.


Constructor & Destructor Documentation

VPBoundingBox::VPBoundingBox  ) 
 

Creates an uninitialized bounding box.

Definition at line 24 of file vpboundingbox.cpp.

VPBoundingBox::VPBoundingBox double  minX,
double  minY,
double  minZ,
double  maxX,
double  maxY,
double  maxZ
 

Definition at line 27 of file vpboundingbox.cpp.

References ProcessCenter().

VPBoundingBox::VPBoundingBox const VPBoundingBox box  ) 
 

Definition at line 38 of file vpboundingbox.cpp.

References center, greaterX, greaterY, greaterZ, smallerX, smallerY, and smallerZ.


Member Function Documentation

void VPBoundingBox::ConditionalUpdate const VPPoint4D point  ) 
 

Updates the bounding box if any given coordinate is outside it.

Definition at line 146 of file vpboundingbox.cpp.

References ConditionalUpdate(), VPPoint4D::GetX(), VPPoint4D::GetY(), and VPPoint4D::GetZ().

void VPBoundingBox::ConditionalUpdate double  x,
double  y,
double  z
 

Updates the bounding box if any given coordinate is outside it.

Definition at line 128 of file vpboundingbox.cpp.

Referenced by VPMeshObject::ComputeBoundingBox(), ConditionalUpdate(), and MergeWith().

const VPPoint4D & VPBoundingBox::GetCenter  )  const
 

Definition at line 124 of file vpboundingbox.cpp.

Referenced by VPScene::MakeCameraViewAll().

double VPBoundingBox::GetGreaterEdge  )  const
 

Returns the length of the greater edge.

Definition at line 155 of file vpboundingbox.cpp.

double VPBoundingBox::GetGreaterX  )  const
 

Definition at line 65 of file vpboundingbox.cpp.

Referenced by VPScene::MakeCameraViewAll().

double VPBoundingBox::GetGreaterY  )  const
 

Definition at line 69 of file vpboundingbox.cpp.

Referenced by VPScene::MakeCameraViewAll().

double VPBoundingBox::GetGreaterZ  )  const
 

Definition at line 73 of file vpboundingbox.cpp.

Referenced by VPScene::MakeCameraViewAll().

double VPBoundingBox::GetSmallerX  )  const
 

Definition at line 89 of file vpboundingbox.cpp.

Referenced by VPScene::MakeCameraViewAll().

double VPBoundingBox::GetSmallerY  )  const
 

Definition at line 93 of file vpboundingbox.cpp.

Referenced by VPScene::MakeCameraViewAll().

double VPBoundingBox::GetSmallerZ  )  const
 

Definition at line 97 of file vpboundingbox.cpp.

Referenced by VPScene::MakeCameraViewAll().

void VPBoundingBox::MergeWith const VPBoundingBox box  ) 
 

Merges a bounding with another, expanding it.

Definition at line 150 of file vpboundingbox.cpp.

References ConditionalUpdate(), greaterX, greaterY, greaterZ, smallerX, smallerY, and smallerZ.

Referenced by VPScene::ComputeBoundingBox(), and VPGraphicObj::ComputeRecursiveBoundingBox().

VPBoundingBox & VPBoundingBox::operator= const VPBoundingBox box  ) 
 

Definition at line 48 of file vpboundingbox.cpp.

References center, greaterX, greaterY, greaterZ, smallerX, smallerY, and smallerZ.

void VPBoundingBox::ProcessCenter  ) 
 

Definition at line 59 of file vpboundingbox.cpp.

References VPPoint4D::SetXYZW().

Referenced by VPScene::MakeCameraViewAll(), SetBoundingBox(), and VPBoundingBox().

void VPBoundingBox::SetBoundingBox double  minX,
double  minY,
double  minZ,
double  maxX,
double  maxY,
double  maxZ
 

Definition at line 113 of file vpboundingbox.cpp.

References ProcessCenter().

Referenced by VPMeshObject::ComputeBoundingBox(), and VPCylinder::ComputeBoundingBox().

void VPBoundingBox::SetGreaterX double  v  ) 
 

Definition at line 77 of file vpboundingbox.cpp.

Referenced by VPSphere::ComputeBoundingBox().

void VPBoundingBox::SetGreaterY double  v  ) 
 

Definition at line 81 of file vpboundingbox.cpp.

Referenced by VPSphere::ComputeBoundingBox().

void VPBoundingBox::SetGreaterZ double  v  ) 
 

Definition at line 85 of file vpboundingbox.cpp.

Referenced by VPSphere::ComputeBoundingBox().

void VPBoundingBox::SetSmallerX double  v  ) 
 

Definition at line 101 of file vpboundingbox.cpp.

Referenced by VPSphere::ComputeBoundingBox().

void VPBoundingBox::SetSmallerY double  v  ) 
 

Definition at line 105 of file vpboundingbox.cpp.

Referenced by VPSphere::ComputeBoundingBox().

void VPBoundingBox::SetSmallerZ double  v  ) 
 

Definition at line 109 of file vpboundingbox.cpp.

Referenced by VPSphere::ComputeBoundingBox().


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  output,
const VPBoundingBox box
[friend]
 

Output operator.


The documentation for this class was generated from the following files:
Generated on Tue Sep 6 10:00:12 2005 for VPAT by  doxygen 1.4.4