source: flair-dev/trunk/include/FlairSimulator/X8.h@ 8

Last change on this file since 8 was 8, checked in by Sanahuja Guillaume, 8 years ago

simulator

File size: 2.0 KB
Line 
1// created: 2014/04/03
2// filename: X8.h
3//
4// author: Majd Saied, Guillaume Sanahuja
5// Copyright Heudiasyc UMR UTC/CNRS 7253
6//
7// version: $Id: $
8//
9// purpose: classe definissant un X8
10//
11/*********************************************************************/
12
13#ifndef X8_H
14#define X8_H
15
16#include <Model.h>
17#include <stdint.h>
18
19namespace flair
20{
21 namespace core
22 {
23 class Mutex;
24 }
25 namespace gui
26 {
27 class DoubleSpinBox;
28 }
29 namespace actuator
30 {
31 class SimuBldc;
32 }
33}
34
35#ifdef GL
36namespace irr
37{
38 namespace scene
39 {
40 class IMesh;
41 }
42}
43#endif
44
45namespace flair
46{
47namespace simulator
48{
49 class Simulator;
50 class Blade;
51 class MeshSceneNode;
52
53 class X8 : public Model
54 {
55 public:
56 X8(const Simulator* parent,std::string name, int dev_id);
57 ~X8();
58 virtual void Draw(void);
59 virtual void ExtraDraw(void){};
60 protected:
61#ifdef GL
62 irr::scene::IMesh *red_arm,*black_arm,*motor;
63 MeshSceneNode *fl_arm,*fr_arm,*rl_arm,*rr_arm;
64 MeshSceneNode *tfl_motor,*tfr_motor,*trl_motor,*trr_motor;
65 MeshSceneNode *bfl_motor,*bfr_motor,*brl_motor,*brr_motor;
66 Blade *tfl_blade,*tfr_blade,*trl_blade,*trr_blade;
67 Blade *bfl_blade,*bfr_blade,*brl_blade,*brr_blade;
68#endif
69 private:
70 void CalcModel(void);
71 #ifdef GL
72 bool OnEvent(const irr::SEvent& event){};
73 void AnimateModel(void);
74 size_t dbtSize(void) const;
75 void WritedbtBuf(char* dbtbuf);
76 void ReaddbtBuf(char* dbtbuf);
77 core::Mutex *motor_speed_mutex;
78 #endif
79
80 actuator::SimuBldc *motors;
81 float motor_speed[8];
82 gui::DoubleSpinBox *m,*arm_length,*l_cg;
83 gui::DoubleSpinBox *k_mot,*c_mot;
84 gui::DoubleSpinBox *f_air_vert,*f_air_lat;
85 gui::DoubleSpinBox *j_roll,*j_pitch,*j_yaw;
86 gui::DoubleSpinBox *j_r,*sigma,*S;
87 };
88} // end namespace simulator
89} // end namespace flair
90#endif // X8_H
Note: See TracBrowser for help on using the repository browser.