diff --git a/src/partibrains.c b/src/partibrains.c index e9bdd215f7eff7ad44bf2966e75083eeb8213999..5cdb2975d7c2ff7cf173628d4476a79bf519b354 100644 --- a/src/partibrains.c +++ b/src/partibrains.c @@ -1,6 +1,12 @@ static char local_id[] = "$Id$"; /* * $Log$ + * Revision 1.44 2001/05/11 10:05:38 slevy + * Add "warp" command if -DUSE_WARP. + * Ellipsoids allow 3-component (Rx Ry Rz) orientation numbers too. + * st->dyndata doesn't mean we should trash the anima[][] specklist. + * Need to keep it intact for warping. + * * Revision 1.43 2001/05/02 09:51:01 slevy * Add "ellipsoids" and "meshes" commands to toggle their display. * Finally parse snapshot arguments properly...? @@ -895,7 +901,8 @@ void specks_set_timestep( struct stuff *st ) st->curtime = timestep; slp = specks_timespecksptr( st, 0, 0 ); - *slp = st->sl = sl; + st->sl = sl; + /* Do we need this? */ /* *slp = sl; */ parti_set_timestep( st, realtime ); /* Hack for kira-parti dynamic data */ if(sl) { @@ -3052,6 +3059,7 @@ void specks_read_ellipsoid( struct stuff *st, Point *pos, int argc, char **argv, int i; struct ellipsoid e, *ep; float m3[3*3]; + float rxyz[3]; memset(&e, 0, sizeof(e)); e.cindex = -1; @@ -3099,8 +3107,16 @@ void specks_read_ellipsoid( struct stuff *st, Point *pos, int argc, char **argv, e.hasori = 1; } else if(i+16 == argc && 16==getfloats(&e.ori.m[0], 16, i, argc, argv)) { e.hasori = 1; + } else if(i+3 == argc && 3==getfloats(rxyz, 3, i, argc, argv)) { + /* XXX */ + float aer[3]; + aer[0] = rxyz[1]; + aer[1] = rxyz[0]; + aer[2] = rxyz[2]; + xyzaer2tfm( &e.ori, NULL, aer ); + e.hasori = 1; } else { - msg("ellipsoid: expected 0 or 9 or 16 numbers after options, not %s", + msg("ellipsoid: expected 0 or 3 (RxRyRz) or 9 or 16 numbers after options, not %s", rejoinargs(i, argc, argv)); return; } @@ -3353,6 +3369,14 @@ void specks_read( struct stuff **stp, char *fname ) #endif + } else if(!strcmp(argv[0], "warp")) { +#ifndef USE_WARP + msg("Need to recompile with -DUSE_WARP"); +#else + st->clk->continuous = 1; + warp_setup(st, argc, argv); +#endif + } else if(!strcmp(argv[0], "sdb") && argc>1) { int tno = st->datatime; char *realfile;