osggraph: Avoid including car.h on header files
car.h defines a bunch of macros with a leading underscore (e.g.: _name) that can clash with symbols from other projects. More specifically, the _name macro was causing header files from OpenSceneGraph to break, since they already used _name for other purposes.
This commit is contained in:
parent
ec61c3700e
commit
a12444fa70
10 changed files with 37 additions and 13 deletions
|
@ -45,6 +45,8 @@
|
||||||
#include "OsgShader.h"
|
#include "OsgShader.h"
|
||||||
#include "OsgReflectionMapping.h"
|
#include "OsgReflectionMapping.h"
|
||||||
#include "OsgNodeMask.h"
|
#include "OsgNodeMask.h"
|
||||||
|
#include <car.h>
|
||||||
|
#include <raceman.h>
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
|
|
|
@ -19,17 +19,19 @@
|
||||||
#ifndef _OSGCAR_H_
|
#ifndef _OSGCAR_H_
|
||||||
#define _OSGCAR_H_
|
#define _OSGCAR_H_
|
||||||
|
|
||||||
#include <car.h>
|
|
||||||
#include <raceman.h>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <osg/TextureCubeMap>
|
#include <osg/TextureCubeMap>
|
||||||
#include <osg/LOD>
|
#include <osg/LOD>
|
||||||
|
|
||||||
|
#include "OsgLoader.h"
|
||||||
#include "OsgWheel.h"
|
#include "OsgWheel.h"
|
||||||
//#include "OsgBackFire.h"
|
//#include "OsgBackFire.h"
|
||||||
#include "OsgCarLight.h"
|
#include "OsgCarLight.h"
|
||||||
|
|
||||||
|
struct CarElt;
|
||||||
|
typedef struct CarElt tCarElt;
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
class SDCarShader;
|
class SDCarShader;
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
#include "OsgHUD.h"
|
#include "OsgHUD.h"
|
||||||
#include "OsgParticles.h"
|
#include "OsgParticles.h"
|
||||||
|
|
||||||
|
#include <raceman.h> //tSituation
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
//extern osg::Timer m_timer;
|
//extern osg::Timer m_timer;
|
||||||
|
|
|
@ -21,7 +21,11 @@
|
||||||
|
|
||||||
#include <camera.h>
|
#include <camera.h>
|
||||||
#include <graphic.h>
|
#include <graphic.h>
|
||||||
#include <raceman.h> //tSituation
|
#include <track.h>
|
||||||
|
#include <tgf.h>
|
||||||
|
|
||||||
|
struct Situation;
|
||||||
|
typedef struct Situation tSituation;
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,12 @@
|
||||||
#include <osg/Matrix>
|
#include <osg/Matrix>
|
||||||
#include <osg/ValueObject>
|
#include <osg/ValueObject>
|
||||||
|
|
||||||
|
#include "OsgCamera.h"
|
||||||
|
#include "OsgView.h"
|
||||||
|
#include "OsgScenery.h"
|
||||||
|
#include "OsgMain.h"
|
||||||
|
#include "OsgNodeMask.h"
|
||||||
|
|
||||||
#include <car.h>
|
#include <car.h>
|
||||||
#include <raceman.h>
|
#include <raceman.h>
|
||||||
#include <robottools.h>
|
#include <robottools.h>
|
||||||
|
@ -32,12 +38,6 @@
|
||||||
#include <guiscreen.h>
|
#include <guiscreen.h>
|
||||||
#include <graphic.h>
|
#include <graphic.h>
|
||||||
|
|
||||||
#include "OsgCamera.h"
|
|
||||||
#include "OsgView.h"
|
|
||||||
#include "OsgScenery.h"
|
|
||||||
#include "OsgMain.h"
|
|
||||||
#include "OsgNodeMask.h"
|
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
static char path[1024];
|
static char path[1024];
|
||||||
|
@ -2621,4 +2621,3 @@ void SDCameras::loadSpanValues()
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace osggraph
|
} // namespace osggraph
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,15 @@
|
||||||
#define _OSGCAMERA_H_
|
#define _OSGCAMERA_H_
|
||||||
|
|
||||||
#include <osg/Vec3>
|
#include <osg/Vec3>
|
||||||
|
#include <tgf.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <camera.h>
|
#include <camera.h>
|
||||||
|
|
||||||
|
struct CarElt;
|
||||||
|
struct Situation;
|
||||||
|
typedef struct CarElt tCarElt;
|
||||||
|
typedef struct Situation tSituation;
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
#define GR_ZOOM_IN 0
|
#define GR_ZOOM_IN 0
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "OsgMain.h"
|
#include "OsgMain.h"
|
||||||
#include "OsgCar.h"
|
#include "OsgCar.h"
|
||||||
#include "OsgHUD.h"
|
#include "OsgHUD.h"
|
||||||
|
#include <raceman.h> //tSituation
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,15 @@
|
||||||
#ifndef _OSGSCREENS_H_
|
#ifndef _OSGSCREENS_H_
|
||||||
#define _OSGSCREENS_H_
|
#define _OSGSCREENS_H_
|
||||||
|
|
||||||
#include <raceman.h> //tSituation
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <osg/Group>
|
#include <osg/Group>
|
||||||
|
|
||||||
#include "OsgView.h"
|
#include "OsgView.h"
|
||||||
|
|
||||||
|
struct Situation;
|
||||||
|
typedef struct Situation tSituation;
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
class SDDebugHUD;
|
class SDDebugHUD;
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
#include "OsgCar.h"
|
#include "OsgCar.h"
|
||||||
#include "OsgNodeMask.h"
|
#include "OsgNodeMask.h"
|
||||||
|
|
||||||
|
#include <raceman.h> //tSituation
|
||||||
|
#include <car.h> //tCarElt
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
static char buf[1024];
|
static char buf[1024];
|
||||||
|
|
|
@ -19,13 +19,16 @@
|
||||||
#define _OSGVIEWER_H_
|
#define _OSGVIEWER_H_
|
||||||
|
|
||||||
#include <camera.h>
|
#include <camera.h>
|
||||||
#include <raceman.h> //tSituation
|
|
||||||
#include <car.h> //tCarElt
|
|
||||||
|
|
||||||
#include "OsgCamera.h" //SDCameras
|
#include "OsgCamera.h" //SDCameras
|
||||||
|
|
||||||
#include <osg/FrontFace>
|
#include <osg/FrontFace>
|
||||||
|
|
||||||
|
struct Situation;
|
||||||
|
struct CarElt;
|
||||||
|
typedef struct CarElt tCarElt;
|
||||||
|
typedef struct Situation tSituation;
|
||||||
|
|
||||||
namespace osggraph {
|
namespace osggraph {
|
||||||
|
|
||||||
class SDFrameInfo;
|
class SDFrameInfo;
|
||||||
|
|
Loading…
Reference in a new issue