Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
biasGLviewerGLUT.hh
1 #ifndef __GLUTGLVIEWERBASE_HH__
2 #define __GLUTGLVIEWERBASE_HH__
3 /*
4 This file is part of the BIAS library (Basic ImageAlgorithmS).
5 
6 Copyright (C) 2003-2009 (see file CONTACT for details)
7  Multimediale Systeme der Informationsverarbeitung
8  Institut fuer Informatik
9  Christian-Albrechts-Universitaet Kiel
10 
11 
12 BIAS is free software; you can redistribute it and/or modify
13 it under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
16 
17 BIAS is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU Lesser General Public License for more details.
21 
22 You should have received a copy of the GNU Lesser General Public License
23 along with BIAS; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */
26 
27 /**
28  @file
29  @ingroup g_tools
30  @relates ContextGLUT,DistanceMeasureControl,SceneOpenSceneGraph,GLProjectionParametersPerspective
31  @brief BIAS OpenGLRendering Tool. Simple viewer for 3D models, executable biasOpenGLviewerGlut
32  executable: biasOpenGLviewerGlut see biasGLviewerGLUT.hh biasGLviewerGLUT.cpp
33  @author Ingo Schiller, Finn Schulte
34  @date 02/2010
35 */
36 #include <GLviewer/ContextGLUT.hh>
37 #include <GLviewer/Controller/DistanceMeasureControl.hh>
38 #include <GLviewer/Controller/FlyControl.hh>
39 #include <GLviewer/Controller/OnlyRotationControl.hh>
40 #include <GLviewer/GLProjectionParametersPerspective.hh>
41 #include <GLviewer/Controller/ScreenShotListener.hh>
42 #include <GLviewer/Scenes/SceneBGImage.hh>
43 #ifdef BIAS_HAVE_OPENSCENEGRAPH
44 #include <GLviewer/Scenes/ScenePlainOpenSceneGraph.hh>
45 #endif
46 #include <GLviewer/Scenes/SceneGlutPrimitives.hh>
47 #include <GLviewer/Scenes/ScenePointLight.hh>
48 
49 #include <Utils/Param.hh>
50 
51 namespace BIAS{
52 
54  {
55 
56 public:
57  biasGLviewerGLUT(int argc, char* argv[]);
58  //virtual ~GlutGLviewerBase();
59  virtual void Init();
60  virtual void Run();
61 
62  bool StandardKeyPressed(unsigned char key, int, int);
63 
64  void AnimationFunc();
65 
66 protected:
67 
68  void toggleStoreToDisc_();
69 
71  bool animate_;
76  unsigned int slotCounter_;
77  unsigned int viewingSlot_;
78 
80 
81 #ifdef BIAS_HAVE_OPENSCENEGRAPH
83 #endif
86 
90 
92  int argc_;
93  char** argv_;
94 
95  // Animation / Control Params
96  std::string* animationFile_;
97  double* fixedFPS_;
98  bool* useFlyMode_;
99  bool* useRotMode_;
100 
101  // View Params
102  double* zNear_;
103  double* zFar_;
104  double* fov_;
107  bool* teapot_;
108  bool* cube_;
111  // Camera Params
112  std::string* projectionFile_;
116 
117  // Misc Params
118  int* winwidth_;
120  std::string* screenShotName_;
123  bool* help_;
124 };
125 
126 }
127 
128 #endif //__GLUTGLVIEWERBASE_HH__
129 
class for distance measurements in 3d model, derives from TrackballControl and SceneBase ...
biasGLviewerGLUT(int argc, char *argv[])
BIAS::DistanceMeasureControl control_
class for camera movement in fly mode.
Definition: FlyControl.hh:15
BIAS::ScenePointLight sceneLight_
BIAS::SceneGlutPrimitives sceneGlut_
class for camera movement in fixed position, only rotation mode.
BIAS::FlyControl flyControl_
BIAS::Vector< double > * backGroundColor_
Class for rendering the Glut primitives like teapot, cube, tetrahedron and icosahedron. Mainly used to test rendering without SceneGraph library.
std::string * animationFile_
Wrapper to glut-library.
Definition: ContextGLUT.hh:38
BIAS::ContextGLUT * contextPointer_
bool StandardKeyPressed(unsigned char key, int, int)
react to press of ascii-coded charakter plus pointer position
This class Param provides generic support for parameters.
Definition: Param.hh:231
Implements slim openscenegraph scene without extras.
BIAS::GLProjectionParametersPerspective camera_
BIAS::ScreenShotListener screenShotControl_
If KEY_F5 is activated screenshot is stored to given basename + screenshot count. ...
Defines the common interface used for communication between rendering components. ...
BIAS::OnlyRotationControl rotControl_
class for rendering with projection parameters of ProjectionParametersPerspective ...