BRL-CAD
sh_air.c File Reference
#include "common.h"
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "bu/units.h"
#include "vmath.h"
#include "raytrace.h"
#include "optical.h"
Include dependency graph for sh_air.c:

Go to the source code of this file.

Data Structures

struct  air_specific
 

Macros

#define AIR_MAGIC   0x41697200 /* "Air" */
 
#define CK_AIR_SP(_p)   BU_CKMAG(_p, AIR_MAGIC, "air_specific")
 
#define SHDR_NULL   ((struct air_specific *)0)
 
#define SHDR_O(m)   bu_offsetof(struct air_specific, m)
 
#define meters_to_millimeters   0.001
 

Functions

HIDDEN int air_setup (register struct region *rp, struct bu_vls *matparm, void **dpp, const struct mfuncs *mfp, struct rt_i *rtip)
 
HIDDEN int airtest_render (struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
 
HIDDEN int air_render (struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
 
HIDDEN int emist_render (struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
 
HIDDEN int tmist_render (struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
 
HIDDEN void air_print (register struct region *rp, void *dp)
 
HIDDEN void air_free (void *cp)
 
int tmist_hit (register struct application *ap, struct partition *PartHeadp, struct seg *segHeadp)
 
int tmist_miss (register struct application *ap)
 
int emist_fbm_render (struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
 

Variables

struct bu_structparse air_parse []
 
struct mfuncs air_mfuncs []
 

Macro Definition Documentation

#define AIR_MAGIC   0x41697200 /* "Air" */

Definition at line 37 of file sh_air.c.

#define CK_AIR_SP (   _p)    BU_CKMAG(_p, AIR_MAGIC, "air_specific")

Definition at line 45 of file sh_air.c.

Referenced by air_render(), airtest_render(), emist_render(), and tmist_render().

#define SHDR_NULL   ((struct air_specific *)0)

Definition at line 56 of file sh_air.c.

#define SHDR_O (   m)    bu_offsetof(struct air_specific, m)

Definition at line 57 of file sh_air.c.

#define meters_to_millimeters   0.001

Function Documentation

HIDDEN int air_setup ( register struct region rp,
struct bu_vls matparm,
void **  dpp,
const struct mfuncs *  mfp,
struct rt_i rtip 
)

Definition at line 123 of file sh_air.c.

References air_print(), bu_bomb(), BU_CK_VLS, BU_GET, bu_log(), bu_struct_parse(), bu_vls_addr(), rdebug, RDEBUG_SHADE, region::reg_aircode, region::reg_name, RT_CHECK_RTI, and RT_CK_REGION.

Here is the call graph for this function:

int airtest_render ( struct application ap,
const struct partition pp,
struct shadework *  swp,
void *  dp 
)

Definition at line 178 of file sh_air.c.

References bu_log(), bu_struct_print(), CK_AIR_SP, hit::hit_dist, partition::pt_inhit, partition::pt_outhit, rdebug, RDEBUG_SHADE, RT_AP_CHECK, and RT_CHECK_PT.

Here is the call graph for this function:

int air_render ( struct application ap,
const struct partition pp,
struct shadework *  swp,
void *  dp 
)

Definition at line 209 of file sh_air.c.

References application::a_ray, bu_log(), bu_struct_print(), CK_AIR_SP, air_specific::d_p_mm, hit::hit_dist, partition::pt_inhit, partition::pt_outhit, xray::r_pt, rdebug, RDEBUG_SHADE, rr_render(), RT_AP_CHECK, RT_CHECK_PT, and V3ARGS.

Here is the call graph for this function:

int emist_render ( struct application ap,
const struct partition pp,
struct shadework *  swp,
void *  dp 
)

Definition at line 378 of file sh_air.c.

References application::a_ray, bu_log(), CK_AIR_SP, air_specific::d_p_mm, air_specific::delta, hit::hit_dist, partition::pt_inhit, partition::pt_outhit, xray::r_dir, xray::r_pt, rdebug, RDEBUG_SHADE, RT_AP_CHECK, RT_CHECK_PT, air_specific::scale, Z, and ZERO.

Here is the call graph for this function:

int tmist_render ( struct application ap,
const struct partition pp,
struct shadework *  swp,
void *  dp 
)

Definition at line 290 of file sh_air.c.

References application::a_hit, application::a_logoverlap, application::a_miss, application::a_onehit, application::a_ray, application::a_uptr, bu_log(), CK_AIR_SP, hit::hit_dist, partition::pt_inhit, partition::pt_outhit, xray::r_dir, xray::r_pt, rdebug, RDEBUG_SHADE, RT_AP_CHECK, RT_APPLICATION_INIT, RT_CHECK_PT, rt_shootray(), tmist_hit(), tmist_miss(), and VSET.

Here is the call graph for this function:

HIDDEN void air_print ( register struct region rp,
void *  dp 
)

Definition at line 158 of file sh_air.c.

References bu_struct_print(), and region::reg_name.

Referenced by air_setup().

Here is the call graph for this function:

HIDDEN void air_free ( void *  cp)

Definition at line 165 of file sh_air.c.

References bu_log(), BU_PUT, rdebug, and RDEBUG_SHADE.

Here is the call graph for this function:

int tmist_hit ( register struct application ap,
struct partition PartHeadp,
struct seg segHeadp 
)

Definition at line 261 of file sh_air.c.

Referenced by tmist_render().

int tmist_miss ( register struct application ap)

Definition at line 273 of file sh_air.c.

Referenced by tmist_render().

int emist_fbm_render ( struct application ap,
const struct partition pp,
struct shadework *  swp,
void *  dp 
)

Variable Documentation

struct bu_structparse air_parse[]
Initial value:
= {
{"%g", 1, "dpm", SHDR_O(d_p_mm), dpm_hook, NULL, NULL },
{"%g", 1, "scale", SHDR_O(scale), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%g", 1, "s", SHDR_O(scale), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%g", 1, "delta", SHDR_O(delta), bu_mm_cvt, NULL, NULL },
{"%f", 1, "d", SHDR_O(delta), bu_mm_cvt, NULL, NULL },
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
}
#define SHDR_O(m)
Definition: sh_air.c:57
void bu_mm_cvt(const struct bu_structparse *sdp, const char *name, void *base, const char *value, void *data)
Definition: units.c:386
#define BU_STRUCTPARSE_FUNC_NULL
Definition: parse.h:153
HIDDEN const point_t delta
Definition: sh_prj.c:618

Definition at line 62 of file sh_air.c.

struct mfuncs air_mfuncs[]
Initial value:
= {
{MF_MAGIC, "airtest", 0, MFI_HIT, MFF_PROC,
{MF_MAGIC, "air", 0, MFI_HIT, MFF_PROC,
{MF_MAGIC, "fog", 0, MFI_HIT, MFF_PROC,
{MF_MAGIC, "emist", 0, MFI_HIT, MFF_PROC,
{MF_MAGIC, "tmist", 0, MFI_HIT, MFF_PROC,
{0, (char *)0, 0, 0, 0,
0, 0, 0, 0 }
}
HIDDEN int air_render(struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
Definition: sh_air.c:209
#define MF_MAGIC
Definition: magic.h:205
HIDDEN void air_print(register struct region *rp, void *dp)
Definition: sh_air.c:158
HIDDEN int emist_render(struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
Definition: sh_air.c:378
HIDDEN int airtest_render(struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
Definition: sh_air.c:178
HIDDEN int air_setup(register struct region *rp, struct bu_vls *matparm, void **dpp, const struct mfuncs *mfp, struct rt_i *rtip)
Definition: sh_air.c:123
HIDDEN void air_free(void *cp)
Definition: sh_air.c:165
HIDDEN int tmist_render(struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
Definition: sh_air.c:290

Definition at line 80 of file sh_air.c.

Referenced by optical_shader_init().