BRL-CAD
bbox.c File Reference
#include "common.h"
#include <string.h>
#include "vmath.h"
#include "raytrace.h"
Include dependency graph for bbox.c:

Go to the source code of this file.

Macros

#define st   sv /* reuse the register */
 

Functions

int rt_bound_tree (const union tree *tp, fastf_t *tree_min, fastf_t *tree_max)
 
HIDDEN struct region_rt_getregion (struct rt_i *rtip, const char *reg_name)
 
int rt_rpp_region (struct rt_i *rtip, const char *reg_name, fastf_t *min_rpp, fastf_t *max_rpp)
 
int rt_in_rpp (struct xray *rp, register const fastf_t *invdir, register const fastf_t *min, register const fastf_t *max)
 
int rt_traverse_tree (struct rt_i *rtip, const union tree *tp, fastf_t *tree_min, fastf_t *tree_max)
 
int rt_bound_internal (struct db_i *dbip, struct directory *dp, point_t rpp_min, point_t rpp_max)
 

Detailed Description

Routines related to creating and processing bounding boxes.

Definition in file bbox.c.

Macro Definition Documentation

Function Documentation

int rt_bound_tree ( const union tree tp,
fastf_t tree_min,
fastf_t tree_max 
)

Definition at line 38 of file bbox.c.

References bu_log(), directory::d_namep, OP_INTERSECT, OP_NOP, OP_SOLID, OP_SUBTRACT, OP_UNION, OP_XOR, RT_CK_SOLTAB, RT_CK_TREE, soltab::st_aradius, soltab::st_dp, soltab::st_max, soltab::st_min, tree::tree_node::tb_left, tree::tree_node::tb_right, tree::tr_a, tree::tr_b, tree::tree_leaf::tu_stp, and VSETALL.

Referenced by rt_rpp_region().

Here is the call graph for this function:

HIDDEN struct region* _rt_getregion ( struct rt_i rtip,
const char *  reg_name 
)

Return a pointer to the corresponding region structure of the given region's name (reg_name), or REGION_NULL if it does not exist.

If the full path of a region is specified, then that one is returned. However, if only the database node name of the region is specified and that region has been referenced multiple time in the tree, then this routine will simply return the first one.

Definition at line 116 of file bbox.c.

References bu_basename(), bu_calloc(), bu_free(), BU_LIST_FOR, BU_STR_EQUAL, rt_i::HeadRegion, region::reg_name, REGION_NULL, and RT_CK_RTI.

Referenced by rt_rpp_region().

Here is the call graph for this function:

int rt_in_rpp ( struct xray rp,
register const fastf_t invdir,
register const fastf_t min,
register const fastf_t max 
)

Definition at line 163 of file bbox.c.

References MAX_FASTF, xray::r_max, xray::r_min, xray::r_pt, SMALL_FASTF, and st.

int rt_traverse_tree ( struct rt_i rtip,
const union tree tp,
fastf_t tree_min,
fastf_t tree_max 
)

Traverse the passed tree using rt_db_internals to show the way This function supports rt_bound_internal and is internal to librt

Returns - 0 success -1 failure (tree_min and tree_max may have been altered)

Definition at line 255 of file bbox.c.

References bu_log(), directory::d_namep, db_lookup(), ID_COMBINATION, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, LOOKUP_NOISY, LOOKUP_QUIET, OP_DB_LEAF, OP_INTERSECT, OP_NOP, OP_SOLID, OP_SUBTRACT, OP_UNION, OP_XOR, RT_CK_COMB, RT_CK_SOLTAB, RT_CK_TREE, rt_db_lookup_internal(), RT_DIR_NULL, rt_find_solid(), rt_uniresource, rt_i::rti_dbip, soltab::st_aradius, soltab::st_dp, soltab::st_max, soltab::st_min, tree::tree_node::tb_left, tree::tree_node::tb_right, tree::tree_db_leaf::tl_name, tree::tr_a, tree::tr_b, tree::tr_l, rt_comb_internal::tree, tree::tree_leaf::tu_stp, and VSETALL.

Referenced by rt_bound_internal().

Here is the call graph for this function: