bool.c File Reference

#include "common.h"
#include <stdio.h>
#include <strings.h>
#include "machine.h"
#include "vmath.h"
#include "raytrace.h"
#include "bu.h"
#include "./debug.h"

Include dependency graph for bool.c:

Go to the source code of this file.

Defines

#define FALSE   0
#define TRUE   1
#define HITS_TODO   (hits_needed - hits_avail)

Functions

void rt_grow_boolstack (struct resource *resp)
int rt_tree_max_raynum (register const union tree *, register const struct partition *)
int rt_bool_partition_eligible (register const struct bu_ptbl *, register const struct bu_bitv *, register const struct partition *)
int rt_booleval (register union tree *, struct partition *, struct region **, struct resource *)
void rt_weave0seg (struct seg *segp, struct partition *PartHdp, struct application *ap)
void rt_boolweave (struct seg *out_hd, struct seg *in_hd, struct partition *PartHdp, struct application *ap)
HIDDEN int _rt_defoverlap (register struct application *ap, register struct partition *pp, struct region *reg1, struct region *reg2, struct partition *pheadp, register int verbose)
int rt_defoverlap (register struct application *ap, register struct partition *pp, struct region *reg1, struct region *reg2, struct partition *pheadp)
int rt_overlap_quietly (register struct application *ap, register struct partition *pp, struct region *reg1, struct region *reg2, struct partition *pheadp)
void rt_get_region_seglist_for_partition (struct bu_ptbl *sl, const struct partition *pp, const struct region *regp)
void rt_fastgen_vol_vol_overlap (struct region **fr1, struct region **fr2, const struct partition *pp)
void rt_fastgen_plate_vol_overlap (struct region **fr1, struct region **fr2, struct partition *pp, struct application *ap)
void rt_default_multioverlap (struct application *ap, struct partition *pp, struct bu_ptbl *regiontable, struct partition *InputHdp)
void rt_silent_logoverlap (struct application *ap, const struct partition *pp, const struct bu_ptbl *regiontable, const struct partition *InputHdp)
void rt_default_logoverlap (struct application *ap, const struct partition *pp, const struct bu_ptbl *regiontable, const struct partition *InputHdp)
int rt_overlap_tables_equal (struct region *const *a, struct region *const *b)
int rt_boolfinal (struct partition *InputHdp, struct partition *FinalHdp, fastf_t startdist, fastf_t enddist, struct bu_ptbl *regiontable, struct application *ap, const struct bu_bitv *solidbits)
int rt_fdiff (double a, double b)
double rt_reldiff (double a, double b)
void rt_grow_boolstack (register struct resource *resp)
int rt_partition_len (const struct partition *partheadp)
int rt_tree_test_ready (register const union tree *tp, register const struct bu_bitv *solidbits, register const struct region *regionp, register const struct partition *pp)
void rt_rebuild_overlaps (struct partition *PartHdp, struct application *ap, int rebuild_fastgen_plates_only)


Detailed Description

Ray Tracing program, Boolean region evaluator.

Note to developers - Do not use the hit_point field in these routines, as for some solid types it has been filled in by the g_xxx_shot() routine, and for other solid types it may not have been. In particular, copying a garbage hit_point from a structure which has not yet been filled in, into a structure which won't be filled in again, gives wrong results. Thanks to Keith Bowman for finding this obscure bug.

Author - Michael John Muuss

Source - The U. S. Army Research Laboratory Aberdeen Proving Ground, Maryland 21005-5068 USA

Definition in file bool.c.


Define Documentation

#define FALSE   0
 

Definition at line 64 of file bool.c.

Referenced by dgo_nirt_cmd(), and rt_booleval().

#define TRUE   1
 

Definition at line 65 of file bool.c.

Referenced by dgo_nirt_cmd(), and rt_booleval().

#define HITS_TODO   (hits_needed - hits_avail)
 


Function Documentation

void rt_grow_boolstack struct resource resp  ) 
 

int rt_tree_max_raynum register const union tree ,
register const struct partition
 

Definition at line 2159 of file bool.c.

References bu_bomb(), BU_PTBL_FOR, hit::hit_rayp, xray::index, OP_INTERSECT, OP_NOP, OP_NOT, OP_SOLID, OP_SUBTRACT, OP_UNION, OP_XOR, RT_CK_PARTITION, RT_CK_TREE, and seg::seg_in.

Here is the call graph for this function:

int rt_bool_partition_eligible register const struct bu_ptbl ,
register const struct bu_bitv ,
register const struct partition
 

Definition at line 2125 of file bool.c.

References BU_CK_BITV, BU_CK_PTBL, BU_PTBL_FOR, region::reg_treetop, RT_CK_PT, RT_CK_REGION, and rt_tree_test_ready().

Here is the call graph for this function:

int rt_booleval register union tree ,
struct partition ,
struct region **  ,
struct resource
 

Definition at line 1768 of file bool.c.

