|
#define | ANALYZE_DEBUG_OFF 0 /* No debugging */ |
|
#define | ANALYZE_DEBUG_NIRT_BACKOUT 0x00000001 /* report on backout calculations */ |
|
#define | ANALYZE_DEBUG_NIRT_HITS 0x00000002 /* report on nirt hits*/ |
|
#define | ANALYZE_DEBUG_UNUSED_0 0x00000004 /* Unallocated */ |
|
#define | ANALYZE_DEBUG_UNUSED_1 0x00000008 /* Unallocated */ |
|
#define | ANALYZE_OK 0x0000 |
|
#define | ANALYZE_ERROR 0x0001 |
|
#define | DENSITY_MAGIC 0xaf0127 |
|
#define | NIRT_SILENT_UNSET 0 |
|
#define | NIRT_SILENT_YES 1 |
|
#define | NIRT_SILENT_NO -1 |
|
#define | NIRT_OVLP_RESOLVE 0 |
|
#define | NIRT_OVLP_REBUILD_FASTGEN 1 |
|
#define | NIRT_OVLP_REBUILD_ALL 2 |
|
#define | NIRT_OVLP_RETAIN 3 |
|
#define | NIRT_OPT_INIT {0, 0, 1, NIRT_OVLP_RESOLVE, 0, 0, 0, NIRT_SILENT_UNSET, 0, 0, BU_PTBL_INIT_ZERO, 0, 0, BU_PTBL_INIT_ZERO, BU_VLS_INIT_ZERO, BU_VLS_INIT_ZERO, VINIT_ZERO, BU_VLS_INIT_ZERO, BU_COLOR_CYAN, BU_COLOR_YELLOW, BU_COLOR_PURPLE, BU_COLOR_WHITE} |
|
#define | NIRT_ALL 0x1 |
| reset to initial state or report all state
|
|
#define | NIRT_OUT 0x2 |
| output log
|
|
#define | NIRT_MSG 0x4 |
| output log
|
|
#define | NIRT_ERR 0x8 |
| error log
|
|
#define | NIRT_SEGS 0x10 |
| segment list
|
|
#define | NIRT_OBJS 0x20 |
| 'active' objects from the scene
|
|
#define | NIRT_FRMTS 0x40 |
| available pre-defined output formats
|
|
#define | NIRT_VIEW 0x80 |
| the current view (ae/dir/center/etc.)
|
|
#define | ANALYZE_OBJ_TO_PNTS_SURF 0x1 |
| save only the first and last hit point on a ray
|
|
#define | ANALYZE_OBJ_TO_PNTS_GRID 0x2 |
| sample using an XYZ grid based on the bounding box (default if no method flags are specified)
|
|
#define | ANALYZE_OBJ_TO_PNTS_RAND 0x4 |
| sample using Marsaglia sampling on the bounding sphere with pseudo random numbers
|
|
#define | ANALYZE_OBJ_TO_PNTS_SOBOL 0x8 |
| sample using Marsaglia sampling on the bounding sphere with Sobol' low-discrepancy-sequence generation
|
|
#define | ANALYZE_POLYGONIZE_PARAMS_DEFAULT { 0, 0, 30, 150000000, 0 } |
|
|
typedef void(* | overlap_callback_t) (const struct xray *ray, const struct partition *pp, const struct region *reg1, const struct region *reg2, double depth, void *callback_data) |
|
typedef void(* | exp_air_callback_t) (const struct partition *pp, point_t last_out_point, point_t pt, point_t opt, void *callback_data) |
|
typedef void(* | gaps_callback_t) (const struct xray *ray, const struct partition *pp, double gap_dist, point_t pt, void *callback_data) |
|
typedef void(* | adj_air_callback_t) (const struct xray *ray, const struct partition *pp, point_t pt, void *callback_data) |
|
typedef void(* | first_air_callback_t) (const struct xray *ray, const struct partition *pp, void *callback_data) |
|
typedef void(* | last_air_callback_t) (const struct xray *ray, const struct partition *pp, void *callback_data) |
|
typedef void(* | unconf_air_callback_t) (const struct xray *ray, const struct partition *in_part, const struct partition *out_part, void *callback_data) |
|
typedef int(* | nirt_hook_t) (struct nirt_state *ns, void *u_data) |
|
typedef int(* | hitfunc_t) (struct application *, struct partition *, struct seg *) |
|
typedef int(* | missfunc_t) (struct application *) |
|
typedef int(* | overlapfunc_t) (struct application *, struct partition *, struct region *, struct region *, struct partition *) |
|
|
int | analyze_densities_create (struct analyze_densities **a) |
|
void | analyze_densities_destroy (struct analyze_densities *a) |
|
int | analyze_densities_init (struct analyze_densities *a) |
|
void | analyze_densities_clear (struct analyze_densities *a) |
|
int | analyze_densities_set (struct analyze_densities *a, long int id, fastf_t density, const char *name, struct bu_vls *msgs) |
|
int | analyze_densities_load (struct analyze_densities *a, const char *buff, struct bu_vls *msgs, int *ecnt) |
|
long int | analyze_densities_write (char **buff, struct analyze_densities *a) |
|
char * | analyze_densities_name (struct analyze_densities *a, long int id) |
|
long int | analyze_densities_id (long int *ids, long int max_ids, struct analyze_densities *a, const char *name) |
|
fastf_t | analyze_densities_density (struct analyze_densities *a, long int id) |
|
long int | analyze_densities_next (struct analyze_densities *a, long int curr_id) |
|
int | analyze_raydiff (struct analyze_raydiff_results **results, struct db_i *dbip, const char *left, const char *right, struct bn_tol *tol, int solidcheck) |
|
void | analyze_raydiff_results_free (struct analyze_raydiff_results *results) |
|
int | rectangular_grid_generator (struct xray *rayp, void *grid_context) |
|
int | rectangular_triple_grid_generator (struct xray *rayp, void *grid_context) |
|
double | rectangular_grid_spacing (void *grid_context) |
|
void | analyze_heal_bot (struct rt_bot_internal *bot, double zipper_tol) |
|
struct region_pair * | add_unique_pair (struct region_pair *list, struct region *r1, struct region *r2, double dist, point_t pt) |
|
int | analyze_obj_inside (struct db_i *dbip, const char *outside, const char *inside, fastf_t tol) |
|
int | analyze_find_subtracted (struct bu_ptbl *results, struct rt_wdb *wdbp, const char *pbrep, struct rt_gen_worker_vars *pbrep_rtvars, const char *curr_comb, struct bu_ptbl *candidates, void *curr_union_data, size_t ncpus) |
|
fastf_t | analyze_volume (struct current_state *context, const char *name) |
|
fastf_t | analyze_total_volume (struct current_state *context) |
|
void | analyze_volume_region (struct current_state *context, int index, char **reg_name, double *volume, double *high, double *low) |
|
fastf_t | analyze_mass (struct current_state *context, const char *name) |
|
fastf_t | analyze_total_mass (struct current_state *context) |
|
void | analyze_mass_region (struct current_state *context, int index, char **reg_name, double *mass, double *high, double *low) |
|
void | analyze_centroid (struct current_state *context, const char *name, point_t value) |
|
void | analyze_total_centroid (struct current_state *context, point_t value) |
|
void | analyze_moments (struct current_state *context, const char *name, mat_t value) |
|
void | analyze_moments_total (struct current_state *context, mat_t moments) |
|
fastf_t | analyze_surf_area (struct current_state *context, const char *name) |
|
fastf_t | analyze_total_surf_area (struct current_state *state) |
|
void | analyze_surf_area_region (struct current_state *state, int i, char **name, double *surf_area, double *high, double *low) |
|
int | perform_raytracing (struct current_state *context, struct db_i *dbip, char *names[], int num_objects, int flags) |
|
struct current_state * | analyze_current_state_init (void) |
|
void | analyze_free_current_state (struct current_state *context) |
|
void | analyze_set_azimuth (struct current_state *context, fastf_t azimuth) |
|
void | analyze_set_elevation (struct current_state *context, fastf_t elevation) |
|
void | analyze_set_grid_spacing (struct current_state *context, fastf_t gridSpacing, fastf_t gridSpacingLimit) |
|
fastf_t | analyze_get_grid_spacing (struct current_state *context) |
|
void | analyze_set_grid_ratio (struct current_state *context, fastf_t gridRatio) |
|
void | analyze_set_grid_size (struct current_state *state, fastf_t width, fastf_t height) |
|
void | analyze_set_aspect (struct current_state *context, fastf_t aspect) |
|
void | analyze_set_samples_per_model_axis (struct current_state *context, fastf_t samples_per_model_axis) |
|
void | analyze_set_overlap_tolerance (struct current_state *context, fastf_t overlap_tolerance) |
|
void | analyze_set_volume_tolerance (struct current_state *context, fastf_t volume_tolerance) |
|
void | analyze_set_mass_tolerance (struct current_state *context, fastf_t mass_tolerance) |
|
void | analyze_set_surf_area_tolerance (struct current_state *context, fastf_t sa_tolerance) |
|
void | analyze_set_ncpu (struct current_state *context, int ncpu) |
|
void | analyze_set_required_number_hits (struct current_state *context, size_t required_number_hits) |
|
void | analyze_set_quiet_missed_report (struct current_state *context) |
|
void | analyze_set_use_air (struct current_state *context, int use_air) |
|
void | analyze_set_num_views (struct current_state *context, int num_views) |
|
void | analyze_set_densityfile (struct current_state *context, char *densityFileName) |
|
void | analyze_set_volume_plotfile (struct current_state *context, FILE *plotvolume) |
|
void | analyze_enable_debug (struct current_state *context, struct bu_vls *vls) |
|
void | analyze_enable_verbose (struct current_state *context, struct bu_vls *vls) |
|
int | analyze_get_num_regions (struct current_state *context) |
|
void | analyze_set_view_information (struct current_state *context, double viewsize, point_t *eye_model, quat_t *orientation) |
|
void | analyze_register_overlaps_callback (struct current_state *context, overlap_callback_t callback_function, void *callback_data) |
|
void | analyze_register_exp_air_callback (struct current_state *context, exp_air_callback_t callback_function, void *callback_data) |
|
void | analyze_register_gaps_callback (struct current_state *context, gaps_callback_t callback_function, void *callback_data) |
|
void | analyze_register_adj_air_callback (struct current_state *context, adj_air_callback_t callback_function, void *callback_data) |
|
void | analyze_register_first_air_callback (struct current_state *context, first_air_callback_t callback_function, void *callback_data) |
|
void | analyze_register_last_air_callback (struct current_state *context, last_air_callback_t callback_function, void *callback_data) |
|
void | analyze_register_unconf_air_callback (struct current_state *context, unconf_air_callback_t callback_function, void *callback_data) |
|
struct bu_opt_desc * | nirt_opt_desc (struct nirt_opt_vals *o) |
|
void | nirt_opt_vals_reset (struct nirt_opt_vals *o) |
|
void | nirt_opt_vals_free (struct nirt_opt_vals *o) |
|
void | nirt_opt_mk_args (struct bu_ptbl *tbl, struct nirt_opt_vals *tgt, struct nirt_opt_vals *src, int add_scripts) |
|
int | nirt_init (struct nirt_state *ns) |
|
int | nirt_init_dbip (struct nirt_state *ns, struct db_i *dbip) |
|
int | nirt_clear_dbip (struct nirt_state *ns) |
|
void | nirt_destroy (struct nirt_state *ns) |
|
int | nirt_exec (struct nirt_state *ns, const char *script) |
|
void * | nirt_udata (struct nirt_state *ns, void *u_data) |
|
void | nirt_hook (struct nirt_state *ns, nirt_hook_t hf, int flag) |
|
void | nirt_clear (struct nirt_state *ns, int flags) |
|
void | nirt_log (struct bu_vls *o, struct nirt_state *ns, int output_type) |
|
int | nirt_help (struct bu_vls *h, struct nirt_state *ns, bu_opt_format_t ofmt) |
|
int | nirt_line_segments (struct bv_vlblock **segs, struct nirt_state *ns) |
|
DEPRECATED int | analyze_obj_to_pnts (struct rt_pnts_internal *rpnts, double *avg_thickness, struct db_i *dbip, const char *obj, struct bn_tol *tol, int flags, int max_pnts, int max_time, int verbosity) |
|
int | analyze_polygonize (int **faces, int *num_faces, point_t **vertices, int *num_vertices, fastf_t size, point_t p_s, const char *obj, struct db_i *dbip, struct analyze_polygonize_params *p) |
|
void | voxelize (struct rt_i *rtip, fastf_t voxelSize[3], int levelOfDetail, void(*create_boxes)(void *callBackData, int x, int y, int z, const char *regionName, fastf_t percentageFill), void *callBackData) |
|
Debugging definitions.
Functions provided by the LIBANALYZE geometry analysis library.
A library implementation of functionality originally developed in Natalie's Interactive Ray Tracer (NIRT)
Using ray intersection, sample the database object obj and return a pnts primitive.
#define ANALYZE_OBJ_TO_PNTS_SURF 0x1 |
save only the first and last hit point on a ray
Using ray intersection, sample the database object obj and return a pnts primitive.
For the grid sampling method, the tolerance sets the number of rays fired. max_time and max_pnts do not impact the GRID sampling logic.
The max_pnts limit will cap the number of reported points for the pseudorandom sampling methods, on a per method basis - i.e., the function will return up to max_pnts for each non-grid sampling method that is enabled. If unset, the maximum pnt count return is 500,000 per method (except for GRID).
Likewise, max_time will limit the run time of each pseudorandom method, with the total limit for all methods being method_cnt_enabled * max_time.
Return codes:
-1 - error 0 - success
Definition at line 61 of file pnts.h.
Generate argv style options that attempts to generate an argv that will make the option values in tgt look like those in src. argv strings will be inserted into tbl - caller is responsible for freeing them.
There are a few caveats - options like silent or verbose that have only an enabling flag will be turned on if they are off in tgt, but if they are off in src and on in tgt there is no command line option to disable them once set.
Operations on init_scripts, performed if add_scripts is non-zero, are additive ONLY - because it is legitimate to have multiple scripts and settings with the same values, it can only add what is present in src to what is already in tgt.