Re: Bounding sphere

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 02/22/2001 20:35:44


OK, I think I misunderstood, this looks OK.

Cheers,ANgus.

Angus Dorbie wrote:
>
> If I understand what you're trying to do, it looks like you compute the
> bounds before you apply the transform to the pfDCS.
>
> Cheers,Angus.
>
> Chris Scharver wrote:
> >
> > 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
> >
> > -----------------------------------------------------------------------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Open Development Project: http://oss.sgi.com/projects/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
>
> --
> For Performer+OpenGL tutorials http://www.dorbie.com/
>
> "In the middle of difficulty lies opportunity."
> --Albert Einstein
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/

"In the middle of difficulty lies opportunity." --Albert Einstein


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Feb 22 2001 - 20:36:15 PST

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