changing axis of rotation and center of rotation in openGL performer

Say I have a number of geodes under a particular DCS node and I pick on a particular geode. How do I set different axes of rotation and center for that picked node. By default performer calculates the center of rotation to be the center of the bounding sphere which binds all the geodes under that particular DCS.

Seems fitting that my 2000th post to opengl.org should be a Performer reply :slight_smile:

Performer has no policy on this as you described, rotations are applied around their local origin or wherever you choose depending on how you build the DCS matrix. Just calling an HPR method on the pfDCS would rotate about the pfDCS origin, not about anything off center or off axis. This ofcourse may look like the bounding center of the children, but it’s coincidence. Perhaps you are really discussing is some application specific code where an application has apparently used the bounding center of an object as the center of rotation, but I doubt it.

You would adjust the center of rotation using appropriate manipulations of the pfDCS pfMatrix. Something like translate(-object_origin), rotate() translate(object_origin), remember these need to be in order multiplications, not simply sets provided by a pfDCS methods. The axis of rotation would also require the use of pfMatric calls since I think the Performer pfDCS just takes Euler angles as HPR rotation.

So, you have to use a pfMatrix and apply that to the pfDCS to get support for both the multiplication of the translate, rotate, translate and the rotation about an arbitrary vector.

I’m a bit rusty, I don’t have the man pages and it’s been a few years, but I think this should do it for you.

This is off topic for this forum. In future you should try the info-performer mailing list. You need to subscribe first. Send an email requesting subscription to info-performer-request@sgi.com
http://www.sgi.com/software/performer/mailinglist.html