From Terry Welsh, added checks to incoming Geometry for existance of normals,

and if they are present use these to compute the tanget and binormals
vectors perpendicular to existing normals.
This commit is contained in:
Robert Osfield
2004-06-04 08:24:13 +00:00
parent 0fac56f56a
commit 2cf45b50c9
2 changed files with 144 additions and 49 deletions

View File

@@ -58,7 +58,7 @@ namespace osgUtil
virtual ~TangentSpaceGenerator() {}
TangentSpaceGenerator &operator=(const TangentSpaceGenerator &) { return *this; }
void compute_basis_vectors(osg::PrimitiveSet *pset, const osg::Array *vx, const osg::Array *tx, int iA, int iB, int iC);
void compute_basis_vectors(osg::PrimitiveSet *pset, const osg::Array *vx, const osg::Array *nx, const osg::Array *tx, int iA, int iB, int iC);
private:
osg::ref_ptr<osg::Vec4Array> T_;