forked from speed-dreams/speed-dreams-code
update class SDCars for buil with gcc < 4.7
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5047 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 05ee495cb9cc8b0e1351c75356e1afd276128c5c Former-commit-id: 757072d92a175f12b8401ea2f9bc8c2885efaa65
This commit is contained in:
parent
ba3edc6e83
commit
2361add693
2 changed files with 11 additions and 7 deletions
|
@ -1,12 +1,9 @@
|
|||
#include <osg/MatrixTransform>
|
||||
|
||||
|
||||
|
||||
#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<osg::Node> 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)
|
||||
{
|
||||
|
|
|
@ -19,14 +19,15 @@ class SDCars
|
|||
{
|
||||
private :
|
||||
std::vector<SDCar *> the_cars;
|
||||
osg::ref_ptr<osg::Group> cars_branch = new osg::Group;
|
||||
osg::ref_ptr<osg::Group> cars_branch;
|
||||
tSituation * situation;
|
||||
|
||||
void addSDCar(SDCar * car);
|
||||
|
||||
public :
|
||||
|
||||
|
||||
SDCars(void);
|
||||
~SDCars(void);
|
||||
|
||||
osg::ref_ptr<osg::Node> loadCars(tSituation * pSituation);
|
||||
void updateCars();
|
||||
|
|
Loading…
Reference in a new issue