beziercurve.hxx
interpolater.hxx
leastsqs.hxx
- project.hxx
sg_geodesy.hxx
sg_types.hxx
sg_random.h
SGGeodesy.cxx
interpolater.cxx
leastsqs.cxx
- project.cxx
sg_random.c
)
+++ /dev/null
-// Copyright (C) 2010 Tim Moore moore@bricoworks.com
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Library General Public
-// License as published by the Free Software Foundation; either
-// version 2 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Library General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// 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 "project.hxx"
-
-#ifndef NO_OPENSCENEGRAPH_INTERFACE
-
-#include <osg/Math>
-#include <osg/Matrixd>
-
-namespace simgear
-{
-GLint project(GLdouble objX, GLdouble objY, GLdouble objZ,
- const GLdouble *model, const GLdouble *proj, const GLint *view,
- GLdouble* winX, GLdouble* winY, GLdouble* winZ)
-{
- using namespace osg;
- Vec4d obj(objX, objY, objZ, 1.0);
- Matrixd Mmodel(model), Mproj(proj);
- Matrixd Mwin = (Matrixd::translate(1.0, 1.0, 1.0)
- * Matrixd::scale(0.5 * view[2], 0.5 * view[3], 0.5)
- * Matrixd::translate(view[0], view[1], 0.0));
- Vec4d result = obj * Mmodel * Mproj * Mwin;
- if (equivalent(result.w(), 0.0))
- return GL_FALSE;
- result = result / result.w();
- *winX = result.x(); *winY = result.y(); *winZ = result.z();
- return GL_TRUE;
-}
-
-}
-
-#endif // of NO_OPENSCENEGRAPH_INTERFACE
-
+++ /dev/null
-// Copyright (C) 2010 Tim Moore moore@bricoworks.com
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Library General Public
-// License as published by the Free Software Foundation; either
-// version 2 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Library General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-#ifndef SIMGEAR_PROJECT_HXX
-#define SIMGEAR_PROJECT_HXX 1
-
-#ifndef NO_OPENSCENEGRAPH_INTERFACE
-
-#include <osg/GL>
-
-namespace simgear
-{
-// Replacement for gluProject. OSG doesn't link in GLU anymore.
-extern GLint project(GLdouble objX, GLdouble objY, GLdouble objZ,
- const GLdouble *model, const GLdouble *proj,
- const GLint *view,
- GLdouble* winX, GLdouble* winY, GLdouble* winZ);
-}
-
-#endif // of NO_OPENSCENEGRAPH_INTERFACE
-
-#endif
-
include (SimGearComponent)
set(HEADERS
- PathOptions.hxx
ResourceManager.hxx
interpolator.hxx
sg_dir.hxx
)
set(SOURCES
- PathOptions.cxx
ResourceManager.cxx
interpolator.cxx
sg_dir.cxx
+++ /dev/null
-// PathOptions.cxx -- make an osgDB Options object from a path
-// Copyright (C) 2007 Tim Moore timoore@redhat.com
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Library General Public
-// License as published by the Free Software Foundation; either
-// version 2 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Library General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-// $Id$
-
-#ifdef HAVE_CONFIG_H
-# include <simgear_config.h>
-#endif
-
-#ifndef NO_OPENSCENEGRAPH_INTERFACE
-
-#include <osgDB/Registry>
-
-#include "PathOptions.hxx"
-
-using namespace simgear;
-
-osgDB::ReaderWriter::Options* simgear::makeOptionsFromPath(const SGPath& path)
-{
- using namespace osgDB;
- ReaderWriter::Options *options
- = new ReaderWriter::Options(*(Registry::instance()->getOptions()));
- options->setDatabasePath(path.str());
- return options;
-}
-
-#endif // of NO_OPENSCENEGRAPH_INTERFACE
+++ /dev/null
-// PathOptions.hxx -- make an osgDB Options object from a path
-// Copyright (C) 2007 Tim Moore timoore@redhat.com
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Library General Public
-// License as published by the Free Software Foundation; either
-// version 2 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Library General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-// $Id$
-
-#ifndef PATHOPTIONSHXX
-#define PATHOPTIONSHXX 1
-
-#ifndef NO_OPENSCENEGRAPH_INTERFACE
-#include <osgDB/ReaderWriter>
-#include <simgear/misc/sg_path.hxx>
-
-namespace simgear
-{
-osgDB::ReaderWriter::Options* makeOptionsFromPath(const SGPath&);
-}
-#endif
-
-#endif
#endif
#include <simgear/math/sg_random.h>
-#include <simgear/misc/PathOptions.hxx>
+#include <simgear/scene/util/PathOptions.hxx>
#include <simgear/debug/logstream.hxx>
#include <simgear/scene/model/model.hxx>
#include <simgear/scene/util/RenderConstants.hxx>
#include <simgear/constants.h>
#include <simgear/screen/colors.hxx>
#include <simgear/scene/model/model.hxx>
-#include <simgear/misc/PathOptions.hxx>
+#include <simgear/scene/util/PathOptions.hxx>
#include "sphere.hxx"
#include "moon.hxx"
#include <simgear/math/sg_random.h>
#include <simgear/misc/sg_path.hxx>
-#include <simgear/misc/PathOptions.hxx>
+#include <simgear/scene/util/PathOptions.hxx>
#include <simgear/props/props.hxx>
#include <simgear/scene/model/model.hxx>
#include <simgear/scene/util/SGReaderWriterOptions.hxx>
#include <osgDB/ReadFile>
#include <simgear/math/SGMath.hxx>
-#include <simgear/misc/PathOptions.hxx>
+#include <simgear/scene/util/PathOptions.hxx>
#include <simgear/screen/colors.hxx>
#include <simgear/scene/model/model.hxx>
#include "oursun.hxx"
StateAttributeFactory.hxx
UpdateOnceCallback.hxx
VectorArrayAdapter.hxx
+ PathOptions.hxx
+ project.hxx
)
set(SOURCES
SplicingVisitor.cxx
StateAttributeFactory.cxx
UpdateOnceCallback.cxx
+ PathOptions.cxx
+ project.cxx
)
simgear_scene_component(util scene/util "${SOURCES}" "${HEADERS}")
--- /dev/null
+// PathOptions.cxx -- make an osgDB Options object from a path
+// Copyright (C) 2007 Tim Moore timoore@redhat.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// $Id$
+
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
+#include <osgDB/Registry>
+
+#include "PathOptions.hxx"
+
+using namespace simgear;
+
+osgDB::ReaderWriter::Options* simgear::makeOptionsFromPath(const SGPath& path)
+{
+ using namespace osgDB;
+ ReaderWriter::Options *options
+ = new ReaderWriter::Options(*(Registry::instance()->getOptions()));
+ options->setDatabasePath(path.str());
+ return options;
+}
--- /dev/null
+// PathOptions.hxx -- make an osgDB Options object from a path
+// Copyright (C) 2007 Tim Moore timoore@redhat.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// $Id$
+
+#ifndef PATHOPTIONSHXX
+#define PATHOPTIONSHXX 1
+
+#include <osgDB/ReaderWriter>
+#include <simgear/misc/sg_path.hxx>
+
+namespace simgear
+{
+osgDB::ReaderWriter::Options* makeOptionsFromPath(const SGPath&);
+}
+
+#endif
# include <simgear_config.h>
#endif
-#include <simgear/math/project.hxx>
-#include <simgear/misc/PathOptions.hxx>
#include <simgear/math/SGMath.hxx>
#include <osg/Math>
#include <osg/Matrixd>
-#include <osgDB/Registry>
-
-namespace simgear
-{
-GLint project(GLdouble objX, GLdouble objY, GLdouble objZ,
- const GLdouble *model, const GLdouble *proj, const GLint *view,
- GLdouble* winX, GLdouble* winY, GLdouble* winZ)
-{
- using namespace osg;
- Vec4d obj(objX, objY, objZ, 1.0);
- Matrixd Mmodel(model), Mproj(proj);
- Matrixd Mwin = (Matrixd::translate(1.0, 1.0, 1.0)
- * Matrixd::scale(0.5 * view[2], 0.5 * view[3], 0.5)
- * Matrixd::translate(view[0], view[1], 0.0));
- Vec4d result = obj * Mmodel * Mproj * Mwin;
- if (equivalent(result.w(), 0.0))
- return GL_FALSE;
- result = result / result.w();
- *winX = result.x(); *winY = result.y(); *winZ = result.z();
- return GL_TRUE;
-}
-
-osgDB::ReaderWriter::Options* makeOptionsFromPath(const SGPath& path)
-{
- using namespace osgDB;
- ReaderWriter::Options *options
- = new ReaderWriter::Options(*(Registry::instance()->getOptions()));
- options->setDatabasePath(path.str());
- return options;
-}
-
-
-}
osg::Matrix SGGeod::makeSimulationFrameRelative() const
{
--- /dev/null
+// Copyright (C) 2010 Tim Moore moore@bricoworks.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// 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 "project.hxx"
+
+#include <osg/Math>
+#include <osg/Matrixd>
+
+namespace simgear
+{
+GLint project(GLdouble objX, GLdouble objY, GLdouble objZ,
+ const GLdouble *model, const GLdouble *proj, const GLint *view,
+ GLdouble* winX, GLdouble* winY, GLdouble* winZ)
+{
+ using namespace osg;
+ Vec4d obj(objX, objY, objZ, 1.0);
+ Matrixd Mmodel(model), Mproj(proj);
+ Matrixd Mwin = (Matrixd::translate(1.0, 1.0, 1.0)
+ * Matrixd::scale(0.5 * view[2], 0.5 * view[3], 0.5)
+ * Matrixd::translate(view[0], view[1], 0.0));
+ Vec4d result = obj * Mmodel * Mproj * Mwin;
+ if (equivalent(result.w(), 0.0))
+ return GL_FALSE;
+ result = result / result.w();
+ *winX = result.x(); *winY = result.y(); *winZ = result.z();
+ return GL_TRUE;
+}
+
+} // of namespace simgear
+
--- /dev/null
+// Copyright (C) 2010 Tim Moore moore@bricoworks.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+#ifndef SIMGEAR_PROJECT_HXX
+#define SIMGEAR_PROJECT_HXX 1
+
+#include <osg/GL>
+
+namespace simgear
+{
+// Replacement for gluProject. OSG doesn't link in GLU anymore.
+extern GLint project(GLdouble objX, GLdouble objY, GLdouble objZ,
+ const GLdouble *model, const GLdouble *proj,
+ const GLint *view,
+ GLdouble* winX, GLdouble* winY, GLdouble* winZ);
+}
+
+#endif
+
#include <windows.h>
#endif
-#include <simgear/math/project.hxx>
+#include <simgear/scene/util/project.hxx>
#include "tr.h"