Re: Rotation of a door and pfDCS

New Message Reply Date view Thread view Subject view Author view

Nicolas Gauvin (nicolas++at++cae.ca)
Thu, 1 May 1997 11:49:35 -0400


On Apr 30, 4:54pm, Project sicma wrote:
> Subject: Rotation of a door and pfDCS
> Hi,
>
> i have some problems with the pfDCS.
>
> I want to rotate a pfDCS around a certain point. The DCS is actually a door
in the model.
> This door should be rotated 90 degrees.
>
>
> door->setRot(0,0,i);
> door->setTrans(rot_point.xyz[0],rot_point.xyz[1],rot_point.xyz[2]);
>
> Has anyone solved such a problem by now?
>

A DCS applies the rotation first and then the translation (R*T). So the door is
first rotated around its origin and then the result of this rotation is moved
to the position set by setTrans.

If you want to change the rotation point you have to apply a translation before
the rotation (T*R). This will effectively change the origin of your geometry
and its point of rotation. A combination of DCS and SCS can do this:

|
      DCS (contains only your rotation)
|
      SCS (contains only your translation)
|
     geometry

You could then flatten your SCS and remove it from the hierarchy.

-- 
Nicolas Gauvin			CAE Electronics Ltd., 8585 Cote De Liesse
Software Developer 		Saint-Laurent, Quebec, Canada, H4L-4X4
3-D Graphics Applications	tel: +1 514 341 2000 extension 2275
nicolas++at++cae.ca			fax: +1 514 340 5496
=======================================================================
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:55:10 PDT

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