Line | |
---|
1 | // created: 2012/08/21
|
---|
2 | // filename: AnimPoursuite.h
|
---|
3 | //
|
---|
4 | // author: Guillaume Sanahuja
|
---|
5 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
6 | //
|
---|
7 | // version: $Id: $
|
---|
8 | //
|
---|
9 | // purpose: classe definissant une animation poursuite pour camera
|
---|
10 | //
|
---|
11 | /*********************************************************************/
|
---|
12 |
|
---|
13 | #ifndef ANIMPOURSUITE_H
|
---|
14 | #define ANIMPOURSUITE_H
|
---|
15 |
|
---|
16 | #include <ISceneNodeAnimator.h>
|
---|
17 | #include <position2d.h>
|
---|
18 | #include <vector3d.h>
|
---|
19 |
|
---|
20 | namespace flair
|
---|
21 | {
|
---|
22 | namespace simulator
|
---|
23 | {
|
---|
24 |
|
---|
25 | class AnimPoursuite : public irr::scene::ISceneNodeAnimator
|
---|
26 | {
|
---|
27 | public:
|
---|
28 | AnimPoursuite(const irr::scene::ISceneNode* parent,float rotateSpeed = -500.0f, float zoomSpeed = 4.0f);
|
---|
29 | ~AnimPoursuite();
|
---|
30 |
|
---|
31 | void animateNode(irr::scene::ISceneNode* node, irr::u32 timeMs);
|
---|
32 | ISceneNodeAnimator* createClone(irr::scene::ISceneNode* node,irr::scene::ISceneManager* newManager=0);
|
---|
33 | bool MouseMoved(const irr::SEvent& event,irr::core::position2df MousePos);
|
---|
34 | void setPositionOffset(irr::core::vector3df newpos);
|
---|
35 | void setTargetOffset(irr::core::vector3df newpos);
|
---|
36 |
|
---|
37 | private:
|
---|
38 | virtual bool isEventReceiverEnabled(void) const
|
---|
39 | {
|
---|
40 | return true;
|
---|
41 | }
|
---|
42 |
|
---|
43 | irr::core::vector3df pos_offset,target_offset;
|
---|
44 | bool LMouseKey;
|
---|
45 | irr::core::position2df RotateStart;
|
---|
46 | irr::core::position2df MousePos;
|
---|
47 | const irr::scene::ISceneNode* parent;
|
---|
48 | bool Rotating;
|
---|
49 | float RotY,RotZ;
|
---|
50 | float rotateSpeed;
|
---|
51 | float zoomSpeed;
|
---|
52 | float currentZoom;
|
---|
53 | float sat(float value);
|
---|
54 | };
|
---|
55 |
|
---|
56 | } // end namespace simulator
|
---|
57 | } // end namespace flair
|
---|
58 |
|
---|
59 | #endif // ANIMPOURSUITE_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.