Show
Ignore:
Timestamp:
03/07/05 18:25:30 (9 years ago)
Author:
robert
Message:

From Ruben, added handling of vertex indices.

Note from Robert. New codes produces errors when running
osgfxbrowser cow.osg so I have elected to keep the original
implementation of compute_basis_vectors around and as the default
compile to keep the CVS version working. Ruben's new version
of compute_basis_vectors has to be explicitly compiled in by
toggling an #if 1 block to #if 0.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgUtil/TangentSpaceGenerator

    r3526 r3882  
    5555    inline void setBinormalArray(osg::Vec4Array *array)    { B_ = array; } 
    5656 
     57    inline osg::IndexArray *getIndices() { return indices_.get(); } 
    5758protected: 
    5859    virtual ~TangentSpaceGenerator() {} 
    5960    TangentSpaceGenerator &operator=(const TangentSpaceGenerator &) { return *this; } 
    6061 
    61     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); 
     62    void compute_basis_vectors(osg::PrimitiveSet *pset, 
     63                               const osg::Array *vx, 
     64                               const osg::Array *nx, 
     65                               const osg::Array *tx, 
     66                               const osg::IndexArray *vix, 
     67                               const osg::IndexArray *nix, 
     68                               const osg::IndexArray *tix, 
     69                               int iA, int iB, int iC); 
    6270 
    6371private: 
     
    6573    osg::ref_ptr<osg::Vec4Array> B_; 
    6674    osg::ref_ptr<osg::Vec4Array> N_; 
     75    osg::ref_ptr<osg::UIntArray> indices_; 
    6776}; 
    6877