Re: [info-performer] Can a we scale a model pfb Model

Date view Thread view Subject view Author view

From: Lawrence E Bertoldi (lberto++at++adelphia.net)
Date: 12/26/2003 17:07:57


Yes,
1 Use a bounding box to find the size
2 Calculate the scale factor to get to the size you want
3 Use a pfMatrix and a pfSCS to scale the object.
4 Add the scs to the scenegraph

Here is the code for step 3. I'll leave the rest to you!

 pfGroup *model = (pfGroup *)pfdLoadFile(filename);
 pfMatrix mat;
 mat.makeScale(scale_length, scale_height, scale_width);
 pfSCS *scs = new pfSCS(mat);
 scs->addChild(model);

"Mr. Rajesh R" wrote:

> Dear All,
>
> My pfb model is too small enough to view from a given eye location.Can I
> scale the model using openGL performer functionalities.
>
> With regards
> Rajesh.R
>
> -----------------------------------------------------------------------
> 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 : Fri Dec 26 2003 - 17:54:49 PST