BRL-CAD
sh_spm.c File Reference
#include "common.h"
#include <stddef.h>
#include <stdio.h>
#include <math.h>
#include "vmath.h"
#include "raytrace.h"
#include "fb.h"
#include "spm.h"
#include "optical.h"
Include dependency graph for sh_spm.c:

Go to the source code of this file.

Data Structures

struct  spm_specific
 

Macros

#define SPM_NAME_LEN   128
 
#define SP_NULL   ((struct spm_specific *)0)
 
#define SP_O(m)   bu_offsetof(struct spm_specific, m)
 

Functions

HIDDEN int spm_setup (register struct region *rp, struct bu_vls *matparm, void **dpp, const struct mfuncs *mfp, struct rt_i *rtip)
 
HIDDEN int spm_render (struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
 
HIDDEN void spm_print (register struct region *rp, void *dp)
 
HIDDEN void spm_mfree (void *cp)
 

Variables

struct bu_structparse spm_parse []
 
struct mfuncs spm_mfuncs []
 

Detailed Description

Spherical Data Structures/Texture Maps

Definition in file sh_spm.c.

Macro Definition Documentation

#define SPM_NAME_LEN   128

Definition at line 39 of file sh_spm.c.

#define SP_NULL   ((struct spm_specific *)0)

Definition at line 45 of file sh_spm.c.

#define SP_O (   m)    bu_offsetof(struct spm_specific, m)

Definition at line 46 of file sh_spm.c.

Function Documentation

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

Definition at line 112 of file sh_spm.c.

References bn_spm_init(), bn_spm_load(), BU_CK_VLS, BU_GET, BU_PUT, bu_struct_parse(), spm_specific::sp_file, spm_specific::sp_map, spm_specific::sp_w, and spm_mfree().

Here is the call graph for this function:

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

bn_spm_read(spp->sp_map, xxx);

Definition at line 72 of file sh_spm.c.

References BLU, GRN, RED, spm_specific::sp_map, and VSET.

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

Definition at line 144 of file sh_spm.c.

References bn_spm_dump(), bu_log(), bu_struct_print(), and spm_specific::sp_map.

Here is the call graph for this function:

HIDDEN void spm_mfree ( void *  cp)

Definition at line 93 of file sh_spm.c.

References bn_spm_free(), BU_PUT, and spm_specific::sp_map.

Referenced by spm_setup().

Here is the call graph for this function:

Variable Documentation

struct bu_structparse spm_parse[]
Initial value:
= {
{"%s", SPM_NAME_LEN, "file", SP_O(sp_file), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%d", 1, "w", SP_O(sp_w), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%d", 1, "n", SP_O(sp_w), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
}
#define SP_O(m)
Definition: sh_spm.c:46
#define SPM_NAME_LEN
Definition: sh_spm.c:39
#define BU_STRUCTPARSE_FUNC_NULL
Definition: parse.h:153

Definition at line 48 of file sh_spm.c.

struct mfuncs spm_mfuncs[]
Initial value:
= {
{MF_MAGIC, "spm", 0, MFI_UV, 0, spm_setup, spm_render, spm_print, spm_mfree },
{0, (char *)0, 0, 0, 0, 0, 0, 0, 0 }
}
HIDDEN void spm_print(register struct region *rp, void *dp)
Definition: sh_spm.c:144
#define MF_MAGIC
Definition: magic.h:205
HIDDEN void spm_mfree(void *cp)
Definition: sh_spm.c:93
HIDDEN int spm_render(struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
Definition: sh_spm.c:72
HIDDEN int spm_setup(register struct region *rp, struct bu_vls *matparm, void **dpp, const struct mfuncs *mfp, struct rt_i *rtip)
Definition: sh_spm.c:112

Definition at line 61 of file sh_spm.c.

Referenced by optical_shader_init().