Re: Bounding sphere

New Message Reply Date view Thread view Subject view Author view

From: Chris Scharver (scharver++at++evl.uic.edu)
Date: 02/23/2001 05:31:58


The geometry under the dcs node has already been transformer with another
manipulation.

...
objDCS->addChild( geode );
dcs->addChild( objDCS );
objDCS->setTrans( -0.0f, -11.0f, 6.0f );
...
> > > 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] );
cout << objCenter[0] <<" "<< objCenter[1] <<" "<< objCenter[2] <<endl;

This is before I attempt to compute the bounding sphere. The geometry
model under objDCS has already been added. If I cout the objCenter
pfVec3 I obtain below, I get 0, 0, 0. I know this isn't right, so that's
why I'm trying to figure out if I'm doing something incorrectly. The man
pages for pfNode indicate that calculating the bounding sphere will take
into account the children and leaf nodes. I'm using Performer 2.2.7 under
IRIX 6.5.7.

I'll try manually calling pfuTravCalcBBox and averaging box.min and
box.max. That should give the same value (or what the value should be) as
the center point of the bounding sphere for the dcs node, correct?

-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 : Fri Feb 23 2001 - 05:32:03 PST

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