Re: How to Duplicate Nodes?

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Tue, 21 Feb 95 10:51:30 PST


>
>
> I have a simple question which doesn't seem to be answered in the
> documentation: How do you make a copy of a node (or better yet, a
> node and all of its children)?
>
> I have an application which needs to draw multiple instances of the
> same model, but with each instance drawn in a different color.
> Unfortunately, I can't seem to use shared or cloned instancing for this,
> since color is not an inherited attribute. So I believe I'm stuck
> with making a copy of the model for each instance I want to draw, then
> setting each leaf node to the desired color. It's ugly, but it might work
> if I could figure out how to make copies (short of reading each node's
> type and attributes and explicitly re-creating an identical one).
>
> I'd appreciate any clues.
>
> Al Jones
> solo++at++crl.com
>

        pfClone() will copy nodes and children down to pfGeoSets.
The pfGeoSets themselves will not be cloned since pfClone() was
originally intended as an instancing mechanism where you wanted
to share geometry. We hope to clone geosets in 2.0.

        There are a few ways you can change color between instances
through draw callbacks:

1. pfColortable - see man page
2. pfHighlight - see man page
3. pfMaterial with a color mode of PFMTL_CMODE_COLOR will override
local pfGeoSet colors.


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:59 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.