17#ifndef OSGSHADOW_DEBUGSHADOWMAP
18#define OSGSHADOW_DEBUGSHADOWMAP 1
94 class DrawableDrawWithDepthShadowComparisonOffCallback;
193 void dump(
const std::string & filename );
#define META_ViewDependentShadowTechniqueData(ShadowTechnique, TechniqueData)
META_ViewDependentShadowTechniqueData macro defines initViewDependentData method used by derived shad...
Definition ViewDependentShadowTechnique:32
BoundingBoxd BoundingBox
Definition BoundingBox:257
Matrixd Matrix
Definition Matrix:27
Vec4f Vec4
Definition Vec4:21
The osgShadow library is a NodeKit that extends the core scene graph to add support for a range of sh...
Definition ConvexPolyhedron:33
Camera - is a subclass of Transform which represents encapsulates the settings of a Camera.
Definition Camera:45
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
Smart pointer for observed objects, that automatically set pointers to them to null when they are del...
Definition observer_ptr:39
A Polytope class for representing convex clipping volumes made up of a set of planes.
Definition Polytope:26
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
General purpose double triple for use as vertices, vectors and normals.
Definition Vec3d:30
Definition ConvexPolyhedron:36
bool getDebugDraw(void) const
Tell if debugging hud & rendering of debug volumes is active.
Definition DebugShadowMap:72
osg::Vec2s _orthoOrigin
Definition DebugShadowMap:101
ViewDependentShadowTechnique BaseClass
Convenient typedef used in definition of ViewData struct and methods.
Definition DebugShadowMap:57
osg::Vec2s _orthoSize
Definition DebugShadowMap:100
std::string getDebugDump(void) const
Get the file name of debugging dump.
Definition DebugShadowMap:75
META_Object(osgShadow, DebugShadowMap)
Declaration of standard OSG object methods.
bool _doDebugDraw
Definition DebugShadowMap:103
osg::Vec2s _viewportSize
Definition DebugShadowMap:98
void setDebugDump(const std::string &debugDumpFile)
Set the file name of debugging dump.
Definition DebugShadowMap:78
DebugShadowMap ThisClass
Convenient typedef used in definition of ViewData struct and methods.
Definition DebugShadowMap:55
void setDebugDraw(bool draw)
Turn on/off debugging hud & rendering of debug volumes in main view.
Definition DebugShadowMap:69
std::string _debugDump
Definition DebugShadowMap:104
virtual void resizeGLObjectBuffers(unsigned int maxSize)
Resize any per context GLObject buffers to specified size.
virtual void releaseGLObjects(osg::State *=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
DebugShadowMap()
Classic OSG constructor.
osg::Vec2s _viewportOrigin
Definition DebugShadowMap:99
DebugShadowMap(const DebugShadowMap &dsm, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Classic OSG cloning constructor.
virtual ~DebugShadowMap()
Classic protected OSG destructor.
osg::Vec2s _hudOrigin
Definition DebugShadowMap:97
osg::Vec2s _hudSize
Definition DebugShadowMap:96
osg::ref_ptr< osg::Shader > _depthColorFragmentShader
Definition DebugShadowMap:106
Definition DebugShadowMap:109
osg::ref_ptr< osg::Camera > _cameraDebugHUD
Definition DebugShadowMap:157
std::string * getDebugDump()
Definition DebugShadowMap:160
virtual void releaseGLObjects(osg::State *=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
virtual void cullDebugGeometry()
osg::Matrixd _viewProjection
Definition DebugShadowMap:121
void dump(const std::string &filename)
bool getDebugDraw()
Definition DebugShadowMap:159
osg::Vec2s _hudOrigin
Definition DebugShadowMap:140
bool DebugMatrix(const osg::Matrix &m, const char *name="")
osg::ref_ptr< osg::Geode > _geode[2]
Definition DebugShadowMap:150
std::map< std::string, osg::BoundingBox > _boundingBoxMap
Definition DebugShadowMap:155
static void displayShadowTexelToPixelErrors(const osg::Camera *viewCam, const osg::Camera *shadowCam, const ConvexPolyhedron *hull)
osg::ref_ptr< osg::Camera > _camera
Camera used to render ShadowMap - initialized by derived classes.
Definition DebugShadowMap:119
virtual void cull()
Method called by ViewDependentShadowTechnique to allow ViewData do the hard work computing shadows fo...
osg::Vec2s _orthoOrigin
Definition DebugShadowMap:144
osg::Vec2s _hudSize
Definition DebugShadowMap:139
osg::Vec2s _orthoSize
Definition DebugShadowMap:143
PolytopeGeometryMap _polytopeGeometryMap
Definition DebugShadowMap:149
osg::observer_ptr< osg::Camera > _viewCamera
Definition DebugShadowMap:122
std::map< std::string, osg::Matrix > _matrixMap
Definition DebugShadowMap:153
std::map< std::string, PolytopeGeometry > PolytopeGeometryMap
Definition DebugShadowMap:137
bool DebugBoundingBox(const osg::BoundingBox &bb, const char *name="")
std::map< std::string, osg::Polytope > _polytopeMap
Definition DebugShadowMap:154
static osg::Vec3d computeShadowTexelToPixelError(const osg::Matrix &mvpwView, const osg::Matrix &mvpwShadow, const osg::Vec3d &vWorld, const osg::Vec3d &vDelta=osg::Vec3d(0.01, 0.01, 0.01))
virtual void resizeGLObjectBuffers(unsigned int maxSize)
virtual void createDebugHUD(void)
osg::Vec2s _viewportOrigin
Definition DebugShadowMap:142
virtual void init(ThisClass *st, osgUtil::CullVisitor *cv)
bool DebugPolytope(const osg::Polytope &p, const char *name="")
osg::ref_ptr< osg::Shader > _depthColorFragmentShader
Coloring Shader used to present shadow depth map contents.
Definition DebugShadowMap:127
bool * _doDebugDrawPtr
Definition DebugShadowMap:146
std::string * _debugDumpPtr
Definition DebugShadowMap:147
void setDebugPolytope(const char *name, const ConvexPolyhedron &polytope= *(ConvexPolyhedron *)(NULL), osg::Vec4 colorOutline=osg::Vec4(0, 0, 0, 0), osg::Vec4 colorInside=osg::Vec4(0, 0, 0, 0))
osg::ref_ptr< osg::Texture > _texture
Texture used as ShadowMap - initialized by derived classes.
Definition DebugShadowMap:114
osg::Vec2s _viewportSize
Definition DebugShadowMap:141
virtual void updateDebugGeometry(const osg::Camera *screenCam, const osg::Camera *shadowCam)
osg::ref_ptr< osg::MatrixTransform > _transform[2]
Definition DebugShadowMap:151
Definition DebugShadowMap:129
osg::ref_ptr< osg::Geometry > _geometry[2]
Definition DebugShadowMap:132
ConvexPolyhedron _polytope
Definition DebugShadowMap:131
osg::Vec4 _colorOutline
Definition DebugShadowMap:133
osg::Vec4 _colorInside
Definition DebugShadowMap:134
ViewDependentShadowTechnique(void)
osgShadow::ShadowTechnique equivalent methods for view dependent techniques
Base container class for view dependent shadow resources.
Definition ViewDependentShadowTechnique:162
ViewData()
Simple constructor zeroing all variables.
Definition ViewDependentShadowTechnique:186
Basic NodeVisitor implementation for rendering a scene.
Definition CullVisitor:49
#define NULL
Definition Export:55
#define OSGSHADOW_EXPORT
Definition Export:39