33 #ifndef CXBOUNDINGBOX3D_H_
34 #define CXBOUNDINGBOX3D_H_
36 #include "cxResourceExport.h"
39 #include "boost/array.hpp"
63 explicit IntBoundingBox3D(
int x0,
int x1,
int y0,
int y1,
int z0 = 0,
int z1 = 0);
65 explicit IntBoundingBox3D(
const Eigen::Vector3i& a,
const Eigen::Vector3i& b);
69 Eigen::Vector3i bottomLeft()
const;
70 Eigen::Vector3i topRight()
const;
71 Eigen::Vector3i center()
const;
72 Eigen::Vector3i range()
const;
73 Eigen::Vector3i corner(
int x,
int y,
int z)
const;
74 bool contains(
const Eigen::Vector3i& p)
const;
88 explicit DoubleBoundingBox3D(
double x0,
double x1,
double y0,
double y1,
double z0 = 0.0,
double z1 = 0.0);
102 Vector3D corner(
int x,
int y,
int z)
const;
103 bool contains(
const Vector3D& p)
const;
108 cxResource_EXPORT
bool similar(
const DoubleBoundingBox3D& a,
const DoubleBoundingBox3D& b,
double tol = 1.0E-6);
110 cxResource_EXPORT std::ostream&
operator<<(std::ostream& s,
const DoubleBoundingBox3D& data);
Eigen::Vector2d fromString(const QString &text)
bool similar(const DoubleBoundingBox3D &a, const DoubleBoundingBox3D &b, double tol)
static DoubleBoundingBox3D zero()
Representation of an integer bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
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.
std::ostream & operator<<(std::ostream &s, const IntBoundingBox3D &data)
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.