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

Go to the source code of this file.

Macros

#define ELL_CIRCUMFERENCE(a, b)
 

Functions

short flip_short (short s)
 
fastf_t flip_dbfloat (dbfloat_t d)
 
void flip_fastf_float (fastf_t *ff, const dbfloat_t *fp, int n, int flip)
 
void flip_mat_dbmat (fastf_t *ff, const dbfloat_t *dbp, int flip)
 
void flip_dbmat_mat (dbfloat_t *dbp, const fastf_t *ff)
 
fastf_t ell_angle (fastf_t *p1, fastf_t a, fastf_t b, fastf_t dtol, fastf_t ntol)
 
const union cutterrt_advance_to_next_cell (struct rt_shootray_status *ssp)
 
void rt_plot_cell (const union cutter *cutp, struct rt_shootray_status *ssp, struct bu_list *waiting_segs_hd, struct rt_i *rtip)
 
fastf_t primitive_get_absolute_tolerance (const struct rt_tess_tol *ttol, fastf_t rel_to_abs)
 
fastf_t primitive_diagonal_samples (struct rt_db_internal *ip, const struct rt_view_info *info)
 
int approximate_parabolic_curve (struct rt_pt_node *pts, fastf_t p, int num_new_points)
 
fastf_t primitive_curve_count (struct rt_db_internal *ip, const struct rt_view_info *info)
 
int approximate_hyperbolic_curve (struct rt_pt_node *pts, fastf_t a, fastf_t b, int num_new_points)
 
void ellipse_point_at_radian (point_t result, const vect_t center, const vect_t axis_a, const vect_t axis_b, fastf_t radian)
 
void plot_ellipse (struct bu_list *vhead, const vect_t t, const vect_t a, const vect_t b, int num_points)
 
void bezier (point2d_t *V, int degree, double t, point2d_t *Left, point2d_t *Right, point2d_t eval_pt, point2d_t normal)
 
int bezier_roots (point2d_t *w, int degree, point2d_t **intercept, point2d_t **normal, point2d_t ray_start, point2d_t ray_dir, point2d_t ray_perp, int depth, fastf_t epsilon)
 
struct bezier_2d_list * bezier_subdivide (struct bezier_2d_list *bezier_hd, int degree, fastf_t epsilon, int depth)
 
int cyclic_path (const struct db_full_path *fp, const char *name)
 
int tcl_list_to_avs (const char *tcl_list, struct bu_attribute_value_set *avs, int offset)
 

Detailed Description

These are declarations for functions that are for internal use by LIBRT but are not public API. NO CODE outside of LIBRT should use these functions.

Non-public functions should NOT have an rt_*() or db_*() prefix. Consider using an rt, db, or other file-identifying prefix accordingly (e.g., ell_*() for functions defined in primitives/ell)

Definition in file librt_private.h.

Macro Definition Documentation

#define ELL_CIRCUMFERENCE (   a,
 
)
Value:
M_PI * ((a) + (b)) * \
(1.0 + (3.0 * ((((a) - b))/((a) + (b))) * ((((a) - b))/((a) + (b))))) \
/ (10.0 + sqrt(4.0 - 3.0 * ((((a) - b))/((a) + (b))) * ((((a) - b))/((a) + (b)))))
#define M_PI
Definition: fft.h:35

Definition at line 40 of file librt_private.h.

Referenced by rt_eto_surf_area(), and rt_tgc_surf_area().

Function Documentation

short flip_short ( short  s)

function similar to ntohs() but always flips the bytes. used for v4 compatibility.

Definition at line 47 of file db_flip.c.

References sval::c, sval::s, s, and OSL::Strings::v.

Referenced by db_scan(), rt_ars_import4(), rt_comb_import4(), and rt_nurb_import4().

fastf_t flip_dbfloat ( dbfloat_t  d)

function similar to ntohf() but always flips the types. used for v4 compatibility.

Definition at line 58 of file db_flip.c.

References val::c, val::f, and OSL::Strings::v.

Referenced by flip_fastf_float(), flip_mat_dbmat(), rt_ehy_import4(), rt_epa_import4(), rt_eto_import4(), rt_nurb_import4(), rt_rhc_import4(), rt_rpc_import4(), and rt_superell_import4().

void flip_fastf_float ( fastf_t ff,
const dbfloat_t *  fp,
int  n,
int  flip 
)

function that flips a dbfloat_t[3] vector into fastf_t[3]

Definition at line 74 of file db_flip.c.

References flip_dbfloat().

