2 #ifndef vgl_orient_box_3d_h 3 #define vgl_orient_box_3d_h 22 #include <vnl/vnl_quaternion.h> 24 # include <vcl_msvc_warnings.h> 35 :
box_(
box),
orient_(vnl_quaternion<double>(vnl_vector_fixed<double,3>(0.0,0.0,1.0), 0.0)) {}
57 std::vector<vgl_point_3d<Type> >
corners()
const;
65 bool contains(Type
const& x, Type
const& y, Type
const& z)
const;
70 std::ostream&
print(std::ostream& s)
const;
72 std::istream&
read(std::istream& s);
92 #define VGL_ORIENT_BOX_3D_INSTANTIATE(T) extern "Please #include <vgl/vgl_orient_box_3d.hxx> instead" 94 #endif // vgl_orient_box_3d_h vgl_orient_box_3d()=default
vgl_point_3d< Type > centroid()
bool contains(Type const &x, Type const &y, Type const &z) const
Return true if (x,y,z) is inside this box.
vgl_orient_box_3d(vgl_box_3d< Type > const &box, vnl_quaternion< double > const &orient)
constructor with box and the orientation.
vgl_box_3d< Type > box_
regular AABB(axis-aligned bounding box).
Contains class to represent a cartesian 3D bounding box.
Represents a cartesian 3D point.
std::ostream & operator<<(std::ostream &s, vgl_orient_box_3d< Type > const &p)
Write box to stream.
vgl_orient_box_3d(vgl_box_3d< Type > const &box)
constructor with only box definition, the direction will be set to (0,0,1) with no rotation.
virtual ~vgl_orient_box_3d(void)=default
std::vector< vgl_point_3d< Type > > corners() const
returns the 8 corner points of the box.
vnl_quaternion< double > orient_
orientation of the box as a quaternion.
a point in 3D nonhomogeneous space
std::istream & read(std::istream &s)
bool operator==(vgl_orient_box_3d< Type > const &obb) const
vgl_box_3d< Type > enclosing_box() const
The axis-aligned box that encloses the oriented box.
std::istream & operator>>(std::istream &is, vgl_orient_box_3d< Type > &p)
Read box from stream.
bool contains(vgl_point_3d< Type > const &p) const
Return true if point is inside this box.
std::ostream & print(std::ostream &s) const
Represents a cartesian 3D box.
vgl_box_3d< Type > const box()