source: flair-dev/trunk/include/FlairSimulator/X4.h@ 12

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

lic

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