|
osgEarth 2.1.1
|
Inheritance diagram for osgEarth::Features::CentroidFilter:
Collaboration diagram for osgEarth::Features::CentroidFilter:Public Member Functions | |
| CentroidFilter () | |
| virtual FilterContext | push (FeatureList &input, FilterContext &context) |
Replaces each feature's geometry with a single-point centroid.
Definition at line 34 of file CentroidFilter.
| CentroidFilter::CentroidFilter | ( | ) |
Definition at line 28 of file CentroidFilter.cpp.
{
//NOP
}
| FilterContext CentroidFilter::push | ( | FeatureList & | input, |
| FilterContext & | context | ||
| ) | [virtual] |
Implements osgEarth::Features::FeatureFilter.
Definition at line 34 of file CentroidFilter.cpp.
{
for( FeatureList::iterator i = features.begin(); i != features.end(); ++i )
{
Feature* f = i->get();
Geometry* geom = f->getGeometry();
if ( !geom )
continue;
PointSet* newGeom = new PointSet();
newGeom->push_back( geom->getBounds().center() );
f->setGeometry( newGeom );
}
return context;
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.3