OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
coArrow.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef CO_ARROW_H
9 #define CO_ARROW_H
10 
24 #include <osg/Geode>
25 #include <osg/Material>
26 #include <osg/Shape>
27 #include <osg/ShapeDrawable>
28 #include <iostream>
29 
30 namespace osg
31 {
32 class Cylinder;
33 class Cone;
34 class ShapeDrawable;
35 class TessellationHints;
36 class StateSet;
37 class Material;
38 };
39 
40 #include <util/coTypes.h>
41 
42 namespace opencover
43 {
44 
45 class PLUGIN_UTILEXPORT coArrow : public osg::Geode
46 {
47 public:
48  coArrow(float radius = 1.0, float length = 1.0, bool originAtTip = false, bool draw = true);
49  ~coArrow();
50  virtual void setColor(osg::Vec4 color);
51  virtual void setAmbient(osg::Vec4 ambient);
52  virtual void setVisible(bool visible);
53  void drawArrow(osg::Vec3 base, float radius, float length);
54 
55 private:
56  osg::Vec4 _color;
57  osg::Vec4 _ambient;
58 
59  osg::Cylinder *cylinder;
60  osg::ShapeDrawable *cylinderDraw;
61  osg::Cone *cone;
62  osg::ShapeDrawable *coneDraw;
63 
64  osg::TessellationHints *hints;
65  osg::StateSet *stateSet;
66  osg::Material *material;
67  bool drawn;
68 };
69 }
70 #endif
Definition: coArrow.h:45