OpenSceneGraph 3.6.5
ShadowTechnique
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 OSGSHADOW_SHADOWEDTECHNIQUE
15#define OSGSHADOW_SHADOWEDTECHNIQUE 1
16
17#include <osg/buffered_value>
18#include <osg/Camera>
19#include <osg/Texture2D>
20#include <osg/TexGenNode>
21#include <osgUtil/CullVisitor>
22
23#include <osgShadow/Export>
24
25namespace osgShadow {
26
27// forward declare ShadowedScene
28class ShadowedScene;
29
32{
33 public :
35
37
38 virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const ShadowTechnique*>(obj)!=NULL; } \
39 virtual const char* libraryName() const { return "osgShadow"; }\
40 virtual const char* className() const { return "ShadowTechnique"; }
41
43
45
47
49 virtual void init();
50
52 virtual void update(osg::NodeVisitor& nv);
53
55 virtual void cull(osgUtil::CullVisitor& cv);
56
58 virtual void cleanSceneGraph();
59
60 virtual void traverse(osg::NodeVisitor& nv);
61
63 virtual void dirty() { _dirty = true; }
64
66 virtual void resizeGLObjectBuffers(unsigned int maxSize) = 0;
67
71 virtual void releaseGLObjects(osg::State* = 0) const = 0;
72
73protected :
74
87
89
91
92 friend class ShadowedScene;
93
95 bool _dirty;
96
97};
98
99}
100
101#endif
Vec3f Vec3
Definition Vec3:21
The osgShadow library is a NodeKit that extends the core scene graph to add support for a range of sh...
Definition ConvexPolyhedron:33
Deprecated.
Definition Callback:215
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
Base class for all internal nodes in the scene graph.
Definition Node:72
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Base class/standard interface for objects which require IO support, cloning and reference counting.
Definition Object:61
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
virtual void update(osg::NodeVisitor &nv)
run the update traversal of the ShadowedScene and update any local cached data structures.
virtual const char * className() const
return the name of the object's class type.
Definition ShadowTechnique:40
virtual void setShadowedScene(ShadowedScene *ss)
ShadowedScene * _shadowedScene
Definition ShadowTechnique:94
virtual void releaseGLObjects(osg::State *=0) const =0
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
ShadowTechnique(const ShadowTechnique &es, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
bool _dirty
Definition ShadowTechnique:95
virtual void cull(osgUtil::CullVisitor &cv)
run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.
virtual void cleanSceneGraph()
Clean scene graph from any shadow technique specific nodes, state and drawables.
virtual void init()
initialize the ShadowedScene and local cached data structures.
const ShadowedScene * getShadowedScene() const
Definition ShadowTechnique:46
virtual void traverse(osg::NodeVisitor &nv)
virtual void dirty()
Dirty so that cached data structures are updated.
Definition ShadowTechnique:63
virtual bool isSameKindAs(const osg::Object *obj) const
Definition ShadowTechnique:38
virtual const char * libraryName() const
return the name of the object's library.
Definition ShadowTechnique:39
virtual void resizeGLObjectBuffers(unsigned int maxSize)=0
Resize any per context GLObject buffers to specified size.
friend class ShadowedScene
Definition ShadowTechnique:92
osg::Vec3 computeOrthogonalVector(const osg::Vec3 &direction) const
ShadowedScene * getShadowedScene()
Definition ShadowTechnique:44
virtual void operator()(osg::Node *, osg::NodeVisitor *nv)
Callback method called by the NodeVisitor when visiting a node.
ShadowTechnique * _shadowTechnique
Definition ShadowTechnique:85
Basic NodeVisitor implementation for rendering a scene.
Definition CullVisitor:49
#define NULL
Definition Export:55
#define OSGSHADOW_EXPORT
Definition Export:39

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