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


Ignore:
Timestamp:
04/08/16 15:40:57 (6 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

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

    r10 r15  
    3232using namespace flair::gui;
    3333
    34 namespace flair
    35 {
    36 namespace simulator
    37 {
     34namespace flair {
     35namespace simulator {
    3836
    39 Model::Model(const Simulator* parent,std::string name) : IODevice(parent,name)
    40 {
     37Model::Model(const Simulator *parent, std::string name)
     38    : IODevice(parent, name) {
    4139#ifdef GL
    42     pimpl_=new Model_impl(this,name,getGui()->getSceneManager(),parent->pimpl_);
     40  pimpl_ =
     41      new Model_impl(this, name, getGui()->getSceneManager(), parent->pimpl_);
    4342#else
    44     pimpl_=new Model_impl(this,name,parent->pimpl_);
     43  pimpl_ = new Model_impl(this, name, parent->pimpl_);
    4544#endif
    46     parent->pimpl_->models.push_back(this);
     45  parent->pimpl_->models.push_back(this);
    4746}
    4847
    49 Model::~Model()
    50 {
    51     delete pimpl_;
    52 }
     48Model::~Model() { delete pimpl_; }
    5349#ifdef GL
    54 ISceneNode* Model::getSceneNode() const
    55 {
    56     return pimpl_;
    57 }
     50ISceneNode *Model::getSceneNode() const { return pimpl_; }
    5851/*
    5952only used by dbt, to rewrite using conversion functions (irrlicht <-> simulator)
     
    6457}
    6558*/
    66 void Model::setScale(float value)
    67 {
    68     pimpl_->setScale(vector3df(value,value,value));
     59void Model::setScale(float value) {
     60  pimpl_->setScale(vector3df(value, value, value));
    6961}
    7062
    71 aabbox3d<f32> *Model::Box() const
    72 {
    73     return &(pimpl_->box);
     63aabbox3d<f32> *Model::Box() const { return &(pimpl_->box); }
     64
     65AnimPoursuite *Model::getCamera(void) const { return pimpl_->animator; }
     66
     67void Model::setTriangleSelector(ITriangleSelector *selector) {
     68
     69  pimpl_->selector = selector;
     70  pimpl_->setTriangleSelector(selector);
    7471}
    7572
    76 AnimPoursuite* Model::getCamera(void) const
    77 {
    78     return pimpl_->animator;
    79 }
    80 
    81 void Model::setTriangleSelector(ITriangleSelector* selector) {
    82 
    83     pimpl_->selector=selector;
    84     pimpl_->setTriangleSelector(selector);
    85 }
    86 
    87 void Model::setCameraFarValue(float zf) {
    88     pimpl_->camera->setFarValue(zf);
    89 }
     73void Model::setCameraFarValue(float zf) { pimpl_->camera->setFarValue(zf); }
    9074#endif
    9175
    92 TabWidget* Model::GetTabWidget(void) const
    93 {
    94     return pimpl_->tabwidget;
    95 }
     76TabWidget *Model::GetTabWidget(void) const { return pimpl_->tabwidget; }
    9677
    97 float Model::dT(void) const
    98 {
    99     return pimpl_->dT->Value();
    100 }
     78float Model::dT(void) const { return pimpl_->dT->Value(); }
    10179
    10280} // end namespace simulator
Note: See TracChangeset for help on using the changeset viewer.