source: flair-src/trunk/lib/FlairSimulator/src/unexported/AnimPoursuite.h @ 15

Last change on this file since 15 was 15, checked in by Bayard Gildas, 5 years ago

sources reformatted with flair-format-dir script

File size: 1.7 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5//  created:    2012/08/21
6//  filename:   AnimPoursuite.h
7//
8//  author:     Guillaume Sanahuja
9//              Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11//  version:    $Id: $
12//
13//  purpose:    classe definissant une animation poursuite pour camera
14//
15/*********************************************************************/
16
17#ifndef ANIMPOURSUITE_H
18#define ANIMPOURSUITE_H
19
20#include <ISceneNodeAnimator.h>
21#include <position2d.h>
22#include <vector3d.h>
23
24namespace flair {
25namespace simulator {
26
27class AnimPoursuite : public irr::scene::ISceneNodeAnimator {
28public:
29  AnimPoursuite(const irr::scene::ISceneNode *parent,
30                float rotateSpeed = -500.0f, float zoomSpeed = 4.0f);
31  ~AnimPoursuite();
32
33  void animateNode(irr::scene::ISceneNode *node, irr::u32 timeMs);
34  ISceneNodeAnimator *createClone(irr::scene::ISceneNode *node,
35                                  irr::scene::ISceneManager *newManager = 0);
36  bool MouseMoved(const irr::SEvent &event, irr::core::position2df MousePos);
37  void setPositionOffset(irr::core::vector3df newpos);
38  void setTargetOffset(irr::core::vector3df newpos);
39
40private:
41  virtual bool isEventReceiverEnabled(void) const { return true; }
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.