Changeset 94 in flair-dev for trunk/include


Ignore:
Timestamp:
01/08/19 10:14:12 (5 years ago)
Author:
Sanahuja Guillaume
Message:

draw vrpn axis in simulator

Location:
trunk/include
Files:
9 added
8 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/FlairMeta/MetaVrpnObject.h

    r50 r94  
    1515
    1616#include <VrpnObject.h>
     17#include <VrpnClient.h>
    1718#include <io_data.h>
    1819#include <Vector3D.h>
     
    4142class MetaVrpnObject : public sensor::VrpnObject {
    4243public:
    43   MetaVrpnObject(std::string name);
    44   MetaVrpnObject(std::string name,uint8_t id);
     44  MetaVrpnObject(std::string name,sensor::VrpnClient *client=sensor::GetVrpnClient());
     45  MetaVrpnObject(std::string name,uint8_t id,sensor::VrpnClient *client=sensor::GetVrpnClient());
    4546  ~MetaVrpnObject();
    4647  gui::DataPlot1D *VxPlot(void) const; // 1,0
     
    5152
    5253private:
    53   void ConstructorCommon(std::string name);
     54  void ConstructorCommon(std::string name,sensor::VrpnClient *client);
    5455  filter::LowPassFilter *pbas;
    5556  filter::EulerDerivative *euler;
  • trunk/include/FlairSensorActuator/VrpnObject.h

    r68 r94  
    1616
    1717#include <IODevice.h>
     18#include <VrpnClient.h>
    1819#include <Vector3D.h>
    1920#include <stdint.h>
     
    3233
    3334class VrpnObject_impl;
    34 class VrpnClient_impl;
    3535
    3636namespace flair {
     
    4545class VrpnObject : public core::IODevice {
    4646  friend class ::VrpnObject_impl;
    47   friend class ::VrpnClient_impl;
    4847
    4948public:
     
    5554  * \param name VRPN object name, should be the same as defined in the server
    5655  * \param tab Tab for the user interface
     56  * \param client VrpnClient of the connection, if unspecified, use the default one
    5757  */
    5858  VrpnObject(std::string name,
    59              const gui::TabWidget *tab);
     59             const gui::TabWidget *tab,sensor::VrpnClient *client=GetVrpnClient());
    6060
    6161  /*!
    6262  * \brief Constructor
    6363  *
    64   * Construct a VrpnObject. Connection is done by IP.
     64  * Construct a VrpnObject. Connection is done by xbee.
    6565  *
    6666  * \param name name
    67   * \param id VRPN object id, should be the same as defined in the server
     67  * \param id VRPN object id, should be the same as defined in the xbee bridge
    6868  * \param tab Tab for the user interface
     69  * \param client VrpnClient of the connection, if unspecified, use the default one
    6970  */
    7071  VrpnObject(std::string name, uint8_t id,
    71              const gui::TabWidget *tab);
     72             const gui::TabWidget *tab,sensor::VrpnClient *client=GetVrpnClient());
    7273
    7374  /*!
  • trunk/include/FlairSimulator/Blade.h

    r13 r94  
    3636        const irr::core::vector3df &position = irr::core::vector3df(0, 0, 0),
    3737        bool inverted = false, irr::s32 id = -1);
     38
     39  Blade(irr::scene::ISceneNode *parent,
     40        const irr::core::vector3df &position = irr::core::vector3df(0, 0, 0),
     41        bool inverted = false, irr::s32 id = -1);
     42 
    3843  virtual void OnRegisterSceneNode(void);
    3944  virtual void render(void);
  • trunk/include/FlairSimulator/MeshSceneNode.h

    r13 r94  
    3131      const irr::core::vector3df &rotation = irr::core::vector3df(0, 0, 0),
    3232      irr::video::ITexture *texture = NULL, irr::s32 id = -1);
     33 
     34  MeshSceneNode(
     35      irr::scene::ISceneNode *parent, irr::scene::IMesh *mesh,
     36      const irr::core::vector3df &position = irr::core::vector3df(0, 0, 0),
     37      const irr::core::vector3df &rotation = irr::core::vector3df(0, 0, 0),
     38      irr::video::ITexture *texture = NULL, irr::s32 id = -1);
    3339
    3440  virtual void OnRegisterSceneNode(void);
  • trunk/include/FlairSimulator/Simulator.h

    r50 r94  
    4444  // yaw_deg: rotation of the vrpn coordinate with respect to the earth
    4545  // coordinate, around z axis
    46   Simulator(std::string name, int optitrack_mstime = 10, float yaw_deg = 30);
     46  Simulator(std::string name, int optitrack_mstime = 10, float yaw_deg = 30, int port=3883);
    4747  ~Simulator();
    4848  void RunSimu(void);
  • trunk/include/FlairSimulator/VisualizationCamera.h

    r34 r94  
    2727    class ICameraSceneNode;
    2828  }
     29  namespace video {
     30    class ITexture;
     31  }
    2932}
    3033
     
    4245  irr::scene::ICameraSceneNode *getCameraSceneNode(void);
    4346  std::string getName(void);
     47  void renderAxisToTexture(irr::video::ITexture* texture);
    4448
    4549private:
    4650  virtual bool isEventReceiverEnabled(void) const { return true; }
    47 
     51  irr::scene::ISceneNode *nodeX,*nodeY,*nodeZ;
     52  irr::scene::ISceneManager *axis_scenemanager;
     53 
    4854protected:
    4955  bool LMouseKey;
    5056  irr::scene::ICameraSceneNode *camera;
     57  irr::scene::ICameraSceneNode *axis_camera;
    5158  irr::core::position2df MousePos;
    5259  float currentZoom;
  • trunk/include/FlairSimulator/X4.h

    r68 r94  
    4343#ifdef GL
    4444  virtual void Draw(void);
    45   virtual void ExtraDraw(void){};
     45  virtual void ExtraDraw(void){};
     46#endif
    4647
    47 protected:
    48   Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
    49   core::Mutex *motor_speed_mutex;
    50 #endif
    5148private:
    5249  void CalcModel(void);
     
    5653  void WritedbtBuf(char *dbtbuf);
    5754  void ReaddbtBuf(char *dbtbuf);
     55  Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
     56  core::Mutex *motor_speed_mutex;
    5857#endif
    5958
  • trunk/include/FlairSimulator/X8.h

    r68 r94  
    4545
    4646protected:
    47 #ifdef GL
    48   Blade *tfl_blade, *tfr_blade, *trl_blade, *trr_blade;
    49   Blade *bfl_blade, *bfr_blade, *brl_blade, *brr_blade;
    50 #endif
     47
    5148private:
    5249  void CalcModel(void);
     
    5754  void ReaddbtBuf(char *dbtbuf);
    5855  core::Mutex *motor_speed_mutex;
     56  Blade *tfl_blade, *tfr_blade, *trl_blade, *trr_blade;
     57  Blade *bfl_blade, *bfr_blade, *brl_blade, *brr_blade;
    5958#endif
    6059
Note: See TracChangeset for help on using the changeset viewer.