21 #ifndef _OF_DEPTHPARTITIONER_ 22 #define _OF_DEPTHPARTITIONER_ 27 #include <osgViewer/View> 31 class DepthPartitionCallback;
48 bool setViewToPartition(osgViewer::View *view);
49 osgViewer::View* getViewToPartition() {
return _view; }
60 osg::ref_ptr<osg::Camera> _dpMainSlaveCamera;
61 osg::ref_ptr<DepthPartitionCallback> _dpCallback;
62 osgViewer::View *_view;
82 void reset() { _cameraManager->reset(); }
86 { _distAccumulator->setMaxDepth(depth); }
88 unsigned int getMaxTraversalDepth()
const 89 {
return _distAccumulator->getMaxDepth(); }
92 virtual void updateSlave(osg::View& view, osg::View::Slave& slave);
101 virtual std::string getCameraName(
unsigned int camNum) = 0;
104 virtual void enableCamera(
unsigned int camNum,
105 osg::Camera* mainCam,
106 const double &zNear,
const double &zFar) = 0;
109 virtual void disableCameras(
unsigned int start) = 0;
113 virtual void reset() = 0;
116 virtual double getMinZNear() {
return 1.0e-5; }
126 osg::ref_ptr<DistanceAccumulator> _distAccumulator;
129 osg::ref_ptr<CameraManager> _cameraManager;
131 unsigned int _numActiveCameras;
osg::Camera * getDPCamera()
Definition: DepthPartitioner.hpp:55
This class sets up depth partitioning.
Definition: DepthPartitioner.hpp:42
Definition: CoordinateAxes.hpp:29
Definition: DepthPartitioner.hpp:95
void setMaxTraversalDepth(unsigned int depth)
Definition: DepthPartitioner.hpp:85
DepthPartitionCallback * getCallback()
Definition: DepthPartitioner.hpp:52
void reset()
Definition: DepthPartitioner.hpp:82
This class analyzes and partitions a scene for rendering.
Definition: DepthPartitioner.hpp:76