application Struct Reference
[librt geometry, raytracing]

This structure is the only parameter to rt_shootray(). The entire structure should be zeroed (e.g. by memset(,0,) ) before it is used the first time. More...

#include <raytrace.h>

Collaboration diagram for application:

Collaboration graph
[legend]

Public Member Functions

int a_hit BU_ARGS ((struct application *, struct partition *, struct seg *))
 called when shot hits model
int a_miss BU_ARGS ((struct application *))
 called when shot misses
void a_multioverlap BU_ARGS ((struct application *, struct partition *, struct bu_ptbl *, struct partition *))
void a_logoverlap BU_ARGS ((struct application *, const struct partition *, const struct bu_ptbl *, const struct partition *))

Data Fields

long a_magic
xray a_ray
 Actual ray to be shot.
int a_onehit
 flag to stop on first hit
fastf_t a_ray_length
 distance from ray start to end intersections
rt_ia_rt_i
 this librt instance
int a_zero1
 must be zero (sanity check)
resourcea_resource
 dynamic memory resources
int(* a_overlap )()
 DEPRECATED.
int a_level
 recursion level (for printing)
int a_x
 Screen X of ray, if applicable.
int a_y
 Screen Y of ray, if applicable.
char * a_purpose
 Debug string: purpose of ray.
fastf_t a_rbeam
 initial beam radius (mm)
fastf_t a_diverge
 slope of beam divergance/mm
int a_return
 Return of a_hit()/a_miss().
int a_no_booleans
 1= partitions==segs, no booleans
char ** attrs
 null terminated list of attributes This list should be the same as passed to rt_gettrees_and_attrs()
pixel_exta_pixelext
 locations of pixel corners
sega_finished_segs_hdp
partitiona_Final_Part_hdp
vect_t a_inv_dir
 filled in by rt_shootray(), inverse of ray direction cosines
int a_user
 application-specific value
genptr_t a_uptr
 application-specific pointer
bn_tabdataa_spectrum
 application-specific bn_tabdata prointer
fastf_t a_color [3]
 application-specific color
fastf_t a_dist
 application-specific distance
vect_t a_uvec
 application-specific vector
vect_t a_vvec
 application-specific vector
fastf_t a_refrac_index
 current index of refraction
fastf_t a_cumlen
 cumulative length of ray
int a_flag
 application-specific flag
int a_zero2
 must be zero (sanity check)

Detailed Description

This structure is the only parameter to rt_shootray(). The entire structure should be zeroed (e.g. by memset(,0,) ) before it is used the first time.

A P P L I C A T I O N

When calling rt_shootray(), these fields are mandatory:

In addition, these fields are used by the library. If they are set to zero, default behavior will be used.

Note that rt_shootray() returns the (int) return of the a_hit()/a_miss() function called, as well as placing it in a_return. A future "multiple rays at a time" interface will only provide a_return.

Note that the organization of this structure, and the details of the non-mandatory elements are subject to change in every release. Therefore, rather than using compile-time structure initialization, you should create a zeroed-out structure, and then assign the intended values at runtime. A zeroed structure can be obtained at compile time with "static struct application zero_ap;", or at run time by using "memset( (char *)ap, 0, sizeof(struct application) );" or bu_calloc( 1, sizeof(struct application), "application" ); While this practice may not work on machines where "all bits off" does not signify a floating point zero, BRL-CAD does not support any such machines, so this is a moot issue.

Definition at line 1630 of file raytrace.h.


Member Function Documentation

int a_hit BU_ARGS (struct application *, struct partition *, struct seg *)   ) 
 

called when shot hits model

int a_miss BU_ARGS (struct application *)   ) 
 

called when shot misses

void a_multioverlap BU_ARGS (struct application *, struct partition *, struct bu_ptbl *, struct partition *)   ) 
 

void a_logoverlap BU_ARGS (struct application *, const struct partition *, const struct bu_ptbl *, const struct partition *)   ) 
 


Field Documentation

long a_magic
 

Definition at line 1631 of file raytrace.h.

Referenced by wdb_rt_gettrees_cmd().

struct xray a_ray
 

Actual ray to be shot.

Definition at line 1633 of file raytrace.h.

Referenced by rt_advance_to_next_cell(), rt_arb_uv(), rt_boolweave(), rt_bot_piece_hitsegs(), rt_dsp_uv(), rt_find_backing_dist(), rt_shootray(), rt_smooth_bot(), rt_submodel_a_hit(), rt_submodel_shot(), rt_tcl_a_hit(), rt_tcl_cutter(), and rt_tcl_rt_shootray().

int a_onehit
 

flag to stop on first hit

Definition at line 1636 of file raytrace.h.

Referenced by rt_boolfinal(), rt_metaball_shot(), and rt_tcl_rt_onehit().

fastf_t a_ray_length
 

distance from ray start to end intersections

Definition at line 1637 of file raytrace.h.

struct rt_i* a_rt_i
 

this librt instance

Definition at line 1638 of file raytrace.h.

Referenced by dgo_E_cmd(), rt_advance_to_next_cell(), rt_arb_uv(), rt_ars_shot(), rt_boolfinal(), rt_boolweave(), rt_dsp_shot(), rt_find_backing_dist(), rt_nmg_shot(), rt_nurb_shot(), rt_pg_shot(), rt_plot_cell(), rt_rebuild_overlaps(), rt_rec_shot(), rt_shootray(), rt_smooth_bot(), rt_submodel_a_hit(), rt_submodel_shot(), rt_tcl_cutter(), rt_tcl_rt_check(), rt_tcl_rt_no_bool(), rt_tcl_rt_onehit(), rt_tcl_rt_prep(), rt_tcl_rt_shootray(), rt_tor_shot(), rt_weave0seg(), rt_xxx_shot(), and wdb_rt_gettrees_cmd().

