Image Component Library (ICL)
ComplexCoordinateFrameSceneObject.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/ComplexCoordinateFrameSceneObject. **
10 ** h **
11 ** Module : ICLGeom **
12 ** Authors: Christof Elbrechter **
13 ** **
14 ** **
15 ** GNU LESSER GENERAL PUBLIC LICENSE **
16 ** This file may be used under the terms of the GNU Lesser General **
17 ** Public License version 3.0 as published by the **
18 ** **
19 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
20 ** included in the packaging of this file. Please review the **
21 ** following information to ensure the license requirements will **
22 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
23 ** **
24 ** The development of this software was supported by the **
25 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
26 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
27 ** Forschungsgemeinschaft (DFG) in the context of the German **
28 ** Excellence Initiative. **
29 ** **
30 ********************************************************************/
31 
32 #pragma once
33 
34 #ifndef ICL_HAVE_OPENGL
35 #if WIN32
36 #pragma WARNING("this header must not be included if ICL_HAVE_OPENGL is not defined")
37 #else
38 #warning "this header must not be included if ICL_HAVE_OPENGL is not defined"
39 #endif
40 #else
41 
42 #include <ICLUtils/CompatMacros.h>
43 #include <ICLGeom/SceneObject.h>
44 #include <ICLUtils/Mutex.h>
45 
46 namespace icl{
47  namespace geom{
48 
50 
60 
62  float axisLength;
63 
66 
68  std::string xLabel, yLabel, zLabel;
69 
70  public:
71 
74  bool withXYZLabels=true,
75  const std::string &xLabel="x",
76  const std::string &yLabel="y",
77  const std::string &zLabel="z");
78 
80  ICLGeom_API ComplexCoordinateFrameSceneObject(float axisLengths[3],float axisThickness=5,
81  bool withXYZLabels=true,
82  const std::string &xLabel="x",
83  const std::string &yLabel="y",
84  const std::string &zLabel="z",
85  const GeomColor &xAxisColor=GeomColor(255,0,0,255),
86  const GeomColor &yAxisColor=GeomColor(0,255,0,255),
87  const GeomColor &zAxisColor=GeomColor(0,0,255,255),
88  const GeomColor &textLabelColor=GeomColor(255,255,255,255),
89  float textScaling=1.0f);
90 
91 
93 
95  ICLGeom_API void setParams(float axisLength[3], float axisThickness, bool withXYZLabels = true,
96  const GeomColor &xAxisColor=GeomColor(255,0,0,255),
97  const GeomColor &yAxisColor=GeomColor(0,255,0,255),
98  const GeomColor &zAxisColor=GeomColor(0,0,255,255),
99  const GeomColor &textLabelColor=GeomColor(255,255,255,255),
100  float textScaling = 1.0f);
101 
103  inline float getAxisLength() const { return axisLength; }
104 
106  inline float getAxisThickness() const { return axisThickness; }
107 
109  virtual void lock() { mutex.lock(); }
110 
112  virtual void unlock() { mutex.unlock(); }
113  };
114  } // namespace geom
115 }
116 
117 #endif
undocument this line if you encounter any issues!
Definition: Any.h:37
void unlock()
unlocks the mutex
Definition: Mutex.h:111
virtual void unlock()
unlocks the internal mutex
Definition: ComplexCoordinateFrameSceneObject.h:112
#define ICLGeom_API
Definition: CompatMacros.h:179
Special SceneObject implementation that define a visible coordinate frame.
Definition: ComplexCoordinateFrameSceneObject.h:57
ICLGeom_API void setParams(float axisLength[3], float axisThickness, bool withXYZLabels=true, const GeomColor &xAxisColor=GeomColor(255, 0, 0, 255), const GeomColor &yAxisColor=GeomColor(0, 255, 0, 255), const GeomColor &zAxisColor=GeomColor(0, 0, 255, 255), const GeomColor &textLabelColor=GeomColor(255, 255, 255, 255), float textScaling=1.0f)
Dynamic adaption.
float getAxisThickness() const
returns current thickness of the axis'
Definition: ComplexCoordinateFrameSceneObject.h:106
std::string yLabel
Definition: ComplexCoordinateFrameSceneObject.h:68
float axisThickness
thickness of each axis
Definition: ComplexCoordinateFrameSceneObject.h:65
std::string xLabel
axis labels
Definition: ComplexCoordinateFrameSceneObject.h:68
float getAxisLength() const
returns current length of the axis'
Definition: ComplexCoordinateFrameSceneObject.h:103
core::Color4D32f GeomColor
color for geometry primitives
Definition: GeomDefs.h:45
std::string zLabel
Definition: ComplexCoordinateFrameSceneObject.h:68
virtual void lock()
locks the internal mutex
Definition: ComplexCoordinateFrameSceneObject.h:109
ICLGeom_API ComplexCoordinateFrameSceneObject(float axisLength=100, float axisThickness=5, bool withXYZLabels=true, const std::string &xLabel="x", const std::string &yLabel="y", const std::string &zLabel="z")
Default constructor with useful default size.
float axisLength
length of each axis
Definition: ComplexCoordinateFrameSceneObject.h:62
Mutex class of the ICL.
Definition: Mutex.h:54
utils::Mutex mutex
internally used mutex
Definition: ComplexCoordinateFrameSceneObject.h:59
The SceneObject class defines visible objects in scenes or scene graph nodes.
Definition: SceneObject.h:140
void lock()
locks the mutex
Definition: Mutex.h:91