RE: [info-performer] RE: [info-performet] Scaling problem

Date view Thread view Subject view Author view

From: Gordon Tomlinson (Gordon.Tomlinson++at++warhammeronline.com)
Date: 01/14/2004 02:11:00


HI

You have to options you can the Bounding sphere of the whole model from the root node

or you can traverse the the models tree and get the bounding box using pfuTravCalcBBox

pfNode *node = NULL;
pfBox bbox;
pfSphere bsphere;

pfMakeEmptyBox( &bbox )
pfuTravCalcBBox( node , &bbox );

pfMakeEmptySphere( &bsphere);
pfNodeBSphere( node, &bsphere);

printf( "BBox Min = %.3f,%.3f,%.3f, \n", bbox.min[0], bbox.min[1], bbox.min[2] );
printf( "BBox Max = %.3f,%.3f,%.3f, \n", bbox.max[0], bbox.max[1], bbox.max[2] );

printf( " Node Centre = %.3f,%.3f,%.3f, \n", bsphere.center[0], bsphere.center[1], bsphere.center[2] );
printf( " Node Radius = %.3f,%.3f,%.3f, \n", bsphere.radius[0], bsphere.radius[1], bsphere.radius[2] );

Regards

Gordon Tomlinson

Warhammer Online Ltd

-----Original Message-----
From: Mr. Rajesh R [mailto:rajeshr++at++cair.res.in]
Sent: 14 January 2004 09:02
To: lawrence bertoldi
Cc: info-performer++at++sgi.com
Subject: Re: [info-performer] RE: [info-performet] Scaling problem

Thanks sir. I got it. But I have one more doubt.How to get the
width,length and height of the original model.so that I can give
appropriate values(scale_length,scale_width,scale_height).

Thanks in advance

With regards
Rajesh.R
VR Lab,IRIS,c/o CAIR
Bangalore -1
Phone 2256473,2262126(Ext-260)

-----------------------------------------------------------------------
   List Archives, Info, FAQ: 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
-----------------------------------------------------------------------
 Download OpenGL Performer 3.1 Early-Access Alphas:
 ftp://download.sgi.com/pub/access/projects/performer/download/3.1EA/
-----------------------------------------------------------------------


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jan 14 2004 - 02:16:49 PST