#ifndef STIM_GL_AABB #define STIM_GL_AABB #include "aabb.h" #include "GL/gl.h" namespace stim{ template class gl_aabb : public aabb{ public: //default constructor gl_aabb() : stim::aabb(){} //constructor takes an AABB gl_aabb(stim::aabb b) : stim::aabb(b){} /// Specifies vertices of the bounding box using CW winding. Use GL_LINE_LOOP for wireframe or GL_QUADS for a solid. void glPointsCW(){ //front plane (in A[2]) glVertex3f(A[0], A[1], A[2]); glVertex3f(A[0], B[1], A[2]); glVertex3f(B[0], B[1], A[2]); glVertex3f(B[0], A[1], A[2]); //back plane (in B[2]) glVertex3f(B[0], B[1], B[2]); glVertex3f(A[0], B[1], B[2]); glVertex3f(A[0], A[1], B[2]); glVertex3f(B[0], A[1], B[2]); } }; //end stim::gl_aabb }; //end namespace stim #endif