Re: pfTraverer in cull

New Message Reply Date view Thread view Subject view Author view

From: 'Bwana' Bob Buckley (Bob.Buckley-contractor++at++JNTF.osd.mil)
Date: 06/15/2000 15:35:42


Okay, got it.

I already had a dummy pfDCS in there but had to just put the callback
one node down the tree. I am dynamically moving an object in the cull
callback and also had to force a bbox recomputation. I trivially
accepted the parent pfDCS by setting the cull traversal mask to 0 and
thus, picked up the concatenated matrix. BTW, it's real nice having that
0x0 traversal mask denote a trivial accept rather than doing a callback.
It's interesting what you find out when you take the time (or are forced
to) read the man pages.

I also found out why it originally worked - I had it attached to another
pfDCS. Doh!

As always, Thanks Dude.

Angus Dorbie wrote:
>
> P.S.
> Try testing the matrix on the predraw for the first child below the DCS,
> that should give you the right matrix.
>
> Also, because of the top down application of the DCS transformation
> (rather than left to right) it's an implementation detail that you are
> seeing the matrix is applied in the post draw, technically I'd say this
> is a bit of a flaw since the post draw of a DCS should be after the
> previous transformation is restored. Maybe it's just being efficient.
>
> I suppose what you need for a DCS is another callback between the
> transformation and the descent into the group below, and maybe one on
> the way out too. But As I've said this can be done using callbacks on
> the children (I hope this is possible for you and you have unique
> children). A dummy node below the DCS would work around this issue if
> you don't.
>
> Cheers,Angus.
>
> 'Bwana' Bob Buckley wrote:
> >
> > I've setup a test case that contains a scene with 2 pfDCSs with pre- and
> > post-cull callbacks. I scale pfDCS #1 and translate pfDCS #2.
> >
> > In the pre-cull callback for pfDCS #1 I query the pfTraverser for the
> > matrix and get the identity matrix. This is contrary to the man page. In
> > the post-cull call back I again query the pfTraverser for the matrix and
> > get what I understand to be the correct matrix (concatenations from the
> > scene down to and including the node)
> >
> > In the pre-cull callback for pfDCS #2 I query the pfTraverser for the
> > matrix and get the matrix for pfDCS #1. In the post-cull callback I get
> > the matrix for pfDCS #2.
> >
> > The man pages states:
> >
> > "pfTraverser::getMat sets mat to the current transform matrix, which is
> > the concatenation of the matrices from the root of the scene down to and
> > including the current node."
> >
> > I could swear that when I put this in my application last week is worked
> > as advertised. Hence, the test case. Am I missing something here? I put
> > together a simple test case if anyone cares to take a look at it.
> >
> > Thanks.
>
> --
> For Performer+OpenGL tutorials http://www.dorbie.com/
>
> "In the middle of difficulty lies opportunity."
> --Albert Einstein



New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 15:35:57 PDT

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