FGGroundCache::GroundProperty& gp = mGroundProperty;
// get some material information for use in the gear model
- gp.material = globals->get_matlib()->findMaterial(&node);
- if (gp.material) {
- gp.type = gp.material->get_solid() ? FGInterface::Solid : FGInterface::Water;
- return true;
- }
gp.type = FGInterface::Unknown;
osg::Referenced* base = node.getUserData();
if (!base)
bool oldBackfaceCulling = mBackfaceCulling;
updateCullMode(drawable->getStateSet());
+ FGGroundCache::GroundProperty& gp = mGroundProperty;
+ // get some material information for use in the gear model
+ gp.material = globals->get_matlib()->findMaterial(drawable->getStateSet());
+ if (gp.material)
+ gp.type = gp.material->get_solid() ? FGInterface::Solid : FGInterface::Water;
+
drawable->accept(mTriangleFunctor);
mBackfaceCulling = oldBackfaceCulling;
FGGroundCache::GroundProperty mGroundProperty;
};
-FGGroundCache::FGGroundCache()
+FGGroundCache::FGGroundCache() :
+ ground_radius(0.0),
+ cache_ref_time(0.0),
+ wire_id(0),
+ reference_wgs84_point(SGVec3d(0, 0, 0)),
+ reference_vehicle_radius(0.0),
+ found_ground(false),
+ _material(0)
{
- ground_radius = 0.0;
- cache_ref_time = 0.0;
- wire_id = 0;
- reference_wgs84_point = SGVec3d(0, 0, 0);
- reference_vehicle_radius = 0.0;
- found_ground = false;
}
FGGroundCache::~FGGroundCache()