ShadowTexture
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGSHADOW_SHADOWETEXTURE
#define OSGSHADOW_SHADOWETEXTURE 1
#include <osg/Camera>
#include <osg/Material>
#include <osgShadow/ShadowTechnique>
namespace osgShadow {
class OSGSHADOW_EXPORT ShadowTexture : public ShadowTechnique
{
public :
ShadowTexture();
ShadowTexture(const ShadowTexture& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Object(osgShadow, ShadowTexture);
void setTextureUnit(unsigned int unit);
unsigned int getTextureUnit() const { return _textureUnit; }
virtual void init();
virtual void update(osg::NodeVisitor& nv);
virtual void cull(osgUtil::CullVisitor& cv);
virtual void cleanSceneGraph();
virtual void resizeGLObjectBuffers(unsigned int maxSize);
virtual void releaseGLObjects(osg::State* = 0) const;
protected :
virtual ~ShadowTexture() {}
osg::ref_ptr<osg::Camera> _camera;
osg::ref_ptr<osg::TexGen> _texgen;
osg::ref_ptr<osg::Texture2D> _texture;
osg::ref_ptr<osg::StateSet> _stateset;
osg::ref_ptr<osg::Material> _material;
unsigned int _textureUnit;
};
}
#endif
Camera
Material
ShadowTechnique
osgShadow::ShadowTechnique::ShadowTechnique
ShadowTechnique()
osgShadow::ShadowTexture::cull
virtual void cull(osgUtil::CullVisitor &cv)
osgShadow::ShadowTexture::_camera
osg::ref_ptr< osg::Camera > _camera
Definition ShadowTexture:66
osgShadow::ShadowTexture::releaseGLObjects
virtual void releaseGLObjects(osg::State *=0) const
osgShadow::ShadowTexture::META_Object
META_Object(osgShadow, ShadowTexture)
osgShadow::ShadowTexture::_texgen
osg::ref_ptr< osg::TexGen > _texgen
Definition ShadowTexture:67
osgShadow::ShadowTexture::getTextureUnit
unsigned int getTextureUnit() const
Definition ShadowTexture:38
osgShadow::ShadowTexture::ShadowTexture
ShadowTexture(const ShadowTexture &es, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osgShadow::ShadowTexture::update
virtual void update(osg::NodeVisitor &nv)
osgShadow::ShadowTexture::ShadowTexture
ShadowTexture()
osgShadow::ShadowTexture::setTextureUnit
void setTextureUnit(unsigned int unit)
osgShadow::ShadowTexture::_material
osg::ref_ptr< osg::Material > _material
Definition ShadowTexture:70
osgShadow::ShadowTexture::init
virtual void init()
osgShadow::ShadowTexture::cleanSceneGraph
virtual void cleanSceneGraph()
osgShadow::ShadowTexture::resizeGLObjectBuffers
virtual void resizeGLObjectBuffers(unsigned int maxSize)
osgShadow::ShadowTexture::_textureUnit
unsigned int _textureUnit
Definition ShadowTexture:71
osgShadow::ShadowTexture::_stateset
osg::ref_ptr< osg::StateSet > _stateset
Definition ShadowTexture:69
osgShadow::ShadowTexture::~ShadowTexture
virtual ~ShadowTexture()
Definition ShadowTexture:64
osgShadow::ShadowTexture::_texture
osg::ref_ptr< osg::Texture2D > _texture
Definition ShadowTexture:68
osgUtil::CullVisitor
Definition CullVisitor:49
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::NodeVisitor
Definition NodeVisitor:82
osg::State
Definition State:80
osg::ref_ptr
Definition ref_ptr:32
osgShadow
Definition ConvexPolyhedron:33
OSGSHADOW_EXPORT
#define OSGSHADOW_EXPORT
Definition osgShadow/Export:39