Changeset 50 in flair-dev for trunk/include/FlairSimulator


Ignore:
Timestamp:
May 31, 2017, 3:54:26 PM (4 years ago)
Author:
Sanahuja Guillaume
Message:

doc

Location:
trunk/include/FlairSimulator
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/FlairSimulator/Castle.h

    r13 r50  
    2323class Castle : public Gui {
    2424public:
    25   Castle(const flair::simulator::Simulator *parent, int app_width,
     25  Castle(int app_width,
    2626         int app_height, int scene_width, int scene_height,
    2727         std::string media_path);
  • trunk/include/FlairSimulator/FixedCamera.h

    r44 r50  
    2626class FixedCamera : public VisualizationCamera {
    2727public:
    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);
    2929  ~FixedCamera();
    3030
  • trunk/include/FlairSimulator/Gui.h

    r34 r50  
    1919
    2020#include <Object.h>
     21#include <Vector3D.h>
    2122#include <EDriverTypes.h>
    2223#include <vector3d.h>
     
    3637namespace core {
    3738class Object;
    38 class Vector3D;
    3939class Euler;
    4040class Quaternion;
     
    4848namespace flair {
    4949namespace simulator {
    50 class Simulator;
    5150
    52 class Gui : public core::Object {
     51class Gui: public core::Object {
    5352  friend class ::Simulator_impl;
    5453  friend class VisualizationCamera;
    5554
    5655public:
    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,
    5857      int scene_width, int scene_height, std::string media_path,
    5958      irr::video::E_DRIVER_TYPE driver_type = irr::video::EDT_OPENGL);
     
    126125* \return vector in irrlicht coordinates
    127126*/
    128 irr::core::vector3df ToIrrlichtCoordinates(core::Vector3D vect);
     127template<typename T>  irr::core::vector3df ToIrrlichtCoordinates(core::Vector3D<T> vect);
    129128
    130129/*!
     
    137136* \return vector in simulator coordinates
    138137*/
    139 core::Vector3D ToSimulatorCoordinates(irr::core::vector3df vect);
     138core::Vector3Df ToSimulatorCoordinates(irr::core::vector3df vect);
    140139
    141140/*!
  • trunk/include/FlairSimulator/Man.h

    r13 r50  
    3434namespace flair {
    3535namespace simulator {
    36 class Simulator;
    3736
    3837class Man : private Model {
    3938public:
    40   Man(const Simulator *parent, std::string name);
     39  Man(std::string name,uint32_t modelId);
    4140  ~Man();
    4241
  • trunk/include/FlairSimulator/Model.h

    r34 r50  
    5151namespace flair {
    5252namespace simulator {
    53 class Simulator;
    5453class FollowMeCamera;
    5554
     
    6564
    6665public:
    67   Model(const Simulator *parent, std::string name);
     66  Model(std::string name,uint32_t modelId);
    6867  virtual ~Model();
    6968
    7069  typedef struct simu_state {
    7170    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;
    7574  } simu_state_t;
    7675
     
    9392#endif
    9493  gui::TabWidget *GetTabWidget(void) const;
     94  int GetId(void) const;
    9595
    9696protected:
    9797  DiscreteTimeVariable<simu_state_t, 3> state;
    98   float dT(void) const;
     98  double dT(void) const;
    9999  virtual void CalcModel(void) = 0;
    100100#ifdef GL
  • trunk/include/FlairSimulator/Parser.h

    r34 r50  
    1919
    2020#include <Gui.h>
     21#include <Vector3D.h>
    2122#include <libxml/parser.h>
    2223#include <libxml/tree.h>
    23 
    24 namespace flair {
    25   namespace core {
    26     class Vector3D;
    27   }
    28 }
     24#include <SColor.h>
    2925
    3026namespace flair {
     
    3834  */
    3935public:
    40   Parser(Simulator *parent, int app_width, int app_height, int scene_width,
     36  Parser(int app_width, int app_height, int scene_width,
    4137         int scene_height, std::string media_path, std::string xmlFile);
    4238  ~Parser();
     
    4541  xmlDoc *doc;
    4642  std::string media_path;
    47   Simulator *parent;
    4843  void processElements(xmlNode *a_node);
    4944  void processObjects(xmlNode *a_node);
    5045  void processParams(xmlNode *a_node);
     46        irr::video::SColor getScolor(xmlNode *mesh_node);
    5147  irr::core::vector3df getMeshVect(xmlNode *mesh_node, xmlChar *param);
    5248  irr::core::vector3df getSceneVect(xmlNode *mesh_node, xmlChar *param,
    5349                                    bool isScale = false);
    54   core::Vector3D getMeshVector3D(xmlNode *mesh_node, xmlChar *param);
     50  core::Vector3Df getMeshVector3D(xmlNode *mesh_node, xmlChar *param);
    5551};
    5652}
  • trunk/include/FlairSimulator/SimuCameraGL.h

    r13 r50  
    5151  // top left origin
    5252  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);
    5454  ~SimuCameraGL();
    5555  //! Sets the value of the near clipping plane. (default: 1.0f)
     
    6767                                  irr::scene::ISceneManager *newManager = 0);
    6868  void getImage(void);
    69   void putImage(char *pixels);
     69  void putImage(char *pixels,core::Time imageTime);
    7070  irr::scene::ICameraSceneNode *camera;
    7171  irr::scene::ISceneManager *smgr;
  • trunk/include/FlairSimulator/SimuLaserGL.h

    r13 r50  
    3838class SimuLaserGL : public SimuLaser, public SensorGL {
    3939public:
    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);
    4141  ~SimuLaserGL();
    4242
  • trunk/include/FlairSimulator/SimuUsGL.h

    r13 r50  
    3838class SimuUsGL : public SimuUs, public SensorGL {
    3939public:
    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);
    4141  ~SimuUsGL();
    4242
  • trunk/include/FlairSimulator/Simulator.h

    r13 r50  
    1919
    2020#include <FrameworkManager.h>
     21#include <Vector3D.h>
    2122#include <stdint.h>
    2223
    2324class Simulator_impl;
     25class Model_impl;
    2426
    2527namespace flair {
    2628namespace core {
    2729class Quaternion;
    28 class Vector3D;
    2930}
    3031}
     
    3637
    3738class Simulator : public core::FrameworkManager {
    38   friend class Model;
     39  friend class ::Model_impl;
    3940  friend class Gui;
    4041  friend class GenericObject;
     
    5253  // coordinate, around z axis
    5354  core::Quaternion ToVRPNReference(core::Quaternion quat_in);
    54   core::Vector3D ToVRPNReference(core::Vector3D point_in);
     55  core::Vector3D<double> ToVRPNReference(core::Vector3D<double> point_in);
    5556
    5657private:
  • trunk/include/FlairSimulator/X4.h

    r34 r50  
    1919
    2020#include <Model.h>
    21 #include <stdint.h>
    22 #include <stdio.h>
    2321
    2422namespace flair {
     
    3432}
    3533
    36 #ifdef GL
    37 namespace irr {
    38 namespace scene {
    39 class IMesh;
    40 }
    41 }
    42 #endif
    43 
    4434namespace flair {
    4535namespace simulator {
    46 class Simulator;
    4736class Blade;
    48 class MeshSceneNode;
    4937
    5038class X4 : public Model {
    5139public:
    52   X4(const Simulator *parent, std::string name, int dev_id);
     40  X4(std::string name, uint32_t modelId);
    5341  ~X4();
    5442#ifdef GL
     
    5745
    5846protected:
    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;
    6247  Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
    6348  core::Mutex *motor_speed_mutex;
  • trunk/include/FlairSimulator/X8.h

    r34 r50  
    1919
    2020#include <Model.h>
    21 #include <stdint.h>
    2221
    2322namespace flair {
     
    3332}
    3433
    35 #ifdef GL
    36 namespace irr {
    37 namespace scene {
    38 class IMesh;
    39 }
    40 }
    41 #endif
    42 
    4334namespace flair {
    4435namespace simulator {
    45 class Simulator;
    4636class Blade;
    47 class MeshSceneNode;
    4837
    4938class X8 : public Model {
    5039public:
    51   X8(const Simulator *parent, std::string name, int dev_id);
     40  X8(std::string name, uint32_t modelId);
    5241  ~X8();
    5342  virtual void Draw(void);
     
    5645protected:
    5746#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;
    6247  Blade *tfl_blade, *tfr_blade, *trl_blade, *trr_blade;
    6348  Blade *bfl_blade, *bfr_blade, *brl_blade, *brr_blade;
Note: See TracChangeset for help on using the changeset viewer.