Re: How to Duplicate Nodes?

New Message Reply Date view Thread view Subject view Author view

Simon Bennett (simonb++at++wormald.com.au)
Thu, 23 Feb 1995 10:31:41 +1100 (EST)


On Tue, 21 Feb 1995, John Rohlf wrote:

> > 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).
>
> 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.

I have a need to perform a similar operation. In my case it would be for
a large number of very simple geometry. Does anybody have any data or
rationale for the performance tradeoffs between actually having duplicate
pfGeoSets with different colours or using one of the above techniques?

Thanx

+--------------------------------------------------------------------------------+
    Simon Bennett simonb++at++wormald.com.au
    Wormald Technology Advanced Systems Engineering Ph: +61 2 981 0611 (x512)

   Computer Terms: hardware - the part of a computer system that one can kick


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.