BRL-CAD
libanalyze (Geometry Analysis)

Debugging definitions. More...

Files

file  debug.h
 
file  nirt.h
 
file  density.h
 
file  diff.h
 
file  grid.h
 
file  heal.h
 
file  info.h
 
file  nirt.h
 
file  analyze.h
 
file  polygonize.h
 
file  voxelize.h
 
file  worker.h
 
file  analyze.h
 

Data Structures

struct  density_entry
 
struct  analyze_densities
 
struct  analyze_raydiff_results
 
struct  diff_seg
 
struct  grid_generator_functions
 
struct  rectangular_grid
 
struct  region_pair
 
struct  nirt_state
 
struct  analyze_polygonize_params
 
struct  voxelRegion
 
struct  rayInfo
 
struct  rt_gen_worker_vars
 

Macros

#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_ALL   0x1
 reset to initial state or report all state More...
 
#define NIRT_OUT   0x2
 output log More...
 
#define NIRT_MSG   0x4
 output log More...
 
#define NIRT_ERR   0x8
 error log More...
 
#define NIRT_SEGS   0x10
 segment list More...
 
#define NIRT_OBJS   0x20
 'active' objects from the scene More...
 
#define NIRT_FRMTS   0x40
 available pre-defined output formats More...
 
#define NIRT_VIEW   0x80
 the current view (ae/dir/center/etc.) More...
 
#define ANALYZE_OBJ_TO_PNTS_SURF   0x1
 save only the first and last hit point on a ray More...
 
#define ANALYZE_OBJ_TO_PNTS_GRID   0x2
 sample using an XYZ grid based on the bounding box (default if no method flags are specified) More...
 
#define ANALYZE_OBJ_TO_PNTS_RAND   0x4
 sample using Marsaglia sampling on the bounding sphere with pseudo random numbers More...
 
#define ANALYZE_OBJ_TO_PNTS_SOBOL   0x8
 sample using Marsaglia sampling on the bounding sphere with Sobol' low-discrepancy-sequence generation More...
 
#define ANALYZE_POLYGONIZE_PARAMS_DEFAULT   { 30, 150000000, 0 }
 

Typedefs

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 *)
 

Functions

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_pairadd_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)
 
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)
 
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)
 

Variables

unsigned int analyze_debug
 

Detailed Description

Debugging definitions.

Density related routines

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.

Macro Definition Documentation

◆ ANALYZE_DEBUG_OFF

#define ANALYZE_DEBUG_OFF   0 /* No debugging */

Section for ANALYZE_DEBUG values

These definitions are each for one bit.

Definition at line 48 of file debug.h.

◆ ANALYZE_DEBUG_NIRT_BACKOUT

#define ANALYZE_DEBUG_NIRT_BACKOUT   0x00000001 /* report on backout calculations */

Definition at line 50 of file debug.h.

◆ ANALYZE_DEBUG_NIRT_HITS

#define ANALYZE_DEBUG_NIRT_HITS   0x00000002 /* report on nirt hits*/

Definition at line 51 of file debug.h.

◆ ANALYZE_DEBUG_UNUSED_0

#define ANALYZE_DEBUG_UNUSED_0   0x00000004 /* Unallocated */

Definition at line 52 of file debug.h.

◆ ANALYZE_DEBUG_UNUSED_1

#define ANALYZE_DEBUG_UNUSED_1   0x00000008 /* Unallocated */

Definition at line 53 of file debug.h.

◆ ANALYZE_OK

#define ANALYZE_OK   0x0000

Definition at line 47 of file defines.h.

◆ ANALYZE_ERROR

#define ANALYZE_ERROR   0x0001

something went wrong, function not completed

Definition at line 48 of file defines.h.

◆ DENSITY_MAGIC

#define DENSITY_MAGIC   0xaf0127

Definition at line 41 of file density.h.

◆ NIRT_ALL

#define NIRT_ALL   0x1

reset to initial state or report all state

Definition at line 81 of file nirt.h.

◆ NIRT_OUT

#define NIRT_OUT   0x2

output log

Definition at line 82 of file nirt.h.

◆ NIRT_MSG

#define NIRT_MSG   0x4

output log

Definition at line 83 of file nirt.h.

◆ NIRT_ERR

#define NIRT_ERR   0x8

error log

Definition at line 84 of file nirt.h.

◆ NIRT_SEGS

#define NIRT_SEGS   0x10

segment list

Definition at line 85 of file nirt.h.

◆ NIRT_OBJS

#define NIRT_OBJS   0x20

