/* osgEarth
 * Copyright 2025 Pelican Mapping
 * MIT License
 */

#ifndef OSGEARTHFEATURES_SCALE_FILTER_H
#define OSGEARTHFEATURES_SCALE_FILTER_H 1

#include <osgEarth/Common>
#include <osgEarth/Feature>
#include <osgEarth/Filter>

namespace osgEarth
{
    /**
     * The scale filter is kind of a poor-man's buffer. It simply
     * scales and re-centers the feature geometry within its envelope.
     */
    class OSGEARTH_EXPORT ScaleFilter : public FeatureFilter
    {
    public:
        ScaleFilter();
        ScaleFilter( double scale );

        virtual ~ScaleFilter() { }

        double scale() const { return _scale; }
        double& scale() { return _scale; }

    public:
        virtual FilterContext push( FeatureList& input, FilterContext& cx );

    protected:
        double _scale;
    };
} // namespace osgEarth

#endif // OSGEARTHFEATURES_SCALE_FILTER_H