Referenced by ars_rd_curve(), rt_arb_import4(), rt_ehy_import4(), rt_ell_import4(), rt_epa_import4(), rt_eto_import4(), rt_fastf_float(), rt_grp_import4(), rt_hlf_import4(), rt_pg_import4(), rt_rhc_import4(), rt_rpc_import4(), rt_superell_import4(), rt_tgc_import4(), and rt_tor_import4().

Here is the call graph for this function:

void flip_mat_dbmat ( fastf_t ff,
const dbfloat_t *  dbp,
int  flip 
)

function that flips a dbfloat_t[16] matrix into fastf_t[16]

Definition at line 107 of file db_flip.c.

References flip_dbfloat().

Referenced by rt_comb_import4(), and rt_mat_dbmat().

Here is the call graph for this function:

void flip_dbmat_mat ( dbfloat_t *  dbp,
const fastf_t ff 
)

function that flips a fastf_t[16] matrix into dbfloat_t[16]

Definition at line 166 of file db_flip.c.

Referenced by rt_comb_export4(), and rt_dbmat_mat().

const union cutter* rt_advance_to_next_cell ( struct rt_shootray_status ssp)

used by rt_shootray_bundle() FIXME: non-public API shouldn't be using rt_ prefix

Referenced by rt_shootray_bundle().

void rt_plot_cell ( const union cutter cutp,
struct rt_shootray_status ssp,
struct bu_list waiting_segs_hd,
struct rt_i rtip 
)

used by rt_shootray_bundle() FIXME: non-public API shouldn't be using rt_ prefix

Referenced by rt_shootray_bundle().

fastf_t primitive_diagonal_samples ( struct rt_db_internal ip,
const struct rt_view_info info 
)

Gives a rough estimate of the maximum number of times a primitive's bounding box diagonal will be sampled based on the sample density of the view.

Practically, it is an estimate of the maximum number of pixels that would be used if the diagonal line were drawn in the current view window.

It is currently used in adaptive plot routines to help choose how many sample points should be used for plotted curves.

Definition at line 78 of file primitive_util.c.

References rt_functab::ft_bbox, rt_db_internal::idb_meth, rt_view_info::point_spacing, and rt_view_info::tol.

int approximate_parabolic_curve ( struct rt_pt_node pts,
fastf_t  p,
int  num_new_points 
)

Definition at line 178 of file primitive_util.c.

References BU_ALLOC, rt_pt_node::next, rt_pt_node::p, OSL::Strings::v, Y, and Z.

fastf_t primitive_curve_count ( struct rt_db_internal ip,
const struct rt_view_info info 
)

Estimate the number of evenly spaced cross-section curves needed to meet a target curve spacing.

Definition at line 100 of file primitive_util.c.

References rt_view_info::curve_spacing, rt_functab::ft_bbox, rt_db_internal::idb_meth, rt_view_info::tol, X, Y, and Z.

Referenced by rt_ell_adaptive_plot(), rt_eto_adaptive_plot(), rt_rhc_adaptive_plot(), rt_rpc_adaptive_plot(), and rt_tor_adaptive_plot().

int approximate_hyperbolic_curve ( struct rt_pt_node pts,
fastf_t  a,
fastf_t  b,
int  num_new_points 
)

Definition at line 278 of file primitive_util.c.

References BU_ALLOC, rt_pt_node::next, rt_pt_node::p, OSL::Strings::v, Y, and Z.

void ellipse_point_at_radian ( point_t  result,
const vect_t  center,
const vect_t  axis_a,
const vect_t  axis_b,
fastf_t  radian 
)
void plot_ellipse ( struct bu_list vhead,
const vect_t  t,
const vect_t  a,
const vect_t  b,
int  num_points 
)

Definition at line 355 of file primitive_util.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, ellipse_point_at_radian(), rt_pt_node::p, and RT_ADD_VLIST.

Referenced by rt_eto_adaptive_plot(), rt_tgc_adaptive_plot(), and rt_tor_adaptive_plot().

Here is the call graph for this function:

int tcl_list_to_avs ( const char *  tcl_list,
struct bu_attribute_value_set avs,
int  offset 
)

Function to convert an ft_get list of parameters into an avs.

Returns
0 if the conversion succeeds, -1 if it does not.

Definition at line 187 of file db_diff.c.

References bu_avs_add(), BU_AVS_INIT, and BU_AVS_IS_INITIALIZED.

Referenced by f_objparam(), and get_diff_components().

Here is the call graph for this function: