gp.type = gp.material->get_solid() ? FGInterface::Solid : FGInterface::Water;
return true;
}
+ gp.type = FGInterface::Unknown;
osg::Referenced* base = node.getUserData();
if (!base)
return true;
t.rotation = mGroundProperty.rot;
t.rotation_pivot = mGroundProperty.pivot - mGroundCache->cache_center;
t.type = mGroundProperty.type;
- t.material=mGroundProperty.material;
+ t.material = mGroundProperty.material;
mGroundCache->triangles.push_back(t);
}
}
isectpoint.osg() = isectpoint.osg()*mLocalToGlobal;
isectpoint += mGroundCache->cache_center;
double this_radius = length(isectpoint);
- if (mGroundCache->ground_radius < this_radius)
+ if (mGroundCache->ground_radius < this_radius) {
mGroundCache->ground_radius = this_radius;
+ mGroundCache->_type = mGroundProperty.type;
+ mGroundCache->_material = mGroundProperty.material;
+ }
}
}
// The altitude is the distance of the requested point from the
// contact point.
*agl = dot(down, contact - dpt);
- *type = FGInterface::Unknown;
+ *type = _type;
+ if (material)
+ *material = _material;
return ret;
}
// Approximate ground radius.
// In case the aircraft is too high above ground.
double ground_radius;
+ // Ground type
+ int _type;
+ // the simgear material reference, contains friction coeficients ...
+ const SGMaterial* _material;
// The time reference for later call to intersection test routines.
// Is required since we will have moving triangles in carriers.
double cache_ref_time;