BRL-CAD
application_bundle Struct Reference

#include <raytrace.h>

Collaboration diagram for application_bundle:
[legend]

Data Fields

uint32_t b_magic
 
struct xrays b_rays
 Actual bundle of rays to be shot. More...
 
struct application b_ap
 application setting to be applied to each ray More...
 
int(* b_hit )(struct application_bundle *, struct partition_bundle *)
 called when bundle hits model More...
 
int(* b_miss )(struct application_bundle *)
 called when entire bundle misses More...
 
int b_user
 application_bundle-specific value More...
 
void * b_uptr
 application_bundle-specific pointer More...
 
int b_return
 

Detailed Description

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

When calling rt_shootrays(), these fields are mandatory:

 - b_ap     Members in this single ray application structure should
    be set in a similar fashion as when used with
    rt_shootray() with the exception of a_hit() and
    a_miss(). Default implementations of these routines
    are provided that simple update hit/miss counters and
    attach the hit partitions and segments to the
    partition_bundle structure. Users can still override
    this default functionality but have to make sure to
    move the partition and segment list to the new
    partition_bundle structure.
 - b_hit() Routine to call when something is hit by the ray bundle.
 - b_miss() Routine to call when ray bundle misses everything.

Note that rt_shootrays() returns the (int) return of the b_hit()/b_miss() function called, as well as placing it in b_return.

An integer field b_user and a void *field b_uptr are provided in the structure for custom user data.

Definition at line 1658 of file raytrace.h.

Field Documentation

uint32_t b_magic

Definition at line 1660 of file raytrace.h.

struct xrays b_rays

Actual bundle of rays to be shot.

Definition at line 1662 of file raytrace.h.

Referenced by rt_shootrays().

struct application b_ap

application setting to be applied to each ray

Definition at line 1663 of file raytrace.h.

Referenced by rt_shootrays().

int(* b_hit) (struct application_bundle *, struct partition_bundle *)

called when bundle hits model

Definition at line 1664 of file raytrace.h.

Referenced by rt_shootrays().

int(* b_miss) (struct application_bundle *)

called when entire bundle misses

Definition at line 1665 of file raytrace.h.

Referenced by rt_shootrays().

int b_user

application_bundle-specific value

Definition at line 1666 of file raytrace.h.

void* b_uptr

application_bundle-specific pointer

Definition at line 1667 of file raytrace.h.

Referenced by rt_shootrays().

int b_return

Definition at line 1668 of file raytrace.h.

Referenced by rt_shootrays().


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