OpenSceneGraph/include/osgUtil/RenderStageLighting

58 lines
1.7 KiB
Plaintext
Raw Normal View History

2002-07-17 04:07:32 +08:00
//C++ header - Open Scene Graph - Copyright (C) 1998-2002 Robert Osfield
//Distributed under the terms of the GNU Library General Public License (LGPL)
//as published by the Free Software Foundation.
2001-09-20 05:19:47 +08:00
#ifndef OSGUTIL_RENDERSTAGELIGHTING
#define OSGUTIL_RENDERSTAGELIGHTING 1
#include <osg/Object>
#include <osg/Light>
#include <osg/State>
#include <osgUtil/RenderLeaf>
#include <osgUtil/RenderGraph>
namespace osgUtil {
/**
* RenderBin base class.
*/
class OSGUTIL_EXPORT RenderStageLighting : public osg::Object
{
public:
RenderStageLighting();
virtual osg::Object* cloneType() const { return osgNew RenderStageLighting(); }
virtual osg::Object* clone(const osg::CopyOp&) const { return osgNew RenderStageLighting(); } // note only implements a clone of type.
2001-09-20 05:19:47 +08:00
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const RenderStageLighting*>(obj)!=0L; }
virtual const char* libraryName() const { return "osgUtil"; }
2001-09-20 05:19:47 +08:00
virtual const char* className() const { return "RenderStageLighting"; }
virtual void reset();
typedef std::pair< const osg::StateAttribute*, osg::ref_ptr<osg::Matrix> > AttrMatrixPair;
typedef std::vector< AttrMatrixPair > AttrMatrixList;
2001-09-20 05:19:47 +08:00
virtual void addPositionedAttribute(osg::Matrix* matrix,const osg::StateAttribute* attr)
2001-09-20 05:19:47 +08:00
{
_attrList.push_back(AttrMatrixPair(attr,matrix));
2001-09-20 05:19:47 +08:00
}
virtual void draw(osg::State& state,RenderLeaf*& previous);
public:
AttrMatrixList _attrList;
2001-09-20 05:19:47 +08:00
protected:
virtual ~RenderStageLighting();
};
}
2001-09-20 05:19:47 +08:00
#endif