Adapt to simgear SGMath change.
Simgears SGMath has lost its dependency on osg. Update includes and code using these methods.
This commit is contained in:
parent
60e49130b2
commit
c71c9aee0a
6 changed files with 7 additions and 4 deletions
|
@ -1298,7 +1298,7 @@ static void WorldCoordinate(osg::Matrix& obj_pos, double lat,
|
|||
double lon, double elev, double hdg, double slope)
|
||||
{
|
||||
SGGeod geod = SGGeod::fromDegM(lon, lat, elev);
|
||||
obj_pos = geod.makeZUpFrame();
|
||||
obj_pos = makeZUpFrame(geod);
|
||||
// hdg is not a compass heading, but a counter-clockwise rotation
|
||||
// around the Z axis
|
||||
obj_pos.preMult(osg::Matrix::rotate(hdg * SGD_DEGREES_TO_RADIANS,
|
||||
|
|
|
@ -1327,7 +1327,7 @@ static void WorldCoordinate(osg::Matrix& obj_pos, double lat,
|
|||
double lon, double elev, double hdg, double slope)
|
||||
{
|
||||
SGGeod geod = SGGeod::fromDegM(lon, lat, elev);
|
||||
obj_pos = geod.makeZUpFrame();
|
||||
obj_pos = makeZUpFrame(geod);
|
||||
// hdg is not a compass heading, but a counter-clockwise rotation
|
||||
// around the Z axis
|
||||
obj_pos.preMult(osg::Matrix::rotate(hdg * SGD_DEGREES_TO_RADIANS,
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
#include <osg/MatrixTransform>
|
||||
|
||||
#include <simgear/constants.h>
|
||||
#include <simgear/math/SGMath.hxx>
|
||||
#include <simgear/scene/sky/sky.hxx>
|
||||
#include <simgear/scene/sky/cloud.hxx>
|
||||
#include <simgear/scene/util/OsgMath.hxx>
|
||||
|
||||
#include <Main/fg_props.hxx>
|
||||
#include <Main/globals.hxx>
|
||||
|
@ -81,7 +81,7 @@ void FGPrecipitationMgr::init()
|
|||
SGGeod geod = SGGeod::fromDegM(fgGetDouble("/position/longitude-deg", 0.0),
|
||||
fgGetDouble("/position/latitude-deg", 0.0),
|
||||
0.0);
|
||||
osg::Matrix position(geod.makeZUpFrame());
|
||||
osg::Matrix position(makeZUpFrame(geod));
|
||||
// Move the precipitation object to player position
|
||||
transform->setMatrix(position);
|
||||
// Add to scene graph
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <simgear/sg_inlines.h>
|
||||
#include <simgear/math/sg_geodesy.hxx>
|
||||
#include <simgear/structure/exception.hxx>
|
||||
#include <simgear/scene/util/OsgMath.hxx>
|
||||
|
||||
using std::auto_ptr;
|
||||
using std::string;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#ifndef FG_POSITIONED_HXX
|
||||
#define FG_POSITIONED_HXX
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <simgear/misc/sg_path.hxx>
|
||||
#include <simgear/scene/material/EffectCullVisitor.hxx>
|
||||
#include <simgear/scene/material/matlib.hxx>
|
||||
#include <simgear/scene/util/OsgMath.hxx>
|
||||
#include <simgear/scene/util/SGReaderWriterOptions.hxx>
|
||||
#include <simgear/scene/tgdb/userdata.hxx>
|
||||
#include <simgear/scene/tgdb/TileEntry.hxx>
|
||||
|
|
Loading…
Reference in a new issue