refract.c File Reference
#include "common.h"
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "bu/sort.h"
#include "bu/parallel.h"
#include "vmath.h"
#include "mater.h"
#include "raytrace.h"
#include "optical.h"
#include "plot3.h"
Include dependency graph for refract.c:

Go to the source code of this file.


#define MSG_PROLOGUE   20 /* # initial messages to see */
#define MSG_INTERVAL   4000 /* message interval thereafter */
#define RI_AIR   1.0 /* Refractive index of air */
#define AIR_GAP_TOL   0.01 /* Max permitted air gap for RI tracking */


int viewshade (struct application *ap, register const struct partition *pp, register struct shadework *swp)
HIDDEN int rr_miss (struct application *ap)
HIDDEN int rr_hit (struct application *ap, struct partition *PartHeadp, struct seg *segp)
HIDDEN int rr_refract (vect_t v_1, vect_t norml, double ri_1, double ri_2, vect_t v_2)
int rr_render (register struct application *ap, const struct partition *pp, struct shadework *swp)


int max_ireflect = 5
int max_bounces = 5
vect_t background

Macro Definition Documentation

#define MSG_PROLOGUE   20 /* # initial messages to see */

Definition at line 47 of file refract.c.

Referenced by rr_render().

#define MSG_INTERVAL   4000 /* message interval thereafter */

Definition at line 48 of file refract.c.

Referenced by rr_render().

#define RI_AIR   1.0 /* Refractive index of air */

Definition at line 50 of file refract.c.

Referenced by rr_hit(), and rr_render().

#define AIR_GAP_TOL   0.01 /* Max permitted air gap for RI tracking */

Definition at line 52 of file refract.c.

Referenced by rr_hit(), and rr_render().

Function Documentation

int viewshade ( struct application ap,
register const struct partition pp,
register struct shadework *  swp 

Referenced by rr_hit().

HIDDEN int rr_miss ( struct application ap)

Definition at line 63 of file refract.c.

References RT_AP_CHECK.

Referenced by rr_render().

HIDDEN int rr_refract ( vect_t  v_1,
vect_t  norml,
double  ri_1,
double  ri_2,
vect_t  v_2 

Definition at line 305 of file refract.c.

References bu_log(), NEAR_ZERO, R_DEBUG, RDEBUG_REFRACT, and OSL::Strings::u.

Referenced by rr_render().

Here is the call graph for this function:

int rr_render ( register struct application ap,
const struct partition pp,
struct shadework *  swp 

Definition at line 356 of file refract.c.

References application::a_color, application::a_cumlen, application::a_diverge, application::a_flag, application::a_hit, application::a_level, application::a_logoverlap, application::a_miss, application::a_onehit, application::a_purpose, application::a_ray, application::a_rbeam, application::a_refrac_index, application::a_rt_i, application::a_spectrum, application::a_uptr, application::a_user, application::a_uvec, application::a_vvec, application::a_x, application::a_y, AIR_GAP_TOL, BN_CK_TABDATA, BN_GET_TABDATA, bn_tabdata_constval(), bn_tabdata_copy(), bn_tabdata_dup(), bn_tabdata_get_constval(), bn_tabdata_join2(), bn_tabdata_mul(), BN_TABDATA_NULL, bn_tabdata_scale(), bn_tabdata_to_tcl(), bu_bomb(), bu_free(), bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_strcat(), code(), hit::hit_dist, max_bounces, max_ireflect, MSG_INTERVAL, MSG_PROLOGUE, NEAR_ZERO, out, pdv_3line(), pl_color(), partition::pt_inhit, partition::pt_regionp, R_DEBUG, xray::r_dir, xray::r_pt, RDEBUG_RAYPLOT, RDEBUG_RAYWRITE, RDEBUG_REFRACT, RDEBUG_SHOWERR, region::reg_name, RI_AIR, rr_hit(), rr_miss(), rr_refract(), RT_AP_CHECK, RT_APPLICATION_INIT, rt_shootray(), rt_i::rti_radius, shade_inputs(), spectrum, bn_tabdata::table, V3ARGS, VPRINT, VSET, VSETALL, wraypts(), and ZERO.

Here is the call graph for this function: