source: flair-dev/tags/0.0.2/include/FlairSimulator/X8.h

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

doc

File size: 1.8 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 {
24namespace core {
25class Mutex;
26}
27namespace gui {
28class DoubleSpinBox;
29}
30namespace actuator {
31class SimuBldc;
32}
33}
34
35#ifdef GL
36namespace irr {
37namespace scene {
38class IMesh;
39}
40}
41#endif
42
43namespace flair {
44namespace simulator {
45class Simulator;
46class Blade;
47class MeshSceneNode;
48
49class X8 : public Model {
50public:
51 X8(const Simulator *parent, std::string name, int dev_id);
52 ~X8();
53 virtual void Draw(void);
54 virtual void ExtraDraw(void){};
55
56protected:
57#ifdef GL
58 irr::scene::IMesh *red_arm, *black_arm, *motor;
59 MeshSceneNode *fl_arm, *fr_arm, *rl_arm, *rr_arm;
60 MeshSceneNode *tfl_motor, *tfr_motor, *trl_motor, *trr_motor;
61 MeshSceneNode *bfl_motor, *bfr_motor, *brl_motor, *brr_motor;
62 Blade *tfl_blade, *tfr_blade, *trl_blade, *trr_blade;
63 Blade *bfl_blade, *bfr_blade, *brl_blade, *brr_blade;
64#endif
65private:
66 void CalcModel(void);
67#ifdef GL
68 void AnimateModel(void);
69 size_t dbtSize(void) const;
70 void WritedbtBuf(char *dbtbuf);
71 void ReaddbtBuf(char *dbtbuf);
72 core::Mutex *motor_speed_mutex;
73#endif
74
75 actuator::SimuBldc *motors;
76 float motor_speed[8];
77 gui::DoubleSpinBox *m, *arm_length, *l_cg;
78 gui::DoubleSpinBox *k_mot, *c_mot;
79 gui::DoubleSpinBox *f_air_vert, *f_air_lat;
80 gui::DoubleSpinBox *j_roll, *j_pitch, *j_yaw;
81 gui::DoubleSpinBox *j_r, *sigma, *S;
82};
83} // end namespace simulator
84} // end namespace flair
85#endif // X8_H
Note: See TracBrowser for help on using the repository browser.