12 #ifndef CXBOUNDINGBOX3D_H_
13 #define CXBOUNDINGBOX3D_H_
15 #include "cxResourceExport.h"
18 #include "boost/array.hpp"
42 explicit IntBoundingBox3D(
int x0,
int x1,
int y0,
int y1,
int z0 = 0,
int z1 = 0);
44 explicit IntBoundingBox3D(
const Eigen::Vector3i& a,
const Eigen::Vector3i& b);
48 Eigen::Vector3i bottomLeft()
const;
49 Eigen::Vector3i topRight()
const;
50 Eigen::Vector3i center()
const;
51 Eigen::Vector3i range()
const;
52 Eigen::Vector3i corner(
int x,
int y,
int z)
const;
53 bool contains(
const Eigen::Vector3i& p)
const;
67 explicit DoubleBoundingBox3D(
double x0,
double x1,
double y0,
double y1,
double z0 = 0.0,
double z1 = 0.0);
81 Vector3D corner(
int x,
int y,
int z)
const;
82 bool contains(
const Vector3D& p)
const;
87 cxResource_EXPORT
bool similar(
const DoubleBoundingBox3D& a,
const DoubleBoundingBox3D& b,
double tol = 1.0E-6);
89 cxResource_EXPORT std::ostream&
operator<<(std::ostream& s,
const DoubleBoundingBox3D& data);
95 cxResource_EXPORT DoubleBoundingBox3D
intersection(DoubleBoundingBox3D a, DoubleBoundingBox3D b);