Re: pfChannel->setView and vectors

New Message Reply Date view Thread view Subject view Author view

Rémi Arnaud (remi++at++remi.asd.sgi.com)
Wed, 21 May 1997 10:42:33 -0700 (PDT)


Carsten Scharfe wrote:
>
> Hi Performers,
>
> i have some trouble with setting the view point and the
> view direction.
> I have a vector which is my view point and another vector
> for my viewing direction. Lets call this vector for the direction vd.
>
> Is there any method to set the viewing direction with this vector vd
> instead of using euler angles hpr?
>
> If yes, how do i have to do this?

 You are missing an information: what is the roll (rotation around
 tha viewing vector ?)

 If you consider no roll, then you can make a a rotation matrix
 that will rotate the y-axis (view vector in observer coordinate
 system) to v by:
 pfVec3 yaxis = (0.0, 1.0f, 0.0f};
 pfNormalizeVec(viewing_direction); /* if needed */
 pfMakeVecRotMat(mat, yaxis, viewing_direction);
 pfSetMatRowVec3(mat, 3, viewPoint); /* translation to viewpoint */

    _ / _ _
|_) _ ._ _ o /\ |_)|\ | /\ | || \
| \(/_| | || /--\| \| \|/--\|_||_/
                                           
=======================================================================
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:16 PDT

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