source: flair-src/trunk/lib/FlairSimulator/src/X4.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: 2012/08/21
2// filename: X4.h
3//
4// author: Osamah Saif, Guillaume Sanahuja
5// Copyright Heudiasyc UMR UTC/CNRS 7253
6//
7// version: $Id: $
8//
9// purpose: classe definissant un x4
10//
11/*********************************************************************/
12
13#ifndef X4_H
14#define X4_H
15
16#include <Model.h>
17#include <stdint.h>
18#include <stdio.h>
19
20namespace flair
21{
22 namespace core
23 {
24 class Mutex;
25 }
26 namespace gui
27 {
28 class DoubleSpinBox;
29 }
30 namespace actuator
31 {
32 class SimuBldc;
33 }
34}
35
36#ifdef GL
37namespace irr
38{
39 namespace scene
40 {
41 class IMesh;
42 }
43}
44#endif
45
46namespace flair
47{
48namespace simulator
49{
50 class Simulator;
51 class Blade;
52 class MeshSceneNode;
53
54 class X4 : public Model
55 {
56 public:
57 X4(const Simulator* parent,std::string name, int dev_id);
58 ~X4();
59#ifdef GL
60 virtual void Draw(void);
61 virtual void ExtraDraw(void){};
62
63 protected:
64 irr::scene::IMesh *red_arm,*black_arm,*motor;
65 MeshSceneNode *fl_arm,*fr_arm,*rl_arm,*rr_arm;
66 MeshSceneNode *fl_motor,*fr_motor,*rl_motor,*rr_motor;
67 Blade *fl_blade,*fr_blade,*rl_blade,*rr_blade;
68 core::Mutex *motor_speed_mutex;
69#endif
70 private:
71 void CalcModel(void);
72 #ifdef GL
73 bool OnEvent(const irr::SEvent& event){};
74 void AnimateModel(void);
75 size_t dbtSize(void) const;
76 void WritedbtBuf(char* dbtbuf);
77 void ReaddbtBuf(char* dbtbuf);
78 #endif
79
80 actuator::SimuBldc *motors;
81 float motor_speed[4];
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 };
87} // end namespace simulator
88} // end namespace flair
89#endif // X4_H
Note: See TracBrowser for help on using the repository browser.