Modified Files:
src/FDM/groundcache.cxx: Tim Moore: fix for groundcache problems.
This commit is contained in:
parent
8955ad14db
commit
8627dd1669
1 changed files with 10 additions and 2 deletions
|
@ -370,15 +370,23 @@ public:
|
||||||
|
|
||||||
virtual void apply(osg::Transform& transform)
|
virtual void apply(osg::Transform& transform)
|
||||||
{
|
{
|
||||||
|
if (!enterNode(transform))
|
||||||
|
return;
|
||||||
|
bool oldBackfaceCulling = mBackfaceCulling;
|
||||||
|
bool oldSphIsec = sphIsec;
|
||||||
|
FGGroundCache::GroundProperty oldGp = mGroundProperty;
|
||||||
/// transform the caches center to local coords
|
/// transform the caches center to local coords
|
||||||
osg::Matrix oldLocalToGlobal = mLocalToGlobal;
|
osg::Matrix oldLocalToGlobal = mLocalToGlobal;
|
||||||
transform.computeLocalToWorldMatrix(mLocalToGlobal, this);
|
transform.computeLocalToWorldMatrix(mLocalToGlobal, this);
|
||||||
|
|
||||||
// walk the children
|
// walk the children
|
||||||
apply((osg::Group&)transform);
|
traverse(transform);
|
||||||
|
|
||||||
// Restore that one
|
// Restore that one
|
||||||
mLocalToGlobal = oldLocalToGlobal;
|
mLocalToGlobal = oldLocalToGlobal;
|
||||||
|
sphIsec = oldSphIsec;
|
||||||
|
mBackfaceCulling = oldBackfaceCulling;
|
||||||
|
mGroundProperty = oldGp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void addTriangle(const osg::Vec3& v1, const osg::Vec3& v2,
|
void addTriangle(const osg::Vec3& v1, const osg::Vec3& v2,
|
||||||
|
|
Loading…
Reference in a new issue