#include <raytrace.h>
Collaboration diagram for application:
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_i * | a_rt_i |
this librt instance | |
int | a_zero1 |
must be zero (sanity check) | |
resource * | a_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_ext * | a_pixelext |
locations of pixel corners | |
seg * | a_finished_segs_hdp |
partition * | a_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_tabdata * | a_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) |
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.
|
called when shot hits model
|
|
called when shot misses
|
|
|
|
|
|
Definition at line 1631 of file raytrace.h. Referenced by wdb_rt_gettrees_cmd(). |
|
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(). |
|
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(). |
|
distance from ray start to end intersections
Definition at line 1637 of file raytrace.h. |
|
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(). |
|
must be zero (sanity check)
Definition at line 1639 of file raytrace.h. |
|
|
DEPRECATED.
Referenced by rt_default_multioverlap(). |
|
recursion level (for printing)
Definition at line 1651 of file raytrace.h. Referenced by rt_boolfinal(), and rt_shootray(). |
|
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(). |
|
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(). |
|
Debug string: purpose of ray.
Definition at line 1654 of file raytrace.h. Referenced by rt_shootray(), and wdb_rt_gettrees_cmd(). |
|
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(). |
|
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(). |
|
Return of a_hit()/a_miss().
Definition at line 1657 of file raytrace.h. |
|
1= partitions==segs, no booleans
Definition at line 1658 of file raytrace.h. Referenced by rt_boolweave(), and rt_tcl_rt_no_bool(). |
|
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. |
|
locations of pixel corners
Definition at line 1665 of file raytrace.h. |
|
Definition at line 1667 of file raytrace.h. |
|
Definition at line 1668 of file raytrace.h. |
|
filled in by rt_shootray(), inverse of ray direction cosines
Definition at line 1669 of file raytrace.h. Referenced by bend_pipe_shot(). |
|
application-specific value
Definition at line 1672 of file raytrace.h. Referenced by rt_smooth_bot(). |
|
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(). |
|
application-specific bn_tabdata prointer
Definition at line 1674 of file raytrace.h. |
|
application-specific color
Definition at line 1675 of file raytrace.h. |
|
application-specific distance
Definition at line 1676 of file raytrace.h. |
|
application-specific vector
Definition at line 1677 of file raytrace.h. |
|
application-specific vector
Definition at line 1678 of file raytrace.h. |
|
current index of refraction
Definition at line 1679 of file raytrace.h. |
|
cumulative length of ray
Definition at line 1680 of file raytrace.h. |
|
application-specific flag
Definition at line 1681 of file raytrace.h. |
|
must be zero (sanity check)
Definition at line 1682 of file raytrace.h. |