Calculating bounding box

New Message Reply Date view Thread view Subject view Author view

From: Sakns (gaitat++at++yahoo.com)
Date: 05/03/2000 01:39:14


pfHi!

In a scene graph when I ask for the bbox of each of the nodes I
get the bbox of the graph below that node. I would like to get the
accumulated bbox from the top of the tree for each of the nodes,
in a preCull function. So I added a preCull function to several
nodes in my scene graph using node->setTravFuncs. The first
argument to preCull is a pfTraverser whose getMat method returns
the accumulated matrix up to that node. But when I get the matrix
it is wrong. It seems that it is off by one always. If nodes (A B
C D) are children of the same parent, node A has the Identity
matrix, node B has the matrix that corresponds to A, C has that of
B... etc.

If instead of the preCull function I add a postCull function (same
code) then the matrix is correct but nothing get pruned when I
return PFTRAV_PRUNE, because of the order things gets executed.
(reading the pftraverser man pages)

Any suggestions?

pfThanks!

=====
Athanasios Gaitatzes (Saki)
e-mail: gaitat++at++yahoo.com
   url: http://www.i.am/gaitatzes

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed May 03 2000 - 01:39:21 PDT

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