[info-performer] Why is 1 node (out of 40) not being traversed?]

Date view Thread view Subject view Author view

From: Dan Johnston (dan.johnston++at++nrc.ca)
Date: 09/25/2003 12:28:28


This is a follow-up to my own posting.
Additional information.

It looks like the one pfObject which is not invoking
the traverser is object number 32 in the list of
objects that should. The number 32 may be a hint
to the problem (power of 2, 32 bit flags in an int,
and so on).

I confirmed that if I stick in an extra, dummy object
before the problem joint, then I get 40 traverser
callbacks called out of 41 - but now it was the
dummy object's callback that was not called.

Hope this extra prods some pfDevelopers to a solution
to this problem.

Thanks

Dan.Johnston++at++nrc.gc.ca

-------- Original Message --------
Subject: [info-performer] Why is 1 node (out of 40) not being traversed?
Date: Tue, 23 Sep 2003 16:59:34 -0230
From: Dan Johnston <dan.johnston++at++nrc.ca>
To: info-performer++at++sgi.com

Time to get an idea or two from the group..

I have a C++ class that includes 40 'joints'. Each joint is created
as a separate class so that I can add features;

For example: a simple 'joint' cointains a DCS to hold the
joint value. It has children;
- a switch to control the display of axis geometry. The
children of the switch are a DCS to scale the axis display,
a pfArrow for z axis, an SCS to rotate pfArrows to the
x axis, ax a axis pfArrow, another SCS for the y axis, and
finally another y axis arrow.
- another switch to select which 'geometry' is shown for
this 'joint'. Possible children of this switch are a thin
cylinder, a thicker one, geometry defined in the config
file, etc.

Children of a simple 'joint' will attach to the joint value
DCS. It is only a bit more complicated for the Offset Joint
class.

As I said. I have 40 of these classes in my superclass.
One feature of the 'joints' is that they set a Traverser
on each 'joint value DCS' so that a class method can
read out the value of the joint in world coordinate values
(since the pfTraverser will set a matrix with this value
pre-computed by Performer).

I can see that all 40 'joints' call the same code to
setTravData ( set to the 'this' pointer so the callback
can access class data) and then setTravFunc
to set the callback. I have added a print statement
so that I see the hex pointer value to all 40 DCSs.

Another print statement in my callback will list out
(each frame) all the hex address of all the DCSs which
invoke the callback. I can match 39 of the 40. One
'joint' (number 11) never invokes the callback, so it
never stores a new value for the 'world value' matrix,
so the matrix is always identity.

Why would this DCS not cause the traverset to be
called. I did a complete pfPrint dump of the entire
scene, and verified that the DCS has the correct parent
and the correct number of children (as does the parent
of this DCS, and so on) The children which are the
coordinate axis display can be seen, the 'joint' geometry
can be switched as desired. But no callback for this one
DCS - when there are 39 that work just fine!

I do not set any traverser mask values, so the default
of 'all ones' was active (and confirmed in the pfPrint
output).

I have checked and re-checked the parent/child
relationships for all 'joints' and their sub-nodes.
I need another idea. Any help??

Thanks.

--
      ___|__    |
      /  |  \   ||\      Daniel (Dan) Johnston
     /___|___\  || \     Dan.Johnston++at++nrc.gc.ca
    _____|____  ||  \    National Research Council of Canada, London, ON
    |    |    | ||   \   Integrated Manufacturing Technologies Institute
\___|    |    | ||____\  Tel: (519) 430-7081   Fax: (519) 430-7090
 \_o_\___|____|_|______\_    Inst: http://www.nrc.gc.ca/imti
  \                o /    These opinions are my own! Not those of NRC.
   \________________/    Virtual Reality:
                        http://www.nrc.ca/imti/vetc/home.html
 More Tall Ships - Fewer Computers!



Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Sep 25 2003 - 12:37:14 PDT