Simgears SGMath has lost its dependency on osg.
Update includes and code using these methods.
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,
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,
#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>
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
#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;
#ifndef FG_POSITIONED_HXX
#define FG_POSITIONED_HXX
+#include <string>
#include <vector>
#include <simgear/structure/SGSharedPtr.hxx>
#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>