'active' objects from the scene

Definition at line 86 of file nirt.h.

◆ NIRT_FRMTS

#define NIRT_FRMTS   0x40

available pre-defined output formats

Definition at line 87 of file nirt.h.

◆ NIRT_VIEW

#define NIRT_VIEW   0x80

the current view (ae/dir/center/etc.)

Definition at line 88 of file nirt.h.

◆ ANALYZE_OBJ_TO_PNTS_SURF

#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.

◆ ANALYZE_OBJ_TO_PNTS_GRID

#define ANALYZE_OBJ_TO_PNTS_GRID   0x2

sample using an XYZ grid based on the bounding box (default if no method flags are specified)

Definition at line 62 of file pnts.h.

◆ ANALYZE_OBJ_TO_PNTS_RAND

#define ANALYZE_OBJ_TO_PNTS_RAND   0x4

sample using Marsaglia sampling on the bounding sphere with pseudo random numbers

Definition at line 63 of file pnts.h.

◆ ANALYZE_OBJ_TO_PNTS_SOBOL

#define ANALYZE_OBJ_TO_PNTS_SOBOL   0x8

sample using Marsaglia sampling on the bounding sphere with Sobol' low-discrepancy-sequence generation

Definition at line 64 of file pnts.h.

◆ ANALYZE_POLYGONIZE_PARAMS_DEFAULT

#define ANALYZE_POLYGONIZE_PARAMS_DEFAULT   { 30, 150000000, 0 }

Definition at line 44 of file polygonize.h.

Typedef Documentation

◆ overlap_callback_t

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)

Definition at line 74 of file info.h.

◆ exp_air_callback_t

typedef void(* exp_air_callback_t) (const struct partition *pp, point_t last_out_point, point_t pt, point_t opt, void *callback_data)

Definition at line 75 of file info.h.

◆ gaps_callback_t

typedef void(* gaps_callback_t) (const struct xray *ray, const struct partition *pp, double gap_dist, point_t pt, void *callback_data)

Definition at line 76 of file info.h.

◆ adj_air_callback_t

typedef void(* adj_air_callback_t) (const struct xray *ray, const struct partition *pp, point_t pt, void *callback_data)

Definition at line 77 of file info.h.

◆ first_air_callback_t

typedef void(* first_air_callback_t) (const struct xray *ray, const struct partition *pp, void *callback_data)

Definition at line 78 of file info.h.

◆ last_air_callback_t

typedef void(* last_air_callback_t) (const struct xray *ray, const struct partition *pp, void *callback_data)

Definition at line 79 of file info.h.

◆ unconf_air_callback_t

typedef void(* unconf_air_callback_t) (const struct xray *ray, const struct partition *in_part, const struct partition *out_part, void *callback_data)

Definition at line 80 of file info.h.

◆ nirt_hook_t

typedef int(* nirt_hook_t) (struct nirt_state *ns, void *u_data)

Mechanism for setting callback hooks executed when the specified state is changed after a nirt_exec call. struct nirt_state_ALL will be executed last, and is run if set and if any of the other states change. Hook functions will be passed the current value of the u_data pointer.

Definition at line 104 of file nirt.h.

◆ hitfunc_t

typedef int(* hitfunc_t) (struct application *, struct partition *, struct seg *)

Definition at line 36 of file worker.h.

◆ missfunc_t

typedef int(* missfunc_t) (struct application *)

Definition at line 37 of file worker.h.

◆ overlapfunc_t

typedef int(* overlapfunc_t) (struct application *, struct partition *, struct region *, struct region *, struct partition *)

Definition at line 38 of file worker.h.

Function Documentation

◆ analyze_densities_create()

int analyze_densities_create ( struct analyze_densities **  a)

◆ analyze_densities_destroy()

void analyze_densities_destroy ( struct analyze_densities a)

◆ analyze_densities_init()

int analyze_densities_init ( struct analyze_densities a)

◆ analyze_densities_clear()

void analyze_densities_clear ( struct analyze_densities a)

◆ analyze_densities_set()

int analyze_densities_set ( struct analyze_densities a,
long int  id,
fastf_t  density,
const char *  name,
struct bu_vls msgs 
)

◆ analyze_densities_load()

int analyze_densities_load ( struct analyze_densities a,
const char *  buff,
struct bu_vls msgs,
int *  ecnt 
)

◆ analyze_densities_write()

long int analyze_densities_write ( char **  buff,
struct analyze_densities a 
)

◆ analyze_densities_name()

char * analyze_densities_name ( struct analyze_densities a,
long int  id 
)

