Re: Drawing spheres, boxes etc.

New Message Reply Date view Thread view Subject view Author view

Mario Veraart (rioj7++at++fel.tno.nl)
Fri, 6 Dec 1996 13:48:53 +0100 (MET)


> I am relatively a beginner to Performer. I was trying a few simple
> Performer apps. for drawing standard objects like sphere, box etc. I
> would like to change the dimensions of these objects.
> So I tried pfdNewSphere which basically draws a unit sphere and cannot
> be resized.
> So I thought of using pfMakeEmptySphere which gives a bounding sphere,
> but doesn't seem like drawing a sphere.
> Can somebody give me a tip of how to go about doing this?

Hi,

Just add a pfDCS or pfSCS node between the loaded object and the scene root.
With pfDCS you can dynamic scale the object, and with pfSCS you have
a fixed scale (use the right pfMatrix routine to construct the scaling matrix).
If you just want a bigger sphere than you can add the correct pfSCS and call
pfFlatten (or node->flatten for C++) to change the geometry. After that you
can delete the pfSCS. Look at the perfy code for an exampel of how
to do this.

Mario
=======================================================================
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:54:06 PDT

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