OpenCOVER
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
30namespace osg
31{
32class Cylinder;
33class Cone;
34class ShapeDrawable;
35class TessellationHints;
36class StateSet;
37class Material;
38};
39
40#include <util/coTypes.h>
41
42namespace opencover
43{
44
45class PLUGIN_UTILEXPORT coArrow : public osg::Geode
46{
47public:
48 coArrow(float radius = 1.0, float length = 1.0, bool originAtTip = false, bool draw = true);
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
55private:
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: ARToolKit.h:33
Definition: coClusterStat.h:29
Definition: coArrow.h:46
virtual void setColor(osg::Vec4 color)
virtual void setAmbient(osg::Vec4 ambient)
virtual void setVisible(bool visible)
coArrow(float radius=1.0, float length=1.0, bool originAtTip=false, bool draw=true)
void drawArrow(osg::Vec3 base, float radius, float length)