> Do you use getCenterMode() in your own code?

No.
For me the new mode approach is OK.

      Luc



De :
Robert Osfield <[email protected]>
A :
OpenSceneGraph Submissions <[email protected]>
Date:
09/13/2011 04:45 PM
Objet :
Re: [osg-submissions] LOD/ProxyNode/TxpPageLOD in USER_DEFINED_CENTER 
mode, new option to compute bounding box
Envoyé par :
[email protected]



HI Luc,

On Tue, Sep 13, 2011 at 3:10 PM, Luc Frauciel <[email protected]> 
wrote:
Thats what I did in the first place.
However, I found some potential problems with existing code:

For example, a call to setCenter   defines the mode to USER_DEFINED_CENTER
So a User doing the below code would get unexpected results.
And removing the mode switch in setCenter    would probably break existing 
code.

PagedLOD plod = new PagedLOD
plod->setCenterMode(UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED)
plod->setCenter(my_center)   <= implicitely sets the mode to 
USER_DEFINED_CENTER

The setCenter method could easily be adapted to not change the mode if 
it's already UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED.
 
There is also a risks of unwanted results in existing code that call 
node.getCenterMode()

The serializers are the only common place that I'd expect code to be 
calling getCenterMode(), I wouldn't expect most users to be effected.  Do 
you use getCenterMode() in your own code?

Robert._______________________________________________
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