source: flair-dev/tags/0.0.2/include/FlairSimulator/X4.h@ 41

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

doc

File size: 1.7 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 {
25namespace core {
26class Mutex;
27}
28namespace gui {
29class DoubleSpinBox;
30}
31namespace actuator {
32class SimuBldc;
33}
34}
35
36#ifdef GL
37namespace irr {
38namespace scene {
39class IMesh;
40}
41}
42#endif
43
44namespace flair {
45namespace simulator {
46class Simulator;
47class Blade;
48class MeshSceneNode;
49
50class X4 : public Model {
51public:
52 X4(const Simulator *parent, std::string name, int dev_id);
53 ~X4();
54#ifdef GL
55 virtual void Draw(void);
56 virtual void ExtraDraw(void){};
57
58protected:
59 irr::scene::IMesh *red_arm, *black_arm, *motor;
60 MeshSceneNode *fl_arm, *fr_arm, *rl_arm, *rr_arm;
61 MeshSceneNode *fl_motor, *fr_motor, *rl_motor, *rr_motor;
62 Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
63 core::Mutex *motor_speed_mutex;
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#endif
73
74 actuator::SimuBldc *motors;
75 float motor_speed[4];
76 gui::DoubleSpinBox *m, *arm_length, *l_cg;
77 gui::DoubleSpinBox *k_mot, *c_mot;
78 gui::DoubleSpinBox *f_air_vert, *f_air_lat;
79 gui::DoubleSpinBox *j_roll, *j_pitch, *j_yaw;
80};
81} // end namespace simulator
82} // end namespace flair
83#endif // X4_H
Note: See TracBrowser for help on using the repository browser.