Re: Highlighting a pfPath

New Message Reply Date view Thread view Subject view Author view

Avi Bar-Zeev (cyranose++at++realityprime.com)
Mon, 15 Feb 1999 19:25:24 -0800


Unless something has recently changed, state sorting does
not happen across DCSs in the same bin (due, iirc, to an
old design decision comparing the relative costs of common
state changes vs. matrix pushes and pops).

But looking at your code, I think the way you're using
pfOverride raised some flags in my mind. You may be simply
leaving the override in place and therefore never turning
the highlighting off in the post function.

I'm at the wrong computer to try this out, but I would
instead try:

int
preDrawHighlight(pfTraverser* , void* )
{
  pfOverride(PFSTATE_ENHIGHLIGHTING, 0); // added line
  pfEnable(PFEN_HIGHLIGHTING);
   pfOverride(PFSTATE_ENHIGHLIGHTING, 1);
  Global->hl->apply();
  return PFTRAV_CONT;
}

int
postDrawHighlight(pfTraverser* , void* )
{
  pfOverride(PFSTATE_ENHIGHLIGHTING, 0); // added line
  pfDisable(PFEN_HIGHLIGHTING);
   pfOverride(PFSTATE_ENHIGHLIGHTING, 1);
  return PFTRAV_CONT;
}

----- Original Message -----
From: Michael Boccara <boccara++at++MIT.EDU>
To: <info-performer++at++sgi.com>
Sent: Monday, February 15, 1999 9:50 PM
Subject: Highlighting a pfPath

>Hello again,
>
>Thanks to Paul and Joseph for answering my previous question.
>Here is another :
>
>I have a pfNode which is multiple referenced by several pfDCS in my in my
>pfScene graph, like that :
>
>scene
>|______
>| \
>dcs_1 dcs_2
>| /
>| /
>| /
> node
>
>I want to pfHighlight a picked pfPath descendind to the leaf node.
>
>pfNodeTravHighlight is not of much help because it modifies the pfGeoStates
>under the level of node.
>
>I guess I should use a draw pre- and post- callback on the dcs_i, but I'm
having
>a hard time with the bin-stuff re-sorting of the scene graph in the DRAW
>process.
>
>How can I ensure that the dcs_i for which I will have set a highlighting
draw
>callback will really highlight only its children and none of its neighbors
?
>
>I tried the follwing piece of code, but it highlights both my 2 dcs :
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Feb 15 1999 - 19:20:46 PST

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