-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimationTest.h
More file actions
34 lines (27 loc) · 869 Bytes
/
Copy pathAnimationTest.h
File metadata and controls
34 lines (27 loc) · 869 Bytes
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
#pragma once
#include "DOFCalculation.h"
#include <osgDB/ReadFile>
#include <osg/Group>
#include <osgGA/GUIEventHandler>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIActionAdapter>
#include <osgViewer/Viewer>
#include <osg/PositionAttitudeTransform>
#include <osg/MatrixTransform>
#include <osg/ComputeBoundsVisitor>
#include <osgSim/DOFTransform>
#define DEGREE_PER_STEP 0.05f
#define DISTANCE_PER_STEP 0.01f
class AnimationTest :public osgGA::GUIEventHandler
{
public:
AnimationTest();
AnimationTest(osgSim::DOFTransform* node);
~AnimationTest();
void set_dof_node(osgSim::DOFTransform* node);
virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa, osg::Object* obj, osg::NodeVisitor* nodeVisitor);
private:
void do_animation();
Motion_type motion_type;
osg::ref_ptr<osgSim::DOFTransform> dofnode;
};