Image Component Library (ICL)
PlotWidget3D.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLGeom/src/ICLGeom/PlotWidget3D.h **
10 ** Module : ICLGeom **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLQt/DrawWidget3D.h>
35 #include <ICLGeom/Scene.h>
36 #include <ICLUtils/Function.h>
37 
38 
39 namespace icl{
40  namespace geom{
41 
43  struct Data;
44  Data *m_data;
45 
46  public:
47 
48  typedef SceneObject* Handle;
49 
50  PlotWidget3D(QWidget *parent=0);
51  ~PlotWidget3D();
52 
53  void setViewPort(const utils::Range32f &xrange,
54  const utils::Range32f &yrange,
55  const utils::Range32f &zrange);
56 
57  const utils::Range32f *getViewPort() const;
58 
59  Scene &getScene();
60  const Scene &getScene() const;
61 
62  SceneObject *getRootObject();
63  const SceneObject *getRootObject() const;
64 
65  const Camera &getCamera() const;
66  void setCamera(const Camera &cam);
67 
68  void add(SceneObject *obj, bool passOwnerShip=true);
69  void remove(Handle h);
70 
71  void color(int r, int g, int b, int a);
72  void nocolor();
73  void fill(int r, int g, int b, int a);
74  void nofill();
75  void smoothfill(bool on);
76  void pointsize(float size);
77  void linewidth(float width);
78  void lock();
79  void unlock();
80  void clear();
81 
82  Handle scatter(const std::vector<Vec> &points);
83 
84  Handle scatter(const std::vector<Vec> &points,
85  const std::vector<GeomColor> &colors,
86  const utils::Range32f &colorRange=utils::Range32f(0,255));
87 
88  Handle linestrip(const std::vector<Vec> &points);
89 
90  Handle surf(const std::vector<Vec> &points, int nx, int ny);
91 
93  const utils::Range32f &rx=utils::Range32f(0,0),
94  const utils::Range32f &ry=utils::Range32f(0,0),
95  int nx=100, int ny=100, Handle reuseObj=0);
96 
97  Handle label(const Vec &p, const std::string &text);
98  };
99  }
100 }
The General Function Template.
Definition: Function.h:284
undocument this line if you encounter any issues!
Definition: Any.h:37
#define ICLGeom_API
Definition: CompatMacros.h:179
Definition: PlotWidget3D.h:42
ICLQt_API void text(ImgQ &image, int x, int y, const string &text)
renders a text into an image (only available with Qt-Support)
Camera class.
Definition: Camera.h:132
SceneObject * Handle
Definition: PlotWidget3D.h:48
ICLQt_API void linestrip(ImgQ &image, const std::vector< utils::Point > &pts, bool closeLoop=true)
draws a strip of connected lines
ICLQt_API ImgQ label(const ImgQ &image, const string &text)
labels an image in the upper left corner (only available with Qt-Support)
ICLQt_API void fill(float r, float g=-1, float b=-1, float alpha=255)
sets the current fill color to given r,g,b,alpha value
Data * m_data
Definition: PlotWidget3D.h:43
Scene Implementation that is used to handle a list of objects and cameras.
Definition: Scene.h:138
Extended ICLDrawWidget, able to draw 2D and 3D primitives using OpenGL.
Definition: DrawWidget3D.h:51
ICLQt_API void color(float r, float g=-1, float b=-1, float alpha=255)
sets the current color to given r,g,b,alpha value
The SceneObject class defines visible objects in scenes or scene graph nodes.
Definition: SceneObject.h:140