int a_zero1
 

must be zero (sanity check)

Definition at line 1639 of file raytrace.h.

struct resource* a_resource
 

dynamic memory resources

Definition at line 1641 of file raytrace.h.

Referenced by classify_seg(), dgo_E_cmd(), do_intersect(), do_subtract(), do_union(), eliminate_overlaps(), eval_op(), free_etree(), isect_ray_snurb_face(), nmg_class_ray_vs_shell(), promote_ints(), rt_arb_shot(), rt_arb_uv(), rt_arbn_shot(), rt_boolweave(), rt_cline_shot(), rt_ebm_dda(), rt_ell_shot(), rt_epa_shot(), rt_fastgen_plate_vol_overlap(), rt_find_backing_dist(), rt_metaball_shot(), rt_nurb_shot(), rt_part_shot(), rt_pipe_shot(), rt_plot_cell(), rt_rebuild_overlaps(), rt_rec_shot(), rt_rhc_shot(), rt_rpc_shot(), rt_seg_planeclip(), rt_shoot_many_rays_worker(), rt_shootray(), rt_sph_shot(), rt_submodel_a_hit(), rt_submodel_shot(), rt_vol_shot(), rt_weave0seg(), shoot_and_plot(), and wdb_rt_gettrees_cmd().

int(* a_overlap)()
 

DEPRECATED.

Referenced by rt_default_multioverlap().

int a_level
 

recursion level (for printing)

Definition at line 1651 of file raytrace.h.

Referenced by rt_boolfinal(), and rt_shootray().

int a_x
 

Screen X of ray, if applicable.

Definition at line 1652 of file raytrace.h.

Referenced by rt_boolfinal(), rt_dsp_shot(), rt_nurb_shot(), rt_shoot_many_rays_worker(), and rt_shootray().

int a_y
 

Screen Y of ray, if applicable.

Definition at line 1653 of file raytrace.h.

Referenced by rt_boolfinal(), rt_dsp_shot(), rt_nurb_shot(), and rt_shootray().

char* a_purpose
 

Debug string: purpose of ray.

Definition at line 1654 of file raytrace.h.

Referenced by rt_shootray(), and wdb_rt_gettrees_cmd().

fastf_t a_rbeam
 

initial beam radius (mm)

Definition at line 1655 of file raytrace.h.

Referenced by rt_arb_uv(), rt_ars_uv(), rt_dsp_uv(), rt_ell_uv(), rt_hf_uv(), rt_hlf_uv(), rt_part_uv(), and rt_sph_uv().

fastf_t a_diverge
 

slope of beam divergance/mm

Definition at line 1656 of file raytrace.h.

Referenced by rt_arb_uv(), rt_ars_uv(), rt_dsp_uv(), rt_ell_uv(), rt_hf_uv(), rt_hlf_uv(), rt_part_uv(), and rt_sph_uv().

int a_return
 

Return of a_hit()/a_miss().

Definition at line 1657 of file raytrace.h.

int a_no_booleans
 

1= partitions==segs, no booleans

Definition at line 1658 of file raytrace.h.

Referenced by rt_boolweave(), and rt_tcl_rt_no_bool().

char** attrs
 

null terminated list of attributes This list should be the same as passed to rt_gettrees_and_attrs()

Definition at line 1659 of file raytrace.h.

struct pixel_ext* a_pixelext
 

locations of pixel corners

Definition at line 1665 of file raytrace.h.

struct seg* a_finished_segs_hdp
 

Definition at line 1667 of file raytrace.h.

struct partition* a_Final_Part_hdp
 

Definition at line 1668 of file raytrace.h.

vect_t a_inv_dir
 

filled in by rt_shootray(), inverse of ray direction cosines

Definition at line 1669 of file raytrace.h.

Referenced by bend_pipe_shot().

int a_user
 

application-specific value

Definition at line 1672 of file raytrace.h.

Referenced by rt_smooth_bot().

genptr_t a_uptr
 

application-specific pointer

Definition at line 1673 of file raytrace.h.

Referenced by rt_smooth_bot(), rt_submodel_a_hit(), rt_tcl_a_hit(), and rt_tcl_rt_shootray().

struct bn_tabdata* a_spectrum
 

application-specific bn_tabdata prointer

Definition at line 1674 of file raytrace.h.

fastf_t a_color[3]
 

application-specific color

Definition at line 1675 of file raytrace.h.

fastf_t a_dist
 

application-specific distance

Definition at line 1676 of file raytrace.h.

vect_t a_uvec
 

application-specific vector

Definition at line 1677 of file raytrace.h.

vect_t a_vvec
 

application-specific vector

Definition at line 1678 of file raytrace.h.

fastf_t a_refrac_index
 

current index of refraction

Definition at line 1679 of file raytrace.h.

fastf_t a_cumlen
 

cumulative length of ray

Definition at line 1680 of file raytrace.h.

int a_flag
 

application-specific flag

Definition at line 1681 of file raytrace.h.

int a_zero2
 

must be zero (sanity check)

Definition at line 1682 of file raytrace.h.


The documentation for this struct was generated from the following file:
Generated on Mon Sep 18 01:25:10 2006 for BRL-CAD by  doxygen 1.4.6