Further work on new MultipassTechnique/VolumeScene.
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
#include <osgVolume/Export>
|
||||
|
||||
#include <osg/Object>
|
||||
#include <osg/observer_ptr>
|
||||
#include <osg/Matrixd>
|
||||
#include <osg/TexGen>
|
||||
#include <osg/MatrixTransform>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -95,6 +98,36 @@ class OSGVOLUME_EXPORT Locator : public osg::Object
|
||||
LocatorCallbacks _locatorCallbacks;
|
||||
};
|
||||
|
||||
class OSGVOLUME_EXPORT TransformLocatorCallback : public Locator::LocatorCallback
|
||||
{
|
||||
public:
|
||||
|
||||
TransformLocatorCallback(osg::MatrixTransform* transform);
|
||||
|
||||
void locatorModified(Locator* locator);
|
||||
|
||||
protected:
|
||||
|
||||
osg::observer_ptr<osg::MatrixTransform> _transform;
|
||||
};
|
||||
|
||||
|
||||
class OSGVOLUME_EXPORT TexGenLocatorCallback : public Locator::LocatorCallback
|
||||
{
|
||||
public:
|
||||
|
||||
TexGenLocatorCallback(osg::TexGen* texgen, Locator* geometryLocator, Locator* imageLocator);
|
||||
|
||||
void locatorModified(Locator*);
|
||||
|
||||
protected:
|
||||
|
||||
osg::observer_ptr<osg::TexGen> _texgen;
|
||||
osg::observer_ptr<osgVolume::Locator> _geometryLocator;
|
||||
osg::observer_ptr<osgVolume::Locator> _imageLocator;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,18 +42,29 @@ class OSGVOLUME_EXPORT VolumeScene : public osg::Group
|
||||
|
||||
virtual ~VolumeScene();
|
||||
|
||||
struct TileData : public osg::Referenced
|
||||
{
|
||||
osg::NodePath nodePath;
|
||||
osg::ref_ptr<osg::RefMatrix> projectionMatrix;
|
||||
osg::ref_ptr<osg::RefMatrix> modelviewMatrix;
|
||||
};
|
||||
typedef std::list< osg::ref_ptr<TileData> > Tiles;
|
||||
|
||||
class ViewData : public osg::Referenced
|
||||
{
|
||||
public:
|
||||
ViewData();
|
||||
osg::ref_ptr<osg::Texture2D> _depthTexture;
|
||||
osg::ref_ptr<osg::Texture2D> _colorTexture;
|
||||
osg::ref_ptr<osg::Camera> _rttCamera;
|
||||
osg::ref_ptr<osg::Camera> _postCamera;
|
||||
osg::ref_ptr<osgUtil::RenderStage> _parentRenderStage;
|
||||
osg::ref_ptr<osg::Texture2D> _depthTexture;
|
||||
osg::ref_ptr<osg::Texture2D> _colorTexture;
|
||||
osg::ref_ptr<osg::Camera> _rttCamera;
|
||||
osg::ref_ptr<osg::Node> _backdropSubgraph;
|
||||
osg::ref_ptr<osg::Geometry> _geometry;
|
||||
osg::ref_ptr<osg::Vec3Array> _vertices;
|
||||
osg::ref_ptr<osg::StateSet> _stateset;
|
||||
osg::ref_ptr<osg::Uniform> _viewportSizeUniform;
|
||||
|
||||
Tiles _tiles;
|
||||
|
||||
typedef std::list< osg::NodePath > Tiles;
|
||||
Tiles _tiles;
|
||||
protected:
|
||||
virtual ~ViewData() {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user