9 #ifndef __LeapUtilGL_h__ 10 #define __LeapUtilGL_h__ 12 #if !defined(__GL_H__) 16 #elif defined(__MACH__) 17 #include <OpenGL/gl.h> 39 void drawGrid(
ePlane plane,
unsigned int horizSubDivs,
unsigned int vertSubDivs );
64 GLVector4fv(
float _x,
float _y,
float _z,
float _w=1.0f ) :
x(_x),
y(_y),
z(_z),
w(_w) {}
67 operator const GLfloat*()
const {
return &
x; }
98 glPushAttrib( flags );
118 glMatrixMode( GL_PROJECTION );
124 glMatrixMode( GL_MODELVIEW );
128 void SetupGLProjection()
const;
130 void SetupGLView()
const;
135 #endif // __LeapUtilGL_h__ void drawCylinder(eStyle style, eAxis axis)
void drawSkeletonHand(const Leap::Hand &hand, const GLVector4fv &vBoneColor, const GLVector4fv &vJointColor)
utility for drawing a skeleton API hand as seen in diagnostic visualizer
GLVector4fv(const Leap::Vector &vRHS, float _w=1.0f)
void drawGrid(ePlane plane, unsigned int horizSubdivs, unsigned int vertSubdivs)
grid is drawn with unlit colored lines.
void drawSphere(eStyle style)
GLAttribScope(GLbitfield flags)
static void ResetGLView()
void drawBox(eStyle style)
utility class for caching and restoring GL attributes via the glPushAttrib/glPopAttrib calls...
GLVector4fv(float _x, float _y, float _z, float _w=1.0f)
void drawDisk(eStyle style, ePlane plane)
disk is double-side
void drawArrow(eAxis axis)
arrow is drawn with unlit colored lines.
static const GLVector4fv & One()
static void ResetGLProjection()
void drawQuad(eStyle style, ePlane plane)
quad is double-sided.
utility class for keeping the gl matrix stack push/pop operations paired up correctly.