00001 #include <esg/explorer/RadiusExplorer.h> 00002 00003 using namespace esg; 00004 00005 bool RadiusExplorer::_process_leaf(SceneGraphObject& obj) 00006 { 00007 const Geometry* pGeom = obj.geometry(); 00008 if (!pGeom) return false; 00009 00010 double r = pGeom->radius(_trCentroid); 00011 if (r > _radius) _radius = r; 00012 return true; 00013 } 00014 00015 void RadiusExplorer::_accept_new_transformation(const Matrix4& trMat) 00016 { 00017 static Matrix3 rMat; 00018 static Vector3 tVec, sVec; 00019 trMat.get(rMat, tVec, sVec); 00020 ESG_INVERSE_TR_POINT(rMat, tVec, sVec, _centroid, _trCentroid); 00021 } 00022 00023