Changeset 158 in flair-src for trunk/lib/FlairSimulator/src/Model.cpp


Ignore:
Timestamp:
Mar 5, 2017, 10:50:56 AM (5 years ago)
Author:
Sanahuja Guillaume
Message:

corrected simu/device id for sensors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.