Revision: 76087
http://sourceforge.net/p/brlcad/code/76087
Author: starseeker
Date: 2020-06-09 15:39:00 +0000 (Tue, 09 Jun 2020)
Log Message:
-----------
Stub in a burst command implementation. It's looking like it will be easier to
extract the needed bits into a 'modern' framing than to scrub down the existing
code in place.
Modified Paths:
--------------
brlcad/branches/bioh/src/CMakeLists.txt
Added Paths:
-----------
brlcad/branches/bioh/src/burst2/
brlcad/branches/bioh/src/burst2/CMakeLists.txt
brlcad/branches/bioh/src/burst2/burst.cpp
brlcad/branches/bioh/src/burst2/burst.format
brlcad/branches/bioh/src/burst2/burst.h
Modified: brlcad/branches/bioh/src/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/CMakeLists.txt 2020-06-09 14:44:51 UTC (rev
76086)
+++ brlcad/branches/bioh/src/CMakeLists.txt 2020-06-09 15:39:00 UTC (rev
76087)
@@ -60,6 +60,7 @@
set(level_3_dirs
brlman
burst
+ burst2
bwish
conv
fb
Added: brlcad/branches/bioh/src/burst2/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/burst2/CMakeLists.txt
(rev 0)
+++ brlcad/branches/bioh/src/burst2/CMakeLists.txt 2020-06-09 15:39:00 UTC
(rev 76087)
@@ -0,0 +1,33 @@
+set(LDIR "${BRLCAD_SOURCE_DIR}/src/other/linenoise")
+
+set(BURST_INCLUDE_DIRS
+ ${BU_INCLUDE_DIRS}
+ ${FB_INCLUDE_DIRS}
+ ${RT_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/src/other/linenoise
+ )
+list(REMOVE_DUPLICATES BURST_INCLUDE_DIRS)
+include_directories(${BURST_INCLUDE_DIRS})
+
+set(burst_SOURCES
+ burst.cpp
+ ${LDIR}/utf8.c
+ ${LDIR}/linenoise.c
+ )
+
+BRLCAD_ADDEXEC(burst2 "${burst_SOURCES}" "librt;libfb;libbu;${M_LIBRARY}")
+
+set(burst_ignore
+ CMakeLists.txt
+ burst.h
+ burst.format
+ )
+CMAKEFILES(${burst_ignore})
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
Property changes on: brlcad/branches/bioh/src/burst2/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/bioh/src/burst2/burst.cpp
===================================================================
--- brlcad/branches/bioh/src/burst2/burst.cpp (rev 0)
+++ brlcad/branches/bioh/src/burst2/burst.cpp 2020-06-09 15:39:00 UTC (rev
76087)
@@ -0,0 +1,285 @@
+/* B U R S T . C P P
+ * BRL-CAD
+ *
+ * Copyright (c) 2004-2020 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file burst/burst.cpp
+ *
+ */
+
+#include "common.h"
+
+#include "bio.h"
+#include <stdlib.h>
+#include <string.h>
+
+extern "C" {
+#include "linenoise.h"
+}
+
+#include "bu/app.h"
+#include "bu/cmd.h"
+#include "bu/getopt.h"
+#include "bu/file.h"
+#include "bu/opt.h"
+#include "bu/str.h"
+#include "bu/exit.h"
+#include "bu/log.h"
+#include "bu/vls.h"
+
+#include "fb.h"
+#include "raytrace.h"
+
+#include "./burst.h"
+
+#define DEFAULT_BURST_PROMPT "burst> "
+
+void
+burst_state_init(struct burst_state *s)
+{
+ //Colors colorids;
+ s->fbiop = NULL;
+ s->burstfp = NULL;
+ s->gridfp = NULL;
+ s->histfp = NULL;
+ s->outfp = NULL;
+ s->plotfp = NULL;
+ s->shotfp = NULL;
+ s->shotlnfp = NULL;
+ s->tmpfp = NULL;
+ //Ids airids;
+ //Ids armorids;
+ //Ids critids;
+ s->pixgrid = NULL;
+ VSET(s->pixaxis, 255, 0, 0);
+ VSET(s->pixbhit, 200, 255, 200);
+ VSET(s->pixbkgr, 150, 100, 255);
+ VSET(s->pixblack, 0, 0, 0);
+ VSET(s->pixcrit, 255, 200, 200);
+ VSET(s->pixghit, 255, 0, 255);
+ VSET(s->pixmiss, 200, 200, 200);
+ VSET(s->pixtarg, 255, 255, 255);
+ s->plotline = 0;
+ s->batchmode = 0;
+ s->cantwarhead = 0;
+ s->deflectcone = DFL_DEFLECT;
+ s->dithercells = DFL_DITHER;
+ s->fatalerror = 0;
+ s->groundburst = 0;
+ s->reportoverlaps = DFL_OVERLAPS;
+ s->reqburstair = 1;
+ s->shotburst = 0;
+ s->tty = 1;
+ s->userinterrupt = 0;
+ memset(s->airfile, 0, LNBUFSZ);
+ memset(s->armorfile, 0, LNBUFSZ);
+ memset(s->burstfile, 0, LNBUFSZ);
+ memset(s->cmdbuf, 0, LNBUFSZ);
+ memset(s->cmdname, 0, LNBUFSZ);
+ memset(s->colorfile, 0, LNBUFSZ);
+ memset(s->critfile, 0, LNBUFSZ);
+ memset(s->errfile, 0, LNBUFSZ);
+ memset(s->fbfile, 0, LNBUFSZ);
+ memset(s->gedfile, 0, LNBUFSZ);
+ memset(s->gridfile, 0, LNBUFSZ);
+ memset(s->histfile, 0, LNBUFSZ);
+ memset(s->objects, 0, LNBUFSZ);
+ memset(s->outfile, 0, LNBUFSZ);
+ memset(s->plotfile, 0, LNBUFSZ);
+ memset(s->scrbuf, 0, LNBUFSZ);
+ memset(s->scriptfile, 0, LNBUFSZ);
+ memset(s->shotfile, 0, LNBUFSZ);
+ memset(s->shotlnfile, 0, LNBUFSZ);
+ memset(s->title, 0, TITLE_LEN);
+ memset(s->timer, 0, TIMER_LEN);
+ memset(s->tmpfname, 0, TIMER_LEN);
+ s->cmdptr = NULL;
+ s->bdist = DFL_BDIST;
+ VSET(s->burstpoint, 0.0, 0.0, 0.0);
+ s->cellsz = DFL_CELLSIZE;
+ s->conehfangle = DFL_CONEANGLE;
+ VSET(s->fire, 0.0, 0.0, 0.0);
+ s->griddn = 0.0;
+ s->gridlf = 0.0;
+ s->gridrt = 0.0;
+ s->gridup = 0.0;
+ VSET(s->gridhor, 0.0, 0.0, 0.0);
+ VSET(s->gridsoff, 0.0, 0.0, 0.0);
+ VSET(s->gridver, 0.0, 0.0, 0.0);
+ s->grndbk = 0.0;
+ s->grndht = 0.0;
+ s->grndfr = 0.0;
+ s->grndlf = 0.0;
+ s->grndrt = 0.0;
+ VSET(s->modlcntr, 0.0, 0.0, 0.0);
+ s->modldn = 0.0;
+ s->modllf = 0.0;
+ s->modlrt = 0.0;
+ s->modlup = 0.0;
+ s->raysolidangle = 0.0;
+ s->standoff = 0.0;
+ s->unitconv = 1.0;
+ s->viewazim = DFL_AZIMUTH;
+ s->viewelev = DFL_ELEVATION;
+ s->pitch = 0.0;
+ s->yaw = 0.0;
+ VSET(s->xaxis, 1.0, 0.0, 0.0);
+ VSET(s->zaxis, 0.0, 0.0, 1.0);
+ VSET(s->negzaxis, 0.0, 0.0, -1.0);
+ s->co = 0;
+ s->devwid = 0;
+ s->devhgt = 0;
+ s->firemode = FM_DFLT;
+ s->gridsz = 512;
+ s->gridxfin = 0;
+ s->gridyfin = 0;
+ s->gridxorg = 0;
+ s->gridyorg = 0;
+ s->gridwidth = 0;
+ s->gridheight = 0;
+ s->li = 0;
+ s->nbarriers = DFL_BARRIERS;
+ s->noverlaps = 0;
+ s->nprocessors = 0;
+ s->nriplevels = DFL_RIPLEVELS;
+ s->nspallrays = DFL_NRAYS;
+ s->units = 1;
+ s->zoom = 1;
+ s->rtip = RTI_NULL;
+ s->norml_sig = NULL; /* active during interactive operation */
+ s->abort_sig = NULL; /* active during ray tracing only */
+}
+
+
+extern "C" int
+_burst_cmd_attack_dir(void *bs, int argc, const char **argv)
+{
+ struct burst_state *s = (struct burst_state *)bs;
+
+ if (!s || !argc || !argv) return BRLCAD_ERROR;
+
+ bu_log("attack-direction\n");
+ return BRLCAD_OK;
+}
+
+
+
+const struct bu_cmdtab _burst_cmds[] = {
+ { "attack-direction", _burst_cmd_attack_dir},
+ { (char *)NULL, NULL}
+};
+
+int
+main(int argc, const char **argv)
+{
+ int ret = EXIT_SUCCESS;
+ char *line = NULL;
+ int print_help = 0;
+ struct bu_vls msg = BU_VLS_INIT_ZERO;
+ struct bu_vls iline= BU_VLS_INIT_ZERO;
+ const char *gpmpt = DEFAULT_BURST_PROMPT;
+ struct burst_state s;
+ struct bu_opt_desc d[2];
+ BU_OPT(d[0], "h", "help", "", NULL, &print_help,
"print help and exit");
+ BU_OPT_NULL(d[1]);
+
+ if (argc == 0 || !argv) return -1;
+
+ /* Let bu_brlcad_root and friends know where we are */
+ bu_setprogname(argv[0]);
+
+ /* Done with program name */
+ argv++; argc--;
+
+ /* Parse options, fail if anything goes wrong */
+ if ((argc = bu_opt_parse(&msg, argc, argv, d)) == -1) {
+ bu_log("%s", bu_vls_cstr(&msg));
+ bu_vls_free(&msg);
+ bu_exit(EXIT_FAILURE, NULL);
+ }
+ bu_vls_trunc(&msg, 0);
+
+ if (print_help) {
+ const char *help = bu_opt_describe(d, NULL);
+ bu_vls_sprintf(&msg, "Usage: 'burst [options]
cmd_file'\n\nOptions:\n%s\n", help);
+ bu_free((char *)help, "done with help string");
+ bu_log("%s", bu_vls_cstr(&msg));
+ bu_vls_free(&msg);
+ bu_exit(EXIT_SUCCESS, NULL);
+ }
+
+ /* We're in business - initalize the burst state */
+ burst_state_init(&s);
+
+ /* If we have a file, batch mode it. */
+ if (argc > 1) {
+ argv++; argc--;
+ bu_exit(EXIT_SUCCESS, "Batch mode: [%s]\n", argv[0]);
+ }
+
+ /* Start the interactive loop */
+ while ((line = linenoise(gpmpt)) != NULL) {
+ bu_vls_sprintf(&iline, "%s", line);
+ free(line);
+ bu_vls_trimspace(&iline);
+ if (!bu_vls_strlen(&iline)) continue;
+ linenoiseHistoryAdd(bu_vls_addr(&iline));
+
+ /* The "clear" command is only for the shell, not
+ * for burst evaluation */
+ if (BU_STR_EQUAL(bu_vls_addr(&iline), "clear")) {
+ linenoiseClearScreen();
+ bu_vls_trunc(&iline, 0);
+ continue;
+ }
+
+ /* Make an argv array from the input line */
+ char *input = bu_strdup(bu_vls_cstr(&iline));
+ char **av = (char **)bu_calloc(strlen(input) + 1, sizeof(char *), "argv
array");
+ int ac = bu_argv_from_string(av, strlen(input), input);
+
+ if (!ac || !bu_cmd_valid(_burst_cmds, av[0]) == BRLCAD_OK) {
+ printf("unrecognzied command: %s\n", av[0]);
+ goto cmd_cont;
+ }
+
+ if (bu_cmd(_burst_cmds, ac, (const char **)av, 0, (void *)&s, &ret) !=
BRLCAD_OK) {
+ printf("error running command: %s\n", av[0]);
+ goto cmd_cont;
+ }
+
+cmd_cont:
+ bu_free(input, "input copy");
+ bu_free(av, "input argv");
+ bu_vls_trunc(&iline, 0);
+ }
+
+ linenoiseHistoryFree();
+ bu_vls_free(&msg);
+ bu_vls_free(&iline);
+ return ret;
+}
+
+/*
+ * Local Variables:
+ * mode: C
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Property changes on: brlcad/branches/bioh/src/burst2/burst.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/bioh/src/burst2/burst.format
===================================================================
--- brlcad/branches/bioh/src/burst2/burst.format
(rev 0)
+++ brlcad/branches/bioh/src/burst2/burst.format 2020-06-09 15:39:00 UTC
(rev 76087)
@@ -0,0 +1,84 @@
+Shotline file output format from burst program:
+
+record type: 1
+description: header line for each aspect
+ICD reference: Line Number 1, Figure 19.
+format: '1',1x,f9.4,1x,f8.4,5(1x,f7.2),1x,6a
+data: attack azimuth in degrees
+ attack elevation in degrees
+ shotline separation
+ maximum Y'-coordinate of target
+ minimum Y'-coordinate of target
+ maximum Z'-coordinate of target
+ minimum Z'-coordinate of target
+ units (mm,cm,inches,feet,meters)
+
+record type: 2
+description: information about shotline
+format: '2',2(1x,f8.3)
+data: horizontal coordinate of shotline in grid plane (Y')
+ vertical coordinate of shotline in grid plane (Z')
+
+record type: 3
+description: information about component intersected by shotline
+format:
'3',1x,f8.2,1x,f7.3,1x,f7.2,1x,i5,2(1x,f8.2),1x,i2,2(1x,f7.2)
+data: X'-coordinate of intersection with component
+ sine of fallback angle of component exit normal
+ rotation angle in degrees of exit normal
+ component code number
+ normal thickness of component
+ line-of-sight thickness of component
+ space code following component
+ obliquity angle at entry to component in degrees
+ obliquity angle at exit from component in degrees
+
+Burst Point Library output format from burst program:
+
+record type: 1
+description: header line for each aspect
+ICD reference: Line Number 1, Figure 20.
+format: '1',1x,f9.4,1x,f8.4,1x,f5.2,1x,f10.2,1x,6a,1x,f9.6
+data: attack azimuth in degrees
+ attack elevation in degrees
+ burst distance
+ projected area associated with burst point
+ units (mm,cm,inches,feet,meters)
+ solid angle of each ray in steradians
+
+record type: 2
+description: information about shotline
+ICD reference: Line Number 2, Figure 20.
+format: '2',2(1x,f8.3) [format of record type '4' compatible]
+data: horizontal coordinate of shotline in grid plane (Y')
+ vertical coordinate of shotline in grid plane (Z')
+
+record type: 3
+description: information about component intersected by shotline
+ICD reference: Line Number 3, Figure 20.
+format: '3',2(1x,f8.2),1x,i5,1x,i2,1x,f7.3,1x,f7.2,1x,f7.3
+data: X'-coordinate of intersection with component
+ line-of-sight thickness of component
+ component code number
+ space code
+ sine of fallback angle of component exit normal
+ rotation angle in degrees of component exit normal
+ cosine of obliquity angle at entry to component
+
+record type: 4
+description: information about burst ray
+ICD reference: Line Number 19, Figure 20.
+format: '4',2(1x,f8.3),1x,i6 [format of record type '2'
compatible]
+data: ray azimuth angle WRT shotline in radians
+ sine of ray elevation angle WRT shotline
+ sequential ray number for this burst point
+
+record type: 5
+description: information about component intersected by burst ray
+ICD reference: Line Number 20, Figure 20.
+format: '5',1x,f10.3,2(1x,f9.3),1x,i4,1x,i5,1x,f6.3
+data: distance to first contact with component from burst point
+ line-of-sight thickness of component
+ normal thickness of component
+ space code
+ component code number
+ cosine of obliquity angle at entry
Property changes on: brlcad/branches/bioh/src/burst2/burst.format
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/bioh/src/burst2/burst.h
===================================================================
--- brlcad/branches/bioh/src/burst2/burst.h (rev 0)
+++ brlcad/branches/bioh/src/burst2/burst.h 2020-06-09 15:39:00 UTC (rev
76087)
@@ -0,0 +1,208 @@
+/* B U R S T . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2004-2020 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ *
+ */
+/** @file burst/burst.h
+ *
+ */
+
+#ifndef BURST_BURST_H
+#define BURST_BURST_H
+
+#include "common.h"
+
+#define LNBUFSZ 1330 /* buffer for one-line messages */
+#define TITLE_LEN 72
+#define TIMER_LEN 72
+
+#define DFL_AZIMUTH 0.0
+#define DFL_BARRIERS 100
+#define DFL_BDIST 0.0
+#define DFL_CELLSIZE 101.6
+#define DFL_CONEANGLE (45.0/RAD2DEG)
+#define DFL_DEFLECT 0
+#define DFL_DITHER 0
+#define DFL_ELEVATION 0.0
+#define DFL_NRAYS 200
+#define DFL_OVERLAPS 1
+#define DFL_RIPLEVELS 1
+
+#define FM_GRID 0 /* generate grid of shotlines */
+#define FM_DFLT FM_GRID
+
+
+typedef struct ids Ids;
+struct ids
+{
+ short i_lower;
+ short i_upper;
+ Ids *i_next;
+};
+#define IDS_NULL (Ids *) 0
+
+typedef struct colors Colors;
+struct colors
+{
+ short c_lower;
+ short c_upper;
+ unsigned char c_rgb[3];
+ Colors *c_next;
+};
+#define COLORS_NULL (Colors *) 0
+
+struct burst_state {
+ Colors colorids; /* ident range to color mappings for plots */
+ fb *fbiop; /* frame buffer specific access from libfb */
+ FILE *burstfp; /* input stream for burst point locations */
+ FILE *gridfp; /* grid file output stream (2-d shots) */
+ FILE *histfp; /* histogram output stream (statistics) */
+ FILE *outfp; /* burst point library output stream */
+ FILE *plotfp; /* 3-D UNIX plot stream (debugging) */
+ FILE *shotfp; /* input stream for shot positions */
+ FILE *shotlnfp; /* shotline file output stream */
+ FILE *tmpfp; /* temporary file output stream for logging
input */
+ Ids airids; /* burst air idents */
+ Ids armorids; /* burst armor idents */
+ Ids critids; /* critical component idents */
+ unsigned char *pixgrid; /* */
+ unsigned char pixaxis[3]; /* grid axis */
+ unsigned char pixbhit[3]; /* burst ray hit non-critical comps */
+ unsigned char pixbkgr[3]; /* outside grid */
+ unsigned char pixblack[3]; /* black */
+ unsigned char pixcrit[3]; /* burst ray hit critical component */
+ unsigned char pixghit[3]; /* ground burst */
+ unsigned char pixmiss[3]; /* shot missed target */
+ unsigned char pixtarg[3]; /* shot hit target */
+
+ int plotline; /* boolean for plot lines (otherwise plots
points) */
+ int batchmode; /* are we processing batch input now */
+ int cantwarhead; /* pitch or yaw will be applied to warhead */
+ int deflectcone; /* cone axis deflects towards normal */
+ int dithercells; /* if true, randomize shot within cell */
+ int fatalerror; /* must abort ray tracing */
+ int groundburst; /* if true, burst on imaginary ground */
+ int reportoverlaps; /* if true, overlaps are reported */
+ int reqburstair; /* if true, burst air required for shotburst */
+ int shotburst; /* if true, burst along shotline */
+ int tty; /* if true, full screen display is used */
+ int userinterrupt; /* has the ray trace been interrupted */
+
+ char airfile[LNBUFSZ]; /* input file name for burst air ids */
+ char armorfile[LNBUFSZ]; /* input file name for burst armor ids */
+ char burstfile[LNBUFSZ]; /* input file name for burst points */
+ char cmdbuf[LNBUFSZ]; /* */
+ char cmdname[LNBUFSZ]; /* */
+ char colorfile[LNBUFSZ]; /* ident range-to-color file name */
+ char critfile[LNBUFSZ]; /* input file for critical components */
+ char errfile[LNBUFSZ]; /* errors/diagnostics log file name */
+ char fbfile[LNBUFSZ]; /* frame buffer image file name */
+ char gedfile[LNBUFSZ]; /* MGED data base file name */
+ char gridfile[LNBUFSZ]; /* saved grid (2-d shots) file name */
+ char histfile[LNBUFSZ]; /* histogram file name (statistics) */
+ char objects[LNBUFSZ]; /* list of objects from MGED file */
+ char outfile[LNBUFSZ]; /* burst point library output file name */
+ char plotfile[LNBUFSZ]; /* 3-D UNIX plot file name (debugging) */
+ char scrbuf[LNBUFSZ]; /* scratch buffer for temporary use */
+ char scriptfile[LNBUFSZ]; /* shell script file name */
+ char shotfile[LNBUFSZ]; /* input file of firing coordinates */
+ char shotlnfile[LNBUFSZ]; /* shotline output file name */
+ char title[TITLE_LEN]; /* title of MGED target description */
+ char timer[TIMER_LEN]; /* CPU usage statistics */
+ char tmpfname[TIMER_LEN]; /* temporary file for logging input */
+ char *cmdptr; /* */
+
+ fastf_t bdist; /* fusing distance for warhead */
+ fastf_t burstpoint[3]; /* explicit burst point coordinates */
+ fastf_t cellsz; /* shotline separation */
+ fastf_t conehfangle; /* spall cone half angle */
+ fastf_t fire[3]; /* explicit firing coordinates (2-D or 3-D) */
+ fastf_t griddn; /* distance in model coordinates from origin to
bottom border of grid */
+ fastf_t gridlf; /* distance to left border */
+ fastf_t gridrt; /* distance to right border */
+ fastf_t gridup; /* distance to top border */
+ fastf_t gridhor[3]; /* horizontal grid direction cosines */
+ fastf_t gridsoff[3]; /* origin of grid translated by stand-off */
+ fastf_t gridver[3]; /* vertical grid direction cosines */
+ fastf_t grndbk; /* distance to back border of ground plane (-X)
*/
+ fastf_t grndht; /* distance of ground plane below target origin
(-Z) */
+ fastf_t grndfr; /* distance to front border of ground plane
(+X) */
+ fastf_t grndlf; /* distance to left border of ground plane (+Y)
*/
+ fastf_t grndrt; /* distance to right border of ground plane
(-Y) */
+ fastf_t modlcntr[3]; /* centroid of target's bounding RPP */
+ fastf_t modldn; /* distance in model coordinates from origin to
bottom extent of projection of model in grid plane */
+ fastf_t modllf; /* distance to left extent */
+ fastf_t modlrt; /* distance to right extent */
+ fastf_t modlup; /* distance to top extent */
+ fastf_t raysolidangle; /* solid angle per spall sampling ray */
+ fastf_t standoff; /* distance from model origin to grid */
+ fastf_t unitconv; /* units conversion factor (mm to "units") */
+ fastf_t viewazim; /* degrees from X-axis to firing position */
+ fastf_t viewelev; /* degrees from XY-plane to firing position */
+
+ /* These are the angles and fusing distance used to specify the path of
+ the canted warhead in Bob Wilson's simulation.
+ */
+ fastf_t pitch; /* elevation above path of main penetrator */
+ fastf_t yaw; /* deviation right of path of main penetrator */
+
+ /* useful vectors */
+ fastf_t xaxis[3];
+ fastf_t zaxis[3];
+ fastf_t negzaxis[3];
+
+ int co; /* columns of text displayable on video
screen */
+ int devwid; /* width in pixels of frame buffer window */
+ int devhgt; /* height in pixels of frame buffer window */
+ int firemode; /* mode of specifying shots */
+ int gridsz;
+ int gridxfin;
+ int gridyfin;
+ int gridxorg;
+ int gridyorg;
+ int gridwidth; /* Grid width in cells. */
+ int gridheight; /* Grid height in cells. */
+ int li; /* lines of text displayable on video
screen */
+ int nbarriers; /* no. of barriers allowed to critical comp */
+ int noverlaps; /* no. of overlaps encountered in this view */
+ int nprocessors; /* no. of processors running concurrently */
+ int nriplevels; /* no. of levels of ripping (0 = no ripping) */
+ int nspallrays; /* no. of spall rays at each burst point */
+ double units; /* target units (default is millimeters) */
+ int zoom; /* magnification factor on frame buffer */
+
+ struct rt_i *rtip; /* model specific access from librt */
+
+ /* signal handlers */
+ void (*norml_sig)(); /* active during interactive operation */
+ void (*abort_sig)(); /* active during ray tracing only */
+};
+
+void burst_state_init(struct burst_state *s);
+
+#endif /* BURST_BURST_H */
+
+/*
+ * Local Variables:
+ * mode: C
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Property changes on: brlcad/branches/bioh/src/burst2/burst.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits