Changeset 50 in flair-dev for trunk/include/FlairSimulator
- Timestamp:
- May 31, 2017, 3:54:26 PM (8 years ago)
- Location:
- trunk/include/FlairSimulator
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairSimulator/Castle.h
r13 r50 23 23 class Castle : public Gui { 24 24 public: 25 Castle( const flair::simulator::Simulator *parent,int app_width,25 Castle(int app_width, 26 26 int app_height, int scene_width, int scene_height, 27 27 std::string media_path); -
trunk/include/FlairSimulator/FixedCamera.h
r44 r50 26 26 class FixedCamera : public VisualizationCamera { 27 27 public: 28 FixedCamera(std::string name,core::Vector3D position,core::Vector3D lookat=core::Vector3D(0,0,0),float rotateSpeed = -3.0f, float zoomSpeed = .05f);28 FixedCamera(std::string name,core::Vector3Df position,core::Vector3Df lookat=core::Vector3Df(0,0,0),float rotateSpeed = -3.0f, float zoomSpeed = .05f); 29 29 ~FixedCamera(); 30 30 -
trunk/include/FlairSimulator/Gui.h
r34 r50 19 19 20 20 #include <Object.h> 21 #include <Vector3D.h> 21 22 #include <EDriverTypes.h> 22 23 #include <vector3d.h> … … 36 37 namespace core { 37 38 class Object; 38 class Vector3D;39 39 class Euler; 40 40 class Quaternion; … … 48 48 namespace flair { 49 49 namespace simulator { 50 class Simulator;51 50 52 class Gui 51 class Gui: public core::Object { 53 52 friend class ::Simulator_impl; 54 53 friend class VisualizationCamera; 55 54 56 55 public: 57 Gui( const Simulator *parent,std::string name, int app_width, int app_height,56 Gui(std::string name, int app_width, int app_height, 58 57 int scene_width, int scene_height, std::string media_path, 59 58 irr::video::E_DRIVER_TYPE driver_type = irr::video::EDT_OPENGL); … … 126 125 * \return vector in irrlicht coordinates 127 126 */ 128 irr::core::vector3df ToIrrlichtCoordinates(core::Vector3Dvect);127 template<typename T> irr::core::vector3df ToIrrlichtCoordinates(core::Vector3D<T> vect); 129 128 130 129 /*! … … 137 136 * \return vector in simulator coordinates 138 137 */ 139 core::Vector3D ToSimulatorCoordinates(irr::core::vector3df vect);138 core::Vector3Df ToSimulatorCoordinates(irr::core::vector3df vect); 140 139 141 140 /*! -
trunk/include/FlairSimulator/Man.h
r13 r50 34 34 namespace flair { 35 35 namespace simulator { 36 class Simulator;37 36 38 37 class Man : private Model { 39 38 public: 40 Man( const Simulator *parent, std::string name);39 Man(std::string name,uint32_t modelId); 41 40 ~Man(); 42 41 -
trunk/include/FlairSimulator/Model.h
r34 r50 51 51 namespace flair { 52 52 namespace simulator { 53 class Simulator;54 53 class FollowMeCamera; 55 54 … … 65 64 66 65 public: 67 Model( const Simulator *parent, std::string name);66 Model(std::string name,uint32_t modelId); 68 67 virtual ~Model(); 69 68 70 69 typedef struct simu_state { 71 70 core::Quaternion Quat; 72 core::Vector3D W;73 core::Vector3D Pos;74 core::Vector3D Vel;71 core::Vector3Df W; 72 core::Vector3D<double> Pos; 73 core::Vector3D<double> Vel; 75 74 } simu_state_t; 76 75 … … 93 92 #endif 94 93 gui::TabWidget *GetTabWidget(void) const; 94 int GetId(void) const; 95 95 96 96 protected: 97 97 DiscreteTimeVariable<simu_state_t, 3> state; 98 floatdT(void) const;98 double dT(void) const; 99 99 virtual void CalcModel(void) = 0; 100 100 #ifdef GL -
trunk/include/FlairSimulator/Parser.h
r34 r50 19 19 20 20 #include <Gui.h> 21 #include <Vector3D.h> 21 22 #include <libxml/parser.h> 22 23 #include <libxml/tree.h> 23 24 namespace flair { 25 namespace core { 26 class Vector3D; 27 } 28 } 24 #include <SColor.h> 29 25 30 26 namespace flair { … … 38 34 */ 39 35 public: 40 Parser( Simulator *parent,int app_width, int app_height, int scene_width,36 Parser(int app_width, int app_height, int scene_width, 41 37 int scene_height, std::string media_path, std::string xmlFile); 42 38 ~Parser(); … … 45 41 xmlDoc *doc; 46 42 std::string media_path; 47 Simulator *parent;48 43 void processElements(xmlNode *a_node); 49 44 void processObjects(xmlNode *a_node); 50 45 void processParams(xmlNode *a_node); 46 irr::video::SColor getScolor(xmlNode *mesh_node); 51 47 irr::core::vector3df getMeshVect(xmlNode *mesh_node, xmlChar *param); 52 48 irr::core::vector3df getSceneVect(xmlNode *mesh_node, xmlChar *param, 53 49 bool isScale = false); 54 core::Vector3D getMeshVector3D(xmlNode *mesh_node, xmlChar *param);50 core::Vector3Df getMeshVector3D(xmlNode *mesh_node, xmlChar *param); 55 51 }; 56 52 } -
trunk/include/FlairSimulator/SimuCameraGL.h
r13 r50 51 51 // top left origin 52 52 SimuCameraGL(const simulator::Model *parent, std::string name, int width, 53 int height, int x, int y, int dev_id);53 int height, int x, int y, uint32_t modelId,uint32_t deviceId); 54 54 ~SimuCameraGL(); 55 55 //! Sets the value of the near clipping plane. (default: 1.0f) … … 67 67 irr::scene::ISceneManager *newManager = 0); 68 68 void getImage(void); 69 void putImage(char *pixels );69 void putImage(char *pixels,core::Time imageTime); 70 70 irr::scene::ICameraSceneNode *camera; 71 71 irr::scene::ISceneManager *smgr; -
trunk/include/FlairSimulator/SimuLaserGL.h
r13 r50 38 38 class SimuLaserGL : public SimuLaser, public SensorGL { 39 39 public: 40 SimuLaserGL(const simulator::Model *parent, std::string name, int dev_id);40 SimuLaserGL(const simulator::Model *parent, std::string name, uint32_t modelId,uint32_t deviceId); 41 41 ~SimuLaserGL(); 42 42 -
trunk/include/FlairSimulator/SimuUsGL.h
r13 r50 38 38 class SimuUsGL : public SimuUs, public SensorGL { 39 39 public: 40 SimuUsGL(const simulator::Model *parent, std::string name, int dev_id);40 SimuUsGL(const simulator::Model *parent, std::string name, uint32_t modelId,uint32_t deviceId); 41 41 ~SimuUsGL(); 42 42 -
trunk/include/FlairSimulator/Simulator.h
r13 r50 19 19 20 20 #include <FrameworkManager.h> 21 #include <Vector3D.h> 21 22 #include <stdint.h> 22 23 23 24 class Simulator_impl; 25 class Model_impl; 24 26 25 27 namespace flair { 26 28 namespace core { 27 29 class Quaternion; 28 class Vector3D;29 30 } 30 31 } … … 36 37 37 38 class Simulator : public core::FrameworkManager { 38 friend class Model;39 friend class ::Model_impl; 39 40 friend class Gui; 40 41 friend class GenericObject; … … 52 53 // coordinate, around z axis 53 54 core::Quaternion ToVRPNReference(core::Quaternion quat_in); 54 core::Vector3D ToVRPNReference(core::Vector3Dpoint_in);55 core::Vector3D<double> ToVRPNReference(core::Vector3D<double> point_in); 55 56 56 57 private: -
trunk/include/FlairSimulator/X4.h
r34 r50 19 19 20 20 #include <Model.h> 21 #include <stdint.h>22 #include <stdio.h>23 21 24 22 namespace flair { … … 34 32 } 35 33 36 #ifdef GL37 namespace irr {38 namespace scene {39 class IMesh;40 }41 }42 #endif43 44 34 namespace flair { 45 35 namespace simulator { 46 class Simulator;47 36 class Blade; 48 class MeshSceneNode;49 37 50 38 class X4 : public Model { 51 39 public: 52 X4( const Simulator *parent, std::string name, int dev_id);40 X4(std::string name, uint32_t modelId); 53 41 ~X4(); 54 42 #ifdef GL … … 57 45 58 46 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 47 Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade; 63 48 core::Mutex *motor_speed_mutex; -
trunk/include/FlairSimulator/X8.h
r34 r50 19 19 20 20 #include <Model.h> 21 #include <stdint.h>22 21 23 22 namespace flair { … … 33 32 } 34 33 35 #ifdef GL36 namespace irr {37 namespace scene {38 class IMesh;39 }40 }41 #endif42 43 34 namespace flair { 44 35 namespace simulator { 45 class Simulator;46 36 class Blade; 47 class MeshSceneNode;48 37 49 38 class X8 : public Model { 50 39 public: 51 X8( const Simulator *parent, std::string name, int dev_id);40 X8(std::string name, uint32_t modelId); 52 41 ~X8(); 53 42 virtual void Draw(void); … … 56 45 protected: 57 46 #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 47 Blade *tfl_blade, *tfr_blade, *trl_blade, *trr_blade; 63 48 Blade *bfl_blade, *bfr_blade, *brl_blade, *brr_blade;
Note:
See TracChangeset
for help on using the changeset viewer.