source: flair-src/trunk/lib/FlairSimulator/src/X8.h@ 10

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

lic

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