-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSphereVisualization.hpp
More file actions
44 lines (37 loc) · 1.2 KB
/
SphereVisualization.hpp
File metadata and controls
44 lines (37 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SphereVisualization_H
#define SphereVisualization_H
#include <boost/noncopyable.hpp>
#include <vizkit3d/Vizkit3DPlugin.hpp>
#include <osg/Geode>
#include <osg/PositionAttitudeTransform>
#include <osg/ShapeDrawable>
#include <base/Eigen.hpp>
namespace vizkit3d
{
class SphereVisualization
: public vizkit3d::Vizkit3DPlugin<base::Vector3d>
, boost::noncopyable
{
Q_OBJECT
Q_PROPERTY(double Transparency READ getTransparency WRITE setTransparency)
public:
SphereVisualization();
~SphereVisualization();
void setTransparency(double f);
double getTransparency();
Q_INVOKABLE void updatePosition(base::Vector3d const &value)
{Vizkit3DPlugin<base::Vector3d>::updateData(value);}
protected:
virtual osg::ref_ptr<osg::Node> createMainNode();
virtual void updateMainNode(osg::Node* node);
virtual void updateDataIntern(base::Vector3d const& value);
private:
osg::ref_ptr<osg::PositionAttitudeTransform> spherePos;
osg::ref_ptr<osg::ShapeDrawable> sd;
float transparency;
struct Data;
Data* p;
};
VizkitQtPluginHeaderDecls(SphereVisualization)
}
#endif