Bo Cordes Petersen (bcp++at++vision.auc.dk)
Tue, 21 Dec 1999 09:33:52 +0100
I have a problem with controlling pfuTraverse, and I was hoping that you
were able to help me.
In a nutshell I am doing some animations with a pfSequence. Unfortunately
I'm in a time-fix which is why I've had to resort to this method of
simple animation: Creating animations in 3D-studio, exporting them to
OpenFlight with Polytrans and then paging the different kinds of animation
in the pfSequence which Polytrans has created (eg. frames 10 to 25
contains the animation of waving).
In the program I'm also checking for collision with bounding boxes. For
this I am using pfuTravCalcBBox. However, when using an OpenFlight model
with a pfSequence as a top-node _and_ about 25 child-nodes which all has
the pfSequence as parents, the call to pfuTravCalcBBox totally chokes
Performer. The APP time goes from 1.2 ms to 41.1 ms which more or less
halves the framerate. This is totally understandable since the model
is fairly complex, and there are a lot of pfDCS' (and other nodes) which
needs to be updated in relation to the pfuTravCalcBBox-call.
Performer 'seems' to able to help me with this problem, since the .mode
integer in the pfuTraverser gives the opportunity of only traversing the
current node in a pfSequence (PFUTRAV_SEQ_CUR) instead of all of the
child-nodes.. However, I simply can't make this work!!
As an example I have the following code which (among other things) I have
tried to test and debug the pfuTraverser functionaltity with:
// Init the traverser
pfuInitTraverser(&Traverser);
Traverser.mode = PFUTRAV_SW_NONE | PFUTRAV_LOD_NONE | PFUTRAV_SEQ_CUR;
pfuTraverse(Node,&Traverser);
printf("Number of vertices %i\n", pfuTravCountNumVerts(Node));
No matter what I write in the .mode bit, the printf gives me the count of
_all_ of the vertices in the child-nodes (about 50k - 60k) instead of the
count of just a single model (about 1500 vertices).
My question is then: Am I missing something ?? Are anybody able to help
me out of this problem?
Sincerely
- Bo
------------------------------------------------------------------------------
Bo Cordes Petersen Phone: +45 9635 9787
3D-Programmer of Virtual Environments Fax: +45 9815 4008
Computer Vision and Media Technology WWW: http://www.intermedia.auc.dk/~bcp
Institute of Electronic Systems Email: bcp++at++intermedia.auc.dk
Aalborg University
------------------------------------------------------------------------------
This archive was generated by hypermail 2.0b2 on Tue Dec 21 1999 - 00:34:05 PST