Changeset 158 in flair-src for trunk/lib/FlairSimulator/src


Ignore:
Timestamp:
03/05/17 10:50:56 (7 years ago)
Author:
Sanahuja Guillaume
Message:

corrected simu/device id for sensors

Location:
trunk/lib/FlairSimulator/src
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSimulator/src/Castle.cpp

    r15 r158  
    1717
    1818#include "Castle.h"
    19 #include "Simulator.h"
    2019#include <IrrlichtDevice.h>
    2120#include <IFileSystem.h>
     
    2726namespace simulator {
    2827
    29 Castle::Castle(const Simulator *parent, int app_width, int app_height,
     28Castle::Castle(int app_width, int app_height,
    3029               int scene_width, int scene_height, std::string media_path)
    31     : Gui(parent, "Castle", app_width, app_height, scene_width, scene_height,
     30    : Gui("Castle", app_width, app_height, scene_width, scene_height,
    3231          media_path) {
    3332  // carte
  • trunk/lib/FlairSimulator/src/Castle.h

    r15 r158  
    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/lib/FlairSimulator/src/GenericObject.cpp

    r134 r158  
    3737namespace simulator {
    3838
    39 GenericObject::GenericObject(Simulator *parent, IMesh *mesh)
     39GenericObject::GenericObject(IMesh *mesh)
    4040{
    4141        meshSceneNode=getGui()->getSceneManager()->addMeshSceneNode(mesh);
     
    4646  meshSceneNode->setMaterialFlag(EMF_LIGHTING, false);
    4747
    48   parent->pimpl_->objects.push_back(this);
     48  getSimulator()->pimpl_->objects.push_back(this);
    4949}
    5050
  • trunk/lib/FlairSimulator/src/Gui.cpp

    r69 r158  
    133133}
    134134
    135 Gui::Gui(const Simulator *parent, std::string name, int app_width,
     135Gui::Gui(std::string name, int app_width,
    136136         int app_height, int scene_width, int scene_height,
    137137         std::string media_path, E_DRIVER_TYPE driver_type)
    138     : Object(parent, name, "Gui") {
     138    : Object(getSimulator(), name, "Gui") {
    139139  if (gui_ != NULL)
    140140    Err("Gui should be instanced only one time\n");
  • trunk/lib/FlairSimulator/src/Gui.h

    r145 r158  
    4848namespace flair {
    4949namespace simulator {
    50 class Simulator;
    5150
    5251class Gui: public core::Object {
     
    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);
  • trunk/lib/FlairSimulator/src/Man.cpp

    r157 r158  
    1818#include "Man.h"
    1919#include "Gui.h"
    20 #include "Simulator.h"
    21 #include "Simulator_impl.h"
    2220#include "Euler.h"
    2321#include <ISceneManager.h>
     
    3836namespace simulator {
    3937
    40 Man::Man(const Simulator *parent, std::string name) : Model(parent, name) {
     38Man::Man(std::string name,uint32_t modelId) : Model(name,modelId) {
    4139  node = getGui()->getSceneManager()->addAnimatedMeshSceneNode(
    4240      getGui()->getMesh("ninja.b3d"), getSceneNode(), -1, vector3df(0, 0, 0),
  • trunk/lib/FlairSimulator/src/Man.h

    r15 r158  
    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/lib/FlairSimulator/src/Model.cpp

    r70 r158  
    1818#include "Model_impl.h"
    1919#include "Simulator.h"
    20 #include "Simulator_impl.h"
    2120#include <DoubleSpinBox.h>
    2221
    2322#ifdef GL
    2423#include "FollowMeCamera.h"
    25 #include "Gui.h"
    2624#include <ICameraSceneNode.h>
    2725using namespace irr;
     
    3634namespace simulator {
    3735
    38 Model::Model(const Simulator *parent, std::string name)
    39     : IODevice(parent, name) {
    40 #ifdef GL
    41   pimpl_ =
    42       new Model_impl(this, name, getGui()->getSceneManager(), parent->pimpl_);
    43 #else
    44   pimpl_ = new Model_impl(this, name, parent->pimpl_);
    45 #endif
    46   parent->pimpl_->models.push_back(this);
     36Model::Model(std::string name,uint32_t modelId)
     37    : IODevice(getSimulator(), name) {
     38  pimpl_ = new Model_impl(this, name,modelId);
    4739}
    4840
     
    7971float Model::dT(void) const { return pimpl_->dT->Value(); }
    8072
     73int Model::GetId(void) const {
     74  return pimpl_->modelId;
     75}
     76
    8177} // end namespace simulator
    8278} // end namespace flair
  • trunk/lib/FlairSimulator/src/Model.h

    r69 r158  
    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
     
    9392#endif
    9493  gui::TabWidget *GetTabWidget(void) const;
     94  int GetId(void) const;
    9595
    9696protected:
  • trunk/lib/FlairSimulator/src/Model_impl.cpp

    r151 r158  
    1818#include "Model_impl.h"
    1919#include "Simulator.h"
     20#include "Simulator_impl.h"
    2021#include "TabWidget.h"
    2122#include "Tab.h"
     
    5152
    5253#ifdef GL
    53 Model_impl::Model_impl(Model *self, std::string name,
    54                        ISceneManager *scenemanager, vrpn_Connection_IP *vrpn)
    55     : ISceneNode(scenemanager->getRootSceneNode(), scenemanager, -1),
    56       Thread(self, name, 50), vrpn_Tracker(name.c_str(), vrpn)
     54Model_impl::Model_impl(Model *self, std::string name,uint32_t modelId)
     55    : ISceneNode(getGui()->getSceneManager()->getRootSceneNode(), getGui()->getSceneManager(), -1),
     56      Thread(self, name, 50), vrpn_Tracker(name.c_str(), getSimulator()->pimpl_)
    5757
    5858#else
    59 Model_impl::Model_impl(Model *self, std::string name, vrpn_Connection_IP *vrpn)
    60     : Thread(self, name, 50), vrpn_Tracker(name.c_str(), vrpn)
     59Model_impl::Model_impl(Model *self, std::string name,uint32_t modelId)
     60    : Thread(self, name, 50), vrpn_Tracker(name.c_str(), getSimulator()->pimpl_)
    6161#endif
    6262{
    6363  this->self = self;
     64  this->modelId=modelId;
    6465
    6566#ifdef GL
     
    131132
    132133  self->AddDataToLog(output);
     134 
     135  getSimulator()->pimpl_->models.push_back(self);
    133136}
    134137
  • trunk/lib/FlairSimulator/src/Parser.cpp

    r138 r158  
    4040namespace flair {
    4141namespace simulator {
    42 Parser::Parser(Simulator *parent, int app_width, int app_height,
     42Parser::Parser(int app_width, int app_height,
    4343               int scene_width, int scene_height, std::string media_path,
    4444               std::string xmlFile)
    45     : Gui(parent, "Parser", app_width, app_height, scene_width, scene_height,
     45    : Gui("Parser", app_width, app_height, scene_width, scene_height,
    4646          media_path) {
    4747  this->media_path = media_path;
    48   this->parent = parent;
    4948  xmlNode *root_element = NULL;
    5049  doc = xmlReadFile(xmlFile.c_str(), NULL, 0);
     
    121120      if (fp != NULL) {
    122121        GenericObject *object =
    123             new GenericObject(parent, getGui()->getMesh((char *)xmlGetProp(cur_node, (xmlChar *)"model")));
     122            new GenericObject(getGui()->getMesh((char *)xmlGetProp(cur_node, (xmlChar *)"model")));
    124123        object->setPosition(
    125124            getMeshVect(cur_node->children, (xmlChar *)"position"));
     
    140139          getScolor(cur_node->children));
    141140          //SColor(100, 255, 100, 100));
    142       GenericObject *object = new GenericObject(parent, mesh);
     141      GenericObject *object = new GenericObject(mesh);
    143142      object->setPosition(getMeshVect(cur_node->children, (xmlChar *)"position"));
    144143      object->setRotation(getMeshVect(cur_node->children, (xmlChar *)"rotation"));
     
    152151                    atof((char *)xmlGetProp(cur_node, (xmlChar *)"eight"))));
    153152                       
    154       GenericObject *object =
    155           new GenericObject(parent, mesh);
     153      GenericObject *object =new GenericObject(mesh);
    156154      object->setPosition(
    157155          getMeshVect(cur_node->children, (xmlChar *)"position"));
  • trunk/lib/FlairSimulator/src/Parser.h

    r138 r158  
    3939  */
    4040public:
    41   Parser(Simulator *parent, int app_width, int app_height, int scene_width,
     41  Parser(int app_width, int app_height, int scene_width,
    4242         int scene_height, std::string media_path, std::string xmlFile);
    4343  ~Parser();
     
    4646  xmlDoc *doc;
    4747  std::string media_path;
    48   Simulator *parent;
    4948  void processElements(xmlNode *a_node);
    5049  void processObjects(xmlNode *a_node);
  • trunk/lib/FlairSimulator/src/SimuCameraGL.cpp

    r151 r158  
    4545
    4646SimuCameraGL::SimuCameraGL(const Model *parent, std::string name, int width,
    47                            int height, int x, int y, int dev_id)
    48     : SimuCamera(parent, name, width, height, 3, dev_id), SensorGL(parent) {
     47                           int height, int x, int y, uint32_t modelId,uint32_t deviceId)
     48    : SimuCamera(parent, name, width, height, 3, modelId,deviceId), SensorGL(parent) {
    4949  smgr = getGui()->getSceneManager();
    5050  camera = smgr->addCameraSceneNode();
    5151  camera->addAnimator(this);
    52   camera->setAspectRatio(4.0f / 3.0f); // on force a cause du view port
     52  camera->setAspectRatio((float)width /(float)height); // on force a cause du view port
    5353
    5454  this->width = width;
  • trunk/lib/FlairSimulator/src/SimuCameraGL.h

    r151 r158  
    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)
  • trunk/lib/FlairSimulator/src/SimuLaserGL.cpp

    r15 r158  
    3838namespace flair {
    3939namespace sensor {
    40 SimuLaserGL::SimuLaserGL(const Model *parent, std::string name, int dev_id)
    41     : SimuLaser(parent, name, dev_id), SensorGL(parent) {
     40SimuLaserGL::SimuLaserGL(const Model *parent, std::string name, uint32_t modelId,uint32_t deviceId)
     41    : SimuLaser(parent, name, modelId,deviceId), SensorGL(parent) {
    4242  Tab *setup_tab = new Tab(parent->GetTabWidget(), name);
    4343  position = new Vector3DSpinBox(setup_tab->NewRow(), "position", -2, 2, .01);
  • trunk/lib/FlairSimulator/src/SimuLaserGL.h

    r15 r158  
    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/lib/FlairSimulator/src/SimuUsGL.cpp

    r15 r158  
    3838namespace flair {
    3939namespace sensor {
    40 SimuUsGL::SimuUsGL(const Model *parent, std::string name, int dev_id)
    41     : SimuUs(parent, name, dev_id), SensorGL(parent) {
     40SimuUsGL::SimuUsGL(const Model *parent, std::string name, uint32_t modelId,uint32_t deviceId)
     41    : SimuUs(parent, name, modelId,deviceId), SensorGL(parent) {
    4242  Tab *setup_tab = new Tab(parent->GetTabWidget(), name);
    4343  position = new Vector3DSpinBox(setup_tab->NewRow(), "position", -2, 2, .01);
  • trunk/lib/FlairSimulator/src/SimuUsGL.h

    r15 r158  
    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/lib/FlairSimulator/src/Simulator.h

    r15 r158  
    2222
    2323class Simulator_impl;
     24class Model_impl;
    2425
    2526namespace flair {
     
    3637
    3738class Simulator : public core::FrameworkManager {
    38   friend class Model;
     39  friend class ::Model_impl;
    3940  friend class Gui;
    4041  friend class GenericObject;
  • trunk/lib/FlairSimulator/src/X4.cpp

    r157 r158  
    1616
    1717#include "X4.h"
    18 #include "Simulator.h"
    1918#include <SimuBldc.h>
    2019#include <TabWidget.h>
     
    4645namespace simulator {
    4746
    48 X4::X4(const Simulator *parent, std::string name, int dev_id)
    49     : Model(parent, name) {
     47X4::X4(std::string name, uint32_t modelId)
     48    : Model(name,modelId) {
    5049  Tab *setup_tab = new Tab(GetTabWidget(), "model");
    5150  m = new DoubleSpinBox(setup_tab->NewRow(), "mass (kg):", 0, 20, 0.1);
     
    7574                            5); // moment d'inertie d'un axe (N.m.s²/rad)
    7675
    77   motors = new SimuBldc(this, name, 4, dev_id);
     76  motors = new SimuBldc(this, name, 4, modelId,0);
    7877 
    7978  SetIsReady(true);
     
    9695
    9796  // cylinders are aligned with y axis
    98   red_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 255, 0, 0));
    99   black_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 128, 128, 128));
    100   motor = geo->createCylinderMesh(7.5, 15, 16); //,SColor(0, 128, 128, 128));
     97  IMesh *red_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 255, 0, 0));
     98  IMesh *black_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 128, 128, 128));
     99  IMesh *motor = geo->createCylinderMesh(7.5, 15, 16); //,SColor(0, 128, 128, 128));
    101100  // geo->drop();
    102101
    103102  ITexture *texture = getGui()->getTexture("carbone.jpg");
    104   fl_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
     103  MeshSceneNode *fl_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
    105104                             vector3df(0, 0, -135));
    106   fr_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
     105  MeshSceneNode *fr_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
    107106                             vector3df(0, 0, -45));
    108   rl_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
     107  MeshSceneNode *rl_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
    109108                             vector3df(0, 0, 135), texture);
    110   rr_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
     109  MeshSceneNode *rr_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
    111110                             vector3df(0, 0, 45), texture);
    112111
    113112  texture = getGui()->getTexture("metal047.jpg");
    114   fl_motor = new MeshSceneNode(this, motor, vector3df(70.71, -70.71, 2.5),
     113  MeshSceneNode *fl_motor = new MeshSceneNode(this, motor, vector3df(70.71, -70.71, 2.5),
    115114                               vector3df(90, 0, 0), texture);
    116   fr_motor = new MeshSceneNode(this, motor, vector3df(70.71, 70.71, 2.5),
     115  MeshSceneNode *fr_motor = new MeshSceneNode(this, motor, vector3df(70.71, 70.71, 2.5),
    117116                               vector3df(90, 0, 0), texture);
    118   rl_motor = new MeshSceneNode(this, motor, vector3df(-70.71, -70.71, 2.5),
     117  MeshSceneNode *rl_motor = new MeshSceneNode(this, motor, vector3df(-70.71, -70.71, 2.5),
    119118                               vector3df(90, 0, 0), texture);
    120   rr_motor = new MeshSceneNode(this, motor, vector3df(-70.71, 70.71, 2.5),
     119  MeshSceneNode *rr_motor = new MeshSceneNode(this, motor, vector3df(-70.71, 70.71, 2.5),
    121120                               vector3df(90, 0, 0), texture);
    122121
  • trunk/lib/FlairSimulator/src/X4.h

    r157 r158  
    3232}
    3333
    34 #ifdef GL
    35 namespace irr {
    36 namespace scene {
    37 class IMesh;
    38 }
    39 }
    40 #endif
    41 
    4234namespace flair {
    4335namespace simulator {
    44 class Simulator;
    4536class Blade;
    46 class MeshSceneNode;
    4737
    4838class X4 : public Model {
    4939public:
    50   X4(const Simulator *parent, std::string name, int dev_id);
     40  X4(std::string name, uint32_t modelId);
    5141  ~X4();
    5242#ifdef GL
     
    5545
    5646protected:
    57   irr::scene::IMesh *red_arm, *black_arm, *motor;
    58   MeshSceneNode *fl_arm, *fr_arm, *rl_arm, *rr_arm;
    59   MeshSceneNode *fl_motor, *fr_motor, *rl_motor, *rr_motor;
    6047  Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
    6148  core::Mutex *motor_speed_mutex;
  • trunk/lib/FlairSimulator/src/X8.cpp

    r157 r158  
    1616
    1717#include "X8.h"
    18 #include "Simulator.h"
    1918#include <SimuBldc.h>
    2019#include <TabWidget.h>
     
    4645namespace simulator {
    4746
    48 X8::X8(const Simulator *parent, std::string name, int dev_id)
    49     : Model(parent, name) {
     47X8::X8(std::string name, uint32_t modelId): Model( name,modelId) {
    5048  Tab *setup_tab = new Tab(GetTabWidget(), "model");
    5149  m = new DoubleSpinBox(setup_tab->NewRow(), "mass (kg):", 0, 20, 0.1);
     
    8482      0.1); // coefficient de forme des helices 1<S=1+Ss/Sprop<2 (sans unite)
    8583
    86   motors = new SimuBldc(this, name, 8, dev_id);
     84  motors = new SimuBldc(this, name, 8, modelId,0);
    8785 
    8886  SetIsReady(true);
     
    10199
    102100  // cylinders are aligned with y axis
    103   red_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 255, 0, 0));
    104   black_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 128, 128, 128));
    105   motor = geo->createCylinderMesh(7.5, 15, 16); //,SColor(0, 128, 128, 128));
     101  IMesh *red_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 255, 0, 0));
     102  IMesh *black_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 128, 128, 128));
     103  IMesh *motor = geo->createCylinderMesh(7.5, 15, 16); //,SColor(0, 128, 128, 128));
    106104  // geo->drop();
    107105
    108106  ITexture *texture = getGui()->getTexture("carbone.jpg");
    109   fl_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
     107  MeshSceneNode *fl_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
    110108                             vector3df(0, 0, -135));
    111   fr_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
     109  MeshSceneNode *fr_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
    112110                             vector3df(0, 0, -45));
    113   rl_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
     111  MeshSceneNode *rl_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
    114112                             vector3df(0, 0, 135), texture);
    115   rr_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
     113  MeshSceneNode *rr_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
    116114                             vector3df(0, 0, 45), texture);
    117115
    118116  texture = getGui()->getTexture("metal047.jpg");
    119   tfl_motor = new MeshSceneNode(this, motor, vector3df(70.71, -70.71, 2.5),
    120                                 vector3df(90, 0, 0), texture);
    121   tfr_motor = new MeshSceneNode(this, motor, vector3df(70.71, 70.71, 2.5),
    122                                 vector3df(90, 0, 0), texture);
    123   trl_motor = new MeshSceneNode(this, motor, vector3df(-70.71, -70.71, 2.5),
    124                                 vector3df(90, 0, 0), texture);
    125   trr_motor = new MeshSceneNode(this, motor, vector3df(-70.71, 70.71, 2.5),
    126                                 vector3df(90, 0, 0), texture);
    127 
    128   bfl_motor = new MeshSceneNode(this, motor, vector3df(70.71, -70.71, -17.5),
    129                                 vector3df(90, 0, 0), texture);
    130   bfr_motor = new MeshSceneNode(this, motor, vector3df(70.71, 70.71, -17.5),
    131                                 vector3df(90, 0, 0), texture);
    132   brl_motor = new MeshSceneNode(this, motor, vector3df(-70.71, -70.71, -17.5),
    133                                 vector3df(90, 0, 0), texture);
    134   brr_motor = new MeshSceneNode(this, motor, vector3df(-70.71, 70.71, -17.5),
     117  MeshSceneNode *tfl_motor = new MeshSceneNode(this, motor, vector3df(70.71, -70.71, 2.5),
     118                                vector3df(90, 0, 0), texture);
     119  MeshSceneNode *tfr_motor = new MeshSceneNode(this, motor, vector3df(70.71, 70.71, 2.5),
     120                                vector3df(90, 0, 0), texture);
     121  MeshSceneNode *trl_motor = new MeshSceneNode(this, motor, vector3df(-70.71, -70.71, 2.5),
     122                                vector3df(90, 0, 0), texture);
     123  MeshSceneNode *trr_motor = new MeshSceneNode(this, motor, vector3df(-70.71, 70.71, 2.5),
     124                                vector3df(90, 0, 0), texture);
     125
     126  MeshSceneNode *bfl_motor = new MeshSceneNode(this, motor, vector3df(70.71, -70.71, -17.5),
     127                                vector3df(90, 0, 0), texture);
     128  MeshSceneNode *bfr_motor = new MeshSceneNode(this, motor, vector3df(70.71, 70.71, -17.5),
     129                                vector3df(90, 0, 0), texture);
     130  MeshSceneNode *brl_motor = new MeshSceneNode(this, motor, vector3df(-70.71, -70.71, -17.5),
     131                                vector3df(90, 0, 0), texture);
     132  MeshSceneNode *brr_motor = new MeshSceneNode(this, motor, vector3df(-70.71, 70.71, -17.5),
    135133                                vector3df(90, 0, 0), texture);
    136134
  • trunk/lib/FlairSimulator/src/X8.h

    r157 r158  
    3232}
    3333
    34 #ifdef GL
    35 namespace irr {
    36 namespace scene {
    37 class IMesh;
    38 }
    39 }
    40 #endif
    41 
    4234namespace flair {
    4335namespace simulator {
    44 class Simulator;
    4536class Blade;
    46 class MeshSceneNode;
    4737
    4838class X8 : public Model {
    4939public:
    50   X8(const Simulator *parent, std::string name, int dev_id);
     40  X8(std::string name, uint32_t modelId);
    5141  ~X8();
    5242  virtual void Draw(void);
     
    5545protected:
    5646#ifdef GL
    57   irr::scene::IMesh *red_arm, *black_arm, *motor;
    58   MeshSceneNode *fl_arm, *fr_arm, *rl_arm, *rr_arm;
    59   MeshSceneNode *tfl_motor, *tfr_motor, *trl_motor, *trr_motor;
    60   MeshSceneNode *bfl_motor, *bfr_motor, *brl_motor, *brr_motor;
    6147  Blade *tfl_blade, *tfr_blade, *trl_blade, *trr_blade;
    6248  Blade *bfl_blade, *bfr_blade, *brl_blade, *brr_blade;
  • trunk/lib/FlairSimulator/src/unexported/GenericObject.h

    r134 r158  
    3434namespace flair {
    3535namespace simulator {
    36 class Simulator;
    3736
    3837class GenericObject {
     
    4039
    4140public:
    42   GenericObject(Simulator *parent,irr::scene::IMesh *mesh);
     41  GenericObject(irr::scene::IMesh *mesh);
    4342  virtual ~GenericObject();
    4443
  • trunk/lib/FlairSimulator/src/unexported/Model_impl.h

    r69 r158  
    6666                   {
    6767public:
    68 #ifdef GL
    69   Model_impl(flair::simulator::Model *self, std::string name,
    70              irr::scene::ISceneManager *scenemanager, vrpn_Connection_IP *vrpn);
    71 #else
    72   Model_impl(flair::simulator::Model *self, std::string name,
    73              vrpn_Connection_IP *vrpn);
    74 #endif
     68  Model_impl(flair::simulator::Model *self, std::string name,uint32_t modelId);
    7569  ~Model_impl();
    7670
     
    10094  flair::gui::TabWidget *tabwidget;
    10195  flair::gui::DoubleSpinBox *dT;
     96  int modelId;
    10297
    10398private:
  • trunk/lib/FlairSimulator/src/unexported/Simulator_impl.h

    r15 r158  
    2929}
    3030
     31class Model_impl;
     32
    3133class Simulator_impl : public vrpn_Connection_IP, private flair::core::Thread {
    32   friend class flair::simulator::Model;
     34  friend class ::Model_impl;
    3335  friend class flair::simulator::GenericObject;
    3436
Note: See TracChangeset for help on using the changeset viewer.