Changeset 13 in flair-dev for trunk/include/FlairSimulator/X4.h
- Timestamp:
- Apr 8, 2016, 3:39:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairSimulator/X4.h
r9 r13 22 22 #include <stdio.h> 23 23 24 namespace 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 } 24 namespace flair { 25 namespace core { 26 class Mutex; 27 } 28 namespace gui { 29 class DoubleSpinBox; 30 } 31 namespace actuator { 32 class SimuBldc; 33 } 38 34 } 39 35 40 36 #ifdef GL 41 namespace irr 42 { 43 namespace scene 44 { 45 class IMesh; 46 } 37 namespace irr { 38 namespace scene { 39 class IMesh; 40 } 47 41 } 48 42 #endif 49 43 50 namespace flair 51 { 52 namespace simulator 53 { 54 class Simulator; 55 class Blade; 56 class MeshSceneNode; 44 namespace flair { 45 namespace simulator { 46 class Simulator; 47 class Blade; 48 class MeshSceneNode; 57 49 58 class X4 : public Model 59 { 60 public: 61 X4(const Simulator* parent,std::string name, int dev_id); 62 ~X4(); 50 class X4 : public Model { 51 public: 52 X4(const Simulator *parent, std::string name, int dev_id); 53 ~X4(); 63 54 #ifdef GL 64 65 55 virtual void Draw(void); 56 virtual void ExtraDraw(void){}; 66 57 67 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 58 protected: 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; 73 64 #endif 74 75 76 77 bool OnEvent(const irr::SEvent&event){};78 79 80 void WritedbtBuf(char*dbtbuf);81 void ReaddbtBuf(char*dbtbuf);82 65 private: 66 void CalcModel(void); 67 #ifdef GL 68 bool OnEvent(const irr::SEvent &event){}; 69 void AnimateModel(void); 70 size_t dbtSize(void) const; 71 void WritedbtBuf(char *dbtbuf); 72 void ReaddbtBuf(char *dbtbuf); 73 #endif 83 74 84 85 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 75 actuator::SimuBldc *motors; 76 float motor_speed[4]; 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 }; 91 82 } // end namespace simulator 92 83 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.