From: <de...@us...> - 2003-01-11 10:54:31
|
Update of /cvsroot/csp/APPLICATIONS/CSPFlightSim/Source In directory sc8-pr-cvs1:/tmp/cvs-serv23217 Modified Files: Hud.cpp Log Message: no message Index: Hud.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPFlightSim/Source/Hud.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Hud.cpp 12 Dec 2002 21:13:45 -0000 1.3 --- Hud.cpp 11 Jan 2003 10:54:28 -0000 1.4 *************** *** 13,23 **** #include "HudTextElement.h" - extern int g_ScreenWidth; - extern int g_ScreenHeight; - Hud::Hud(StandardVector3 const & p_direction) { setName("Hud"); ! double const scale = 750.0; StandardVector3 t1 = scale * p_direction; setPosition(osg::Vec3(t1.x, t1.y, t1.z)); --- 13,20 ---- #include "HudTextElement.h" Hud::Hud(StandardVector3 const & p_direction) { setName("Hud"); ! double const scale = 0.8; StandardVector3 t1 = scale * p_direction; setPosition(osg::Vec3(t1.x, t1.y, t1.z)); *************** *** 46,50 **** sstaticString = ""; ! osg::Vec3 position( x * g_ScreenWidth, y, z * g_ScreenHeight); std::string sfontName; --- 43,47 ---- sstaticString = ""; ! osg::Vec3 position( x , 0, z ); std::string sfontName; *************** *** 80,84 **** // read the "static" text part of the hud in a unique geode ! osg::Geode * staticHud = osgNew osg::Geode; // static part is stored in a geode which contains all osgtext drawables --- 77,81 ---- // read the "static" text part of the hud in a unique geode ! osg::Geode * staticHud = new osg::Geode; // static part is stored in a geode which contains all osgtext drawables *************** *** 95,99 **** else { ! HudTextElement * phudTextElement = osgNew HudTextElement; std::istringstream isStream(buf); // read every hud element --- 92,96 ---- else { ! HudTextElement * phudTextElement = new HudTextElement; std::istringstream isStream(buf); // read every hud element *************** *** 110,124 **** { // next, add hsi to the hud ! HudGeometricElement * phsi = osgNew HudGeometricElement(std::string("HSI"), osg::Vec3(0.0,0.0,0.0)); // add hsi to hud (master transform) addChild(phsi); ! HudGeometricElement * pfpm = osgNew HudGeometricElement(std::string("FPM"), osg::Vec3(0.0,0.0,0.0)); addChild(pfpm); } ! osg::StateSet * state = osgNew osg::StateSet; ! osg::Depth* depth = osgNew osg::Depth; depth->setRange(0.0,0.0); --- 107,121 ---- { // next, add hsi to the hud ! HudGeometricElement * phsi = new HudGeometricElement(std::string("HSI"), osg::Vec3(0.0,0.0,0.0)); // add hsi to hud (master transform) addChild(phsi); ! HudGeometricElement * pfpm = new HudGeometricElement(std::string("FPM"), osg::Vec3(0.0,0.0,0.0)); addChild(pfpm); } ! osg::StateSet * state = new osg::StateSet; ! osg::Depth* depth = new osg::Depth; depth->setRange(0.0,0.0); |