g2o
Loading...
Searching...
No Matches
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 "g2o/config.h"
30#include "opengl_wrapper.h"
31
32#ifdef _MSC_VER
33#ifdef G2O_SHARED_LIBS
34#ifdef opengl_helper_EXPORTS
35#define G2O_OPENGL_API __declspec(dllexport)
36#else
37#define G2O_OPENGL_API __declspec(dllimport)
38#endif
39#else
40#define G2O_OPENGL_API
41#endif
42#else
43#define G2O_OPENGL_API
44#endif
45
46namespace g2o {
47namespace opengl {
48
55void G2O_OPENGL_API drawBox(GLfloat l, GLfloat w, GLfloat h);
56
62void G2O_OPENGL_API drawPlane(GLfloat l, GLfloat w);
63
68void G2O_OPENGL_API drawSphere(GLfloat radius);
69
77void G2O_OPENGL_API drawEllipsoid(GLfloat r1, GLfloat r2, GLfloat r3);
78
82void G2O_OPENGL_API drawCone(GLfloat radius, GLfloat height);
83
87void G2O_OPENGL_API drawDisk(GLfloat radius);
88
92void G2O_OPENGL_API drawCircle(GLfloat radius, int segments = 32);
93
99void G2O_OPENGL_API drawCylinder(GLfloat radius, GLfloat height);
100
104void G2O_OPENGL_API drawPyramid(GLfloat length, GLfloat height);
105
112void G2O_OPENGL_API drawRangeRing(GLfloat range, GLfloat fov,
113 GLfloat range_width = 0.05);
114
124void G2O_OPENGL_API drawSlice(GLfloat radius, GLfloat height, GLfloat fov,
125 int slices_per_circle = 32);
126
131
135void G2O_OPENGL_API drawArrow2D(float len, float head_width, float head_len);
136
140void G2O_OPENGL_API drawPoint(float pointSize);
141
142// @}
143
144#define POSE_VERTEX_COLOR 0.5f, 0.5f, 0.8f
145#define POSE_PARAMETER_COLOR 0.5f, 0.5f, 0.8f
146#define POSE_EDGE_COLOR 0.4f, 0.4f, 0.7f
147#define POSE_EDGE_GHOST_COLOR 0.4f, 0.4f, 0.7f
148
149#define LANDMARK_VERTEX_COLOR 0.8f, 0.5f, 0.3f
150#define LANDMARK_EDGE_COLOR 0.7f, 0.4f, 0.2f
151#define LANDMARK_EDGE_GHOST_COLOR 0.7f, 0.4f, 0.2f
152
153} // namespace opengl
154} // namespace g2o
155
156#endif
void drawCylinder(GLfloat radius, GLfloat height)
void drawSphere(GLfloat radius)
void drawSlice(GLfloat radius, GLfloat height, GLfloat fov, int slices_per_circle)
void drawPoint(float pointSize)
void drawCone(GLfloat radius, GLfloat height)
void drawPlane(GLfloat l, GLfloat w)
void drawDisk(GLfloat radius)
void drawBox(GLfloat l, GLfloat w, GLfloat h)
void drawCircle(GLfloat radius, int segments)
void drawRangeRing(GLfloat range, GLfloat fov, GLfloat range_width)
void drawArrow2D(float len, float head_width, float head_len)
void drawPyramid(GLfloat length, GLfloat height)
void drawEllipsoid(GLfloat r1, GLfloat r2, GLfloat r3)
#define G2O_OPENGL_API