Moved the shadow creation code into a seperate CreateShadowedScene header and source,

and exposed just the basic createShadowedScene function in the header.
This commit is contained in:
Robert Osfield
2002-11-21 15:35:51 +00:00
parent 3f97d6a44d
commit a545f3b48c
11 changed files with 436 additions and 401 deletions

View File

@@ -87,6 +87,13 @@ class SG_EXPORT Plane
inline bool valid() const { return _fv.valid(); }
inline bool operator == (const Plane& plane) const { return _fv==plane._fv; }
inline bool operator != (const Plane& plane) const { return _fv!=plane._fv; }
inline bool operator < (const Plane& plane) const { return _fv<plane._fv; }
inline float* ptr() { return _fv.ptr(); }
inline const float* ptr() const { return _fv.ptr(); }
inline Vec4& asVec4() { return _fv; }
inline const Vec4& asVec4() const { return _fv; }

View File

@@ -5,7 +5,7 @@
#ifndef OSG_TEXGEN
#define OSG_TEXGEN 1
#include <osg/Vec4>
#include <osg/Plane>
#include <osg/StateAttribute>
namespace osg {
@@ -92,9 +92,11 @@ class SG_EXPORT TexGen : public StateAttribute
S, T, R, Q
};
void setPlane(Coord which, const Vec4& plane);
void setPlane(Coord which, const Plane& plane);
const Vec4& getPlane(Coord which) const;
Plane& getPlane(Coord which);
const Plane& getPlane(Coord which) const;
protected :
@@ -103,7 +105,7 @@ class SG_EXPORT TexGen : public StateAttribute
Mode _mode;
/// additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,
Vec4 _plane_s, _plane_t, _plane_r, _plane_q;
Plane _plane_s, _plane_t, _plane_r, _plane_q;
};