Scaling

New Message Reply Date view Thread view Subject view Author view

Jeremy Townsend (paradoxgames++at++mindspring.com)
Sun, 21 Dec 1997 17:26:49 -0600


I am having trouble with scaling of a dcs. The whole thing seems so simple
to me I just don't see where I am going wrong.

All I want to do is apply a scale to a dcs. I noticed when I did this,
however, I lost my Z axis all together, everything became 2 dimensional and
flat.

I have reworked Simple.C that came with performer to illustrate what I am
doing. Perhaps someone can point out where I am going wrong.

Here goes:

        /*Pre stuff Deleted*/

         pfDCS* test = new pfDCS;
         test = (pfDCS*) root->find("main",pfDCS::getClassType());

         // Attach loaded file to a new pfScene
         pfScene *scene = new pfScene;
         scene->addChild(root);

         // Create a pfLightSource and attach it to scene
         scene->addChild(new pfLightSource);

        float scale=.5;

         // Simulate for twenty seconds.
         while (1)
         {
         test->setScale(scale);

        // Initiate cull/draw for this frame.
        pfFrame();

        scale+=.005;
        if (scale>2)
                scale =1;
         }

I would think the object, a box with only one dcs, MAIN, at the root of the
DB, would cause the entire box to eventually grow to twice it's original
size. It doesn't. The box become two dimensional and then grows to twices
it's original size.

Any idea?
Thanks in advance.
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:27 PDT

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