Jerry Edsall (jedsall++at++fasainteractive.com)
15 Jul 1997 12:06:55 -0500
Jerry
------------------------------
Date: 7/15/97 7:04 AM
To: Edsall, Jerry
From: Angus Dorbie
On Jul 14, 2:06pm, Anita Kishore wrote:
> Subject: model view matrix and rotation
> Hi :
>
> I am confused with the following:
>
> I have a Pf application where the channel's view point pos = (x,y,z), and
> orientaion = (0,0,0). The graphics object that it is looking at is at the
> origin. This object's geode has pre and post draw callbacks. In the pre
> callback I do :
>
> - set mmode to mviewing
> - push matrix
> - getmatrix
> - print matrix
>
> As far as I understand, this matrix that I get is a composite transformation
> matrix for view point. Which means that its transpose will be of the form:
>
> a11 a12 a13 tx
> a21 a22 a23 ty
> a31 a32 a33 tz
> 0 0 0 1
>
>
> tx, ty, tz are the translation part and the upper LHS 3X3 sub-matrix contains
> the rotation and scale parts, right? But eventhough I do not have any
rotation
> or scale for the view point, the sub-matrix porion has some numbers in it and
> when I do pfGetOrthoMatCoord(mat, dst), dst->xyz is fine, just as I set the
> view point's position, but dst->hpr shows pitch = -90. Why is this not 0?
Because you read the GL matrix. Performer does a world coordinate conversion
from (GL) Y = up to (pf) Z = up which is the 90 degree rotation about x ie
pitch, although I wouldn't call it that since it's a different multiplicaton
order.
>
> Another related question is : what is the equivalent of getmatrix() in
OpenGL?
> The porting guide says GLGet(), but I can't find any man page or info in the
> OPenGL book.
>
GLfloat matarray[16];
glGetFloatv(GL_MODELVIEW_MATRIX, matarray);
Cheers,Angus.
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
------------------ RFC822 Header Follows ------------------
>From guest++at++holodeck.csd.sgi.com Tue Jul 15 07:12:44 1997
Received: from deliverator.sgi.com by uu10.psi.com (5.65b/4.0.940727-PSI/PSINet)
via SMTP;
id AA15507 for jedsall; Tue, 15 Jul 97 07:12:44 -0400
Received: from holodeck.csd.sgi.com (holodeck.csd.sgi.com [150.166.145.108]) by
deliverator.sgi.com (950413.SGI.8.6.12/951211.SGI.AUTO) via ESMTP id EAA13933;
Tue, 15 Jul 1997 04:06:44 -0700
env-from (guest++at++holodeck.csd.sgi.com)
Received: by holodeck.csd.sgi.com (950413.SGI.8.6.12/911001.SGI)
for info-performer-dist++at++holodeck.csd.sgi.com id VAA07211; Mon, 14 Jul 1997
21:07:32 -0700
Received: from rock.csd.sgi.com by holodeck.csd.sgi.com via ESMTP
(950413.SGI.8.6.12/911001.SGI)
for <info-performer++at++holodeck.csd.sgi.com> id VAA07195; Mon, 14 Jul 1997
21:07:31 -0700
Received: from sgi.sgi.com by rock.csd.sgi.com via ESMTP
(950413.SGI.8.6.12/910805.SGI)
for <info-performer++at++relay.csd.sgi.com> id VAA26187; Mon, 14 Jul 1997 21:07:30
-0700
Received: from giraffe.asd.sgi.com (giraffe.asd.sgi.com [192.26.72.158]) by
sgi.sgi.com (950413.SGI.8.6.12/970507) via ESMTP id VAA12540
for <info-performer++at++sgi.com>; Mon, 14 Jul 1997 21:07:29 -0700
env-from (dorbie++at++multipass.asd.sgi.com)
Received: from multipass.asd.sgi.com by giraffe.asd.sgi.com via ESMTP
(951211.SGI.8.6.12.PATCH1502/951211.SGI)
id VAA22014; Mon, 14 Jul 1997 21:07:28 -0700
Received: by multipass.asd.sgi.com (950413.SGI.8.6.12/940406.SGI.AUTO)
id VAA26205; Mon, 14 Jul 1997 21:07:27 -0700
Date: Mon, 14 Jul 1997 21:07:27 -0700
From: dorbie++at++multipass.asd.sgi.com (Angus Dorbie)
Message-Id: <9707142107.ZM26203++at++multipass.asd.sgi.com>
In-Reply-To: "Anita Kishore" <kishore++at++triavest.com>
"model view matrix and rotation" (Jul 14, 2:06pm)
References: <9707141406.ZM29096++at++tracey.triavest.com>
X-Mailer: Z-Mail-SGI (3.2S.3 08feb96 MediaMail)
To: "Anita Kishore" <kishore++at++triavest.com>, info-performer++at++sgi.com
Subject: Re: model view matrix and rotation
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:36 PDT