Skip to content
Snippets Groups Projects
partibrains.c 195 KiB
Newer Older
slevy's avatar
 
slevy committed
static char local_id[] = "$Id$";
/*
 * $Log$
 * Revision 1.77  2002/03/11 22:31:23  slevy
 * Move virdir-specific parti_seto2w() and specks_display() to partiview.cc.
 * "rawdata -a" particle-dump includes position, color, brightness too.
 *
 * Revision 1.76  2002/02/02 04:13:07  slevy
 * Unless PARTIMENU explicitly set, just get rid of the blasted menus.
 *
 * Revision 1.75  2002/01/27 00:38:19  slevy
 * Add "setenv name value" data command.
 *
 * Revision 1.74  2002/01/23 03:56:34  slevy
 * Add "timealign", "skipblanktimes" commands.
 * Default change: no longer skip blank times!
 * Per-data time ranges now extend overall clock range,
 * don't replace it.
 * Reset material properties (shininess, specular, ambient)
 * when drawing a lighted mesh.
 *
 * Revision 1.73  2001/12/28 07:23:57  slevy
 * Move plugins (kira, warp, ieeeio) off to separate source files.
 * "where" command gives full-precision values, and reports jump-pos with scale.
 * Allow for model-specific render function (initially for Maya models).
 * env TXDEBUG.
 *
 * Revision 1.72  2001/11/09 05:27:53  slevy
 * In specks_set_timestep(), don't set clock's range if we only have
 * a single timestep ourselves!
 *
slevy's avatar
slevy committed
 * Revision 1.71  2001/11/08 06:32:52  slevy
 * Extract async code into async.c.
 * Add pointsize metering, normally #ifdef USE_PTRACK'ed out.
 *
 * Revision 1.70  2001/11/06 06:20:30  slevy
 * Centralize test for nonempty timestep slot: specks_nonempty_timestep().
 * Fix tokenize() for case of "quoted" or 'quoted' arg strings.
 *
 * Revision 1.69  2001/10/19 17:48:51  slevy
 * Don't leak FILE in specks_read_waveobj().
 *
 * Revision 1.68  2001/08/29 17:54:00  slevy
 * Make rejoinargs() work robustly -- use a private static malloced area,
 * don't overwrite args in memory.
 *
 * Revision 1.67  2001/08/28 18:27:34  slevy
 * Remove lots of unused variables.  Move some used only in CAVE code
 * inside #ifdef brackets.
 *
slevy's avatar
slevy committed
 * Revision 1.66  2001/08/28 02:05:22  slevy
 * Fix format string usage.
 *
 * Revision 1.65  2001/08/26 17:40:04  slevy
 * Bounds-check all references to st->meshes[][], st->annot[][], etc. --
 * all those maintained by specks_timespecksptr.  We no longer guarantee
 * that st->curtime is always in range 0..st->ntimes-1, so just yield NULL
 * for out-of-range references.  New CURDATATIME(fieldname) does it.
 *
 * Revision 1.64  2001/08/26 02:10:40  slevy
 * "color rgb ..." sets colors of otherwise-uncolored mesh objects.
 * Only call parti_parse_args() if non-CAVE.
 *
 * Revision 1.63  2001/08/24 01:02:38  slevy
 * Add polygonal meshes -- wavefront .obj models.
 *
 * Revision 1.62  2001/08/16 19:58:56  slevy
 * Pull non-specks-specific code out of partibrains.c
 * and into partiview.cc, using new parti_add_commands hook.
 *
 * Revision 1.61  2001/08/16 17:23:41  slevy
 * New parti_parse_args() for generic add-on commands.
 * "where" prints more information.
 *
 * Revision 1.60  2001/07/19 20:10:23  slevy
 * st->threshsel is now kept as a SEL_DEST.
 * Fix seldest2src(), not even wrong.
 * Use specks_reupdate() after changing thresh, so the reported
 * selcount should be right.
 * specks_rethresh(): keep track of whether anything changed,
 * and increment st->selseq if so.
 *
 * Revision 1.59  2001/07/18 19:24:57  slevy
 * parse_selexpr() returns bit-encoded value saying whether src or dest or
 * both were filled in.
 *
 * Revision 1.58  2001/07/17 17:28:08  slevy
 * Increase MAXPTSIZE to allow bigger dots!
 *
 * Revision 1.57  2001/07/16 17:58:37  slevy
 * Don't take spurious snapshot if "snapset" command gets -... args.
 * Revert to compatible texture behavior: texture -A is again the default,
 * use texture -O for "over"-style blending.
 *
 * Revision 1.56  2001/07/15 23:09:46  slevy
 * Um, let "wanted == 0" and SEL_USE indicate that we want to match all pcles.
 *
 * Revision 1.55  2001/07/15 22:55:14  slevy
 * Er, those 'leadc' parameters to seldest()/selsrc() are ints, not SelTokens.
 *
 * Revision 1.54  2001/07/12 21:42:25  slevy
 * Use new selcounts() function to report stats whenever we mention a SelOp.
 * ``sel <src>'' alone now works too, to just report match count.
 *
 * Revision 1.53  2001/07/10 17:18:05  slevy
 * threshsel is a src, not a dest-type SelOp.
 *
 * Revision 1.52  2001/07/09 23:46:56  slevy
 * A bit more ripening of selection system...
 * And, report match counts from "sel", "thresh", "emph".
 *
 * Revision 1.51  2001/07/07 15:35:49  slevy
 * Implement more (most?) of selection framework:
 *     selsrc(), seldest(), selname(), seltoken().
 * "thresh" now accepts "-s 'destexpr'".
 * Add new selthresh SelOp.
 *
 * Revision 1.50  2001/07/04 03:44:12  slevy
 * Add framework of set-selection stuff; not really usable yet.
 * Next: implement "see" in drawspecks().
 * Add "picked" callback which gets notified of all pick results.
 *
 * Revision 1.49  2001/06/30 18:14:22  slevy
 * Provide for storing another bit in rgba alpha field: EMPHBIT, for
 * emphasis tag.
 * Use new sfStrDrawTJ (with transform & justification) for text.
 * Yeow, handle polymax properly -- default == infinity!
 * Add "vcmap" for per-datafield colormaps.
 * Enable GL_SMOOTH mode to get texture colors to work right (huh? why do we need to?).
 * "tfm c"/"tfm w" choose cam vs. world (default) location for object tfms.
 *
 * Revision 1.48  2001/05/30 14:32:55  slevy
 * Add subcameras ("subcam" command).
 * popen() needs "r" not "rb" -- no such thing as binary mode.
 * kira_open() gets original filename if we can't find it, for error messaging.
 *
 * Revision 1.47  2001/05/15 12:18:57  slevy
 * New interface to dynamic-data routines.
 * Now, the only #ifdef KIRA/WARP needed in partibrains.c are
 * the data-command initialization routines.  All others,
 * including control-command parsing and specialized drawing,
 * is now via a function table.
 *
 * Revision 1.46  2001/05/14 15:51:34  slevy
 * Initialize new speckseq value whenever we make a new specklist.
 * Put colorseq/sizeseq/threshseq invalidation in kira_parti, not here,
 * since we needn't do it when warping.
 * By default, clock range is whatever it had been set to before.
 *
 * Revision 1.45  2001/05/12 07:22:24  slevy
 * Add get-time-range func for dynamic data.
 * Initialize all dynamic-data stuff explicitly.
 *
slevy's avatar
slevy committed
 * 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...?
 *
 * Revision 1.42  2001/04/26 08:52:46  slevy
 * Add hook for off-screen rendering: "-w width[xheight]" option for
 * snapshot/snapset.  Not actually implemented yet.
 * Add "clipbox hide".  This (a) doesn't display the big yellow box
 * and (b) doesn't enable OpenGL clipping -- just whatever object culling
 * the draw routine does anyway.
 * specks_draw_mesh() now pays attention to drawing style (solid/line/plane/point).
 * When drawing ellipsoids, disable blending altogether if bgcolor != 0.
 * Small, distant labels now disappear by default.  To get the old
 * draw-tiny-line behavior, use a negative "labelmin" value.
 *
 * Revision 1.41  2001/04/20 13:47:39  slevy
 * Allow *cment commands to alter multiple colormap entries: new editcmap().
 *
 * Revision 1.40  2001/04/10 19:18:33  slevy
 * Open sdb files (and while we're at it, other files too) in binary mode.
 *
 * Revision 1.39  2001/04/04 20:33:02  slevy
 * Use findfile() for "read" ctrl-command.
 *
 * Revision 1.38  2001/03/30 16:49:00  slevy
 * Change enum SurfStyle to avoid mentioning POINT, which Windows uses too.
 *
 * Revision 1.37  2001/03/30 14:00:42  slevy
 * Allow cment/boxcment/textcment as data commands too.
 * Add "ghosts" ctl command (not really implemented).
 * Add "winsize" ctl command.
 * Ellipsoids now accept -l levelno option, in which case
 * "hide levelno"/"show levelno" applies to them.  Default is -1,
 * which means "show if any level is shown", but hidden by "hide all".
 * Scrap ghost maintenance.  Do that elsewhere instead.
 * Make "maxcomment" work properly.
 *
 * Revision 1.36  2001/03/19 11:55:08  slevy
 * New version.c (derived from ../VERSION) contains current version string.
 * New "version" command in partibrains reports that and the partibrains.c CVS ver no.
 *
Loading
Loading full blame...