◆ analyze_densities_id()

long int analyze_densities_id ( long int *  ids,
long int  max_ids,
struct analyze_densities a,
const char *  name 
)

◆ analyze_densities_density()

fastf_t analyze_densities_density ( struct analyze_densities a,
long int  id 
)

◆ analyze_densities_next()

long int analyze_densities_next ( struct analyze_densities a,
long int  curr_id 
)

◆ analyze_raydiff()

int analyze_raydiff ( struct analyze_raydiff_results **  results,
struct db_i dbip,
const char *  left,
const char *  right,
struct bn_tol tol,
int  solidcheck 
)

◆ analyze_raydiff_results_free()

void analyze_raydiff_results_free ( struct analyze_raydiff_results results)

◆ rectangular_grid_generator()

int rectangular_grid_generator ( struct xray rayp,
void *  grid_context 
)

grid generator for rectangular grid type

◆ rectangular_triple_grid_generator()

int rectangular_triple_grid_generator ( struct xray rayp,
void *  grid_context 
)

grid generator for rectangular triple grid type

◆ rectangular_grid_spacing()

double rectangular_grid_spacing ( void *  grid_context)

function to get the grid spacing of rectangular grid

◆ analyze_heal_bot()

void analyze_heal_bot ( struct rt_bot_internal bot,
double  zipper_tol 
)

◆ add_unique_pair()

struct region_pair * add_unique_pair ( struct region_pair list,
struct region r1,
struct region r2,
double  dist,
point_t  pt 
)

region_pair for gqa

◆ analyze_obj_inside()

int analyze_obj_inside ( struct db_i dbip,
const char *  outside,
const char *  inside,
fastf_t  tol 
)

◆ analyze_find_subtracted()

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 
)

◆ analyze_volume()

fastf_t analyze_volume ( struct current_state *  context,
const char *  name 
)

returns the volume of the specified object (name)

◆ analyze_total_volume()

fastf_t analyze_total_volume ( struct current_state *  context)

returns the volume of all the specified objects while ray-tracing

◆ analyze_volume_region()

void analyze_volume_region ( struct current_state *  context,
int  index,
char **  reg_name,
double *  volume,
double *  high,
double *  low 
)

stores the region name, volume, high and low ranges of volume for the specified index of region in region table.

◆ analyze_mass()

fastf_t analyze_mass ( struct current_state *  context,
const char *  name 
)

returns the mass of the specified object (name)

◆ analyze_total_mass()

fastf_t analyze_total_mass ( struct current_state *  context)

returns the mass of all the specified objects while ray-tracing

◆ analyze_mass_region()

void analyze_mass_region ( struct current_state *  context,
int  index,
char **  reg_name,
double *  mass,
double *  high,
double *  low 
)

stores the region name, mass, high and low ranges of mass for the specified index of region in region table.

◆ analyze_centroid()

void analyze_centroid ( struct current_state *  context,
const char *  name,
point_t  value 
)

returns the centroid of the specified object (name)

◆ analyze_total_centroid()

void analyze_total_centroid ( struct current_state *  context,
point_t  value 
)

returns the centroid of all the specified objects while ray-tracing

◆ analyze_moments()

void analyze_moments ( struct current_state *  context,
const char *  name,
mat_t  value 
)

returns the moments and products of inertia of the specified object (name)

◆ analyze_moments_total()

void analyze_moments_total ( struct current_state *  context,
mat_t  moments 
)

returns the moments and products of all the specified objects while ray-tracing

◆ analyze_surf_area()

fastf_t analyze_surf_area ( struct current_state *  context,
const char *  name 
)

returns the surface area of the specified object (name)

◆ analyze_total_surf_area()

fastf_t analyze_total_surf_area ( struct current_state *  state)

returns the surface area of all the specified objects while ray-tracing

◆ analyze_surf_area_region()

void analyze_surf_area_region ( struct current_state *  state,
int  i,
char **  name,
double *  surf_area,
double *  high,
double *  low 
)

stores the region name, surf_area, high and low ranges of surf_area for the specified index of region in region table.

◆ perform_raytracing()

int perform_raytracing ( struct current_state *  context,
struct db_i dbip,
char *  names[],
int  num_objects,
int  flags 
)

performs raytracing based on the current state

◆ analyze_current_state_init()

struct current_state * analyze_current_state_init ( void  )

functions to initialize and clear current_state struct

◆ analyze_free_current_state()

void analyze_free_current_state ( struct current_state *  context)

◆ analyze_set_azimuth()