References bu_log(), BU_PTBL_FOR, FALSE, MAX_PSW, OP_GUARD, OP_INTERSECT, OP_NOP, OP_NOT, OP_SOLID, OP_SUBTRACT, OP_UNION, OP_XNOP, OP_XOR, partition::pt_seglist, resource::re_boolstack, REGION_NULL, RT_CK_PT, RT_CK_RESOURCE, RT_CK_TREE, rt_grow_boolstack(), stack, tree::tree_node::tb_left, tree::tree_node::tb_right, tree::tr_b, tr_regionp, TREE_NULL, and TRUE.

Here is the call graph for this function:

void rt_weave0seg struct seg segp,
struct partition PartHdp,
struct application ap
 

Definition at line 90 of file bool.c.

References application::a_resource, application::a_rt_i, APPEND_PT, bu_log(), bu_ptbl_ins_unique(), DEBUG_PARTITION, bn_tol::dist, FAST, GET_PT_INIT, hit::hit_dist, hit::hit_surfno, NEAR_ZERO, partition::pt_forw, partition::pt_inhit, partition::pt_inseg, partition::pt_outhit, partition::pt_outseg, partition::pt_seglist, rt_bomb(), RT_CK_PT_HD, RT_CK_RESOURCE, RT_CK_RTI, RT_G_DEBUG, rt_i::rti_tol, seg::seg_in, seg::seg_out, and seg::seg_stp.

Referenced by rt_boolweave().

Here is the call graph for this function:

HIDDEN int _rt_defoverlap register struct application ap,
register struct partition pp,
struct region reg1,
struct region reg2,
struct partition pheadp,
register int  verbose
 

Definition at line 657 of file bool.c.

References region::reg_aircode, region::reg_bit, RT_CK_AP, RT_CK_PT, and RT_CK_REGION.

Referenced by rt_defoverlap(), and rt_overlap_quietly().

int rt_defoverlap register struct application ap,
register struct partition pp,
struct region reg1,
struct region reg2,
struct partition pheadp
 

Definition at line 697 of file bool.c.

References _rt_defoverlap().

Here is the call graph for this function:

int rt_overlap_quietly register struct application ap,
register struct partition pp,
struct region reg1,
struct region reg2,
struct partition pheadp
 

Definition at line 713 of file bool.c.

References _rt_defoverlap().

Here is the call graph for this function:

void rt_get_region_seglist_for_partition struct bu_ptbl sl,
const struct partition pp,
const struct region regp
 

Definition at line 731 of file bool.c.

References bu_bomb(), BU_PTBL_FOR, bu_ptbl_init(), bu_ptbl_ins_unique(), BU_PTBL_LEN, partition::pt_seglist, RT_CK_REGION, and RT_CK_SEG.

Referenced by rt_fastgen_vol_vol_overlap().

Here is the call graph for this function:

void rt_fastgen_vol_vol_overlap struct region **  fr1,
struct region **  fr2,
const struct partition pp
 

Definition at line 766 of file bool.c.

References bu_log(), BU_PTBL_FOR, bu_ptbl_free(), DEBUG_PARTITION, hit::hit_dist, MAX_FASTF, NULL, partition::pt_inhit, partition::pt_outhit, REGION_NULL, RT_CK_REGION, RT_CK_SEG, RT_G_DEBUG, rt_get_region_seglist_for_partition(), s1, and s2.

Here is the call graph for this function:

void rt_fastgen_plate_vol_overlap struct region **  fr1,
struct region **  fr2,
struct partition pp,
struct application ap
 

Definition at line 848 of file bool.c.

References application::a_resource, bu_log(), DEBUG_PARTITION, DEQUEUE_PT, FREE_PT, hit::hit_dist, partition::pt_back, PT_HD_MAGIC, partition::pt_inhit, partition::pt_magic, partition::pt_outhit, partition::pt_regionp, REGION_NULL, RT_CK_AP, RT_CK_PT, RT_CK_REGION, rt_fdiff(), and RT_G_DEBUG.

Here is the call graph for this function:

int rt_overlap_tables_equal struct region *const *  a,
struct region *const *  b
 

Definition at line 1225 of file bool.c.

References NULL.

void rt_grow_boolstack register struct resource resp  ) 
 

Definition at line 2025 of file bool.c.

References bu_malloc(), and rt_realloc.

Here is the call graph for this function:

int rt_tree_test_ready register const union tree tp,
register const struct bu_bitv solidbits,
register const struct region regionp,
register const struct partition pp
 

Definition at line 2077 of file bool.c.

References BU_BITTEST, BU_CK_BITV, OP_INTERSECT, OP_NOP, OP_NOT, OP_SOLID, OP_SUBTRACT, OP_UNION, OP_XOR, rt_bomb(), RT_CK_PT, RT_CK_REGION, and RT_CK_TREE.

Referenced by rt_bool_partition_eligible().

Here is the call graph for this function:


Generated on Mon Sep 18 01:25:04 2006 for BRL-CAD by  doxygen 1.4.6