g2o
opengl_primitives.h
Go to the documentation of this file.
1 // g2o - General Graph Optimization
2 // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
3 //
4 // This file is part of g2o.
5 //
6 // g2o is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // g2o is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with g2o. If not, see <http://www.gnu.org/licenses/>.
18 
19 #ifndef G2O_OPENGL_PRIMITIVES_H
20 #define G2O_OPENGL_PRIMITIVES_H
21 
23 // @{
24 
29 #include "opengl_wrapper.h"
30 
31 #include "g2o/config.h"
32 
33 #ifdef _MSC_VER
34 # ifdef G2O_SHARED_LIBS
35 # ifdef opengl_helper_EXPORTS
36 # define G2O_OPENGL_API __declspec(dllexport)
37 # else
38 # define G2O_OPENGL_API __declspec(dllimport)
39 # endif
40 # else
41 # define G2O_OPENGL_API
42 # endif
43 #else
44 # define G2O_OPENGL_API
45 #endif
46 
47 namespace g2o {
48 namespace opengl {
49 
56 void G2O_OPENGL_API drawBox(GLfloat l, GLfloat w, GLfloat h);
57 
63 void G2O_OPENGL_API drawPlane(GLfloat l, GLfloat w);
64 
69 void G2O_OPENGL_API drawSphere(GLfloat radius);
70 
77 void G2O_OPENGL_API drawEllipsoid(GLfloat r1, GLfloat r2, GLfloat r3);
78 
82 void G2O_OPENGL_API drawCone(GLfloat radius, GLfloat height);
83 
87 void G2O_OPENGL_API drawDisk(GLfloat radius);
88 
94 void G2O_OPENGL_API drawCylinder(GLfloat radius, GLfloat height);
95 
99 void G2O_OPENGL_API drawPyramid(GLfloat length, GLfloat height);
100 
107 void G2O_OPENGL_API drawRangeRing(GLfloat range, GLfloat fov, GLfloat range_width = 0.05);
108 
116 void G2O_OPENGL_API drawSlice(GLfloat radius, GLfloat height, GLfloat fov, int slices_per_circle = 32);
117 
122 
126 void G2O_OPENGL_API drawArrow2D(float len, float head_width, float head_len);
127 
131 void G2O_OPENGL_API drawPoint(float pointSize);
132 
133 
134 // @}
135 
136 #define POSE_VERTEX_COLOR 0.5f,0.5f,0.8f
137 #define POSE_PARAMETER_COLOR 0.5f,0.5f,0.8f
138 #define POSE_EDGE_COLOR 0.4f,0.4f,0.7f
139 #define POSE_EDGE_GHOST_COLOR 0.4f,0.4f,0.7f
140 
141 #define LANDMARK_VERTEX_COLOR 0.8f,0.5f,0.3f
142 #define LANDMARK_EDGE_COLOR 0.7f,0.4f,0.2f
143 #define LANDMARK_EDGE_GHOST_COLOR 0.7f,0.4f,0.2f
144 
145 
146 } // end namespace
147 } // end namespace
148 
149 #endif
void drawDisk(GLfloat radius)
void drawArrow2D(float len, float head_width, float head_len)
void drawEllipsoid(GLfloat r1, GLfloat r2, GLfloat r3)
void drawPlane(GLfloat l, GLfloat w)
void drawBox(GLfloat l, GLfloat w, GLfloat h)
void drawPoint(float pointSize)
void drawCone(GLfloat radius, GLfloat height)
void drawSphere(GLfloat radius)
void drawSlice(GLfloat radius, GLfloat height, GLfloat fov, int slices_per_circle)
void drawRangeRing(GLfloat range, GLfloat fov, GLfloat range_width)
void drawCylinder(GLfloat radius, GLfloat height)
#define G2O_OPENGL_API
void drawPyramid(GLfloat length, GLfloat height)