void analyze_set_azimuth ( struct current_state *  context,
fastf_t  azimuth 
)

sets the azimuth and elevation for single grid to shoot rays

◆ analyze_set_elevation()

void analyze_set_elevation ( struct current_state *  context,
fastf_t  elevation 
)

◆ analyze_set_grid_spacing()

void analyze_set_grid_spacing ( struct current_state *  context,
fastf_t  gridSpacing,
fastf_t  gridSpacingLimit 
)

sets the grid_spacing and grid spacing limit for shooting the rays

◆ analyze_get_grid_spacing()

fastf_t analyze_get_grid_spacing ( struct current_state *  context)

returns the grid_spacing when the raytracing stopped – used for printing summaries

◆ analyze_set_grid_ratio()

void analyze_set_grid_ratio ( struct current_state *  context,
fastf_t  gridRatio 
)

sets the cell_width by cell_height ratio (default is 1)

◆ analyze_set_grid_size()

void analyze_set_grid_size ( struct current_state *  state,
fastf_t  width,
fastf_t  height 
)

sets the grid width and grid height values

◆ analyze_set_aspect()

void analyze_set_aspect ( struct current_state *  context,
fastf_t  aspect 
)

sets the width by height ratio (default is 1)

◆ analyze_set_samples_per_model_axis()

void analyze_set_samples_per_model_axis ( struct current_state *  context,
fastf_t  samples_per_model_axis 
)

used to specify the minimum samples per model axis

◆ analyze_set_overlap_tolerance()

void analyze_set_overlap_tolerance ( struct current_state *  context,
fastf_t  overlap_tolerance 
)

sets the tolerance values for overlaps, volume, mass and surface area for the analysis

◆ analyze_set_volume_tolerance()

void analyze_set_volume_tolerance ( struct current_state *  context,
fastf_t  volume_tolerance 
)

◆ analyze_set_mass_tolerance()

void analyze_set_mass_tolerance ( struct current_state *  context,
fastf_t  mass_tolerance 
)

◆ analyze_set_surf_area_tolerance()

void analyze_set_surf_area_tolerance ( struct current_state *  context,
fastf_t  sa_tolerance 
)

◆ analyze_set_ncpu()

void analyze_set_ncpu ( struct current_state *  context,
int  ncpu 
)

sets the number of cpus to be used for raytracing

◆ analyze_set_required_number_hits()

void analyze_set_required_number_hits ( struct current_state *  context,
size_t  required_number_hits 
)

sets the required number of hits per object when raytracing

◆ analyze_set_quiet_missed_report()

void analyze_set_quiet_missed_report ( struct current_state *  context)

sets a flag which quiets the missed reports

◆ analyze_set_use_air()

void analyze_set_use_air ( struct current_state *  context,
int  use_air 
)

sets the use_air flag for raytracing

◆ analyze_set_num_views()

void analyze_set_num_views ( struct current_state *  context,
int  num_views 
)

set the number of views when shooting triple grids of rays

◆ analyze_set_densityfile()

void analyze_set_densityfile ( struct current_state *  context,
char *  densityFileName 
)

set the name of the density file

◆ analyze_set_volume_plotfile()

void analyze_set_volume_plotfile ( struct current_state *  context,
FILE *  plotvolume 
)

registers the plotfile used to store the plot information for volume

◆ analyze_enable_debug()

void analyze_enable_debug ( struct current_state *  context,
struct bu_vls vls 
)

used to set debug flag and get debug information into the bu_vls pointer

◆ analyze_enable_verbose()

void analyze_enable_verbose ( struct current_state *  context,
struct bu_vls vls 
)

used to set verbose flag and get verbose information into the bu_vls pointer

◆ analyze_get_num_regions()

int analyze_get_num_regions ( struct current_state *  context)

used to get the value of number of regions

◆ analyze_set_view_information()

void analyze_set_view_information ( struct current_state *  context,
double  viewsize,
point_t eye_model,
quat_t orientation 
)

used to prepare single grid (eye position) by expliciting mentioning viewsize, eye model and orientation

◆ analyze_register_overlaps_callback()

void analyze_register_overlaps_callback ( struct current_state *  context,
overlap_callback_t  callback_function,
void *  callback_data 
)

registers the callback functions defined by the user to be called when raytracing

◆ analyze_register_exp_air_callback()

void analyze_register_exp_air_callback ( struct current_state *  context,
exp_air_callback_t  callback_function,
void *  callback_data 
)

◆ analyze_register_gaps_callback()

