Switch to new vector conversion functions.
Modified Files: simgear/math/SGGeod.cxx simgear/math/SGQuat.hxx simgear/math/SGVec2.hxx simgear/math/SGVec3.hxx simgear/math/SGVec4.hxx simgear/scene/material/Effect.cxx simgear/scene/model/SGInteractionAnimation.cxx simgear/scene/model/SGMaterialAnimation.cxx simgear/scene/model/SGRotateTransform.cxx simgear/scene/model/SGScaleTransform.cxx simgear/scene/model/SGTranslateTransform.cxx simgear/scene/model/animation.cxx simgear/scene/model/particles.cxx simgear/scene/model/placement.cxx simgear/scene/model/shadanim.cxx simgear/scene/sky/CloudShaderGeometry.cxx simgear/scene/sky/cloud.cxx simgear/scene/sky/cloudfield.cxx simgear/scene/sky/dome.cxx simgear/scene/sky/sky.cxx simgear/scene/tgdb/GroundLightManager.cxx simgear/scene/tgdb/SGOceanTile.cxx simgear/scene/tgdb/SGTexturedTriangleBin.hxx simgear/scene/tgdb/SGVasiDrawable.cxx simgear/scene/tgdb/TreeBin.cxx simgear/scene/tgdb/obj.cxx simgear/scene/tgdb/pt_lights.cxx simgear/scene/util/SGUpdateVisitor.hxx
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
osg::Matrix SGGeod::makeSimulationFrameRelative() const
|
||||
{
|
||||
SGQuatd hlOr = SGQuatd::fromLonLat(*this);
|
||||
return osg::Matrix(hlOr.osg());
|
||||
return osg::Matrix(toOsg(hlOr));
|
||||
}
|
||||
|
||||
osg::Matrix SGGeod::makeSimulationFrame() const
|
||||
@@ -30,7 +30,7 @@ osg::Matrix SGGeod::makeSimulationFrame() const
|
||||
osg::Matrix result(makeSimulationFrameRelative());
|
||||
SGVec3d coord;
|
||||
SGGeodesy::SGGeodToCart(*this, coord);
|
||||
result.setTrans(coord.osg());
|
||||
result.setTrans(toOsg(coord));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ osg::Matrix SGGeod::makeZUpFrame() const
|
||||
osg::Matrix result(makeZUpFrameRelative());
|
||||
SGVec3d coord;
|
||||
SGGeodesy::SGGeodToCart(*this, coord);
|
||||
result.setTrans(coord.osg());
|
||||
result.setTrans(toOsg(coord));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,10 +55,6 @@ public:
|
||||
/// make sure it has at least 4 elements
|
||||
explicit SGQuat(const T* d)
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; data()[2] = d[2]; data()[3] = d[3]; }
|
||||
#ifndef NO_OPENSCENEGRAPH_INTERFACE
|
||||
explicit SGQuat(const osg::Quat& d)
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; data()[2] = d[2]; data()[3] = d[3]; }
|
||||
#endif
|
||||
|
||||
/// Return a unit quaternion
|
||||
static SGQuat unit(void)
|
||||
@@ -376,11 +372,6 @@ public:
|
||||
T (&data(void))[4]
|
||||
{ return _data; }
|
||||
|
||||
#ifndef NO_OPENSCENEGRAPH_INTERFACE
|
||||
osg::Quat osg() const
|
||||
{ return osg::Quat(data()[0], data()[1], data()[2], data()[3]); }
|
||||
#endif
|
||||
|
||||
/// Inplace addition
|
||||
SGQuat& operator+=(const SGQuat& v)
|
||||
{ data()[0]+=v(0);data()[1]+=v(1);data()[2]+=v(2);data()[3]+=v(3);return *this; }
|
||||
|
||||
@@ -55,12 +55,6 @@ public:
|
||||
template<typename S>
|
||||
explicit SGVec2(const SGVec2<S>& d)
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; }
|
||||
#ifndef NO_OPENSCENEGRAPH_INTERFACE
|
||||
explicit SGVec2(const osg::Vec2f& d)
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; }
|
||||
explicit SGVec2(const osg::Vec2d& d)
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; }
|
||||
#endif
|
||||
|
||||
/// Access by index, the index is unchecked
|
||||
const T& operator()(unsigned i) const
|
||||
@@ -96,11 +90,6 @@ public:
|
||||
T (&data(void))[2]
|
||||
{ return _data; }
|
||||
|
||||
#ifndef NO_OPENSCENEGRAPH_INTERFACE
|
||||
osg::Vec2d osg() const
|
||||
{ return osg::Vec2d(data()[0], data()[1]); }
|
||||
#endif
|
||||
|
||||
/// Inplace addition
|
||||
SGVec2& operator+=(const SGVec2& v)
|
||||
{ data()[0] += v(0); data()[1] += v(1); return *this; }
|
||||
|
||||
@@ -53,12 +53,6 @@ public:
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; data()[2] = d[2]; }
|
||||
explicit SGVec3(const SGVec2<T>& v2, const T& v3 = 0)
|
||||
{ data()[0] = v2[0]; data()[1] = v2[1]; data()[2] = v3; }
|
||||
#ifndef NO_OPENSCENEGRAPH_INTERFACE
|
||||
explicit SGVec3(const osg::Vec3f& d)
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; data()[2] = d[2]; }
|
||||
explicit SGVec3(const osg::Vec3d& d)
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; data()[2] = d[2]; }
|
||||
#endif
|
||||
|
||||
/// Access by index, the index is unchecked
|
||||
const T& operator()(unsigned i) const
|
||||
@@ -100,11 +94,6 @@ public:
|
||||
T (&data(void))[3]
|
||||
{ return _data; }
|
||||
|
||||
#ifndef NO_OPENSCENEGRAPH_INTERFACE
|
||||
osg::Vec3d osg() const
|
||||
{ return osg::Vec3d(data()[0], data()[1], data()[2]); }
|
||||
#endif
|
||||
|
||||
/// Inplace addition
|
||||
SGVec3& operator+=(const SGVec3& v)
|
||||
{ data()[0] += v(0); data()[1] += v(1); data()[2] += v(2); return *this; }
|
||||
|
||||
@@ -53,12 +53,6 @@ public:
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; data()[2] = d[2]; data()[3] = d[3]; }
|
||||
explicit SGVec4(const SGVec3<T>& v3, const T& v4 = 0)
|
||||
{ data()[0] = v3[0]; data()[1] = v3[1]; data()[2] = v3[2]; data()[3] = v4; }
|
||||
#ifndef NO_OPENSCENEGRAPH_INTERFACE
|
||||
explicit SGVec4(const osg::Vec4f& d)
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; data()[2] = d[2]; data()[3] = d[3]; }
|
||||
explicit SGVec4(const osg::Vec4d& d)
|
||||
{ data()[0] = d[0]; data()[1] = d[1]; data()[2] = d[2]; data()[3] = d[3]; }
|
||||
#endif
|
||||
|
||||
/// Access by index, the index is unchecked
|
||||
const T& operator()(unsigned i) const
|
||||
@@ -106,11 +100,6 @@ public:
|
||||
T (&data(void))[4]
|
||||
{ return _data; }
|
||||
|
||||
#ifndef NO_OPENSCENEGRAPH_INTERFACE
|
||||
osg::Vec4d osg() const
|
||||
{ return osg::Vec4d(data()[0], data()[1], data()[2], data()[3]); }
|
||||
#endif
|
||||
|
||||
/// Inplace addition
|
||||
SGVec4& operator+=(const SGVec4& v)
|
||||
{ data()[0]+=v(0);data()[1]+=v(1);data()[2]+=v(2);data()[3]+=v(3);return *this; }
|
||||
|
||||
Reference in New Issue
Block a user