From: Angus Dorbie (dorbie++at++sgi.com)
Date: 06/14/2000 15:38:27
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
This archive was generated by hypermail 2b29 : Wed Jun 14 2000 - 15:38:35 PDT