Revision: 35463
http://brlcad.svn.sourceforge.net/brlcad/?rev=35463&view=rev
Author: irpguardian
Date: 2009-08-04 13:26:40 +0000 (Tue, 04 Aug 2009)
Log Message:
-----------
Added support for naming combining region (the human region) with the -n
command.
human -n Name
Modified Paths:
--------------
brlcad/trunk/src/proc-db/human.c
Modified: brlcad/trunk/src/proc-db/human.c
===================================================================
--- brlcad/trunk/src/proc-db/human.c 2009-08-04 03:01:31 UTC (rev 35462)
+++ brlcad/trunk/src/proc-db/human.c 2009-08-04 13:26:40 UTC (rev 35463)
@@ -43,6 +43,7 @@
*/
#define DEFAULT_HEIGHT_INCHES 68.0
#define DEFAULT_FILENAME "human.g"
+#define DEFAULT_HUMANNAME "Body.c"
#define MAXLENGTH 64 /*Maxlength of things like object names, filenames */
#define IN2MM 25.4 /*Convert an inch measurement to millimeters */
@@ -50,6 +51,7 @@
char *progname = "Human Model";
char filename[MAXLENGTH]=DEFAULT_FILENAME;
+char humanName[MAXLENGTH]=DEFAULT_HUMANNAME;
/** Human information structures */
/** Location of all joints on the body located here */
@@ -1387,7 +1389,7 @@
int read_args(int argc, char **argv, struct human_data_t *dude, fastf_t
*percentile, fastf_t *location, fastf_t *stance, fastf_t *troops, fastf_t
*showBoxes)
{
char c = 'a';
- char *options="AbH:hLlmN:O:o:p:s:w";
+ char *options="AbH:hLlmn:N:O:o:p:s:w";
float height=0;
int soldiers=0;
int pose=0;
@@ -1450,6 +1452,12 @@
Manual(dude);
break;
+ case 'n':
+ memset(humanName, 0, MAXLENGTH);
+ bu_strlcpy(humanName, bu_optarg, MAXLENGTH);
+ fflush(stdin);
+ break;
+
case 'N':
sscanf(bu_optarg, "%d", &soldiers);
if(soldiers <= 1){
@@ -1579,7 +1587,7 @@
is_region = 1;
VSET(rgb, 128, 255, 128); /* some wonky bright green color */
mk_lcomb(db_fp,
- "Body.r",
+ humanName,
&human,
is_region,
"plastic",
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits