BRL-CAD
Loading...
Searching...
No Matches
rt_crofton_params Struct Reference

#include <func.h>

Data Fields

size_t n_rays
 
double stability_mm
 
double time_ms
 

Detailed Description

Stopping-criteria parameters for rt_crofton_shoot() and rt_crofton_sample().

All fields default to zero. Behaviour when all three are zero (or the pointer is NULL) is identical to the historical default: fire 2 000 rays and stop when two successive 1 %-threshold iterations agree.

When one or more non-zero fields are provided, sampling continues until the FIRST criterion that is met:

n_rays > 0 Stop once this many rays have been fired in total.

stability_mm > 0 Stop once the estimate is "stable" to within the given linear dimension. Stability is measured as the change in equivalent-sphere radius between successive iterations: r_sa = sqrt(SA / (4*pi)) for surface area and r_v = cbrt(3*V / (4*pi)) for volume. Sampling stops when both |Δr_sa| and |Δr_v| (for whichever outputs are requested) remain < stability_mm for consecutive stable windows.

time_ms > 0 Stop once this many wall-clock milliseconds have elapsed, returning the best estimate accumulated so far.

When multiple fields are non-zero the first criterion to fire wins, giving callers fine control over the accuracy / speed trade-off.

Definition at line 212 of file func.h.

Field Documentation

◆ n_rays

size_t n_rays

max total rays; 0 = no limit via this criterion

Definition at line 213 of file func.h.

◆ stability_mm

double stability_mm

equivalent-radius stability target (mm); 0 = disabled

Definition at line 214 of file func.h.

◆ time_ms

double time_ms

wall-clock time budget (ms); 0 = disabled

Definition at line 215 of file func.h.


The documentation for this struct was generated from the following file: