From: lawrence bertoldi (lberto++at++adelphia.net)
Date: 01/12/2004 11:08:06
Raj,
Tried to send this directly to you but your email will not except it!
attached mail follows:
Rajesh,
What exactly are you trying to do?
From your last email it sounds like you might not be asking the right
question.
Or else we don't have enough information about the problem.
If a scene is scaled proportionately to it's self, I'm not sure you
really want to scale it.
If you have one model that is scaled wrong for the scene it seems that
it might
be better to scale the object and not the scene!
Might I make a few suggestions?
First it might be good if you tried Performer in C++, the interface is
much more
intuitive once you get used to it. In lue of that you should at least
compile it using the C++
compilers since they are more robust and will catch things that might
cause problems
down the line.
Second I would suggest using an pfSCS to scale objects followed by a
flatten then
remove the SCS. This way the scale only gets done once at load time in
stead of every frame
The flatten moves the scaling into the geometry.
here is the way i do it for models in my IG. You will also notice that I
use a
matrix to set up the x,y,z scale factors!
pfGroup *model = (pfGroup *) pfdLoadFile(filename);
pfMatrix mat;
mat.makeScale(scale_length, scale_width, scale_height);
pfSCS *scs = new pfSCS(mat);
scs->addChild(model);
scs->flatten(0);
scs->removeChild(model);
pfDelete(scs);
now you can add the object to a DCS so you can control it's motion in
the scene
if that is what you want
Mr. Rajesh R wrote:
>Dear All,
>
>I am using PfDCSScale(DCSNode,100.0f) for scaling the entire pfb model.But
>only base model is getting scaling, other objects such as house, trees
>and Roads
>which are there in the model has not scaled.Any Suggestions.
>
>Here is the code
>
>
> root = pfdLoadFile(argv[1]);
> DCSNode = pfNewDCS();
> pfAddChild(DCSNode,root);
> pfDCSScale(DCSNode,100.0f);
>
>
>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/
>-----------------------------------------------------------------------
>
>
>
>
-----------------------------------------------------------------------
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/
-----------------------------------------------------------------------
-----------------------------------------------------------------------
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/
-----------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Jan 13 2004 - 15:59:28 PST