diff --git a/VisualStudio/osgTerrain/osgTerrain.dsp b/VisualStudio/osgTerrain/osgTerrain.dsp index b75506e92..df2f48ec6 100644 --- a/VisualStudio/osgTerrain/osgTerrain.dsp +++ b/VisualStudio/osgTerrain/osgTerrain.dsp @@ -155,6 +155,14 @@ LIB32=link.exe -lib # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File +SOURCE=..\..\src\osgTerrain\Layer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\src\osgTerrain\Locator.cpp +# End Source File +# Begin Source File + SOURCE=..\..\src\osgTerrain\TerrainNode.cpp # End Source File # Begin Source File @@ -175,6 +183,14 @@ SOURCE=..\..\include\osgTerrain\Export # End Source File # Begin Source File +SOURCE=..\..\include\osgTerrain\Layer +# End Source File +# Begin Source File + +SOURCE=..\..\include\osgTerrain\Locator +# End Source File +# Begin Source File + SOURCE=..\..\include\osgTerrain\TerrainNode # End Source File # Begin Source File diff --git a/include/osgTerrain/Layer b/include/osgTerrain/Layer new file mode 100644 index 000000000..7834cc2a0 --- /dev/null +++ b/include/osgTerrain/Layer @@ -0,0 +1,50 @@ +/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield + * + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * (at your option) any later version. The full license is in LICENSE file + * included with this distribution, and on the openscenegraph.org website. + * + * 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 + * OpenSceneGraph Public License for more details. +*/ + +#ifndef OSGTERRAIN_LAYER +#define OSGTERRAIN_LAYER 1 + +#include + +#include + +namespace osgTerrain { + +class OSGTERRAIN_EXPORT Layer : public osg::Object +{ + public: + + Layer(); + + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Layer(const Layer&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); + + + void setLocator(Locator* locator) { _locator = locator; } + + Locator* getLocator() { return _locator.get(); } + + const Locator* getLocator() const { return _locator.get(); } + + protected: + + virtual ~Layer(); + + + osg::ref_ptr _locator; + +}; + +} + +#endif diff --git a/include/osgTerrain/Locator b/include/osgTerrain/Locator new file mode 100644 index 000000000..e54f688df --- /dev/null +++ b/include/osgTerrain/Locator @@ -0,0 +1,43 @@ +/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield + * + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * (at your option) any later version. The full license is in LICENSE file + * included with this distribution, and on the openscenegraph.org website. + * + * 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 + * OpenSceneGraph Public License for more details. +*/ + +#ifndef OSGTERRAIN_LOCATOR +#define OSGTERRAIN_LOCATOR 1 + +#include + +#include + +namespace osgTerrain { + +class TerrainNode; + +class OSGTERRAIN_EXPORT Locator : public osg::Object +{ + public: + + Locator(); + + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Locator(const Locator&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); + + + protected: + + virtual ~Locator(); + +}; + +} + +#endif diff --git a/src/osgTerrain/CMakeLists.txt b/src/osgTerrain/CMakeLists.txt index ccce12362..2e4e25d15 100644 --- a/src/osgTerrain/CMakeLists.txt +++ b/src/osgTerrain/CMakeLists.txt @@ -8,6 +8,8 @@ SET(LIB_NAME osgTerrain) SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME}) SET(LIB_PUBLIC_HEADERS ${HEADER_PATH}/Export + ${HEADER_PATH}/Locator + ${HEADER_PATH}/Layer ${HEADER_PATH}/TerrainNode ${HEADER_PATH}/TerrainTechnique ${HEADER_PATH}/Version @@ -17,6 +19,8 @@ SET(LIB_PUBLIC_HEADERS ADD_LIBRARY(${LIB_NAME} ${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC} ${LIB_PUBLIC_HEADERS} + Layer.cpp + Locator.cpp TerrainNode.cpp TerrainTechnique.cpp Version.cpp diff --git a/src/osgTerrain/GNUmakefile b/src/osgTerrain/GNUmakefile index ba1e2c471..5dca7d8b5 100644 --- a/src/osgTerrain/GNUmakefile +++ b/src/osgTerrain/GNUmakefile @@ -3,6 +3,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES = \ + Locator.cpp\ + Layer.cpp\ TerrainNode.cpp\ TerrainTechnique.cpp\ Version.cpp\ diff --git a/src/osgTerrain/Layer.cpp b/src/osgTerrain/Layer.cpp new file mode 100644 index 000000000..f5463f802 --- /dev/null +++ b/src/osgTerrain/Layer.cpp @@ -0,0 +1,29 @@ +/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield + * + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * (at your option) any later version. The full license is in LICENSE file + * included with this distribution, and on the openscenegraph.org website. + * + * 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 + * OpenSceneGraph Public License for more details. +*/ + +#include + +using namespace osgTerrain; + +Layer::Layer() +{ +} + +Layer::Layer(const Layer& Layer,const osg::CopyOp& copyop): + osg::Object(Layer,copyop) +{ +} + +Layer::~Layer() +{ +} diff --git a/src/osgTerrain/Locator.cpp b/src/osgTerrain/Locator.cpp new file mode 100644 index 000000000..a76c370d5 --- /dev/null +++ b/src/osgTerrain/Locator.cpp @@ -0,0 +1,29 @@ +/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield + * + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * (at your option) any later version. The full license is in LICENSE file + * included with this distribution, and on the openscenegraph.org website. + * + * 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 + * OpenSceneGraph Public License for more details. +*/ + +#include + +using namespace osgTerrain; + +Locator::Locator() +{ +} + +Locator::Locator(const Locator& Locator,const osg::CopyOp& copyop): + osg::Object(Locator,copyop) +{ +} + +Locator::~Locator() +{ +}