Changeset 3432

Show
Ignore:
Timestamp:
09/26/04 20:39:34 (10 years ago)
Author:
robert
Message:

From Geoff Michel, typos and spelling fixes.

Location:
OpenSceneGraph/trunk
Files:
23 modified

Legend:

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

    r3035 r3432  
    3131    /** This is the base class for cube map generators.  
    3232        It exposes the necessary interface to access the six generated images; 
    33         descendants    should only override the compute_color() method. 
     33        descendants should only override the compute_color() method. 
    3434    */ 
    3535    class OSGUTIL_EXPORT CubeMapGenerator: public osg::Referenced { 
     
    4141        inline const osg::Image *getImage(osg::TextureCubeMap::Face face) const; 
    4242 
    43         /** generate the six cube images.  
     43        /** Generate the six cube images.  
    4444            If use_osg_system is true, then the OSG's coordinate system is used instead  
    4545            of the default OpenGL one. 
     
    5454        inline static osg::Vec4 vector_to_color(const osg::Vec3 &vec);         
    5555 
    56         /** override this method to define how colors are computed.  
     56        /** Override this method to define how colors are computed.  
    5757            The parameter R is the reflection vector, pointing from the center of the cube. 
    5858            The return value should be the RGBA color associated with that reflection ray. 
  • OpenSceneGraph/trunk/include/osgUtil/CullVisitor

    r3230 r3432  
    4343 * opaque osg::Drawables into a depth sorted transparent bin and a state 
    4444 * sorted opaque bin.  The opaque bin is rendered first, and then the 
    45  * transparent bin in rendered in order from the furthest osg::Drawable 
     45 * transparent bin is rendered in order from the furthest osg::Drawable 
    4646 * from the eye to the one nearest the eye.  
    4747 */ 
     
    155155        value_type computeNearestPointInFrustum(const osg::Matrix& matrix, const osg::Polytope::PlaneList& planes,const osg::Drawable& drawable); 
    156156 
    157         bool updateCalculatedNearFar(const osg::Matrix& matrix,const osg::BoundingBox& bb); 
    158  
    159         bool updateCalculatedNearFar(const osg::Matrix& matrix,const osg::Drawable& drawable, bool isBillboard=false); 
    160          
    161         void updateCalculatedNearFar(const osg::Vec3& pos); 
    162                  
     157        bool updateCalculatedNearFar(const osg::Matrix& matrix,const osg::BoundingBox& bb); 
     158 
     159        bool updateCalculatedNearFar(const osg::Matrix& matrix,const osg::Drawable& drawable, bool isBillboard=false); 
     160         
     161        void updateCalculatedNearFar(const osg::Vec3& pos); 
     162         
    163163        /** Add a drawable to current render graph.*/ 
    164164        inline void addDrawable(osg::Drawable* drawable,osg::RefMatrix* matrix); 
     
    167167        inline void addDrawableAndDepth(osg::Drawable* drawable,osg::RefMatrix* matrix,float depth); 
    168168 
    169         /** Add an attribute which is positioned related to the modelview matrix.*/ 
     169        /** Add an attribute which is positioned relative to the modelview matrix.*/ 
    170170        inline void addPositionedAttribute(osg::RefMatrix* matrix,const osg::StateAttribute* attr); 
    171171 
    172         /** Add an attribute which is positioned related to the modelview matrix.*/ 
     172        /** Add an attribute which is positioned relative to the modelview matrix.*/ 
    173173        inline void addPositionedTextureAttribute(unsigned int textureUnit, osg::RefMatrix* matrix,const osg::StateAttribute* attr); 
    174174 
    175         /** reimplement CullStack's popProjectionMatrix() adding clamping of the projection matrix to the computed near and far.*/ 
     175        /** Re-implement CullStack's popProjectionMatrix() adding clamping of the projection matrix to 
     176          * the computed near and far.*/ 
    176177        virtual void popProjectionMatrix(); 
    177178         
     
    185186        virtual bool clampProjectionMatrixImplementation(osg::Matrixd& projection, double& znear, double& zfar) const; 
    186187 
    187         /** clamp the projection float matrix to computed near and far values, use callback if it exists, otherwise use default CullVisitro implemntation.*/ 
     188        /** Clamp the projection float matrix to computed near and far values, use callback if it exists, 
     189          * otherwise use default CullVisitor implementation.*/ 
    188190        inline bool clampProjectionMatrix(osg::Matrixf& projection, value_type& znear, value_type& zfar) const 
    189191        { 
     
    204206        } 
    205207 
    206         /** clamp the projection double matrix to computed near and far values, use callback if it exists, otherwise use default CullVisitro implemntation.*/ 
     208        /** Clamp the projection double matrix to computed near and far values, use callback if it exists, 
     209          * otherwise use default CullVisitor implementation.*/ 
    207210        inline bool clampProjectionMatrix(osg::Matrixd& projection, value_type& znear, value_type& zfar) const 
    208211        { 
     
    231234    protected: 
    232235 
    233 //         /** prevent unwanted copy construction.*/ 
    234 //         CullVisitor(const CullVisitor&): osg::NodeVisitor(), osg::CullStack() {} 
    235  
    236         /** prevent unwanted copy operator.*/ 
     236        /** Prevent unwanted copy operator.*/ 
    237237        CullVisitor& operator = (const CullVisitor&) { return *this; } 
    238238         
     
    252252 
    253253 
    254         /** create an impostor sprite by setting up a pre-rendering stage 
     254        /** Create an impostor sprite by setting up a pre-rendering stage 
    255255          * to generate the impostor texture. */ 
    256256        osg::ImpostorSprite* createImpostorSprite(osg::Impostor& node); 
     
    269269         
    270270         
    271         typedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList; 
    272         RenderLeafList _reuseRenderLeafList; 
    273         unsigned int _currentReuseRenderLeafIndex; 
    274          
    275         inline RenderLeaf* createOrReuseRenderLeaf(osg::Drawable* drawable,osg::RefMatrix* projection,osg::RefMatrix* matrix, float depth=0.0f); 
     271        typedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList; 
     272        RenderLeafList _reuseRenderLeafList; 
     273        unsigned int _currentReuseRenderLeafIndex; 
     274     
     275        inline RenderLeaf* createOrReuseRenderLeaf(osg::Drawable* drawable,osg::RefMatrix* projection,osg::RefMatrix* matrix, float depth=0.0f); 
    276276         
    277277        osg::ref_ptr<osg::ImpostorSpriteManager>    _impostorSpriteManager; 
     
    318318        typedef std::multimap<value_type, MatrixPlanesDrawables>   DistanceMatrixDrawableMap; 
    319319        DistanceMatrixDrawableMap                                  _nearPlaneCandidateMap; 
    320          
     320     
    321321}; 
    322322 
     
    348348} 
    349349 
    350 /** Add an attribute which is positioned related to the modelview matrix.*/ 
     350/** Add an attribute which is positioned relative to the modelview matrix.*/ 
    351351inline void CullVisitor::addPositionedAttribute(osg::RefMatrix* matrix,const osg::StateAttribute* attr) 
    352352{ 
     
    354354} 
    355355 
    356 /** Add an attribute which is positioned related to the modelview matrix.*/ 
     356/** Add an attribute which is positioned relative to the modelview matrix.*/ 
    357357inline void CullVisitor::addPositionedTextureAttribute(unsigned int textureUnit, osg::RefMatrix* matrix,const osg::StateAttribute* attr) 
    358358{ 
     
    362362inline RenderLeaf* CullVisitor::createOrReuseRenderLeaf(osg::Drawable* drawable,osg::RefMatrix* projection,osg::RefMatrix* matrix, float depth) 
    363363{ 
    364     // skip of any already reused renderleaf. 
     364    // Skips any already reused renderleaf. 
    365365    while (_currentReuseRenderLeafIndex<_reuseRenderLeafList.size() &&  
    366366           _reuseRenderLeafList[_currentReuseRenderLeafIndex]->referenceCount()>1) 
     
    370370    } 
    371371 
    372     // if still within list, element must be singularly referenced 
    373     // there return it to be reused. 
     372    // If still within list, element must be singularly referenced then return it to be reused. 
    374373    if (_currentReuseRenderLeafIndex<_reuseRenderLeafList.size()) 
    375374    { 
     
    379378    } 
    380379 
    381     // otherwise need to create new renderleaf. 
     380    // Otherwise need to create new renderleaf. 
    382381    RenderLeaf* renderleaf = new RenderLeaf(drawable,projection,matrix,depth); 
    383382    _reuseRenderLeafList.push_back(renderleaf); 
  • OpenSceneGraph/trunk/include/osgUtil/DelaunayTriangulator

    r1893 r3432  
    2626{ 
    2727 
    28 /** Utility class that triangulates an irregolar network of sample points. 
     28/** Utility class that triangulates an irregular network of sample points. 
    2929    Just create a DelaunayTriangulator, assign it the sample point array and call 
    3030    its triangulate() method to start the triangulation. Then you can obtain the 
     
    3838    DelaunayTriangulator(const DelaunayTriangulator &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY); 
    3939 
    40     /// Get the const input point array. 
     40    /** Get the const input point array. */ 
    4141    inline const osg::Vec3Array *getInputPointArray() const; 
    4242 
    43     /// Get the input point array. 
     43    /** Get the input point array. */ 
    4444    inline osg::Vec3Array *getInputPointArray(); 
    4545 
    46     /// Set the input point array. 
     46    /** Set the input point array. */ 
    4747    inline void setInputPointArray(osg::Vec3Array *points); 
    4848 
    49     /// Get the const output normal array (optional). 
     49    /** Get the const output normal array (optional). */ 
    5050    inline const osg::Vec3Array *getOutputNormalArray() const; 
    5151 
    52     /// Get the output normal array (optional). 
     52    /** Get the output normal array (optional). */ 
    5353    inline osg::Vec3Array *getOutputNormalArray(); 
    5454 
    55     /// Set the output normal array (optional). 
     55    /** Set the output normal array (optional). */ 
    5656    inline void setOutputNormalArray(osg::Vec3Array *normals); 
    5757 
    58     /// Start triangulation. 
     58    /** Start triangulation. */ 
    5959    bool triangulate(); 
    6060 
    61     /// Get the generated primitive (call triangulate() first). 
     61    /** Get the generated primitive (call triangulate() first). */ 
    6262    inline const osg::DrawElementsUInt *getTriangles() const; 
    6363 
    64     /// Get the generated primitive (call triangulate() first). 
     64    /** Get the generated primitive (call triangulate() first). */ 
    6565    inline osg::DrawElementsUInt *getTriangles(); 
    6666 
  • OpenSceneGraph/trunk/include/osgUtil/DisplayRequirementsVisitor

    r1529 r3432  
    2323namespace osgUtil { 
    2424 
    25 /** A visitor for traversing a scene graph establishing the OpenGL visuals are required 
    26   * to support rendering of that scene graph.  The results can then be used by 
    27   * applications to set up there windows with the correct visuals.  Have a look at 
    28   * src/osgGLUT/Viewer.cpp's Viewer::open() method for an example how to use it. 
     25/** A visitor for traversing a scene graph establishing which OpenGL visuals are 
     26  * required to support rendering of that scene graph.  The results can then be used by 
     27  * applications to set up their windows with the correct visuals.  Have a look at 
     28  * src/osgGLUT/Viewer.cpp's Viewer::open() method for an example of how to use it. 
    2929  */ 
    3030class OSGUTIL_EXPORT DisplayRequirementsVisitor : public osg::NodeVisitor 
     
    3232    public: 
    3333 
    34         /** Default to traversing all children, and reqiresDoubleBuffer, 
     34        /** Default to traversing all children, and requiresDoubleBuffer, 
    3535          * requiresRGB and requiresDepthBuffer to true and with 
    3636          * alpha and stencil off.*/ 
  • OpenSceneGraph/trunk/include/osgUtil/Export

    r1704 r3432  
    2727 
    2828#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) 
    29         #  ifdef OSGUTIL_LIBRARY 
    30         #    define OSGUTIL_EXPORT   __declspec(dllexport) 
    31         #  else 
    32         #    define OSGUTIL_EXPORT   __declspec(dllimport) 
    33         #endif /* OSGUTIL_LIBRARY */ 
     29    #  ifdef OSGUTIL_LIBRARY 
     30    #    define OSGUTIL_EXPORT   __declspec(dllexport) 
     31    #  else 
     32    #    define OSGUTIL_EXPORT   __declspec(dllimport) 
     33    #endif /* OSGUTIL_LIBRARY */ 
    3434#else 
    35         #define OSGUTIL_EXPORT  
     35    #define OSGUTIL_EXPORT  
    3636#endif  
    3737 
  • OpenSceneGraph/trunk/include/osgUtil/GLObjectsVisitor

    r3178 r3432  
    4444        typedef unsigned int Mode; 
    4545 
    46         /** Construct a GLObjectsVisior to traverse all child, operating on 
     46        /** Construct a GLObjectsVisitor to traverse all children, operating on 
    4747          * node according to specified mode, such as to compile or release  
    4848          * display list/texture objects etc. Default mode is to compile  
  • OpenSceneGraph/trunk/include/osgUtil/HalfWayMapGenerator

    r1529 r3432  
    2121{ 
    2222 
    23         /** This cube map generator produces an Half-way vector map, useful for  
    24             hardware-based specular lighting effects. 
    25             It computes: C = normalize(R - L), where C is the resulting color,  
    26             R is the reflection vector and L is the light direction. 
    27         */ 
    28         class OSGUTIL_EXPORT HalfWayMapGenerator: public CubeMapGenerator { 
    29         public: 
    30                 HalfWayMapGenerator(const osg::Vec3 &light_direction, int texture_size = 64); 
    31                 HalfWayMapGenerator(const HalfWayMapGenerator &copy, const osg::CopyOp &copyop); 
     23    /** This cube map generator produces an Half-way vector map, useful for  
     24      * hardware-based specular lighting effects. 
     25      * It computes: C = normalize(R - L), where C is the resulting color,  
     26      * R is the reflection vector and L is the light direction. 
     27      */ 
     28    class OSGUTIL_EXPORT HalfWayMapGenerator: public CubeMapGenerator { 
     29    public: 
     30        HalfWayMapGenerator(const osg::Vec3 &light_direction, int texture_size = 64); 
     31        HalfWayMapGenerator(const HalfWayMapGenerator &copy, const osg::CopyOp &copyop); 
    3232 
    33         protected: 
    34                 virtual ~HalfWayMapGenerator() {} 
    35                 HalfWayMapGenerator &operator=(const HalfWayMapGenerator &) { return *this; } 
     33    protected: 
     34        virtual ~HalfWayMapGenerator() {} 
     35        HalfWayMapGenerator &operator=(const HalfWayMapGenerator &) { return *this; } 
    3636 
    37                 inline virtual osg::Vec4 compute_color(const osg::Vec3 &R) const; 
     37        inline virtual osg::Vec4 compute_color(const osg::Vec3 &R) const; 
    3838 
    39         private: 
    40                 osg::Vec3 ldir_; 
    41         }; 
     39    private: 
     40        osg::Vec3 ldir_; 
     41    }; 
    4242 
    43         // INLINE METHODS 
     43    // INLINE METHODS 
    4444 
    45         inline osg::Vec4 HalfWayMapGenerator::compute_color(const osg::Vec3 &R) const 
    46         { 
    47                 const osg::Vec3 V = (R / R.length()) - ldir_; 
    48                 return vector_to_color(V / V.length()); 
    49         } 
     45    inline osg::Vec4 HalfWayMapGenerator::compute_color(const osg::Vec3 &R) const 
     46    { 
     47        const osg::Vec3 V = (R / R.length()) - ldir_; 
     48        return vector_to_color(V / V.length()); 
     49    } 
    5050 
    5151} 
  • OpenSceneGraph/trunk/include/osgUtil/HighlightMapGenerator

    r3035 r3432  
    2222 
    2323    /** This cube map generator produces a specular highlight map.  
    24         The vector-color association is: C = (R dot (-L)) ^ n, where C is the  
    25         resulting color, R is the reflection vector, L is the light direction  
    26         and n is the specular exponent. 
    27     */ 
     24      * The vector-color association is: C = (R dot (-L)) ^ n, where C is the  
     25      * resulting color, R is the reflection vector, L is the light direction  
     26      * and n is the specular exponent. 
     27      */ 
    2828    class OSGUTIL_EXPORT HighlightMapGenerator: public CubeMapGenerator { 
    2929    public: 
  • OpenSceneGraph/trunk/include/osgUtil/InsertImpostorsVisitor

    r1529 r3432  
    2323 
    2424/** Insert impostor nodes into scene graph. 
    25   * For example of usage see src/Demos/osgimpostor. 
     25  * For example of usage see examples/osgimpostor. 
    2626  */ 
    2727class OSGUTIL_EXPORT InsertImpostorsVisitor : public osg::NodeVisitor 
     
    2929    public: 
    3030 
    31         /// default to traversing all children. 
     31        /** Default to traversing all children. */ 
    3232        InsertImpostorsVisitor(); 
    3333         
     
    3838        unsigned int getMaximumNumberOfNestedImpostors() const { return _maximumNumNestedImpostors; } 
    3939 
    40         /** empty visitor, make it ready for next traversal.*/         
     40        /** Empty visitor, make it ready for next traversal. */         
    4141        void reset(); 
    4242 
     
    4949        virtual void apply(osg::Impostor& node); 
    5050         
    51         /* insert the required impostors into the scene graph.*/ 
     51        /* Insert the required impostors into the scene graph. */ 
    5252        void insertImpostors(); 
    5353         
  • OpenSceneGraph/trunk/include/osgUtil/IntersectVisitor

    r1629 r3432  
    3030 
    3131class OSGUTIL_EXPORT Hit 
    32 { 
     32{  
     33    /** Describes a point in space produced by an intersection of a line with a scene. 
     34      * A Hit is always on a surface as rendered by the Open Scene Graph scene (usually 
     35      * a triangle or other primitive, but a special hit handler could return a 
     36      * different value perhaps: a sphere shape might return a Hit on the true sphere 
     37      * rather than the approximate tesselated sphere rendered. 
     38      */ 
    3339    public: 
    3440 
     
    8692        void addLineSegment(osg::LineSegment* seg); 
    8793 
    88         //typedef std::multiset<Hit> HitList; 
    8994        typedef std::vector<Hit> HitList; 
    9095        typedef std::map<osg::LineSegment*,HitList > LineSegmentHitListMap; 
  • OpenSceneGraph/trunk/include/osgUtil/Optimizer

    r3203 r3432  
    2626namespace osgUtil { 
    2727 
    28 /** Insert impostor nodes into scene graph. 
    29   * For example of usage see src/Demos/osgimpostor. 
     28/** Traverses scene graph to improve efficiency. See OptimizationOptions. 
     29  * For example of usage see examples/osgimpostor or osgviewer. 
    3030  */ 
    3131   
     
    7070        }; 
    7171 
    72         /** reset internal data to initial state - the getPrimissableOptionsMap is cleared.*/ 
     72        /** Reset internal data to initial state - the getPermissibleOptionsMap is cleared.*/ 
    7373        void reset(); 
    7474         
    75         /** traverse the node and its subgraph with a series of optimization 
    76           * visitors, specificied by the OptizationOptions.*/ 
     75        /** Traverse the node and its subgraph with a series of optimization 
     76          * visitors, specified by the OptimizationOptions.*/ 
    7777        void optimize(osg::Node* node); 
    7878 
    79         /** traverse the node and its subgraph with a series of optimization 
    80           * visitors, specificied by the OptizationOptions.*/ 
     79        /** Traverse the node and its subgraph with a series of optimization 
     80          * visitors, specified by the OptimizationOptions.*/ 
    8181        virtual void optimize(osg::Node* node, unsigned int options); 
    8282 
    8383 
    84         inline void setPermissableOptimizationsForObject(const osg::Object* object, unsigned int options) 
    85         { 
    86             _permissableOptimizationsMap[object] = options; 
     84        inline void setPermissibleOptimizationsForObject(const osg::Object* object, unsigned int options) 
     85        { 
     86            _permissibleOptimizationsMap[object] = options; 
    8787        } 
    8888         
    89         inline unsigned int getPermissableOptimizationsForObject(const osg::Object* object) const 
    90         { 
    91             PermissableOptimizationsMap::const_iterator itr = _permissableOptimizationsMap.find(object); 
    92             if (itr!=_permissableOptimizationsMap.end()) return itr->second; 
     89        inline unsigned int getPermissibleOptimizationsForObject(const osg::Object* object) const 
     90        { 
     91            PermissibleOptimizationsMap::const_iterator itr = _permissibleOptimizationsMap.find(object); 
     92            if (itr!=_permissibleOptimizationsMap.end()) return itr->second; 
    9393            else return 0xffffffff; 
    9494        } 
    9595         
    96         inline bool isOperationPermissableForObject(const osg::Object* object,unsigned int option) const 
    97         { 
    98             return (option & getPermissableOptimizationsForObject(object))!=0;  
     96        inline bool isOperationPermissibleForObject(const osg::Object* object,unsigned int option) const 
     97        { 
     98            return (option & getPermissibleOptimizationsForObject(object))!=0;  
    9999        } 
    100100         
    101         typedef std::map<const osg::Object*,unsigned int> PermissableOptimizationsMap; 
    102  
    103         PermissableOptimizationsMap& getPrimissableOptionsMap() { return _permissableOptimizationsMap; } 
    104         const PermissableOptimizationsMap& getPrimissableOptionsMap() const { return _permissableOptimizationsMap; } 
     101        typedef std::map<const osg::Object*,unsigned int> PermissibleOptimizationsMap; 
     102 
     103        PermissibleOptimizationsMap& getPermissibleOptionsMap() { return _permissibleOptimizationsMap; } 
     104        const PermissibleOptimizationsMap& getPermissibleOptionsMap() const { return _permissibleOptimizationsMap; } 
    105105         
    106106         
    107107    protected: 
    108108     
    109         PermissableOptimizationsMap _permissableOptimizationsMap; 
     109        PermissibleOptimizationsMap _permissibleOptimizationsMap; 
    110110 
    111111 
     
    113113 
    114114 
    115         /** Flatten Static Trasform nodes by applying their transform to the 
     115        /** Flatten Static Transform nodes by applying their transform to the 
    116116          * geometry on the leaves of the scene graph, then removing the  
    117117          * now redundant transforms.*/         
     
    133133                bool removeTransforms(osg::Node* nodeWeCannotRemove); 
    134134 
    135                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    136                 { 
    137                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,FLATTEN_STATIC_TRANSFORMS) :  true;  
     135                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     136                { 
     137                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,FLATTEN_STATIC_TRANSFORMS) :  true;  
    138138                } 
    139139 
     
    156156 
    157157 
    158         /** Combine Static Trasform nodes that sit above on another.*/         
     158        /** Combine Static Transform nodes that sit above one another.*/         
    159159        class OSGUTIL_EXPORT CombineStaticTransformsVisitor : public osg::NodeVisitor 
    160160        { 
     
    169169                bool removeTransforms(osg::Node* nodeWeCannotRemove); 
    170170 
    171                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    172                 { 
    173                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,FLATTEN_STATIC_TRANSFORMS) :  true;  
     171                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     172                { 
     173                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,FLATTEN_STATIC_TRANSFORMS) :  true;  
    174174                } 
    175175 
     
    199199                void removeEmptyNodes(); 
    200200 
    201                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    202                 { 
    203                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,REMOVE_REDUNDANT_NODES) :  true;  
     201                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     202                { 
     203                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,REMOVE_REDUNDANT_NODES) :  true;  
    204204                } 
    205205 
     
    224224                void removeRedundantNodes(); 
    225225 
    226                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    227                 { 
    228                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,REMOVE_REDUNDANT_NODES) :  true;  
    229                 } 
    230  
    231                 Optimizer*      _optimizer; 
    232         }; 
    233  
    234         /** Tesselate all geodes, to remove POLYGONS 
    235           * complementary ranges.*/ 
     226                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     227                { 
     228                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,REMOVE_REDUNDANT_NODES) :  true;  
     229                } 
     230 
     231                Optimizer*      _optimizer; 
     232        }; 
     233 
     234        /** Tesselate all geodes, to remove POLYGONS.*/ 
    236235        class OSGUTIL_EXPORT TesselateVisitor : public osg::NodeVisitor 
    237236        { 
     
    264263                void combineLODs(); 
    265264 
    266                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    267                 { 
    268                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,COMBINE_ADJACENT_LODS) :  true;  
     265                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     266                { 
     267                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,COMBINE_ADJACENT_LODS) :  true;  
    269268                } 
    270269 
     
    293292                void optimize(); 
    294293 
    295                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    296                 { 
    297                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,SHARE_DUPLICATE_STATE) :  true;  
     294                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     295                { 
     296                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,SHARE_DUPLICATE_STATE) :  true;  
    298297                } 
    299298 
     
    323322                void checkGeode(osg::Geode& geode); 
    324323                 
    325                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    326                 { 
    327                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,CHECK_GEOMETRY) :  true;  
     324                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     325                { 
     326                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,CHECK_GEOMETRY) :  true;  
    328327                } 
    329328 
     
    356355                static bool mergePrimitive(osg::DrawElementsUInt& lhs,osg::DrawElementsUInt& rhs); 
    357356 
    358                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    359                 { 
    360                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,MERGE_GEOMETRY) :  true;  
     357                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     358                { 
     359                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,MERGE_GEOMETRY) :  true;  
    361360                } 
    362361 
     
    382381                GroupsToDivideList _groupsToDivideList; 
    383382 
    384                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    385                 { 
    386                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,SPATIALIZE_GROUPS) :  true;  
     383                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     384                { 
     385                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,SPATIALIZE_GROUPS) :  true;  
    387386                } 
    388387 
     
    407406                SharedNodeList _sharedNodeList; 
    408407                 
    409                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    410                 { 
    411                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,COPY_SHARED_NODES) :  true;  
     408                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     409                { 
     410                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,COPY_SHARED_NODES) :  true;  
    412411                } 
    413412 
     
    438437                void apply(osg::Texture& texture); 
    439438                 
    440                 inline bool isOperationPermissableForObject(const osg::Object* object) const 
    441                 { 
    442                     return _optimizer ? _optimizer->isOperationPermissableForObject(object,OPTIMIZE_TEXTURE_SETTINGS) :  true;  
     439                inline bool isOperationPermissibleForObject(const osg::Object* object) const 
     440                { 
     441                    return _optimizer ? _optimizer->isOperationPermissibleForObject(object,OPTIMIZE_TEXTURE_SETTINGS) :  true;  
    443442                } 
    444443 
  • OpenSceneGraph/trunk/include/osgUtil/ReflectionMapGenerator

    r1529 r3432  
    1919{ 
    2020 
    21         /** This is the most simple cube map generator. It performs a direct association  
    22             between reflection vector and RGBA color (C = R). 
    23         */ 
    24         class ReflectionMapGenerator: public CubeMapGenerator { 
    25         public: 
    26                 inline ReflectionMapGenerator(int texture_size = 64); 
    27                 inline ReflectionMapGenerator(const ReflectionMapGenerator &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY); 
     21    /** This is the most simple cube map generator. It performs a direct association  
     22        between reflection vector and RGBA color (C = R). 
     23    */ 
     24    class ReflectionMapGenerator: public CubeMapGenerator { 
     25    public: 
     26        inline ReflectionMapGenerator(int texture_size = 64); 
     27        inline ReflectionMapGenerator(const ReflectionMapGenerator &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY); 
    2828 
    29         protected: 
    30                 virtual ~ReflectionMapGenerator() {} 
    31                 ReflectionMapGenerator &operator=(const ReflectionMapGenerator &) { return *this; } 
     29    protected: 
     30        virtual ~ReflectionMapGenerator() {} 
     31        ReflectionMapGenerator &operator=(const ReflectionMapGenerator &) { return *this; } 
    3232 
    33                 inline virtual osg::Vec4 compute_color(const osg::Vec3 &R) const; 
    34         }; 
     33        inline virtual osg::Vec4 compute_color(const osg::Vec3 &R) const; 
     34    }; 
    3535 
    36         // INLINE METHODS 
     36    // INLINE METHODS 
    3737 
    38         inline ReflectionMapGenerator::ReflectionMapGenerator(int texture_size) 
    39                 : CubeMapGenerator(texture_size) 
    40         { 
    41         } 
     38    inline ReflectionMapGenerator::ReflectionMapGenerator(int texture_size) 
     39        : CubeMapGenerator(texture_size) 
     40    { 
     41    } 
    4242 
    43         inline ReflectionMapGenerator::ReflectionMapGenerator(const ReflectionMapGenerator &copy, const osg::CopyOp &copyop) 
    44                 : CubeMapGenerator(copy, copyop) 
    45         { 
    46         } 
     43    inline ReflectionMapGenerator::ReflectionMapGenerator(const ReflectionMapGenerator &copy, const osg::CopyOp &copyop) 
     44        : CubeMapGenerator(copy, copyop) 
     45    { 
     46    } 
    4747 
    48         inline osg::Vec4 ReflectionMapGenerator::compute_color(const osg::Vec3 &R) const 
    49         { 
    50                 return vector_to_color(R / R.length()); 
    51         } 
     48    inline osg::Vec4 ReflectionMapGenerator::compute_color(const osg::Vec3 &R) const 
     49    { 
     50        return vector_to_color(R / R.length()); 
     51    } 
    5252 
    5353} 
  • OpenSceneGraph/trunk/include/osgUtil/RenderBin

    r3299 r3432  
    2626class Statistics; 
    2727/** 
    28  * RenderBin base class. 
     28 * RenderBin base class. Renderbin contains geometries to be rendered as a group,  
     29 * renderbins are rendered once each.  They can improve efficiency or  
     30 * use different rendering algorithms. 
     31 * A renderBin can contain further renderBins producing a tree hierarchy of renderBins. 
    2932 */ 
    3033class OSGUTIL_EXPORT RenderBin : public osg::Object 
     
    6972        const RenderStage* getStage() const { return _stage; } 
    7073 
    71         int getBinNum() const { return _binNum; } 
     74        int getBinNum() const { return _binNum; } 
    7275 
    7376        RenderGraphList& getRenderGraphList() { return _renderGraphList; } 
     
    9194 
    9295        virtual void sortImplementation(); 
    93          
     96     
    9497        void setSortMode(SortMode mode); 
    9598        SortMode getSortMode() const { return _sortMode; } 
     
    123126        const DrawCallback* getDrawCallback() const { return _drawCallback.get(); } 
    124127 
    125         /** extract stats for current draw list. */ 
     128        /** Extract stats for current draw list. */ 
    126129        bool getStats(Statistics* primStats); 
    127130        void getPrims(Statistics* primStats); 
  • OpenSceneGraph/trunk/include/osgUtil/RenderGraph

    r1572 r3432  
    3737}; 
    3838 
     39/** RenderGraph - contained in a renderBin, defines the scene to be drawn. 
     40  */ 
    3941class OSGUTIL_EXPORT RenderGraph : public osg::Referenced 
    4042{ 
     
    140142        } 
    141143 
    142         /** reset the internal contents of a RenderGraph, including deleting all children.*/ 
     144        /** Reset the internal contents of a RenderGraph, including deleting all children.*/ 
    143145        void reset(); 
    144146 
    145         /** recursively clean the RenderGraph of all its drawables, lights and depths. 
     147        /** Recursively clean the RenderGraph of all its drawables, lights and depths. 
    146148          * Leaves children intact, and ready to be populated again.*/ 
    147149        void clean(); 
    148150 
    149         /** recursively prune the RenderGraph of empty children.*/ 
     151        /** Recursively prune the RenderGraph of empty children.*/ 
    150152        void prune(); 
    151153         
  • OpenSceneGraph/trunk/include/osgUtil/RenderLeaf

    r1529 r3432  
    2424namespace osgUtil { 
    2525 
    26 // forward declare RenderGraph 
     26// Forward declare RenderGraph 
    2727class RenderGraph; 
    2828 
    29 /** container class for all data required for rendering of drawables. 
     29/** Container class for all data required for rendering of drawables. 
    3030  */ 
    3131class OSGUTIL_EXPORT RenderLeaf : public osg::Referenced 
     
    4242 
    4343         
    44         inline void set(osg::Drawable* drawable,osg::RefMatrix* projection,osg::RefMatrix* modelview, float depth=0.0f) 
    45         { 
    46             _parent = 0; 
    47             _drawable = drawable; 
    48             _projection = projection, 
    49             _modelview = modelview, 
    50             _depth = depth; 
    51         } 
    52          
    53         inline void reset() 
    54         { 
    55             _parent = 0; 
    56             _drawable = 0; 
    57             _projection = 0; 
    58             _modelview = 0; 
    59             _depth = 0.0f; 
    60         } 
    61  
    62          
     44        inline void set(osg::Drawable* drawable,osg::RefMatrix* projection,osg::RefMatrix* modelview, float depth=0.0f) 
     45        { 
     46            _parent = 0; 
     47            _drawable = drawable; 
     48                _projection = projection, 
     49                _modelview = modelview, 
     50            _depth = depth; 
     51        } 
     52         
     53        inline void reset() 
     54        { 
     55            _parent = 0; 
     56            _drawable = 0; 
     57            _projection = 0; 
     58            _modelview = 0; 
     59            _depth = 0.0f; 
     60        } 
     61     
    6362        virtual void render(osg::State& state,RenderLeaf* previous); 
    6463         
    65         /// allow RenderGraph to change the RenderLeaf's _parent. 
     64        /// Allow RenderGraph to change the RenderLeaf's _parent. 
    6665        friend class osgUtil::RenderGraph; 
    6766 
  • OpenSceneGraph/trunk/include/osgUtil/RenderStage

    r3214 r3432  
    2424 
    2525/** 
    26  * RenderState base class. Used for encapsulate a complete stage in 
     26 * RenderStage base class. Used for encapsulate a complete stage in 
    2727 * rendering - setting up of viewport, the projection and model 
    2828 * matrices and rendering the RenderBin's enclosed with this RenderStage. 
     
    8282 
    8383        /** Set the clear accum used in glClearAccum(..).  
    84           * glClearAcumm is only called if mask & GL_ACCUM_BUFFER_BIT is true*/ 
     84          * glClearAcumm is only called if mask & GL_ACCUM_BUFFER_BIT is true. */ 
    8585        void setClearAccum(const osg::Vec4& color) { _clearAccum=color; } 
    8686         
     
    9191         
    9292        /** Set the clear depth used in glClearDepth(..). Defaults to 1.0 
    93           * glClearDepth is only called if mask & GL_DEPTH_BUFFER_BIT is true*/ 
     93          * glClearDepth is only called if mask & GL_DEPTH_BUFFER_BIT is true. */ 
    9494        void setClearDepth(double depth) { _clearDepth=depth; } 
    9595         
     
    9898 
    9999         
    100         /** Set the clear stencil value used in glClearStencil(). Defaults to 0  
     100        /** Set the clear stencil value used in glClearStencil(). Defaults to 0; 
    101101          * glClearStencil is only called if mask & GL_STENCIL_BUFFER_BIT is true*/ 
    102102        void setClearStencil(int stencil) { _clearStencil=stencil; } 
     
    126126 
    127127        virtual void draw(osg::State& state,RenderLeaf*& previous); 
    128          
     128     
    129129        virtual void drawImplementation(osg::State& state,RenderLeaf*& previous); 
    130130 
    131131        void addToDependencyList(RenderStage* rs); 
    132132 
    133         /** extract stats for current draw list. */ 
     133        /** Extract stats for current draw list. */ 
    134134        bool getStats(Statistics* primStats);  
    135135         
  • OpenSceneGraph/trunk/include/osgUtil/RenderStageLighting

    r3125 r3432  
    2525 
    2626/** 
    27  * RenderBin base class. 
     27 * RenderStageLighting base class. Used in RenderStage class. 
    2828 */ 
    2929class OSGUTIL_EXPORT RenderStageLighting : public osg::Object 
  • OpenSceneGraph/trunk/include/osgUtil/SceneView

    r3429 r3432  
    2828 
    2929/** 
    30  * SceneView is literally a view of a scene, encapsulating the 
    31  * camera (modelview+projection matrices), global state, lights and the scene itself.  Provides 
     30 * SceneView is literally a view of a scene, encapsulating the 'camera'  
     31 * (not to be confused with Producer::Camera) (modelview+projection matrices), 
     32 * global state, lights and the scene itself.  Provides 
    3233 * methods for setting up the view and rendering it. 
    3334*/ 
     
    5152        /** Set scene view to use default global state, light, camera 
    5253         *  and render visitor. 
    53         */ 
     54         */ 
    5455        void setDefaults(unsigned int options = STANDARD_SETTINGS); 
    5556 
    56         /** Set the data which to view. The data will typically be 
     57        /** Set the data to view. The data will typically be 
    5758         *  an osg::Scene but can be any osg::Node type. 
    5859         */ 
    5960        void setSceneData(osg::Node* node) { _sceneData = node; } 
    60         /** Get the scene data which to view. The data will typically be 
     61        /** Get the scene data to view. The data will typically be 
    6162         *  an osg::Scene but can be any osg::Node type. 
    6263         */ 
     
    6869        const osg::Node* getSceneData() const { return _sceneData.get(); } 
    6970 
    70         /** Set the viewport of the scene view to use specfied osg::Viewport. */ 
     71        /** Set the viewport of the scene view to use specified osg::Viewport. */ 
    7172        void setViewport(osg::Viewport* viewport) 
    7273        { 
     
    119120            Defaults to an off blue color.*/ 
    120121        void setClearColor(const osg::Vec4& color) { _clearColor=color; } 
    121         /** Get the color usinged in glClearColor.*/ 
     122        /** Get the color used in glClearColor.*/ 
    122123        const osg::Vec4& getClearColor() const { return _clearColor; } 
    123124 
     
    153154        inline void setProjectionMatrix(const osg::Matrixd& matrix) { _projectionMatrix.set(matrix); } 
    154155 
    155         /** Set to a orthographic projection. See OpenGL glOrtho for documentation further details.*/ 
     156        /** Set to an orthographic projection. See OpenGL glOrtho for documentation further details.*/ 
    156157        void setProjectionMatrixAsOrtho(double left, double right, 
    157158                                        double bottom, double top, 
     
    178179        const osg::Matrixd& getProjectionMatrix() const { return _projectionMatrix; } 
    179180 
    180         /** Get the othorgraphic settings of the orthographic projection matrix.  
     181        /** Get the othographic settings of the orthographic projection matrix.  
    181182          * Returns false if matrix is not an orthographic matrix, where parameter values are undefined.*/ 
    182183        bool getProjectionMatrixAsOrtho(double& left, double& right, 
     
    190191                                          double& zNear, double& zFar); 
    191192 
    192         /** Get the frustum setting of a symetric perspective projection matrix. 
     193        /** Get the frustum setting of a symmetric perspective projection matrix. 
    193194          * Returns false if matrix is not a perspective matrix, where parameter values are undefined.  
    194           * Note, if matrix is not a symetric perspective matrix then the shear will be lost. 
    195           * Asymetric metrices occur when stereo, power walls, caves and reality center display are used. 
    196           * In these configuration one should use the AsFrustum method instead.*/ 
     195          * Note, if matrix is not a symmetric perspective matrix then the shear will be lost. 
     196          * Asymmetric matrices occur when stereo, power walls, caves and reality center display are used. 
     197          * In these configurations one should use the 'getProjectionMatrixAsFrustum' method instead.*/ 
    197198        bool getProjectionMatrixAsPerspective(double& fovy,double& aspectRatio, 
    198199                                              double& zNear, double& zFar); 
     
    291292            /** Use fusion distance from the value set on the SceneView.*/ 
    292293            USE_FUSION_DISTANCE_VALUE, 
    293             /** Compute the fusion distance by multiplying the screen distance by the  fusion distance value.*/ 
     294            /** Compute the fusion distance by multiplying the screen distance by the fusion distance value.*/ 
    294295            PROPORTIONAL_TO_SCREEN_DISTANCE 
    295296        }; 
     
    309310 
    310311 
    311         /** set whether the draw method should call renderer->prioritizeTexture.*/ 
     312        /** Set whether the draw method should call renderer->prioritizeTexture.*/ 
    312313        void setPrioritizeTextures(bool pt) { _prioritizeTextures = pt; } 
    313314         
    314         /** get whether the draw method should call renderer->prioritizeTexture.*/ 
     315        /** Get whether the draw method should call renderer->prioritizeTexture.*/ 
    315316        bool getPrioritizeTextures() const { return _prioritizeTextures; } 
    316317 
    317         /** callback for overidding the default method for compute the offset projection and view matrices.*/ 
     318        /** Callback for overidding the default method for compute the offset projection and view matrices.*/ 
    318319        struct ComputeStereoMatricesCallback : public osg::Referenced 
    319320        { 
     
    350351            for projectWindowIntoObject to produce valid values.  Consistent with OpenGL 
    351352            windows coordinates are calculated relative to the bottom left of the window, 
    352             whereas as window API's normally have the top left as the origin, 
     353            whereas window API's normally have the top left as the origin, 
    353354            so you may need to pass in (mouseX,window_height-mouseY,...). 
    354355            Returns true on successful projection. 
     
    360361        inline void setFrameStamp(osg::FrameStamp* fs) { _frameStamp = fs; } 
    361362 
    362         /** Set the frame stamp for the current frame.*/ 
     363        /** Get the frame stamp for the current frame.*/ 
    363364        inline const osg::FrameStamp* getFrameStamp() const { return _frameStamp.get(); } 
    364365 
     
    400401          * The init traversal is called once for each SceneView, and should 
    401402          * be used to compile display list, texture objects intialize data 
    402           * not otherwise intializaed during scene graph loading. Note, is 
    403           * called automatically by update&cull if it hasn't already been called 
     403          * not otherwise intialized during scene graph loading. Note, is 
     404          * called automatically by update & cull if it hasn't already been called 
    404405          * elsewhere. Also init() should only ever be called within a valid 
    405406          * graphics context.*/ 
  • OpenSceneGraph/trunk/include/osgUtil/TangentSpaceGenerator

    r3032 r3432  
    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    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); 
    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; } 
     57    protected: 
     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         }; 
     63    private: 
     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/TriStripVisitor

    r3216 r3432  
    8282        } 
    8383         
    84         inline bool isOperationPermissableForObject(const osg::Object* object) const 
     84        inline bool isOperationPermissibleForObject(const osg::Object* object) const 
    8585        { 
    86             return _optimizer ? _optimizer->isOperationPermissableForObject(object,osgUtil::Optimizer::TRISTRIP_GEOMETRY) : true;  
     86            return _optimizer ? _optimizer->isOperationPermissibleForObject(object,osgUtil::Optimizer::TRISTRIP_GEOMETRY) : true;  
    8787        } 
    8888         
  • OpenSceneGraph/trunk/include/osgUtil/UpdateVisitor

    r2313 r3432  
    9494            } 
    9595        } 
    96          
     96     
    9797}; 
    9898 
  • OpenSceneGraph/trunk/src/osgUtil/Optimizer.cpp

    r3203 r3432  
    5555void Optimizer::reset() 
    5656{ 
    57     _permissableOptimizationsMap.clear(); 
     57    _permissibleOptimizationsMap.clear(); 
    5858} 
    5959 
     
    294294    if (ss && ss->getDataVariance()==osg::Object::STATIC)  
    295295    { 
    296         if (isOperationPermissableForObject(&node) && 
    297             isOperationPermissableForObject(ss)) 
     296        if (isOperationPermissibleForObject(&node) && 
     297            isOperationPermissibleForObject(ss)) 
    298298        { 
    299299            addStateSet(ss,&node); 
     
    306306void Optimizer::StateVisitor::apply(osg::Geode& geode) 
    307307{ 
    308     if (!isOperationPermissableForObject(&geode)) return; 
     308    if (!isOperationPermissibleForObject(&geode)) return; 
    309309 
    310310    osg::StateSet* ss = geode.getStateSet(); 
     
    313313    if (ss && ss->getDataVariance()==osg::Object::STATIC) 
    314314    { 
    315         if (isOperationPermissableForObject(ss)) 
     315        if (isOperationPermissibleForObject(ss)) 
    316316        { 
    317317            addStateSet(ss,&geode); 
     
    326326            if (ss && ss->getDataVariance()==osg::Object::STATIC) 
    327327            { 
    328                 if (isOperationPermissableForObject(drawable) && 
    329                     isOperationPermissableForObject(ss)) 
     328                if (isOperationPermissibleForObject(drawable) && 
     329                    isOperationPermissibleForObject(ss)) 
    330330                { 
    331331                    addStateSet(ss,drawable); 
     
    586586        bool removeTransforms(osg::Node* nodeWeCannotRemove); 
    587587 
    588         inline bool isOperationPermissableForObject(const osg::Object* object) 
     588        inline bool isOperationPermissibleForObject(const osg::Object* object) 
    589589        { 
    590590            // disable if cannot apply transform functor. 
     
    595595            if (strcmp(object->className(),"LightPointNode")==0) return false; 
    596596 
    597             return _optimizer ? _optimizer->isOperationPermissableForObject(object,Optimizer::FLATTEN_STATIC_TRANSFORMS) :  true;  
     597            return _optimizer ? _optimizer->isOperationPermissibleForObject(object,Optimizer::FLATTEN_STATIC_TRANSFORMS) :  true;  
    598598        } 
    599599 
     
    832832        if (os._canBeApplied) 
    833833        { 
    834             if (os._moreThanOneMatrixRequired || !isOperationPermissableForObject(object)) 
     834            if (os._moreThanOneMatrixRequired || !isOperationPermissibleForObject(object)) 
    835835            { 
    836836                disableObject(oitr); 
     
    11521152            if (group.getNumParents()>0 && group.getNumChildren()<=1) 
    11531153            { 
    1154                 if (isNodeEmpty(group) && isOperationPermissableForObject(&group)) 
     1154                if (isNodeEmpty(group) && isOperationPermissibleForObject(&group)) 
    11551155                { 
    11561156                    _redundantNodeList.insert(&group); 
     
    11661166    if (transform.getNumParents()>0 &&  
    11671167        transform.getDataVariance()==osg::Object::STATIC && 
    1168         isOperationPermissableForObject(&transform)) 
     1168        isOperationPermissibleForObject(&transform)) 
    11691169    { 
    11701170        static osg::Matrix identity; 
     
    12251225        if (typeid(*lod.getParent(i))==typeid(osg::Group)) 
    12261226        { 
    1227             if (isOperationPermissableForObject(&lod)) 
     1227            if (isOperationPermissibleForObject(&lod)) 
    12281228            { 
    12291229                _groupList.insert(lod.getParent(i)); 
     
    14491449void Optimizer::CheckGeometryVisitor::checkGeode(osg::Geode& geode) 
    14501450{ 
    1451     if (isOperationPermissableForObject(&geode)) 
     1451    if (isOperationPermissibleForObject(&geode)) 
    14521452    { 
    14531453        for(unsigned int i=0;i<geode.getNumDrawables();++i) 
    14541454        { 
    14551455            osg::Geometry* geom = geode.getDrawable(i)->asGeometry(); 
    1456             if (geom && isOperationPermissableForObject(geom)) 
     1456            if (geom && isOperationPermissibleForObject(geom)) 
    14571457            { 
    14581458                geom->computeCorrectBindingsAndArraySizes(); 
     
    14641464bool Optimizer::MergeGeometryVisitor::mergeGeode(osg::Geode& geode) 
    14651465{ 
    1466     if (!isOperationPermissableForObject(&geode)) return false; 
     1466    if (!isOperationPermissibleForObject(&geode)) return false; 
    14671467 
    14681468#if 1 
     
    19851985    if (typeid(group)==typeid(osg::Group) || group.asTransform()) 
    19861986    { 
    1987         if (isOperationPermissableForObject(&group)) 
     1987        if (isOperationPermissibleForObject(&group)) 
    19881988        { 
    19891989            _groupsToDivideList.insert(&group); 
     
    21742174void Optimizer::CopySharedSubgraphsVisitor::apply(osg::Node& node) 
    21752175{ 
    2176     if (node.getNumParents()>1 && !isOperationPermissableForObject(&node)) 
     2176    if (node.getNumParents()>1 && !isOperationPermissibleForObject(&node)) 
    21772177    { 
    21782178        _sharedNodeList.insert(&node); 
     
    22162216    osg::StateSet* ss = node.getStateSet(); 
    22172217    if (ss &&  
    2218         isOperationPermissableForObject(&node) && 
    2219         isOperationPermissableForObject(ss)) 
     2218        isOperationPermissibleForObject(&node) && 
     2219        isOperationPermissibleForObject(ss)) 
    22202220    { 
    22212221        apply(*ss); 
     
    22272227void Optimizer::TextureVisitor::apply(osg::Geode& geode) 
    22282228{ 
    2229     if (!isOperationPermissableForObject(&geode)) return; 
     2229    if (!isOperationPermissibleForObject(&geode)) return; 
    22302230 
    22312231    osg::StateSet* ss = geode.getStateSet(); 
    22322232     
    2233     if (ss && isOperationPermissableForObject(ss)) 
     2233    if (ss && isOperationPermissibleForObject(ss)) 
    22342234    { 
    22352235        apply(*ss); 
     
    22432243            ss = drawable->getStateSet(); 
    22442244            if (ss && 
    2245                isOperationPermissableForObject(drawable) && 
    2246                isOperationPermissableForObject(ss)) 
     2245               isOperationPermissibleForObject(drawable) && 
     2246               isOperationPermissibleForObject(ss)) 
    22472247            { 
    22482248                apply(*ss); 
     
    22582258        osg::StateAttribute* sa = stateset.getTextureAttribute(i,osg::StateAttribute::TEXTURE); 
    22592259        osg::Texture* texture = dynamic_cast<osg::Texture*>(sa); 
    2260         if (texture && isOperationPermissableForObject(texture)) 
     2260        if (texture && isOperationPermissibleForObject(texture)) 
    22612261        { 
    22622262            apply(*texture); 
  • OpenSceneGraph/trunk/src/osgUtil/RenderBin.cpp

    r2029 r3432  
    169169    // actually we'll do nothing right now, as fine grained sorting by state 
    170170    // appears to cost more to do than it saves in draw.  The contents of 
    171     // the RenderGraph leaves is already coasrse grained sorted, this 
     171    // the RenderGraph leaves is already coarse grained sorted, this 
    172172    // sorting is as a function of the cull traversal. 
    173173    // cout << "doing sortByState "<<this<<endl;