Privacy
An open-source, flexible 3D physical simulation framework
mars::graphics::ShadowMap Class Reference

#include <ShadowMap.h>

Public Member Functions

 ShadowMap (void)
 
 ShadowMap (const ShadowMap &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
virtual ~ShadowMap (void)
 
 META_Object (mars_graphics, ShadowMap)
 
void setLight (osg::Light *light)
 
void setLight (osg::LightSource *ls)
 
virtual void init ()
 
virtual void update (osg::NodeVisitor &nv)
 
virtual void cull (osgUtil::CullVisitor &cv)
 
virtual void cleanSceneGraph ()
 
void setCenterObject (DrawObject *cO)
 
void setRadius (double v)
 
void setShadowTextureSize (int v)
 
void initTexture ()
 
osg::Texture2D * getTexture ()
 
void applyState (osg::StateSet *state)
 
void removeTexture (osg::StateSet *state)
 
void addTexture (osg::StateSet *state)
 
void updateTexScale ()
 
float getTexScale ()
 
virtual void resizeGLObjectBuffers (unsigned int maxSize)
 
virtual void releaseGLObjects (osg::State *=0) const
 

Protected Member Functions

virtual void createUniforms ()
 

Protected Attributes

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::Light > light
 
osg::ref_ptr< osg::LightSource > ls
 
DrawObjectcenterObject
 
double radius
 
osg::ref_ptr< osg::Uniform > ambientBiasUniform
 
osg::ref_ptr< osg::Uniform > textureScaleUniform
 
osg::ref_ptr< osg::Uniform > texGenMatrixUniform
 
std::vector< osg::ref_ptr< osg::Uniform > > uniformList
 
unsigned int shadowTextureUnit
 
int shadowTextureSize
 
float texscale
 

Detailed Description

Definition at line 43 of file ShadowMap.h.

Constructor & Destructor Documentation

◆ ShadowMap() [1/2]

mars::graphics::ShadowMap::ShadowMap ( void  )

Definition at line 59 of file ShadowMap.cpp.

◆ ShadowMap() [2/2]

mars::graphics::ShadowMap::ShadowMap ( const ShadowMap copy,
const osg::CopyOp &  copyop = osg::CopyOp::SHALLOW_COPY 
)

Definition at line 68 of file ShadowMap.cpp.

◆ ~ShadowMap()

virtual mars::graphics::ShadowMap::~ShadowMap ( void  )
inlinevirtual

Definition at line 49 of file ShadowMap.h.

Member Function Documentation

◆ addTexture()

void mars::graphics::ShadowMap::addTexture ( osg::StateSet *  state)

Definition at line 143 of file ShadowMap.cpp.

◆ applyState()

void mars::graphics::ShadowMap::applyState ( osg::StateSet *  state)

Definition at line 119 of file ShadowMap.cpp.

◆ cleanSceneGraph()

virtual void mars::graphics::ShadowMap::cleanSceneGraph ( )
inlinevirtual

Definition at line 59 of file ShadowMap.h.

◆ createUniforms()

void mars::graphics::ShadowMap::createUniforms ( )
protectedvirtual

Definition at line 88 of file ShadowMap.cpp.

◆ cull()

void mars::graphics::ShadowMap::cull ( osgUtil::CullVisitor &  cv)
virtual

Definition at line 221 of file ShadowMap.cpp.

◆ getTexScale()

float mars::graphics::ShadowMap::getTexScale ( )
inline

Definition at line 80 of file ShadowMap.h.

◆ getTexture()

osg::Texture2D* mars::graphics::ShadowMap::getTexture ( void  )
inline

Definition at line 73 of file ShadowMap.h.

◆ init()

void mars::graphics::ShadowMap::init ( void  )
virtual

Definition at line 148 of file ShadowMap.cpp.

◆ initTexture()

void mars::graphics::ShadowMap::initTexture ( )

Definition at line 104 of file ShadowMap.cpp.

◆ META_Object()

mars::graphics::ShadowMap::META_Object ( mars_graphics  ,
ShadowMap   
)

◆ releaseGLObjects()

void mars::graphics::ShadowMap::releaseGLObjects ( osg::State *  state = 0) const
virtual

Definition at line 439 of file ShadowMap.cpp.

◆ removeTexture()

void mars::graphics::ShadowMap::removeTexture ( osg::StateSet *  state)

Definition at line 138 of file ShadowMap.cpp.

◆ resizeGLObjectBuffers()

void mars::graphics::ShadowMap::resizeGLObjectBuffers ( unsigned int  maxSize)
virtual

Definition at line 429 of file ShadowMap.cpp.

◆ setCenterObject()

void mars::graphics::ShadowMap::setCenterObject ( DrawObject cO)
inline

Definition at line 61 of file ShadowMap.h.

◆ setLight() [1/2]

void mars::graphics::ShadowMap::setLight ( osg::Light *  light)

Definition at line 78 of file ShadowMap.cpp.

◆ setLight() [2/2]

void mars::graphics::ShadowMap::setLight ( osg::LightSource *  ls)

Definition at line 83 of file ShadowMap.cpp.

◆ setRadius()

void mars::graphics::ShadowMap::setRadius ( double  v)
inline

Definition at line 64 of file ShadowMap.h.

◆ setShadowTextureSize()

void mars::graphics::ShadowMap::setShadowTextureSize ( int  v)
inline

Definition at line 68 of file ShadowMap.h.

◆ update()

void mars::graphics::ShadowMap::update ( osg::NodeVisitor &  nv)
virtual

Definition at line 216 of file ShadowMap.cpp.

◆ updateTexScale()

void mars::graphics::ShadowMap::updateTexScale ( )

Definition at line 211 of file ShadowMap.cpp.

Member Data Documentation

◆ ambientBiasUniform

osg::ref_ptr<osg::Uniform> mars::graphics::ShadowMap::ambientBiasUniform
protected

Definition at line 99 of file ShadowMap.h.

◆ camera

osg::ref_ptr<osg::Camera> mars::graphics::ShadowMap::camera
protected

Definition at line 90 of file ShadowMap.h.

◆ centerObject

DrawObject* mars::graphics::ShadowMap::centerObject
protected

Definition at line 96 of file ShadowMap.h.

◆ light

osg::ref_ptr<osg::Light> mars::graphics::ShadowMap::light
protected

Definition at line 94 of file ShadowMap.h.

◆ ls

osg::ref_ptr<osg::LightSource> mars::graphics::ShadowMap::ls
protected

Definition at line 95 of file ShadowMap.h.

◆ radius

double mars::graphics::ShadowMap::radius
protected

Definition at line 97 of file ShadowMap.h.

◆ shadowTextureSize

int mars::graphics::ShadowMap::shadowTextureSize
protected

Definition at line 104 of file ShadowMap.h.

◆ shadowTextureUnit

unsigned int mars::graphics::ShadowMap::shadowTextureUnit
protected

Definition at line 103 of file ShadowMap.h.

◆ stateset

osg::ref_ptr<osg::StateSet> mars::graphics::ShadowMap::stateset
protected

Definition at line 93 of file ShadowMap.h.

◆ texgen

osg::ref_ptr<osg::TexGen> mars::graphics::ShadowMap::texgen
protected

Definition at line 91 of file ShadowMap.h.

◆ texGenMatrixUniform

osg::ref_ptr<osg::Uniform> mars::graphics::ShadowMap::texGenMatrixUniform
protected

Definition at line 101 of file ShadowMap.h.

◆ texscale

float mars::graphics::ShadowMap::texscale
protected

Definition at line 105 of file ShadowMap.h.

◆ texture

osg::ref_ptr<osg::Texture2D> mars::graphics::ShadowMap::texture
protected

Definition at line 92 of file ShadowMap.h.

◆ textureScaleUniform

osg::ref_ptr<osg::Uniform> mars::graphics::ShadowMap::textureScaleUniform
protected

Definition at line 100 of file ShadowMap.h.

◆ uniformList

std::vector< osg::ref_ptr<osg::Uniform> > mars::graphics::ShadowMap::uniformList
protected

Definition at line 102 of file ShadowMap.h.


The documentation for this class was generated from the following files: