Renamed osgUtil::RenderStageLighting osgUtil::PositionalStateContainer
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef OSGUTIL_RENDERSTAGELIGHTING
|
||||
#define OSGUTIL_RENDERSTAGELIGHTING 1
|
||||
#ifndef OSGUTIL_POSTIONALSTATECONTIANER
|
||||
#define OSGUTIL_POSTIONALSTATECONTIANER 1
|
||||
|
||||
#include <osg/Object>
|
||||
#include <osg/Light>
|
||||
@@ -24,19 +24,19 @@
|
||||
namespace osgUtil {
|
||||
|
||||
/**
|
||||
* RenderStageLighting base class. Used in RenderStage class.
|
||||
* PositionalStateContainer base class. Used in RenderStage class.
|
||||
*/
|
||||
class OSGUTIL_EXPORT RenderStageLighting : public osg::Object
|
||||
class OSGUTIL_EXPORT PositionalStateContainer : public osg::Object
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
RenderStageLighting();
|
||||
virtual osg::Object* cloneType() const { return new RenderStageLighting(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp&) const { return new RenderStageLighting(); } // note only implements a clone of type.
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const RenderStageLighting*>(obj)!=0L; }
|
||||
PositionalStateContainer();
|
||||
virtual osg::Object* cloneType() const { return new PositionalStateContainer(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp&) const { return new PositionalStateContainer(); } // note only implements a clone of type.
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const PositionalStateContainer*>(obj)!=0L; }
|
||||
virtual const char* libraryName() const { return "osgUtil"; }
|
||||
virtual const char* className() const { return "RenderStageLighting"; }
|
||||
virtual const char* className() const { return "PositionalStateContainer"; }
|
||||
|
||||
virtual void reset();
|
||||
|
||||
@@ -63,7 +63,7 @@ class OSGUTIL_EXPORT RenderStageLighting : public osg::Object
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~RenderStageLighting();
|
||||
virtual ~PositionalStateContainer();
|
||||
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <osg/CameraNode>
|
||||
|
||||
#include <osgUtil/RenderBin>
|
||||
#include <osgUtil/RenderStageLighting>
|
||||
#include <osgUtil/PositionalStateContainer>
|
||||
|
||||
namespace osgUtil {
|
||||
|
||||
@@ -147,28 +147,28 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
|
||||
|
||||
|
||||
|
||||
void setInheritedRenderStageLightingMatrix(const osg::Matrix& matrix) { _inheritedRenderStageLightingMatrix = matrix; }
|
||||
const osg::Matrix& getInheritedRenderStageLightingMatrix() const { return _inheritedRenderStageLightingMatrix; }
|
||||
void setInheritedPositionalStateContainerMatrix(const osg::Matrix& matrix) { _inheritedPositionalStateContainerMatrix = matrix; }
|
||||
const osg::Matrix& getInheritedPositionalStateContainerMatrix() const { return _inheritedPositionalStateContainerMatrix; }
|
||||
|
||||
void setInheritedRenderStageLighting(RenderStageLighting* rsl) { _inheritedRenderStageLighting = rsl; }
|
||||
RenderStageLighting* getInheritedRenderStageLighting() { return _inheritedRenderStageLighting.get(); }
|
||||
void setInheritedPositionalStateContainer(PositionalStateContainer* rsl) { _inheritedPositionalStateContainer = rsl; }
|
||||
PositionalStateContainer* getInheritedPositionalStateContainer() { return _inheritedPositionalStateContainer.get(); }
|
||||
|
||||
void setRenderStageLighting(RenderStageLighting* rsl) { _renderStageLighting = rsl; }
|
||||
void setPositionalStateContainer(PositionalStateContainer* rsl) { _renderStageLighting = rsl; }
|
||||
|
||||
RenderStageLighting* getRenderStageLighting() const
|
||||
PositionalStateContainer* getPositionalStateContainer() const
|
||||
{
|
||||
if (!_renderStageLighting.valid()) _renderStageLighting = new RenderStageLighting;
|
||||
if (!_renderStageLighting.valid()) _renderStageLighting = new PositionalStateContainer;
|
||||
return _renderStageLighting.get();
|
||||
}
|
||||
|
||||
virtual void addPositionedAttribute(osg::RefMatrix* matrix,const osg::StateAttribute* attr)
|
||||
{
|
||||
getRenderStageLighting()->addPositionedAttribute(matrix,attr);
|
||||
getPositionalStateContainer()->addPositionedAttribute(matrix,attr);
|
||||
}
|
||||
|
||||
virtual void addPositionedTextureAttribute(unsigned int textureUnit, osg::RefMatrix* matrix,const osg::StateAttribute* attr)
|
||||
{
|
||||
getRenderStageLighting()->addPositionedTextureAttribute(textureUnit, matrix,attr);
|
||||
getPositionalStateContainer()->addPositionedTextureAttribute(textureUnit, matrix,attr);
|
||||
}
|
||||
|
||||
void copyTexture(osg::State& state);
|
||||
@@ -229,9 +229,9 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
|
||||
osg::ref_ptr<osg::FrameBufferObject> _fbo;
|
||||
osg::ref_ptr<osg::GraphicsContext> _graphicsContext;
|
||||
|
||||
mutable osg::Matrix _inheritedRenderStageLightingMatrix;
|
||||
mutable osg::ref_ptr<RenderStageLighting> _inheritedRenderStageLighting;
|
||||
mutable osg::ref_ptr<RenderStageLighting> _renderStageLighting;
|
||||
mutable osg::Matrix _inheritedPositionalStateContainerMatrix;
|
||||
mutable osg::ref_ptr<PositionalStateContainer> _inheritedPositionalStateContainer;
|
||||
mutable osg::ref_ptr<PositionalStateContainer> _renderStageLighting;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user