10 #include <vtkSphereSource.h>
11 #include <vtkPolyDataMapper.h>
26 vtkSmartPointer<vtkCamera> cam = ren->GetActiveCamera();
27 cam->GetFrustumPlanes(ren->GetTiledAspectRatio(), planes);
29 cam->GetClippingRange(clip);
38 cam->GetPosition(position);
40 cam->GetDirectionOfProjection(dir);
44 std::vector<lvr2::BaseVector<float> > centroids;
45 std::vector<size_t> indices;
49 double scale = cam->GetParallelScale();
51 cam->SetParallelScale(1.0);
53 double planes_high[24];
54 cam->GetFrustumPlanes(ren->GetTiledAspectRatio(), planes_high);
56 cam->SetParallelScale(scale);
57 cam->SetClippingRange(clip[0], clip[1]);
58 std::vector<lvr2::BaseVector<float> > centroids2;
59 std::vector<size_t> indices2;
64 for(
size_t i = 0; i < centroids2.size(); ++i)
66 highResArea.
expand(centroids2[i]);
94 for(
size_t i = 0; i < indices.size(); ++i)
96 lowRes.at(indices[i])->VisibilityOn();
100 for(
auto& it: highRes)
102 if(std::find(indices2.begin(), indices2.end(), it.first) != indices2.end())
106 it.second->VisibilityOn();
108 if(lowRes.size() > 0)
110 lowRes.at(it.first)->VisibilityOff();
117 it.second->VisibilityOff();