Changeset 3526

Show
Ignore:
Timestamp:
10/24/04 16:42:40 (9 years ago)
Author:
robert
Message:

From Geoff Michel, speeling and typo fixes in osgUtil

Location:
OpenSceneGraph/trunk/include/osgUtil
Files:
5 modified

Legend:

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

    r3432 r3526  
    2525{ 
    2626 
    27     /** 
    28      This class generates three arrays containing tangent-space basis vectors. It takes 
    29      a texture-mapped Geometry object as input, traverses its primitive sets and computes 
    30      Tangent, Normal and Binormal vectors for each vertex, storing them into arrays. 
    31      The resulting arrays can be used as vertex program varying (per-vertex) parameters, 
    32      enabling advanced effects like bump-mapping. 
    33      To use this class, simply call the generate() method specifying the Geometry object 
    34      you want to process and the texture unit that contains UV mapping for the normal map; 
    35      then you can retrieve the TBN arrays by calling getTangentArray(), getNormalArray() 
    36      and getBinormalArray() methods. 
    37      */ 
    38     class OSGUTIL_EXPORT TangentSpaceGenerator: public osg::Referenced { 
    39     public: 
    40         TangentSpaceGenerator(); 
    41         TangentSpaceGenerator(const TangentSpaceGenerator &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY); 
     27/** 
     28 The TangentSpaceGenerator class generates three arrays containing tangent-space basis vectors. 
     29 It takes a texture-mapped Geometry object as input, traverses its primitive sets and computes 
     30 Tangent, Normal and Binormal vectors for each vertex, storing them into arrays. 
     31 The resulting arrays can be used as vertex program varying (per-vertex) parameters, 
     32 enabling advanced effects like bump-mapping. 
     33 To use this class, simply call the generate() method specifying the Geometry object 
     34 you want to process and the texture unit that contains UV mapping for the normal map; 
     35 then you can retrieve the TBN arrays by calling getTangentArray(), getNormalArray() 
     36 and getBinormalArray() methods. 
     37 */ 
     38class OSGUTIL_EXPORT TangentSpaceGenerator: public osg::Referenced { 
     39public: 
     40    TangentSpaceGenerator(); 
     41    TangentSpaceGenerator(const TangentSpaceGenerator &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY); 
    4242 
    43         void generate(osg::Geometry *geo, int normal_map_tex_unit = 0); 
     43    void generate(osg::Geometry *geo, int normal_map_tex_unit = 0); 
    4444 
    45         inline osg::Vec4Array *getTangentArray()               { return T_.get(); } 
    46         inline const osg::Vec4Array *getTangentArray() const   { return T_.get(); } 
    47         inline void setTangentArray(osg::Vec4Array *array)     { T_ = array; } 
     45    inline osg::Vec4Array *getTangentArray()               { return T_.get(); } 
     46    inline const osg::Vec4Array *getTangentArray() const   { return T_.get(); } 
     47    inline void setTangentArray(osg::Vec4Array *array)     { T_ = array; } 
    4848 
    49         inline osg::Vec4Array *getNormalArray()                { return N_.get(); } 
    50         inline const osg::Vec4Array *getNormalArray() const    { return N_.get(); } 
    51         inline void setNormalArray(osg::Vec4Array *array)      { N_ = array; } 
     49    inline osg::Vec4Array *getNormalArray()                { return N_.get(); } 
     50    inline const osg::Vec4Array *getNormalArray() const    { return N_.get(); } 
     51    inline void setNormalArray(osg::Vec4Array *array)      { N_ = array; } 
    5252 
    53         inline osg::Vec4Array *getBinormalArray()              { return B_.get(); } 
    54         inline const osg::Vec4Array *getBinormalArray() const  { return B_.get(); } 
    55         inline void setBinormalArray(osg::Vec4Array *array)    { B_ = array; } 
     53    inline osg::Vec4Array *getBinormalArray()              { return B_.get(); } 
     54    inline const osg::Vec4Array *getBinormalArray() const  { return B_.get(); } 
     55    inline void setBinormalArray(osg::Vec4Array *array)    { B_ = array; } 
    5656 
    57     protected: 
    58         virtual ~TangentSpaceGenerator() {} 
    59         TangentSpaceGenerator &operator=(const TangentSpaceGenerator &) { return *this; } 
     57protected: 
     58    virtual ~TangentSpaceGenerator() {} 
     59    TangentSpaceGenerator &operator=(const TangentSpaceGenerator &) { return *this; } 
    6060 
    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); 
     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); 
    6262 
    63     private: 
    64         osg::ref_ptr<osg::Vec4Array> T_; 
    65         osg::ref_ptr<osg::Vec4Array> B_; 
    66         osg::ref_ptr<osg::Vec4Array> N_; 
    67     }; 
     63private: 
     64    osg::ref_ptr<osg::Vec4Array> T_; 
     65    osg::ref_ptr<osg::Vec4Array> B_; 
     66    osg::ref_ptr<osg::Vec4Array> N_; 
     67}; 
    6868 
    6969} 
  • OpenSceneGraph/trunk/include/osgUtil/TransformAttributeFunctor

    r1984 r3526  
    2828    public: 
    2929     
    30         /** construct a functor to transform a drawable's vertex and normal attributes by specified matrix.*/ 
     30        /** Construct a functor to transform a drawable's vertex and normal attributes by specified matrix.*/ 
    3131        TransformAttributeFunctor(const osg::Matrix& m); 
    3232             
    3333        virtual ~TransformAttributeFunctor(); 
    3434 
    35         /** do the work of transforming vertex and normal attributes. */ 
     35        /** Do the work of transforming vertex and normal attributes. */ 
    3636        virtual void apply(osg::Drawable::AttributeType type,unsigned int count,osg::Vec3* begin); 
    3737 
  • OpenSceneGraph/trunk/include/osgUtil/TriStripVisitor

    r3432 r3526  
    2626 
    2727/** A tri stripping visitor for converting Geometry surface primitives into tri strips. 
    28   * The current implemention is based up Tanguy Fautre's triangulation code. 
     28  * The current implemention is based upon Tanguy Fautre's triangulation code. 
    2929  */ 
    3030class OSGUTIL_EXPORT TriStripVisitor : public osg::NodeVisitor 
     
    4646        void stripify(osg::Geometry& drawable); 
    4747 
    48         /** Stripfy the accumulated list of Geometry drawables.*/ 
     48        /** Stripify (make into strips of tria or quads) the accumulated list of Geometry drawables.*/ 
    4949        void stripify(); 
    5050 
    51         /// accumulate the Geometry drawables to stripify 
     51        /// Accumulate the Geometry drawables to make into strips. 
    5252        virtual void apply(osg::Geode& geode); 
    5353 
  • OpenSceneGraph/trunk/include/osgUtil/UpdateVisitor

    r3432 r3526  
    3333/** 
    3434 * Basic UpdateVisitor implementation for animating a scene. 
    35  * This visitor traverses the scene graph, call each nodes appCallback if 
     35 * This visitor traverses the scene graph, calling each nodes appCallback if 
    3636 * it exists.  
    3737 */ 
     
    4545        virtual void reset(); 
    4646 
     47    /** During traversal each type of node calls its callbacks and its children traversed. */ 
    4748        virtual void apply(osg::Node& node)         { handle_callbacks_and_traverse(node); } 
    4849         
     
    6364    protected: 
    6465 
    65 //         /** prevent unwanted copy construction.*/ 
     66//         /** Prevent unwanted copy construction.*/ 
    6667//         UpdateVisitor(const UpdateVisitor&):osg::NodeVisitor() {} 
    6768 
    68         /** prevent unwanted copy operator.*/ 
     69        /** Prevent unwanted copy operator.*/ 
    6970        UpdateVisitor& operator = (const UpdateVisitor&) { return *this; } 
    7071         
     
    8081            osg::NodeCallback* callback = node.getUpdateCallback(); 
    8182            if (callback) (*callback)(&node,this); 
    82             /*else if (node.getNumChildrenRequiringUpdateTraversal()>0)*/ traverseGeode(node); 
     83            /*else if (node.getNumChildrenRequiringUpdateTraversal()>0)*/  
     84            traverseGeode(node); 
    8385        } 
    8486         
     
    8789            traverse((osg::Node&)geode); 
    8890             
    89             // call the app callbacks on the drawables. 
     91            // Call the app callbacks on the drawables. 
    9092            for(unsigned int i=0;i<geode.getNumDrawables();++i) 
    9193            { 
  • OpenSceneGraph/trunk/include/osgUtil/Version

    r1529 r3526  
    2121 
    2222/** 
    23  * getVersion_osgUtil() returns the library version number. 
    24  * Numbering convention : osg_src-0.8-31 will return 0.8.31 from getVersion_osgUtil. 
     23 * osgUtilGetVersion() returns the library version number. 
     24 * Numbering convention : osg_src-0.8-31 will return 0.8.31 from osgUtilGetVersion. 
    2525 * 
    2626 * This C function can be also used to check for the existence of the OpenSceneGraph 
     
    3939 
    4040/** 
    41  * getLibraryName_osgUtil() returns the library name in human friendly form. 
    42 */ 
     41 * osgUtilGetLibraryName() returns the library name in human friendly form. 
     42 */ 
    4343extern OSGUTIL_EXPORT const char* osgUtilGetLibraryName(); 
    4444