*******************************************************************************/
#include <Moof/Aabb.hh>
+#include <Moof/Camera.hh>
namespace Mf {
max[0], min[1], max[2],
max[0], max[1], max[2]};
- GLubyte indicis[] = {0, 1, 2, 3,
+ GLubyte indices[] = {0, 1, 2, 3,
1, 2, 7, 4,
3, 0, 5, 6,
2, 3, 6, 7,
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_SCALAR, 0, vertices);
- glDrawElements(GL_QUADS, sizeof(indicis), GL_UNSIGNED_BYTE, indicis);
+ glDrawElements(GL_QUADS, sizeof(indices), GL_UNSIGNED_BYTE, indices);
+}
+
+bool Aabb::isVisible(const Camera& cam) const
+{
+ return cam.getFrustum().checkAabb(*this);
}