From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 02/20/2002 18:20:31
Hi Bram !
Why not add draw callbacks on the selected DCS ? You can add and remove
DRAW callbacks from nodes in an MP-safe way.
In the pre-draw callback, do:
pfOverride(PFSTATE_HIGHLIGHT |
PFSTATE_ENHIGHLIGHTING,
PF_OFF);
pfApplyHlight(hl); /* Some highlight object */
pfEnable(PFEN_HIGHLIGHTING);
pfOverride(PFSTATE_HIGHLIGHT |
PFSTATE_ENHIGHLIGHTING,
PF_ON);
and in the post-draw callback do:
pfOverride(PFSTATE_HIGHLIGHT |
PFSTATE_ENHIGHLIGHTING,
PF_OFF);
OR, if you want to be more efficient, create one new geode and make it a clone
of your original instanced geode. Set highlight on the new geode. When you pick
a geode, remove it from its DCS and place the new geode instead. When you
un-pick the geode, restore the original un-highlighted geode to its DCS.
-yair
> I have a performer scene with hundreds of DCSes, which all contain the
> same geode.
>
> When implementing picking, I want a single geode to light up, when touched
> with a cursor (CAVE wand in my case).
>
> I currently use pfHighlight, and I enable highlighting for the geostates
> of the geosets of the selected geode.
>
> Ofcourse, ALL the geometry in my scene lights up, as I reuse a single
> piece of geometry in a lot of DCSes.
>
> How can I achieve the desired highlighting without replicating the geometry?
>
> I'm affraid I will have to remove and add children from the affected DCS?
>
> Thanks,
>
> Bram
>
>
> --
> ------------------------------------------------------------------------------
> Bram Stolk, VR Specialist.
> SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
> email: bram++at++sara.nl Phone +31-20-5923059 Fax +31-20-6683167
>
> "I heard if you play the NT-4.0-CD backwards, you get a satanic message."
> "Thats nothing, if you play it forward, it installs NT-4.0"
> ------------------------------------------------------------------------------
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
>
--
\_________ \_____ \__ \__ \_____
\_________ \_____ \__ \__ \_____ Yair Kurzion
\__ \__ \____\__ \__ yair++at++sgi.com
\__ \__ \__ (650) 933-6502
\__ \__ \__
\__ \__ \__
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 18:20:46 PST