Bounding sphere

New Message Reply Date view Thread view Subject view Author view

From: Chris Scharver (scharver++at++evl.uic.edu)
Date: 02/22/2001 11:42:37


Hello,

I am trying to determine the bounding sphere for a node in the scene
graph... but it is always returned as 0,0,0. Here's the code:

pfSphere objSphere;
dcs->setBound( NULL, PFBOUND_STATIC ); //should force pf to recompute
dcs->getBound( &objSphere ); //get the sphere
pfVec3 objCenter = objSphere.center;
dcs->setTrans( -objCenter[0], -objCenter[1], -objCenter[2] );

The pfVec3 objCenter should contain the center point of the heirarchy in
world coordinates, right? The dcs node should also be repositioned with
its center at the origin. Geodes and other children have already been
added under the dcs node, but is there something additional I need to do
in order to ensure the bounding sphere takes them into account? I know
that 0,0,0 isn't correct for the center because I have manually offset the
dcs position earlier.

Any help would be appreciated. Thanks!

-Chris

__________________________________________________________________________
Chris Scharver EECS Graduate Student
Electronic Visualization Laboratory EVL Phone: 312-996-3002
The University of Illinois at Chicago EVL FAX: 312-413-7585
1998-1999 UIC Men's Swimming and Diving


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Feb 22 2001 - 11:42:46 PST

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