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

Go to the source code of this file.

Functions

void rt_pr_soltab (register const struct soltab *stp)
 
void rt_pr_region (register const struct region *rp)
 
void rt_pr_partitions (const struct rt_i *rtip, register const struct partition *phead, const char *title)
 
void rt_pr_pt_vls (struct bu_vls *v, const struct rt_i *rtip, register const struct partition *pp)
 
void rt_pr_pt (const struct rt_i *rtip, register const struct partition *pp)
 
void rt_pr_seg_vls (struct bu_vls *v, register const struct seg *segp)
 
void rt_pr_seg (register const struct seg *segp)
 
void rt_pr_hit (const char *str, register const struct hit *hitp)
 
void rt_pr_hit_vls (struct bu_vls *v, const char *str, register const struct hit *hitp)
 
void rt_pr_hitarray_vls (struct bu_vls *v, const char *str, register const struct hit *hitp, int count)
 
void rt_pr_tree (register const union tree *tp, int lvl)
 
void rt_pr_tree_vls (struct bu_vls *vls, register const union tree *tp)
 
char * rt_pr_tree_str (const union tree *tree)
 
void rt_pr_tree_val (register const union tree *tp, const struct partition *partp, int pr_name, int lvl)
 
void rt_pr_fallback_angle (struct bu_vls *str, const char *prefix, const double *angles)
 
void rt_find_fallback_angle (double *angles, const fastf_t *vec)
 
void rt_pr_tol (const struct bn_tol *tol)
 
void rt_pr_uvcoord (const struct uvcoord *uvp)
 

Detailed Description

Routines to print LIBRT data structures using bu_log().

Definition in file pr.c.

Function Documentation

void rt_pr_soltab ( register const struct soltab stp)

Definition at line 41 of file pr.c.

References bu_bomb(), bu_log(), bu_pr_ptbl(), directory::d_namep, rt_functab::ft_name, rt_functab::ft_print, ID_MAX_SOLID, OBJ, soltab::st_aradius, soltab::st_bit, soltab::st_bradius, soltab::st_center, soltab::st_dp, soltab::st_id, soltab::st_max, soltab::st_min, soltab::st_regions, and VPRINT.

Here is the call graph for this function:

void rt_pr_region ( register const struct region rp)
void rt_pr_partitions ( const struct rt_i rtip,
register const struct partition phead,
const char *  title 
)

Definition at line 98 of file pr.c.

References bu_log(), bu_log_indent_delta(), bu_log_indent_vls(), bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_strcat(), partition::pt_forw, RT_CHECK_PT, RT_CHECK_RTI, and rt_pr_pt_vls().

Here is the call graph for this function:

void rt_pr_pt_vls ( struct bu_vls v,
const struct rt_i rtip,
register const struct partition pp 
)
void rt_pr_pt ( const struct rt_i rtip,
register const struct partition pp 
)

Definition at line 185 of file pr.c.

References bu_log(), bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, RT_CHECK_PT, RT_CHECK_RTI, and rt_pr_pt_vls().

Here is the call graph for this function:

void rt_pr_seg_vls ( struct bu_vls v,
register const struct seg segp 
)

Definition at line 198 of file pr.c.

References BU_CK_VLS, bu_log_indent_vls(), bu_vls_printf(), directory::d_namep, hit::hit_dist, hit::hit_rayp, xray::index, RT_CK_SEG, seg::seg_in, seg::seg_out, seg::seg_stp, soltab::st_bit, and soltab::st_dp.

Referenced by rt_pr_pt_vls(), and rt_pr_seg().

Here is the call graph for this function:

void rt_pr_seg ( register const struct seg segp)

Definition at line 216 of file pr.c.

References bu_log(), bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, RT_CK_SEG, and rt_pr_seg_vls().

Here is the call graph for this function:

void rt_pr_hit ( const char *  str,
register const struct hit hitp 
)

Definition at line 229 of file pr.c.

References bu_log(), bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, RT_CK_HIT, and rt_pr_hit_vls().

Here is the call graph for this function:

void rt_pr_hit_vls ( struct bu_vls v,
const char *  str,
register const struct hit hitp 
)

Definition at line 242 of file pr.c.

References BU_CK_VLS, bu_log_indent_vls(), bu_vls_printf(), bu_vls_strcat(), hit::hit_dist, hit::hit_surfno, and RT_CK_HIT.

