/* osgEarth - Geospatial SDK for OpenSceneGraph
* Copyright 2018 Pelican Mapping
* MIT License
*/
#ifndef OSGEARTH_ENGINE_KEY_NODE_FACTORY
#define OSGEARTH_ENGINE_KEY_NODE_FACTORY 1

#include "Common"
#include <osgEarth/TileKey>
#include <osgEarth/Progress>
#include <osg/Node>

using namespace osgEarth;

namespace osgEarth { namespace Drivers { namespace MPTerrainEngine
{
    /**
    * Factory object that can create a scene graph given a TileKey.
    */
    class KeyNodeFactory : public osg::Referenced
    {
    public:

        /**
        * Creates a node for a tile key.
        */
        virtual osg::Node* createNode(
            const TileKey&    key, 
            bool              accumulate,
            bool              setupChildren,
            ProgressCallback* progress ) =0;


    protected:
        KeyNodeFactory();

        /** dtor */
        virtual ~KeyNodeFactory() { }
    };

} } } // namespace osgEarth::Drivers::MPTerrainEngine

#endif // OSGEARTH_ENGINE_KEY_NODE_FACTORY
