CustusX  2020.11.07-dev+develop.4ce4a
An IGT application
cx::DoubleBoundingBox3D Class Reference

Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk. More...

#include <cxBoundingBox3D.h>

Inheritance diagram for cx::DoubleBoundingBox3D:

Public Member Functions

 DoubleBoundingBox3D ()
 
 DoubleBoundingBox3D (double x0, double x1, double y0, double y1, double z0=0.0, double z1=0.0)
 
 DoubleBoundingBox3D (const Vector3D &a, const Vector3D &b)
 
 DoubleBoundingBox3D (const double *data)
 
 DoubleBoundingBox3D (const IntBoundingBox3D &bb)
 
 DoubleBoundingBox3D (const int *data)
 
Vector3D bottomLeft () const
 
Vector3D topRight () const
 
Vector3D center () const
 
Vector3D range () const
 
Vector3D corner (int x, int y, int z) const
 
bool contains (const Vector3D &p) const
 
DoubleBoundingBox3D unionWith (const DoubleBoundingBox3D &other) const
 

Static Public Member Functions

static DoubleBoundingBox3D fromViewport (const double *data)
 
static DoubleBoundingBox3D fromCloud (std::vector< Vector3D > cloud)
 
static DoubleBoundingBox3D fromString (const QString &text)
 construct a bb from a string containing 6 whitespace-separated numbers More...
 
static DoubleBoundingBox3D zero ()
 

Detailed Description

Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.

Definition at line 63 of file cxBoundingBox3D.h.

Constructor & Destructor Documentation

cx::DoubleBoundingBox3D::DoubleBoundingBox3D ( )

Definition at line 133 of file cxBoundingBox3D.cpp.

cx::DoubleBoundingBox3D::DoubleBoundingBox3D ( double  x0,
double  x1,
double  y0,
double  y1,
double  z0 = 0.0,
double  z1 = 0.0 
)
explicit

Definition at line 136 of file cxBoundingBox3D.cpp.

cx::DoubleBoundingBox3D::DoubleBoundingBox3D ( const Vector3D a,
const Vector3D b 
)
explicit

Create a bounding box describing the volume spanned by the two points a and b.

Definition at line 147 of file cxBoundingBox3D.cpp.

cx::DoubleBoundingBox3D::DoubleBoundingBox3D ( const double *  data)
explicit

Definition at line 163 of file cxBoundingBox3D.cpp.

cx::DoubleBoundingBox3D::DoubleBoundingBox3D ( const IntBoundingBox3D bb)
explicit

Definition at line 171 of file cxBoundingBox3D.cpp.

cx::DoubleBoundingBox3D::DoubleBoundingBox3D ( const int *  data)
explicit

Definition at line 167 of file cxBoundingBox3D.cpp.

Member Function Documentation

Vector3D cx::DoubleBoundingBox3D::bottomLeft ( ) const

Definition at line 188 of file cxBoundingBox3D.cpp.

Vector3D cx::DoubleBoundingBox3D::center ( ) const

Definition at line 196 of file cxBoundingBox3D.cpp.

bool cx::DoubleBoundingBox3D::contains ( const Vector3D p) const

return true if p is inside or on the edge of the bounding box

Definition at line 220 of file cxBoundingBox3D.cpp.

Vector3D cx::DoubleBoundingBox3D::corner ( int  x,
int  y,
int  z 
) const

Return the coordinate value of a given corner. Insert 0 or 1 for each of the 3 axis in order to get start or stop corner along that axis.

Definition at line 208 of file cxBoundingBox3D.cpp.

DoubleBoundingBox3D cx::DoubleBoundingBox3D::fromCloud ( std::vector< Vector3D cloud)
static

Definition at line 239 of file cxBoundingBox3D.cpp.

DoubleBoundingBox3D cx::DoubleBoundingBox3D::fromString ( const QString &  text)
static

construct a bb from a string containing 6 whitespace-separated numbers

Definition at line 258 of file cxBoundingBox3D.cpp.

DoubleBoundingBox3D cx::DoubleBoundingBox3D::fromViewport ( const double *  data)
static

Create a bounding box based the following input: (xmin,ymin,xmax,ymax)

Definition at line 182 of file cxBoundingBox3D.cpp.

Vector3D cx::DoubleBoundingBox3D::range ( ) const

Definition at line 200 of file cxBoundingBox3D.cpp.

Vector3D cx::DoubleBoundingBox3D::topRight ( ) const

Definition at line 192 of file cxBoundingBox3D.cpp.

DoubleBoundingBox3D cx::DoubleBoundingBox3D::unionWith ( const DoubleBoundingBox3D other) const

Definition at line 266 of file cxBoundingBox3D.cpp.

static DoubleBoundingBox3D cx::DoubleBoundingBox3D::zero ( )
inlinestatic

Definition at line 75 of file cxBoundingBox3D.h.


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