Re: highlighting a re-used geode

New Message Reply Date view Thread view Subject view Author view

From: Bram Stolk (bram++at++sara.nl)
Date: 02/26/2002 05:22:43


Yair, Paolo,

Many thanks for the suggestion.
I have implemented it, but it turns out to be unusable.

The problem is that DRAW traversals have no relation
to the scene-graph, as I understand it.

This means, that when putting callbacks on a DCS, there
is no garantee that the entire sub-tree is drawn during
pre and post visits of the DCS.
I do not only want the geometry directly under the DCS
to lit up, but all geometry of tree below it.

So that would leave me only with a clone-hack?
I'm affraid that calling the pfNode::clone() member
func won't cut it as it will share geometry?

thanks,

  Bram

On Wed, 20 Feb 2002 18:20:31 -0800 (PST)
Yair Kurzion <yair++at++polygon.engr.sgi.com> wrote:

> 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
> \__ \__ \__
> \__ \__ \__
>

-- 
------------------------------------------------------------------------------
 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" ------------------------------------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Feb 26 2002 - 05:22:26 PST

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