|
From: Gordon K. <kin...@us...> - 2004-05-10 23:20:31
|
Update of /cvsroot/teem/teem/src/limn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32247 Modified Files: cam.c Log Message: I now believe that limnCameraPathMake works correctly Index: cam.c =================================================================== RCS file: /cvsroot/teem/teem/src/limn/cam.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** cam.c 10 May 2004 21:40:36 -0000 1.22 --- cam.c 10 May 2004 23:20:21 -0000 1.23 *************** *** 162,173 **** ** PRE-ALLOCATED array of output cameras, "cam". ** ! ** input: an array of keyframe cameras "keycam", and times associated ! ** with the key frames "time", both arrays length "numKeys" ** trackWhat: takes values from the limnCameraPathTrack* enum ** quatType: spline to control camera orientations. This is needed for ! ** tracking at or from, but not needed for limnCameraPathTrackBoth ! ** This is the only limnSplineTypeSpec* argument that can be NULL ** posType: spline to control whichever of from, at, and up are needed for ! ** the given style of tracking ** distType: spline to control neer, faar, dist: positions of near clipping, ** far clipping, and image plane, as well as the --- 162,175 ---- ** PRE-ALLOCATED array of output cameras, "cam". ** ! ** input: ! ** keycam: array of keyframe cameras ! ** time: times associated with the key frames ! ** ---> both of these arrays are length "numKeys" <--- ** trackWhat: takes values from the limnCameraPathTrack* enum ** quatType: spline to control camera orientations. This is needed for ! ** tracking at or from, but not needed for limnCameraPathTrackBoth. ! ** This is the only limnSplineTypeSpec* argument that can be NULL. ** posType: spline to control whichever of from, at, and up are needed for ! ** the given style of tracking. ** distType: spline to control neer, faar, dist: positions of near clipping, ** far clipping, and image plane, as well as the *************** *** 177,184 **** ** ** NOTE: The "atRelative", "orthographic", and "rightHanded" fields ! ** are used from keycam[0], and those fields are ignored for all other ! ** keycam[i]. Also, for the sake of simplicity, this only works with ! ** fov and aspect, instead of {u,v}Range, and hence both "fov" and "aspect" ! ** need to set in *all* the keycams, even if neither of them ever changes! */ int --- 179,188 ---- ** ** NOTE: The "atRelative", "orthographic", and "rightHanded" fields ! ** are copied from keycam[0] into all output cam[i], but you still need ! ** to correctly set them for all keycam[i] for limnCameraUpdate to work ! ** as expected. Also, for the sake of simplicity, this function only works ! ** with fov and aspect, instead of {u,v}Range, and hence both "fov" and ! ** "aspect" need to set in *all* the keycams, even if neither of them ! ** ever changes! */ int *************** *** 195,199 **** Nrrd *nquat, *nfrom, *natpt, *nupvc, *ndist, *nfova, *ntime, *nsample; double fratVec[3], *quat, *from, *atpt, *upvc, *dist, *fova, ! W2V[9], N[3], fratDist; limnSpline *timeSpline, *quatSpline, *fromSpline, *atptSpline, *upvcSpline, *distSpline, *fovaSpline; --- 199,203 ---- Nrrd *nquat, *nfrom, *natpt, *nupvc, *ndist, *nfova, *ntime, *nsample; double fratVec[3], *quat, *from, *atpt, *upvc, *dist, *fova, ! W2V[9], N[3], fratDist, testquat[4]; limnSpline *timeSpline, *quatSpline, *fromSpline, *atptSpline, *upvcSpline, *distSpline, *fovaSpline; *************** *** 264,275 **** biffAdd(LIMN, err); airMopError(mop); return 1; } - fprintf(stderr, "!%s: keycam[%d].W2V:\n", me, ii); - ell_4m_print_d(stderr, keycam[ii].W2V); ell_4m_to_q_d(quat + 4*ii, keycam[ii].W2V); - fprintf(stderr, "!%s: --> q = %g %g %g %g --> \n", me, - (quat + 4*ii)[0], (quat + 4*ii)[1], - (quat + 4*ii)[2], (quat + 4*ii)[3]); - ell_q_to_3m_d(W2V, quat + 4*ii); - ell_3m_print_d(stderr, W2V); if (ii) { if (0 > ELL_4V_DOT(quat + 4*ii, quat + 4*(ii-1))) { --- 268,272 ---- *************** *** 282,286 **** ELL_3V_SUB(fratVec, keycam[ii].from, keycam[ii].at); fratDist = ELL_3V_LEN(fratVec); - fprintf(stderr, "!%s(%d): fratDist = %g\n", me, ii, fratDist); ELL_4V_SET(dist + 4*ii, fratDist, keycam[ii].neer, keycam[ii].dist, keycam[ii].faar); --- 279,282 ---- *************** *** 367,371 **** } else { fratDist = (dist + 4*ii)[0]; - fprintf(stderr, "!%s(%d): fratDist = %g\n", me, ii, fratDist); ell_q_to_3m_d(W2V, quat + 4*ii); ELL_3MV_ROW1_GET(cam[ii].up, W2V); --- 363,366 ---- |