BRL-CAD
sh_treetherm.c File Reference
#include "common.h"
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "vmath.h"
#include "raytrace.h"
#include "optical.h"
#include "rtgeom.h"
Include dependency graph for sh_treetherm.c:

Go to the source code of this file.

Data Structures

struct  branch_seg
 
struct  thrm_seg
 
struct  tthrm_specific
 

Macros

#define tthrm_MAGIC   0x7468726d /* 'thrm' */
 
#define CK_tthrm_SP(_p)   BU_CKMAG(_p, tthrm_MAGIC, "tthrm_specific")
 
#define NUM_NODES   8
 
#define THRM_SEG_MAGIC   246127
 
#define CK_THRM_SEG(_p)   BU_CKMAG(_p, THRM_SEG_MAGIC, "thrm_seg")
 
#define SHDR_NULL   ((struct tthrm_specific *)0)
 
#define SHDR_O(m)   bu_offsetof(struct tthrm_specific, m)
 
#define CYL_DATA(_n)
 

Functions

HIDDEN int tthrm_setup (register struct region *rp, struct bu_vls *matparm, void **dpp, const struct mfuncs *mfp, struct rt_i *rtip)
 
HIDDEN int tthrm_render (struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
 
HIDDEN void tthrm_print (register struct region *rp, void *dp)
 
HIDDEN void tthrm_free (void *cp)
 
void print_thrm_seg (struct thrm_seg *ts)
 
void tree_parse (struct bu_list *br, union tree *tr)
 
void build_tree (struct bu_list *br, struct region *rp)
 

Variables

struct bu_structparse tthrm_parse []
 
struct mfuncs tthrm_mfuncs []
 

Macro Definition Documentation

#define tthrm_MAGIC   0x7468726d /* 'thrm' */

Definition at line 38 of file sh_treetherm.c.

Referenced by tthrm_setup().

#define CK_tthrm_SP (   _p)    BU_CKMAG(_p, tthrm_MAGIC, "tthrm_specific")

Definition at line 39 of file sh_treetherm.c.

Referenced by tthrm_render().

#define NUM_NODES   8

Definition at line 100 of file sh_treetherm.c.

Referenced by print_thrm_seg(), tthrm_render(), and tthrm_setup().

#define THRM_SEG_MAGIC   246127

Definition at line 101 of file sh_treetherm.c.

Referenced by tthrm_setup().

#define CK_THRM_SEG (   _p)    BU_CKMAG(_p, THRM_SEG_MAGIC, "thrm_seg")

Definition at line 102 of file sh_treetherm.c.

Referenced by print_thrm_seg(), and tthrm_render().

#define SHDR_NULL   ((struct tthrm_specific *)0)

Definition at line 131 of file sh_treetherm.c.

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

Definition at line 132 of file sh_treetherm.c.

#define CYL_DATA (   _n)
Value:
((float *) (&tt_data[ \
long_size + \
(_n) * (sizeof(short) + sizeof(float) * 4 * NUM_NODES) + \
sizeof(short) \
]))
#define NUM_NODES
Definition: sh_treetherm.c:100

Referenced by tthrm_setup().

Function Documentation

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

Definition at line 460 of file sh_treetherm.c.

References bn_mat_print(), bu_log(), tthrm_specific::tt_name, and tthrm_specific::tthrm_m_to_sh.

Referenced by tthrm_setup().

Here is the call graph for this function:

HIDDEN void tthrm_free ( void *  cp)

Definition at line 470 of file sh_treetherm.c.

References bu_free(), BU_PUT, tthrm_specific::magic, tthrm_specific::tt_name, and tthrm_specific::tt_segs.

Here is the call graph for this function:

void print_thrm_seg ( struct thrm_seg ts)

Definition at line 164 of file sh_treetherm.c.

References bu_log(), CK_THRM_SEG, thrm_seg::dir, thrm_seg::node, NUM_NODES, thrm_seg::pt, thrm_seg::temperature, V3ARGS, and thrm_seg::vect.

Referenced by tthrm_render().

Here is the call graph for this function:

void tree_parse ( struct bu_list br,
union tree tr 
)
void build_tree ( struct bu_list br,
struct region rp 
)

Definition at line 208 of file sh_treetherm.c.

References region::reg_treetop, and tree_parse().

Here is the call graph for this function:

Variable Documentation

struct bu_structparse tthrm_parse[]
Initial value:
= {
{"%f", 1, "l", SHDR_O(tt_min_temp), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%f", 1, "h", SHDR_O(tt_max_temp), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%s", 64, "file", SHDR_O(tt_name), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
}
#define SHDR_O(m)
Definition: sh_treetherm.c:132
#define BU_STRUCTPARSE_FUNC_NULL
Definition: parse.h:153

Definition at line 138 of file sh_treetherm.c.

struct mfuncs tthrm_mfuncs[]
Initial value:
= {
{MF_MAGIC, "tthrm", 0, MFI_NORMAL|MFI_HIT|MFI_UV, 0, tthrm_setup, tthrm_render, tthrm_print, tthrm_free },
{0, (char *)0, 0, 0, 0, 0, 0, 0, 0 }
}
#define MF_MAGIC
Definition: magic.h:205
HIDDEN void tthrm_print(register struct region *rp, void *dp)
Definition: sh_treetherm.c:460
HIDDEN int tthrm_setup(register struct region *rp, struct bu_vls *matparm, void **dpp, const struct mfuncs *mfp, struct rt_i *rtip)
Definition: sh_treetherm.c:220
HIDDEN int tthrm_render(struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
Definition: sh_treetherm.c:528
HIDDEN void tthrm_free(void *cp)
Definition: sh_treetherm.c:470

Definition at line 159 of file sh_treetherm.c.

Referenced by optical_shader_init().