// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
#include <osg/Transform>
#include <simgear/debug/logstream.hxx>
#include "CheckSceneryVisitor.hxx"
#include "SGPagedLOD.hxx"
+#include <simgear/math/SGMath.hxx>
+
using namespace simgear;
-CheckSceneryVisitor::CheckSceneryVisitor(osgDB::DatabasePager* dbp, osg::Vec3 &position, double range)
+CheckSceneryVisitor::CheckSceneryVisitor(osgDB::DatabasePager* dbp, const osg::Vec3 &position, double range)
:osg::NodeVisitor(osg::NodeVisitor::NODE_VISITOR,
osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN),
-_loaded(true), _position(position), _range(range), _dbp(dbp)
+_position(position), _range(range), _loaded(true), _dbp(dbp)
{
_viewMatrices.push_back(osg::Matrix::identity());
}