From: Skluzacek, Christian (C.Skluzacek++at++fokkerspace.nl)
Date: 11/27/2001 06:17:13
I'm trying to set the position and orientation of a pfFrustum and I'm
getting some weird behavior. I'm using Vega on Irix so I'm mixing the math
functions of the two libraries (which may not be valid AFAIK). For example:
// ----------------------------------
// Update the position of the frustum
// ----------------------------------
vgMat vgmat;
vgGetPosMat( position(), vgmat );
// Convert to pfMatrix. Both vgMatrix and pfMatrix are float[4][4]
// so hope they are in the same row-column order?????
pfMatrix pfmat;
memcpy( pfmat.mat, vgmat, sizeof(pfmat.mat) );
m_pFrustum->orthoXform( m_pFrustum, pfmat );
m_pFrustum->apply();
for vgPosition set as: 50,0,0,0,0,0
pfFrustum: 0x6410e430, frustType 0
eye point (3050.000000 0.000000 0.000000)
near clip plane 1.000000, far clip plane 1000.000000
FOV fovh 45.000000, fovv 45.000000
AspectRatio 1.000000
corners[0] (3049.585938 1.000000 -0.414214)
corners[1] (3050.414062 1.000000 -0.414214)
corners[2] (3050.414062 1.000000 0.414214)
corners[3] (3049.585938 1.000000 0.414214)
corners[4] (2635.786377 1000.000000 -414.213562)
corners[5] (3464.213623 1000.000000 -414.213562)
corners[6] (3464.213623 1000.000000 414.213562)
corners[7] (2635.786377 1000.000000 414.213562)
For a vgPosition of: 0,50,0,0,0,0
pfFrustum: 0x6410e430, frustType 0
eye point (0.000000 2250.000000 0.000000)
For a vgPosition of: 0,0,0,1.57,0,0
pfFrustum: 0x6410e430, frustType 0
eye point (0.000000 0.000000 0.000000)
near clip plane 1.000000, far clip plane 1000.000000
FOV fovh 45.000000, fovv 45.000000
AspectRatio 1.000000
corners[0] (-0.441456 0.988276 -0.414214)
corners[1] (0.386660 1.010973 -0.414214)
corners[2] (0.386660 1.010973 0.414214)
corners[3] (-0.441456 0.988276 0.414214)
corners[4] (-441.456329 988.275940 -414.213562)
corners[5] (386.659821 1010.973328 -414.213562)
corners[6] (386.659821 1010.973328 414.213562)
corners[7] (-441.456329 988.275940 414.213562)
and then the program crashes....
What is the correct way of setting the position and orientation of a
pfFrustim??
Thanks,
Chris
****************************************************************************
This communication is intended for use by the addressee and may
contain confidential or privileged information. If you receive this
communication unintentionally, please notify us immediately and
delete the message from your computer without making any copies.
****************************************************************************
This archive was generated by hypermail 2b29 : Tue Nov 27 2001 - 06:14:45 PST