25 #ifndef COMMON_BOUNDINGBOX_H 26 #define COMMON_BOUNDINGBOX_H 28 #include "glm/mat4x4.hpp" 44 void getMin(
float &x,
float &y,
float &z)
const;
45 void getMax(
float &x,
float &y,
float &z)
const;
51 bool isIn(
float x,
float y )
const;
52 bool isIn(
float x,
float y,
float z)
const;
54 bool isIn(
float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
const;
56 void add(
float x,
float y,
float z);
59 void translate(
float x,
float y,
float z);
60 void scale (
float x,
float y,
float z);
62 void rotate(
float angle,
float x,
float y,
float z);
87 float x1,
float y1,
float z1,
88 float x2,
float y2,
float z2,
89 float &x,
float &y,
float &z)
const;
90 bool inBox(
float x,
float y,
float z,
float minX,
float minY,
float minZ,
91 float maxX,
float maxY,
float maxZ,
int axis)
const;
96 #endif // COMMON_BOUNDINGBOX_H bool isIn(float x, float y) const
float getDepth() const
Get the depth of the bounding box.
void scale(float x, float y, float z)
A bounding box around 3D points.
const glm::mat4 & getOrigin() const
float getHeight() const
Get the height of the bounding box.
void getMin(float &x, float &y, float &z) const
float getCoordMin(int i) const
void getMax(float &x, float &y, float &z) const
float getWidth() const
Get the width of the bounding box.
void transform(const glm::mat4 &m)
float getCoordMax(int i) const
void absolutize()
Apply the origin transformations directly to the coordinates.
void rotate(float angle, float x, float y, float z)
bool inBox(float x, float y, float z, float minX, float minY, float minZ, float maxX, float maxY, float maxZ, int axis) const
void add(float x, float y, float z)
BoundingBox getAbsolute() const
Return a copy with the origin transformations directly applied to the coordinates.
bool getIntersection(float fDst1, float fDst2, float x1, float y1, float z1, float x2, float y2, float z2, float &x, float &y, float &z) const
void translate(float x, float y, float z)