Thanks Magnus, typo/spelling fixes merged and submitted to svn/trunk.

On 13 June 2013 11:08, Magnus Kessler <[email protected]> wrote:
> I came across these when trying to understand how the optimizer removes 
> Transform nodes.
> ---
>  include/osgUtil/Optimizer | 10 +++++-----
>  src/osgUtil/Optimizer.cpp |  6 +++---
>  2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/include/osgUtil/Optimizer b/include/osgUtil/Optimizer
> index 9f7759c..1014b9c 100644
> --- a/include/osgUtil/Optimizer
> +++ b/include/osgUtil/Optimizer
> @@ -257,7 +257,7 @@ class OSGUTIL_EXPORT Optimizer
>
>          /** Flatten Static Transform nodes by applying their transform to the
>            * geometry on the leaves of the scene graph, then removing the
> -          * now redundant transforms.  Static transformed Subgraphs that 
> have multiple
> +          * now redundant transforms.  Static transformed subgraphs that 
> have multiple
>            * parental paths above them are not flattened, if you require this 
> then
>            * the subgraphs have to be duplicated - for this use the
>            * FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor. */
> @@ -292,11 +292,11 @@ class OSGUTIL_EXPORT Optimizer
>                  TransformSet    _transformSet;
>          };
>
> -        /** FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor is 
> similar to
> -          * to FlattenStaticTransformsVisitor in that is desgined to remove 
> static transforms
> +        /** FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor is 
> similar
> +          * to FlattenStaticTransformsVisitor in that it is designed to 
> remove static transforms
>            * from the scene graph, pushing down the transforms to the 
> geometry leaves of the scene graph,
>            * but with the difference that any subgraphs that are shared 
> between different transforms
> -          * of duplicated and flatten individually.  This results in more 
> static transforms
> +          * are duplicated and flattened individually.  This results in more 
> static transforms
>            * being removed, but also means that more data is generated, and 
> as a result may
>            * not always be the most appropriate flatten visitor to use.*/
>          class OSGUTIL_EXPORT 
> FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor : public 
> BaseOptimizerVisitor
> @@ -794,7 +794,7 @@ class OSGUTIL_EXPORT Optimizer
>
>          /** Optimize texture usage in the scene graph by combining textures 
> into texture atlas
>            * Use of texture atlas cuts down on the number of seperate states 
> in the scene, reducing
> -          * state changes and improving the chances of use larger batches of 
> geomertry.*/
> +          * state changes and improving the chances of using larger batches 
> of geometry.*/
>          class OSGUTIL_EXPORT TextureAtlasVisitor : public 
> BaseOptimizerVisitor
>          {
>              public:
> diff --git a/src/osgUtil/Optimizer.cpp b/src/osgUtil/Optimizer.cpp
> index 53a072f..8e5269f 100644
> --- a/src/osgUtil/Optimizer.cpp
> +++ b/src/osgUtil/Optimizer.cpp
> @@ -257,7 +257,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int 
> options)
>              ++i;
>          } while (result);
>
> -        // no combine any adjacent static transforms.
> +        // now combine any adjacent static transforms.
>          CombineStaticTransformsVisitor cstv(this);
>          node->accept(cstv);
>          cstv.removeTransforms(node);
> @@ -267,7 +267,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int 
> options)
>      {
>          OSG_INFO<<"Optimizer::optimize() doing 
> FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS"<<std::endl;
>
> -        // no combine any adjacent static transforms.
> +        // now combine any adjacent static transforms.
>          FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor 
> fstdssv(this);
>          node->accept(fstdssv);
>
> @@ -1283,7 +1283,7 @@ bool 
> Optimizer::CombineStaticTransformsVisitor::removeTransforms(osg::Node* node
>  {
>      if (nodeWeCannotRemove && nodeWeCannotRemove->asTransform()!=0 && 
> nodeWeCannotRemove->asTransform()->asMatrixTransform()!=0)
>      {
> -        // remove topmost node if it exists in the transform set.
> +        // remove topmost node from transform set if it exists there.
>          TransformSet::iterator itr = 
> _transformSet.find(nodeWeCannotRemove->asTransform()->asMatrixTransform());
>          if (itr!=_transformSet.end()) _transformSet.erase(itr);
>      }
> --
> 1.8.2.1
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to