Initial revision

This commit is contained in:
Don BURNS
2001-01-10 16:32:10 +00:00
parent 7c12eb9361
commit 70208ebc06
461 changed files with 70936 additions and 0 deletions

42
include/osg/LightSource Normal file
View File

@@ -0,0 +1,42 @@
#ifndef OSG_LIGHTSOURCE
#define OSG_LIGHTSOURCE 1
#include <osg/Node>
#include <osg/NodeVisitor>
#include <osg/Light>
namespace osg {
/** Leaf Node for defining a light in the scene.*/
class SG_EXPORT LightSource : public Node
{
public:
LightSource();
virtual Object* clone() const { return new LightSource(); }
virtual bool isSameKindAs(Object* obj) { return dynamic_cast<LightSource*>(obj)!=NULL; }
virtual const char* className() const { return "LightSource"; }
virtual void accept(NodeVisitor& nv) { nv.apply(*this); }
/** Set the attached light.*/
void setLight(Light* light) { _light = light; }
/** Get the attached light.*/
Light* getLight() { return _light.get(); }
protected:
virtual ~LightSource();
virtual bool readLocalData(Input& fr);
virtual bool writeLocalData(Output& fw);
virtual bool computeBound( void );
ref_ptr<Light> _light;
};
};
#endif