Referenced by rt_pr_hit(), and rt_pr_pt_vls().

Here is the call graph for this function:

void rt_pr_hitarray_vls ( struct bu_vls v,
const char *  str,
register const struct hit hitp,
int  count 
)

Definition at line 256 of file pr.c.

References BU_CK_VLS, bu_log_indent_vls(), bu_vls_printf(), bu_vls_strcat(), hit::hit_dist, hit::hit_surfno, and RT_CK_HIT.

Here is the call graph for this function:

void rt_pr_tree ( register const union tree tp,
int  lvl 
)

Warning: This function uses recursion rather than iteration and a stack, to preserve simplicity. On machines with limited stack space, such as the Gould, this subroutine may overwhelm the stack on complex expressions.

Definition at line 280 of file pr.c.

References bu_log(), directory::d_namep, db_pr_combined_tree_state(), OP_DB_LEAF, OP_GUARD, OP_INTERSECT, OP_NOP, OP_NOT, OP_REGION, OP_SOLID, OP_SUBTRACT, OP_UNION, OP_XNOP, OP_XOR, RT_CK_TREE, soltab::st_bit, soltab::st_dp, tree::tree_node::tb_left, tree::tree_node::tb_right, tree::tree_cts::tc_ctsp, tree::tree_db_leaf::tl_mat, tree::tree_db_leaf::tl_name, tree::tr_a, tree::tr_b, tree::tr_c, tree::tr_l, TREE_NULL, and tree::tree_leaf::tu_stp.

Here is the call graph for this function:

void rt_pr_tree_vls ( struct bu_vls vls,
register const union tree tp 
)

Produce a compact representation of this tree. The destination vls must be initialized by the caller.

Operations are responsible for generating white space.

Definition at line 367 of file pr.c.

References bu_free(), bu_log(), bu_vls_printf(), bu_vls_strcat(), combined_tree_state::cts_p, directory::d_namep, DB_OP_INTERSECT, DB_OP_SUBTRACT, DB_OP_UNION, db_path_to_string(), OP_DB_LEAF, OP_GUARD, OP_INTERSECT, OP_NOP, OP_NOT, OP_REGION, OP_SOLID, OP_SUBTRACT, OP_UNION, OP_XNOP, OP_XOR, soltab::st_dp, tree::tree_node::tb_left, tree::tree_node::tb_right, tree::tree_cts::tc_ctsp, tree::tree_db_leaf::tl_name, tree::tr_a, tree::tr_b, tree::tr_c, tree::tr_l, TREE_NULL, and tree::tree_leaf::tu_stp.

Referenced by rt_pr_region().

Here is the call graph for this function:

void rt_pr_tree_val ( register const union tree tp,
const struct partition partp,
int  pr_name,
int  lvl 
)

Print the actual values of the terms in a boolean expression.

The values for pr_name determine the printing action: 0 bit value 1 name 2 bit number

Definition at line 528 of file pr.c.

References bu_log(), BU_PTBL_FOR, directory::d_namep, DB_OP_INTERSECT, DB_OP_SUBTRACT, DB_OP_UNION, OP_GUARD, OP_INTERSECT, OP_NOT, OP_SOLID, OP_SUBTRACT, OP_UNION, OP_XOR, out, partition::pt_seglist, soltab::st_bit, soltab::st_dp, tree::tree_node::tb_left, tree::tree_node::tb_right, tree::tr_a, tree::tr_b, TREE_NULL, and tree::tree_leaf::tu_stp.

Here is the call graph for this function:

void rt_pr_fallback_angle ( struct bu_vls str,
const char *  prefix,
const double *  angles 
)

Definition at line 629 of file pr.c.

References BU_CK_VLS, and bu_vls_printf().

Here is the call graph for this function:

void rt_find_fallback_angle ( double *  angles,
const fastf_t vec 
)

In degrees.

Definition at line 645 of file pr.c.

References X, Y, and Z.

void rt_pr_uvcoord ( const struct uvcoord uvp)

Definition at line 725 of file pr.c.

References bu_log(), uvcoord::uv_du, uvcoord::uv_dv, uvcoord::uv_u, and uvcoord::uv_v.

Here is the call graph for this function: