BRL-CAD

#include <application.h>

Collaboration diagram for application:
[legend]

Data Fields

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

Detailed Description

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

When calling rt_shootray(), these fields are mandatory:

Field Description
a_ray.r_pt Starting point of ray to be fired
a_ray.r_dir UNIT VECTOR with direction to fire in (dir cosines)
a_hit() Routine to call when something is hit
a_miss() Routine to call when ray misses everything
a_rt_i The current struct rt_i instance, which must be set to the value returned by rt_dirbuild().

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

Field Description
a_resource Pointer to CPU-specific resources. Multi-CPU only.
a_overlap() DEPRECATED, set a_multioverlap() instead.

If non-null, this routine will be called to handle overlap conditions. See librt/bool.c for calling sequence. Return of 0 eliminates partition with overlap entirely Return of !0 retains one partition in output a_multioverlap() | Called when two or more regions overlap in a partition. Default behavior used if pointer not set. See librt/bool.c for calling sequence. a_level | Printed by librt on errors, but otherwise not used. a_x | Printed by librt on errors, but otherwise not used. a_y | Printed by librt on errors, but otherwise not used. a_purpose | Printed by librt on errors, but otherwise not used. a_rbeam | Used to compute beam coverage on geometry, a_diverge | for spline subdivision & many UV mappings.

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(), bu_calloc(), or BU_ALLOC().

Definition at line 99 of file application.h.

Field Documentation

◆ a_magic

uint32_t a_magic

Definition at line 100 of file application.h.

◆ a_ray

struct xray a_ray

Actual ray to be shot.

Definition at line 102 of file application.h.

◆ a_hit

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

called when shot hits model

Definition at line 103 of file application.h.

◆ a_miss

int(* a_miss) (struct application *)

called when shot misses

Definition at line 104 of file application.h.

◆ a_onehit

int a_onehit

flag to stop on first hit

Definition at line 105 of file application.h.

◆ a_ray_length

fastf_t a_ray_length

distance from ray start to end intersections

Definition at line 106 of file application.h.

◆ a_rt_i

struct rt_i* a_rt_i

this librt instance

Definition at line 107 of file application.h.

◆ a_zero1

int a_zero1

must be zero (sanity check)

Definition at line 108 of file application.h.

◆ a_resource

struct resource* a_resource

dynamic memory resources

Definition at line 110 of file application.h.

◆ a_overlap

int(* a_overlap) (struct application *, struct partition *, struct region *, struct region *, struct partition *)

DEPRECATED.

Definition at line 111 of file application.h.

◆ a_multioverlap

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

called to resolve overlaps

Definition at line 112 of file application.h.

◆ a_logoverlap

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

called to log overlaps

Definition at line 113 of file application.h.

◆ a_level

int a_level

recursion level (for printing)

Definition at line 114 of file application.h.

◆ a_x

int a_x

Screen X of ray, if applicable.

Definition at line 115 of file application.h.

◆ a_y

int a_y

Screen Y of ray, if applicable.

Definition at line 116 of file application.h.

◆ a_purpose

const char* a_purpose

Debug string: purpose of ray.

Definition at line 117 of file application.h.

◆ a_rbeam

fastf_t a_rbeam

initial beam radius (mm)

Definition at line 118 of file application.h.

◆ a_diverge

fastf_t a_diverge

slope of beam divergence/mm

Definition at line 119 of file application.h.

◆ a_return

int a_return

Return of a_hit()/a_miss()

Definition at line 120 of file application.h.

◆ a_no_booleans

int a_no_booleans

1= partitions==segs, no booleans

Definition at line 121 of file application.h.

◆ attrs

char** attrs

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

Definition at line 122 of file application.h.

◆ a_bot_reverse_normal_disabled

int a_bot_reverse_normal_disabled

1= no bot normals get reversed in BOT_UNORIENTED_NORM

Definition at line 125 of file application.h.

◆ a_pixelext

struct pixel_ext* a_pixelext

locations of pixel corners

Definition at line 129 of file application.h.

◆ a_finished_segs_hdp

struct seg* a_finished_segs_hdp

Definition at line 131 of file application.h.

◆ a_Final_Part_hdp

struct partition* a_Final_Part_hdp

Definition at line 132 of file application.h.

◆ a_inv_dir

vect_t a_inv_dir

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

Definition at line 133 of file application.h.

◆ a_user

int a_user

application-specific value

Definition at line 136 of file application.h.

◆ a_uptr

void* a_uptr

application-specific pointer

Definition at line 137 of file application.h.

◆ a_spectrum

struct bn_tabdata* a_spectrum

application-specific bn_tabdata pointer

Definition at line 138 of file application.h.

◆ a_color

fastf_t a_color[3]

application-specific color

Definition at line 139 of file application.h.

◆ a_dist

fastf_t a_dist

application-specific distance

Definition at line 140 of file application.h.

◆ a_uvec

vect_t a_uvec

application-specific vector

Definition at line 141 of file application.h.

◆ a_vvec

vect_t a_vvec

application-specific vector

Definition at line 142 of file application.h.

◆ a_refrac_index

fastf_t a_refrac_index

current index of refraction

Definition at line 143 of file application.h.

◆ a_cumlen

fastf_t a_cumlen

cumulative length of ray

Definition at line 144 of file application.h.

◆ a_flag

int a_flag

application-specific flag

Definition at line 145 of file application.h.

◆ a_zero2

int a_zero2

must be zero (sanity check)

Definition at line 146 of file application.h.


The documentation for this struct was generated from the following file: