OpenSceneGraph 3.6.5
MultipassTechnique
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGVOLUME_MULTIPASSTECHNIQUE
15#define OSGVOLUME_MULTIPASSTECHNIQUE 1
16
18#include <osg/MatrixTransform>
19#include <osg/Texture2D>
20
21namespace osgVolume {
22
23
24
26{
27 public:
28
30
32
34
35 virtual void init();
36
37 virtual void update(osgUtil::UpdateVisitor* nv);
38
40
41 virtual void cull(osgUtil::CullVisitor* cv);
42
44 virtual void cleanSceneGraph();
45
47 virtual void traverse(osg::NodeVisitor& nv);
48
55
57
80
83 virtual TileData* createTileData(osgUtil::CullVisitor* cv) { return new MultipassTileData(cv, this); }
84
85 protected:
86
88
90
91 typedef std::map<osgUtil::CullVisitor::Identifier*, osg::Matrix> ModelViewMatrixMap;
92
93 OpenThreads::Mutex _mutex;
95
98
99 osg::StateSet* createStateSet(osg::StateSet* statesetPrototype, osg::Program* programPrototype, osg::Shader* shaderToAdd1=0, osg::Shader* shaderToAdd2=0);
100
112
113 typedef std::map<int, osg::ref_ptr<osg::StateSet> > StateSetMap;
115
117};
118
119}
120
121#endif
The osgVolume library is a NodeKit that extends the core scene graph to support volume rendering.
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Smart pointer for observed objects, that automatically set pointers to them to null when they are del...
Definition observer_ptr:39
osg::Program is an application-level abstraction of an OpenGL glProgram.
Definition Program:52
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
osg::Shader is an application-level abstraction of an OpenGL glShader.
Definition Shader:89
Stores a set of modes and attributes which represent a set of OpenGL state.
Definition StateSet:46
Basic NodeVisitor implementation for rendering a scene.
Definition CullVisitor:49
Basic UpdateVisitor implementation for animating a scene.
Definition UpdateVisitor:38
virtual void backfaceSubgraphCullTraversal(osgUtil::CullVisitor *cv)
std::map< osgUtil::CullVisitor::Identifier *, osg::Matrix > ModelViewMatrixMap
Definition MultipassTechnique:91
virtual void cull(osgUtil::CullVisitor *cv)
virtual TileData * createTileData(osgUtil::CullVisitor *cv)
Called from VolumeScene to create the TileData container when a multi-pass technique is being used.
Definition MultipassTechnique:83
osg::ref_ptr< osg::MatrixTransform > _transform
Definition MultipassTechnique:89
META_Object(osgVolume, MultipassTechnique)
virtual void cleanSceneGraph()
Clean scene graph from any terrain technique specific nodes.
osg::StateSet * createStateSet(osg::StateSet *statesetPrototype, osg::Program *programPrototype, osg::Shader *shaderToAdd1=0, osg::Shader *shaderToAdd2=0)
osg::ref_ptr< osg::StateSet > _volumeRenderStateSet
Definition MultipassTechnique:97
OpenThreads::Mutex _mutex
Definition MultipassTechnique:93
virtual void update(osgUtil::UpdateVisitor *nv)
ModelViewMatrixMap _modelViewMatrixMap
Definition MultipassTechnique:94
std::map< int, osg::ref_ptr< osg::StateSet > > StateSetMap
Definition MultipassTechnique:113
osg::ref_ptr< osg::StateSet > _whenMovingStateSet
Definition MultipassTechnique:96
virtual void traverse(osg::NodeVisitor &nv)
Traverse the terrain subgraph.
ShaderMask
Definition MultipassTechnique:102
@ ISO_SHADERS
Definition MultipassTechnique:108
@ CUBE_SHADERS
Definition MultipassTechnique:103
@ CUBE_AND_HULL_SHADERS
Definition MultipassTechnique:105
@ TF_SHADERS
Definition MultipassTechnique:110
@ HULL_SHADERS
Definition MultipassTechnique:104
@ STANDARD_SHADERS
Definition MultipassTechnique:106
@ LIT_SHADERS
Definition MultipassTechnique:107
@ MIP_SHADERS
Definition MultipassTechnique:109
MultipassTechnique(const MultipassTechnique &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
RenderingMode
Definition MultipassTechnique:50
@ CUBE_AND_HULL
Definition MultipassTechnique:53
@ HULL
Definition MultipassTechnique:52
@ CUBE
Definition MultipassTechnique:51
RenderingMode computeRenderingMode()
StateSetMap _stateSetMap
Definition MultipassTechnique:114
osg::ref_ptr< osg::StateSet > _frontFaceStateSet
Definition MultipassTechnique:116
Container for render to texture objects used when doing multi-pass volume rendering techniques.
Definition MultipassTechnique:60
virtual void update(osgUtil::CullVisitor *cv)
osg::ref_ptr< osg::Camera > frontFaceRttCamera
Definition MultipassTechnique:72
osg::ref_ptr< osg::Uniform > tileToImageUniform
Definition MultipassTechnique:78
MultipassTileData(osgUtil::CullVisitor *cv, MultipassTechnique *mpt)
void setUp(osg::ref_ptr< osg::Camera > &camera, osg::ref_ptr< osg::Texture2D > &texture2D, int width, int height)
osg::ref_ptr< osg::Texture2D > backFaceDepthTexture
Definition MultipassTechnique:74
osg::observer_ptr< MultipassTechnique > multipassTechnique
Definition MultipassTechnique:68
osg::ref_ptr< osg::Uniform > eyeToTileUniform
Definition MultipassTechnique:77
osg::ref_ptr< osg::Camera > backFaceRttCamera
Definition MultipassTechnique:75
osg::ref_ptr< osg::Texture2D > frontFaceDepthTexture
Definition MultipassTechnique:71
RenderingMode currentRenderingMode
Definition MultipassTechnique:69
Container for render to texture objects used when doing multi-pass volume rendering techniques.
Definition VolumeTechnique:30
TileData()
Definition VolumeTechnique:31
#define OSGVOLUME_EXPORT
Definition Export:39

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.