2 #ifndef AL_BOUNDINGBOX_HPP
3 #define AL_BOUNDINGBOX_HPP
7 #include "al/graphics/al_Graphics.hpp"
8 #include "al/graphics/al_Mesh.hpp"
9 #include "al/graphics/al_Shapes.hpp"
10 #include "al/math/al_Vec.hpp"
23 void set(
const Vec3f &min_,
const Vec3f &max_);
25 void setCenterDim(
const Vec3f &cen_,
const Vec3f &dim_);
27 bool contains(
const Vec3d &p);
37 max = {std::numeric_limits<float>::lowest(),
38 std::numeric_limits<float>::lowest(),
39 std::numeric_limits<float>::lowest()};
44 inline void includePoint(
al::Vec3f &pos) {
47 }
else if (pos.x < min.x) {
52 }
else if (pos.y <
min.y) {
57 }
else if (pos.z <
min.z) {
66 Mesh mesh, tics, gridMesh[2];
75 void set(
const Mesh &mesh);
77 void set(
const Vec3f &min_,
const Vec3f &max_);
79 void setCenterDim(
const Vec3f &cen_,
const Vec3f &dim_);
83 void draw(
Graphics &g,
bool drawTics =
false);
Interface for loading fonts and rendering text.
Stores buffers related to rendering graphical objects.
T min(const T &v1, const T &v2, const T &v3)
T max(const T &v1, const T &v2, const T &v3)
void resetInv()
reset box to float value inverse extremes