Re: [osg-users] hiding objects from a cloned scenegraph hides the original...

2010-11-02 Thread Robert Osfield
Hi Ted,

A shallow copy will share as much as possible of the data below the
object you are calling clone on.  Only a deep copy will force the data
itself to be copied.

As a general note, you want to avoid duplicating data as much as
possible, so share as much as possible.  In you case it might not be
necessary to clone anything and share the whole scene graph between
views.  You can use a combination of NodeMask and Camera CullMask
(see osg::CullSetting from which osg::Camera is derived), to enable
each view to just see a portion of the scene.

Robert.

On Mon, Nov 1, 2010 at 9:34 PM, Ted Morris ted.mor...@gmail.com wrote:
 Hi,

 I am cloning a scenegraph for a 2nd viewer for osgCompositeView. Everytime I 
 setNodeMask(0x0) to some objects that is part of the cloned node the objects 
 in the original disappears as well, unless it is a CopyOp::DEEP_COPY_ALL.  
 The problem with using  DEEP_COPY_ALL is that it makes the UpdateCallback 
 process a mess-- since I then have to contrive other mechanisms to tie in the 
 existing, callbacks for objects in the original scene with the 'secondary' 
 view's cloned scene graph.

 Or, I have to end up walking the scenegraph tree, and doing appropriate clone 
 level flags, one by one??

 Thanks to all in advance!


 Ted

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=33279#33279





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] hiding objects from a cloned scenegraph hides the original...

2010-11-02 Thread ted morris
ah! -- it is so obvious once you said it. ;)
thanks.

t


On Tue, Nov 2, 2010 at 4:34 AM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Ted,

 A shallow copy will share as much as possible of the data below the
 object you are calling clone on.  Only a deep copy will force the data
 itself to be copied.

 As a general note, you want to avoid duplicating data as much as
 possible, so share as much as possible.  In you case it might not be
 necessary to clone anything and share the whole scene graph between
 views.  You can use a combination of NodeMask and Camera CullMask
 (see osg::CullSetting from which osg::Camera is derived), to enable
 each view to just see a portion of the scene.

 Robert.

 On Mon, Nov 1, 2010 at 9:34 PM, Ted Morris ted.mor...@gmail.com wrote:
  Hi,
 
  I am cloning a scenegraph for a 2nd viewer for osgCompositeView.
 Everytime I setNodeMask(0x0) to some objects that is part of the cloned node
 the objects in the original disappears as well, unless it is a
 CopyOp::DEEP_COPY_ALL.  The problem with using  DEEP_COPY_ALL is that it
 makes the UpdateCallback process a mess-- since I then have to contrive
 other mechanisms to tie in the existing, callbacks for objects in the
 original scene with the 'secondary' view's cloned scene graph.
 
  Or, I have to end up walking the scenegraph tree, and doing appropriate
 clone level flags, one by one??
 
  Thanks to all in advance!
 
 
  Ted
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=33279#33279
 
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] hiding objects from a cloned scenegraph hides the original...

2010-11-01 Thread Ted Morris
Hi,

I am cloning a scenegraph for a 2nd viewer for osgCompositeView. Everytime I 
setNodeMask(0x0) to some objects that is part of the cloned node the objects in 
the original disappears as well, unless it is a CopyOp::DEEP_COPY_ALL.  The 
problem with using  DEEP_COPY_ALL is that it makes the UpdateCallback process a 
mess-- since I then have to contrive other mechanisms to tie in the existing, 
callbacks for objects in the original scene with the 'secondary' view's cloned 
scene graph.

Or, I have to end up walking the scenegraph tree, and doing appropriate clone 
level flags, one by one?? 

Thanks to all in advance!


Ted

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33279#33279





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org