void analyze_register_gaps_callback ( struct current_state *  context,
gaps_callback_t  callback_function,
void *  callback_data 
)

◆ analyze_register_adj_air_callback()

void analyze_register_adj_air_callback ( struct current_state *  context,
adj_air_callback_t  callback_function,
void *  callback_data 
)

◆ analyze_register_first_air_callback()

void analyze_register_first_air_callback ( struct current_state *  context,
first_air_callback_t  callback_function,
void *  callback_data 
)

◆ analyze_register_last_air_callback()

void analyze_register_last_air_callback ( struct current_state *  context,
last_air_callback_t  callback_function,
void *  callback_data 
)

◆ analyze_register_unconf_air_callback()

void analyze_register_unconf_air_callback ( struct current_state *  context,
unconf_air_callback_t  callback_function,
void *  callback_data 
)

◆ nirt_init()

int nirt_init ( struct nirt_state ns)

Perform non-database dependent initialization. A newly initialized state can accept some commands (like updates to the attribute list) but will not be able to raytrace. To set up a raytracing environment, apply nirt_init_dbip

◆ nirt_init_dbip()

int nirt_init_dbip ( struct nirt_state ns,
struct db_i dbip 
)

Initialize a struct nirt_state state for a particular database. After this step a nirt instance is ready to raytrace.

◆ nirt_clear_dbip()

int nirt_clear_dbip ( struct nirt_state ns)

Clear those aspects of a struct nirt_state state specific to a database instance.

◆ nirt_destroy()

void nirt_destroy ( struct nirt_state ns)

Clean up and free the internals of a NIRT state.

◆ nirt_exec()

int nirt_exec ( struct nirt_state ns,
const char *  script 
)

Execute nirt commands. Runs either the supplied script.

Returns -1 if there was any sort of error, 0 if the script executed successfully without a quit call, and 1 if a quit command was encountered during execution. See the man(1) nirt manual page for documentation of valid script commands and options.

◆ nirt_udata()

void * nirt_udata ( struct nirt_state ns,
void *  u_data 
)

Associate a pointer to user data with the struct nirt_state state, unless u_data is NULL. Returns the current u_data pointer - so to extract the current struct nirt_state data pointer value, supply a NULL argument to u_data. If u_data is non-NULL, the current data pointer will be overwritten

  • the caller should save the old pointer if they need it before setting the new one.

◆ nirt_hook()

void nirt_hook ( struct nirt_state ns,
nirt_hook_t  hf,
int  flag 
)

◆ nirt_clear()

void nirt_clear ( struct nirt_state ns,
int  flags 
)

Reset some or all of the struct nirt_state state, depending on the supplied flags. If other flags are provided with struct nirt_state_ALL, struct nirt_state_ALL will skip the clearing step(s) specified by the other flag(s). So, for example, if a caller wishes to reset the struct nirt_state state but retain the existing scripts for re-use they could call with nirt_clear with struct nirt_state_ALL|struct nirt_state_SCRIPTS. Note that the struct nirt_state_FRMTS, struct nirt_state_OUT and struct nirt_state_ERR flags are no-ops for nirt_clear.

◆ nirt_log()

void nirt_log ( struct bu_vls o,
struct nirt_state ns,
int  output_type 
)

Report command output. For SEGS, SCRIPTS, OBJS and FRMTS reports a textual list of the output. Unlike clear, which takes the type as combinable flags, nirt_log expects only one type. Returns -1 if output can't be printed for any reason (NULL input or unknown output_type) and 0 otherwise.

◆ nirt_help()

int nirt_help ( struct bu_vls h,
struct nirt_state ns,
bu_opt_format_t  ofmt 
)

Reports available commands and their options. Returns -1 if help can't be printed for any reason (NULL input or unknown output type) and 0 otherwise.

◆ nirt_line_segments()

int nirt_line_segments ( struct bv_vlblock **  segs,
struct nirt_state ns 
)

Return any line segments generated by processed commands in segs. Returns number of line segments in segs, or -1 if there was an error.

◆ analyze_obj_to_pnts()

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 
)

◆ analyze_polygonize()

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 
)

◆ voxelize()

void voxelize ( struct rt_i rtip,
fastf_t  voxelSize[3],
int  levelOfDetail,
void(*)(void *callBackData, int x, int y, int z, const char *regionName, fastf_t percentageFill)  create_boxes,
void *  callBackData 
)

voxelize function takes raytrace instance and user parameters as inputs

Variable Documentation

◆ analyze_debug

unsigned int analyze_debug
extern

controls the libanalyze debug reporting