BRL-CAD
analyze.h File Reference
#include "common.h"
#include "raytrace.h"
Include dependency graph for analyze.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  density_entry
 
struct  region_pair
 
struct  voxelRegion
 
struct  rayInfo
 

Macros

#define ANALYZE_OK   0x0000
 
#define ANALYZE_ERROR   0x0001
 
#define DENSITY_MAGIC   0xaf0127
 

Enumerations

enum  diff_t {
  DIFF_NONE = 0, DIFF_REMOVED, DIFF_ADDED, DIFF_TYPECHANGE,
  DIFF_BINARY, DIFF
}
 
enum  diff_result_t {
  DIFF_SHARED_PARAM = 0, DIFF_ORIG_ONLY_PARAM, DIFF_NEW_ONLY_PARAM, DIFF_CHANGED_ORIG_PARAM,
  DIFF_CHANGED_NEW_PARAM, DIFF_SHARED_ATTR, DIFF_ORIG_ONLY_ATTR, DIFF_NEW_ONLY_ATTR,
  DIFF_CHANGED_ORIG_ATTR, DIFF_CHANGED_NEW_ATTR
}
 
enum  diff_obj_t { DIFF_ORIG = 0, DIFF_NEW }
 

Functions

int parse_densities_buffer (char *buf, size_t len, struct density_entry *densities, struct bu_vls *result_str, int *num_densities)
 
struct region_pairadd_unique_pair (struct region_pair *list, struct region *r1, struct region *r2, double dist, point_t pt)
 
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)
 
void * diff_dp (void *result_in, struct directory *dp1, struct directory *dp2, struct db_i *dbip1, struct db_i *dbip2)
 
struct bu_ptbldiff_dbip (struct db_i *dbip1, struct db_i *dbip2)
 
void diff_free (void *result)
 
void diff_free_ptbl (struct bu_ptbl *results_table)
 
int diff_status (void *result)
 
diff_t diff_type (void *result)
 
struct bu_attribute_value_setdiff_result (void *result, diff_result_t result_type)
 
struct directorydiff_info_dp (void *result, diff_obj_t obj_type)
 
struct rt_db_internaldiff_info_intern (void *result, diff_obj_t obj_type)
 

Detailed Description

Functions provided by the LIBANALYZE geometry analysis library.

Definition in file analyze.h.

Macro Definition Documentation

#define ANALYZE_OK   0x0000

Definition at line 48 of file analyze.h.

Referenced by parse_densities_buffer().

#define ANALYZE_ERROR   0x0001

something went wrong, function not completed

Definition at line 49 of file analyze.h.

Referenced by parse_densities_buffer().

#define DENSITY_MAGIC   0xaf0127

Definition at line 55 of file analyze.h.

Referenced by hit(), and parse_densities_buffer().

Enumeration Type Documentation

enum diff_t
Enumerator
DIFF_NONE 
DIFF_REMOVED 
DIFF_ADDED 
DIFF_TYPECHANGE 
DIFF_BINARY 
DIFF 

Definition at line 172 of file analyze.h.

Enumerator
DIFF_SHARED_PARAM 
DIFF_ORIG_ONLY_PARAM 
DIFF_NEW_ONLY_PARAM 
DIFF_CHANGED_ORIG_PARAM 
DIFF_CHANGED_NEW_PARAM 
DIFF_SHARED_ATTR 
DIFF_ORIG_ONLY_ATTR 
DIFF_NEW_ONLY_ATTR 
DIFF_CHANGED_ORIG_ATTR 
DIFF_CHANGED_NEW_ATTR 

Definition at line 194 of file analyze.h.

enum diff_obj_t
Enumerator
DIFF_ORIG 
DIFF_NEW 

Definition at line 215 of file analyze.h.

Function Documentation

int parse_densities_buffer ( char *  buf,
size_t  len,
struct density_entry densities,
struct bu_vls result_str,
int *  num_densities 
)

Routine to parse a .density file

Definition at line 28 of file density.c.

References _ged_current_gedp, ANALYZE_ERROR, ANALYZE_OK, bu_realloc(), bu_strdup, bu_vls_printf(), DENSITY_MAGIC, ged::ged_result_str, density_entry::grams_per_cu_mm, density_entry::magic, magic, density_entry::name, and strchr().

Referenced by get_densities_from_database(), get_densities_from_file(), and main().

Here is the call graph for this function:

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

Definition at line 31 of file overlaps.c.

References BU_ALLOC, BU_LIST_FOR, BU_LIST_INSERT, bu_semaphore_acquire(), bu_semaphore_release(), bu_strcmp(), region_pair::coord, region_pair::count, GED_SEM_LIST, region_pair::l, region_pair::max_dist, region_pair::r, region_pair::r1, region_pair::r2, and region::reg_name.

Referenced by exposed_air(), hit(), and overlap().

Here is the call graph for this function:

void voxelize ( struct rt_i rtip,
fastf_t  sizeVoxel[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

Definition at line 147 of file voxels.c.

References application::a_hit, application::a_miss, application::a_onehit, application::a_ray, application::a_rt_i, application::a_uptr, BU_ASSERT_LONG, bu_calloc(), bu_free(), BU_FREE, create_boxes(), rayInfo::fillDistances, hit_voxelize(), rt_i::mdl_max, rt_i::mdl_min, voxelRegion::nextRegion, xray::r_dir, xray::r_pt, voxelRegion::regionDistance, rayInfo::regionList, voxelRegion::regionName, RT_APPLICATION_INIT, rt_prep_parallel(), rt_shootray(), rayInfo::sizeVoxel, and VSET.

Referenced by ged_voxelize().

Here is the call graph for this function:

void* diff_dp ( void *  result_in,
struct directory dp1,
struct directory dp2,
struct db_i dbip1,
struct db_i dbip2 
)

Analyze the difference between two directory objects

Returns a pointer to the results structure. If the first parameter is NULL, diff_dp will create a results structure - else, it uses the one provided. This allows a calling function to allocate a large number of result containers at once.

struct bu_ptbl* diff_dbip ( struct db_i dbip1,
struct db_i dbip2 
)

Analyze the difference between two database objects

Returns a bu_ptbl of results, which can be interpreted by diff_result and friends. To free the elements call diff_free_ptbl.

void diff_free ( void *  result)

Free diff result

void diff_free_ptbl ( struct bu_ptbl results_table)

Free diff results in a bu_ptbl

int diff_status ( void *  result)

Report on the status of the result object - 0 is OK, 1 means something went wrong with the diff.

diff_t diff_type ( void *  result)

Report on the type of diff result contained in the object

struct bu_attribute_value_set* diff_result ( void *  result,
diff_result_t  result_type 
)

Return the attribute/value set corresponding to a particular subgroup in the result, as enumerated by the diff_result_t types.

struct directory* diff_info_dp ( void *  result,
diff_obj_t  obj_type 
)

Return the directory pointer corresponding to either the original object or the object being compared to it.

struct rt_db_internal* diff_info_intern ( void *  result,
diff_obj_t  obj_type 
)

Return the rt_db_internal information for either the original object or the object being compared to it.