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

Go to the source code of this file.

Data Structures

struct  fbm_specific
 

Macros

#define FBM_NULL   ((struct fbm_specific *)0)
 
#define FBM_O(m)   bu_offsetof(struct fbm_specific, m)
 

Functions

HIDDEN int fbm_setup (register struct region *rp, struct bu_vls *matparm, void **dpp, const struct mfuncs *mfp, struct rt_i *rtip)
 
HIDDEN int fbm_render (struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
 
HIDDEN void fbm_print (register struct region *rp, void *dp)
 
HIDDEN void fbm_free (void *cp)
 

Variables

struct bu_structparse fbm_parse []
 
struct mfuncs fbm_mfuncs []
 

Macro Definition Documentation

#define FBM_NULL   ((struct fbm_specific *)0)

Definition at line 59 of file sh_fbm.c.

#define FBM_O (   m)    bu_offsetof(struct fbm_specific, m)

Definition at line 60 of file sh_fbm.c.

Function Documentation

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

Definition at line 92 of file sh_fbm.c.

References BU_CK_VLS, BU_GET, bu_log(), bu_struct_parse(), bu_struct_print(), rdebug, RDEBUG_SHADE, and region::reg_name.

Here is the call graph for this function:

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

Definition at line 129 of file sh_fbm.c.

References bn_noise_vec(), bu_log(), bu_struct_print(), fbm_specific::distortion, rdebug, RDEBUG_SHADE, fbm_specific::scale, and V3ARGS.

Here is the call graph for this function:

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

Definition at line 115 of file sh_fbm.c.

References bu_struct_print(), and region::reg_name.

Here is the call graph for this function:

HIDDEN void fbm_free ( void *  cp)

Definition at line 122 of file sh_fbm.c.

References BU_PUT.

Variable Documentation

struct bu_structparse fbm_parse[]
Initial value:
= {
{"%g", 1, "lacunarity", FBM_O(lacunarity), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%g", 1, "H", FBM_O(h_val), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%g", 1, "octaves", FBM_O(octaves), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%g", 1, "gain", FBM_O(gain), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%g", 1, "distortion", FBM_O(distortion), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%g", 1, "l", FBM_O(lacunarity), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%d", 1, "o", FBM_O(octaves), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%g", 1, "g", FBM_O(gain), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%g", 1, "d", FBM_O(distortion), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%f", 3, "scale", FBM_O(scale), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
}
#define FBM_O(m)
Definition: sh_fbm.c:60
#define BU_STRUCTPARSE_FUNC_NULL
Definition: parse.h:153

Definition at line 62 of file sh_fbm.c.

struct mfuncs fbm_mfuncs[]
Initial value:
= {
{MF_MAGIC, "bump_fbm", 0, MFI_NORMAL|MFI_HIT|MFI_UV, 0,
{0, (char*)0, 0, 0, 0,
0, 0, 0, 0}
}
HIDDEN void fbm_free(void *cp)
Definition: sh_fbm.c:122
#define MF_MAGIC
Definition: magic.h:205
HIDDEN void fbm_print(register struct region *rp, void *dp)
Definition: sh_fbm.c:115
HIDDEN int fbm_setup(register struct region *rp, struct bu_vls *matparm, void **dpp, const struct mfuncs *mfp, struct rt_i *rtip)
Definition: sh_fbm.c:92
HIDDEN int fbm_render(struct application *ap, const struct partition *pp, struct shadework *swp, void *dp)
Definition: sh_fbm.c:129

Definition at line 82 of file sh_fbm.c.