/******************************************************************************
** Copyright (c) 2025 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/

//! \file DtIndirectGeoCdbCallbackGs.h
//! \brief DtIndirectGeoCdbCallbackGs
//! \ingroup osgdb_osgearth_model_cdb

#pragma once

#include <osg/BoundingBox>
#include <osg/Drawable>
#include <osgdb_osgearth_model_cdb/DtCDBGroupNode.h>

namespace osg
{
   class CopyOp;
}

namespace makVrv
{
   namespace oe
   {
      namespace CDB
      {
         class DtCDBGeoTypicalIndirectGeo;

         //! compute bound callback for indirect geometries so they can access the DtCDBGeoTypicalIndirectGeo bounds
         //! \ingroup vrvOsg
         class DtIndirectGeoCdbCallbackGt : public osg::Drawable::ComputeBoundingBoxCallback
         {
         public:
            //!Constructor
            DtIndirectGeoCdbCallbackGt(DtCDBGeoTypicalIndirectGeo* provider, Quadrant quadrant);

            //!Copy Constructor
            DtIndirectGeoCdbCallbackGt(const DtIndirectGeoCdbCallbackGt& rhs, const osg::CopyOp& copyop);

            //! Destructor
            virtual ~DtIndirectGeoCdbCallbackGt();

         private:
            //! Copy Constructor not implemented  -- Copy Not Allowed      
            DtIndirectGeoCdbCallbackGt(const DtIndirectGeoCdbCallbackGt &other);
            //! Assignment Operator Not implemented – Assignment Not Allowed      
            DtIndirectGeoCdbCallbackGt &operator=(const DtIndirectGeoCdbCallbackGt &other);
         
         public:
            //! override for compute bounding box callback which returns the calculated bounding box for the specified drawable.
            virtual osg::BoundingBox computeBound(const osg::Drawable& drawable) const;

         protected:

            const DtCDBGeoTypicalIndirectGeo* myProvider;
            const Quadrant myQuadrant;
         };
      }
   }
}
