00001 #ifndef OPENTISSUE_UTILITY_GL_GL_DRAW_POINT_H 00002 #define OPENTISSUE_UTILITY_GL_GL_DRAW_POINT_H 00003 // 00004 // OpenTissue Template Library 00005 // - A generic toolbox for physics-based modeling and simulation. 00006 // Copyright (C) 2008 Department of Computer Science, University of Copenhagen. 00007 // 00008 // OTTL is licensed under zlib: http://opensource.org/licenses/zlib-license.php 00009 // 00010 #include <OpenTissue/configuration.h> 00011 00012 #include <OpenTissue/utility/gl/gl.h> 00013 #include <OpenTissue/core/math/math_vector3.h> 00014 00015 namespace OpenTissue 00016 { 00017 00018 namespace gl 00019 { 00020 00025 template <typename vector3_type> 00026 inline void DrawPoint( vector3_type const & p , double const radius = 0.1) 00027 { 00028 typedef typename vector3_type::value_type value_type; 00029 GLUquadric * qobj = gluNewQuadric(); 00030 glPushMatrix(); 00031 glTranslatef( p(0), p(1), p(2) ); 00032 GLint slices = 8; 00033 GLint stacks = 8; 00034 gluSphere( qobj, radius, slices, stacks ); 00035 glPopMatrix(); 00036 gluDeleteQuadric( qobj ); 00037 } 00038 00039 } // namespace gl 00040 00041 } // namespace OpenTissue 00042 00043 //OPENTISSUE_UTILITY_GL_GL_DRAW_POINT_H 00044 #endif