Skip to content

Commit

Permalink
fix(rxcontrib): Assign default options to match those of rcontrib
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregungory committed Dec 13, 2024
1 parent 1230f38 commit 0604a2b
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/rt/rxcmain.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static const char RCSid[] = "$Id: rxcmain.cpp,v 2.9 2024/12/03 17:39:42 greg Exp $";
static const char RCSid[] = "$Id: rxcmain.cpp,v 2.10 2024/12/13 21:12:40 greg Exp $";
#endif
/*
* rxcmain.c - main for rxcontrib ray contribution tracer
Expand Down Expand Up @@ -132,6 +132,23 @@ setformat(const char *fmt)
error(USER, errmsg);
}

/* Set default options */
static void
default_options(void)
{
rand_samp = 1;
dstrsrc = 0.9;
directrelay = 3;
vspretest = 512;
srcsizerat = .2;
specthresh = .02;
specjitter = 1.;
maxdepth = -10;
minweight = 2e-3;
ambres = 256;
ambdiv = 350;
ambounce = 1;
}

/* Set overriding options */
static void
Expand All @@ -142,7 +159,6 @@ override_options(void)
ambacc = 0;
}


int
main(int argc, char *argv[])
{
Expand Down Expand Up @@ -173,6 +189,8 @@ main(int argc, char *argv[])
/* initialize calcomp routines early */
initfunc();
calcontext(RCCONTEXT);
/* set rcontrib defaults */
default_options();
/* option city */
for (i = 1; i < argc; i++) {
/* expand arguments */
Expand Down

0 comments on commit 0604a2b

Please # to comment.