BRL-CAD
sh_temp.c File Reference
#include "common.h"
#include <stddef.h>
#include <stdio.h>
#include <ctype.h>
#include "bu/cv.h"
#include "vmath.h"
#include "raytrace.h"
#include "optical.h"
Include dependency graph for sh_temp.c:

Go to the source code of this file.

Data Structures

struct  temp_specific
 

Macros

#define TXT_NAME_LEN   128
 
#define TX_NULL   ((struct temp_specific *)0)
 
#define TX_O(m)   bu_offsetof(struct temp_specific, m)
 

Functions

HIDDEN int temp_setup (register struct region *rp, struct bu_vls *matparm, void **dp, const struct mfuncs *mfp, struct rt_i *rtip)
 
HIDDEN int temp_render (struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
 
HIDDEN void temp_print (register struct region *rp, void *dp)
 
HIDDEN void temp_free (void *cp)
 
int mlib_zero ()
 
int mlib_one ()
 
void mlib_void ()
 

Variables

struct region env_region
 
struct mfuncs temp_mfuncs []
 
struct bu_structparse temp_parse []
 

Detailed Description

Temperature map lookup. Based upon liboptical/sh_text.c

Definition in file sh_temp.c.

Macro Definition Documentation

#define TXT_NAME_LEN   128

Definition at line 56 of file sh_temp.c.

#define TX_NULL   ((struct temp_specific *)0)

Definition at line 63 of file sh_temp.c.

#define TX_O (   m)    bu_offsetof(struct temp_specific, m)

Definition at line 64 of file sh_temp.c.

Function Documentation

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

Definition at line 225 of file sh_temp.c.

References BU_CK_VLS, BU_GET, bu_log(), bu_open_mapped_file(), BU_PUT, bu_struct_parse(), bu_mapped_file::buflen, temp_specific::mp, bu_mapped_file::name, region::reg_name, temp_specific::t_file, temp_specific::t_n, and temp_specific::t_w.

Here is the call graph for this function:

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

Definition at line 83 of file sh_temp.c.

References application::a_x, application::a_y, bu_cv_ntohd(), bu_log(), bu_mapped_file::buf, temp_specific::mp, partition::pt_inseg, rdebug, RDEBUG_SHADE, rr_render(), seg::seg_stp, temp_specific::t_file, temp_specific::t_n, and temp_specific::t_w.

Here is the call graph for this function:

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

Definition at line 266 of file sh_temp.c.

References bu_struct_print(), region::reg_name, and region::reg_udata.

Here is the call graph for this function:

HIDDEN void temp_free ( void *  cp)

Definition at line 273 of file sh_temp.c.

References bu_close_mapped_file(), BU_PUT, and temp_specific::mp.

Here is the call graph for this function:

int mlib_zero ( )
int mlib_one ( )
void mlib_void ( )

Variable Documentation

struct mfuncs temp_mfuncs[]
Initial value:
= {
{MF_MAGIC, "temp", 0, MFI_UV, 0, temp_setup, temp_render, temp_print, temp_free },
{0, (char *)0, 0, 0, 0, 0, 0, 0, 0 }
}
#define MF_MAGIC
Definition: magic.h:205
HIDDEN int temp_setup(register struct region *rp, struct bu_vls *matparm, void **dp, const struct mfuncs *mfp, struct rt_i *rtip)
Definition: sh_temp.c:225
HIDDEN void temp_free(void *cp)
Definition: sh_temp.c:273
HIDDEN void temp_print(register struct region *rp, void *dp)
Definition: sh_temp.c:266
HIDDEN int temp_render(struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
Definition: sh_temp.c:83

Definition at line 50 of file sh_temp.c.

struct bu_structparse temp_parse[]
Initial value:
= {
{"%s", TXT_NAME_LEN, "file", TX_O(t_file), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%d", 1, "w", TX_O(t_w), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%d", 1, "n", TX_O(t_n), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%d", 1, "l", TX_O(t_n), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
}
#define TX_O(m)
Definition: sh_temp.c:64
#define BU_STRUCTPARSE_FUNC_NULL
Definition: parse.h:153
#define TXT_NAME_LEN
Definition: sh_temp.c:56

Definition at line 66 of file sh_temp.c.