diff --git a/src/modules/graphic/osggraph/OsgCar.cpp b/src/modules/graphic/osggraph/OsgCar.cpp index 95b46a5d..3b1fa62a 100644 --- a/src/modules/graphic/osggraph/OsgCar.cpp +++ b/src/modules/graphic/osggraph/OsgCar.cpp @@ -1,12 +1,9 @@ #include - - #include "OsgLoader.h" #include "OsgCar.h" #include "OsgMath.h" - /*float * flatten(float mat[4][4]){ float res[16]; for(int i=0;i<16;i++){ @@ -20,8 +17,6 @@ }*/ - - osg::ref_ptr SDCar::loadCar(tCarElt *car) { this->car = car; @@ -177,6 +172,14 @@ void SDCar::updateCar() //this->car_branch->setMatrix(osg::Matrix(flatten(car->pub.posMat))); } +SDCars::SDCars(void) +{ + cars_branch = new osg::Group; +} + +SDCars::~SDCars(void) +{ +} void SDCars::addSDCar(SDCar * car) { diff --git a/src/modules/graphic/osggraph/OsgCar.h b/src/modules/graphic/osggraph/OsgCar.h index 6ee0b29a..b9f7112a 100644 --- a/src/modules/graphic/osggraph/OsgCar.h +++ b/src/modules/graphic/osggraph/OsgCar.h @@ -19,14 +19,15 @@ class SDCars { private : std::vector the_cars; - osg::ref_ptr cars_branch = new osg::Group; + osg::ref_ptr cars_branch; tSituation * situation; void addSDCar(SDCar * car); public : - + SDCars(void); + ~SDCars(void); osg::ref_ptr loadCars(tSituation * pSituation); void updateCars();