INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
glutil.h00001 #if 0 00002 /* 00003 * Orca-Robotics Project: Components for robotics 00004 * http://orca-robotics.sf.net/ 00005 * Copyright (c) 2004-2009 Alex Brooks 00006 * 00007 * This copy of Orca is licensed to you under the terms described in 00008 * the LICENSE file included in this distribution. 00009 * 00010 */ 00011 00012 #ifndef ORCAGUI3D_GLUTIL_H 00013 #define ORCAGUI3D_GLUTIL_H 00014 00015 #include <GL/gl.h> 00016 #include <string> 00017 00018 namespace orcaqgui3d { 00019 00020 namespace glutil { 00021 00022 void transform( float x, 00023 float y, 00024 float z, 00025 float roll, 00026 float pitch, 00027 float yaw ); 00028 00029 // Draws a box centred on the origin. 00030 // Draws the surfaces in the current colour 00031 void drawBox( float d, float w, float h, bool drawSurfaces, bool drawWireFrame ); 00032 00033 void drawIcosahedron(); 00034 00035 // Makes a little grayscale checkerboard. 00036 void makeCheckImage64x64x3( GLubyte img[64][64][3], 00037 int numSquaresPerEdge, 00038 int lowVal=0, 00039 int highVal=255 ); 00040 00041 std::string errorToString( GLenum error ); 00042 00043 // Throws an exception if there's an error condition 00044 void checkGLError(); 00045 00046 // 00047 // Calls glPushMatrix() in the constructor, and glPopMatrix() in the destructor. 00048 // 00049 class ScopedMatrixSave 00050 { 00051 public: 00052 00053 ScopedMatrixSave(); 00054 ~ScopedMatrixSave(); 00055 }; 00056 00058 void paintCovarianceEllipse( float pxx, float pxy, float pyy ); 00059 00061 void drawEllipse( float radiusX, float radiusY, int numPts=25 ); 00062 00064 void drawCyclinder( float height, float radiusX, float radiusY, int numFacets=25 ); 00065 00066 } // namespace 00067 } // namespace 00068 00069 #endif 00070 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)