SoNode copy() method

SoNode copy() method

Post by John Shal » Sat, 07 Oct 1995 04:00:00



I've been trying to distribute inventor scene graphs to forked processes using
shared memory.  To do so, I replaced the new and delete operators with my own
which allocate from a shared memory arena.  This works perfectly when I create
new inventor nodes (ie. I can fork off any number of simultaneous renderers)

Problems arise when I attempt to copy scene graphs using the SoNode::copy()
method.  Since sharing the same graph among multiple rendering processes is
impossible (due to render-caching & that render state info is stored in the
scene graph), I need to copy scene graphs that are rendered by multiple
processes.  However, the graphs generated when I use the copy() method cause
segmentation faults when I attempt to render them because some portions of the
graph are either not copied, or are not using new/delete to allocate parts of
the copied graph (and are therefore not allocating in shared mem using my
new/delete).

How can I get around this problem?  Is copy() not actually copying everything,
or is it simply not using new/delete for all of its operations?  

John Shalf

 
 
 

1. SoXtClipBoard and SoNode::copy() Iv2.0 question


|> Organization: NAS - NASA Ames Research Center, Moffett Field, CA
|> Lines: 34
|> NNTP-Posting-Host: win229.nas.nasa.gov
|>
|>  I have these nodekits that are put onto the clipboard then
|>  pasted into another viewer which works fine except that my
|>  kits are derived and I want some of the other data to be
|>  copied along as well.
|>
|>  After looking at Inventor Toolmaker, pg62, I thought I
|>   could put my local field copies in there after I put
|>   a myKit::copy() method in my class.
|>
|>  Unfortunately,  myKit::copy() is never getting called,
|>   and I wanted to know how SoXtClipboard does the copy.
|>   Does it just get the "print" string (for an ASCII file)
|>   and give that to the clipboard?

The SoXtClipboard class just applies a write action to get the
data into the clipboard buffer. You need to make sure that
whatever data is in your kits can be written to files. The
easiest way to do this is to store all the instance data in
fields.

(By the way, check out the new comp.graphics.api.inventor newsgroup.)

----

  Open Inventor Web info in http://www.sgi.com/Technology/Inventor.html

2. absolute position of a linked object for expression..

3. Disabling SoNode::copy() or SoType::createInstance()

4. shrinking a portion of a picture

5. Why does SoNode::copy() require a ref count?

6. Pointing at a object

7. super fast canvas copy method

8. Minimizing spaces between 2D polygons?

9. Error no standard conversion of SoCoordinate3* to SoNode*

10. Looking for: Shadow Methods using common Hardware features - An alternative to Stencil Buffer Method

11. Adding same SoNode several times screws up Material...

12. Newbie: how to get coordinates of SoNode object?