From: Paolo Farinelli (paolo++at++sgi.com)
Date: 02/20/2002 18:28:54
Hi Bram,
You could bind draw callbacks to the picked pfDCS node,
and in your predraw you could force highlight ON by
calling:
pfOverride(PFSTATE_ENHIGHLIGHTING, 0);
pfEnable(PFEN_HIGHLIGHTING);
pfOverride(PFSTATE_ENHIGHLIGHTING, 1);
pfApplyHlight(hl);
In your postdraw callback you should then disable highlighting
by calling:
pfOverride(PFSTATE_ENHIGHLIGHTING, 0);
pfDisable(PFEN_HIGHLIGHTING);
Also, you should remove draw callbacks from the pfDCS once
you no longer want it to be highlighted.
Hope this helps,
Regards,
Paolo
Bram Stolk wrote:
>
> Hi there,
>
> 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
> -----------------------------------------------------------------------
-- Paolo Farinelli paolo++at++sgi.com Member of Technical Staff, OpenGL Performer 1-650-933-1808 Silicon Graphics 1600 Amphitheatre Pkwy, Mountain View, CA 94043
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 18:29:07 PST