20 #ifndef Tulip_BOUNDINGBOX_H 21 #define Tulip_BOUNDINGBOX_H 24 #include <tulip/Vector.h> 25 #include <tulip/tulipconf.h> 84 BoundingBox(
const tlp::Vec3f &min,
const tlp::Vec3f &max,
bool checkMinMax =
false);
94 return ((*
this)[0] + (*
this)[1]) / 2.f;
104 return ((*
this)[1][0] - (*
this)[0][0]);
114 return ((*
this)[1][1] - (*
this)[0][1]);
124 return ((*
this)[1][2] - (*
this)[0][2]);
134 void expand(
const tlp::Vec3f &coord);
151 void translate(
const tlp::Vec3f &vec);
159 void scale(
const tlp::Vec3f &factor);
167 bool isValid()
const;
175 bool contains(
const tlp::Vec3f &coord)
const;
200 bool intersect(
const Vec3f &segStart,
const Vec3f &segEnd)
const;
233 void getCompleteBB(Vec3f bb[8])
const;
237 #endif // Tulip_BOUNDINGBOX_H
float height() const
Returns the height of the bounding box An assertion is raised in debug mode if the bounding box is no...
float depth() const
Returns the depth of the bounding box An assertion is raised in debug mode if the bounding box is not...
float width() const
Returns the width of the bounding box An assertion is raised in debug mode if the BoundingBox is not ...
This class represents the 3D bounding box of an object. It is mostly used to determine whether or not...
Vec3f center() const
Returns the geometrical center of the bounding box. An assertion is raised in debug mode if the Bound...