BRL-CAD
mater.c File Reference
#include "common.h"
#include "bio.h"
#include "vmath.h"
#include "raytrace.h"
#include "mater.h"
Include dependency graph for mater.c:

Go to the source code of this file.

Functions

void rt_pr_mater (register const struct mater *mp)
 
HIDDEN void _rt_check_overlap (struct mater *newp)
 
void rt_insert_color (struct mater *newp)
 
void rt_color_addrec (int low, int hi, int r, int g, int b, off_t addr)
 
void rt_region_color_map (register struct region *regp)
 
void rt_vls_color_map (struct bu_vls *str)
 
struct mater * rt_material_head (void)
 
void rt_new_material_head (struct mater *newmat)
 
struct mater * rt_dup_material_head (void)
 
void rt_color_free (void)
 

Detailed Description

Code to deal with establishing and maintaining the tables which map region ID codes into worthwhile material information (colors and outboard database "handles").

These really are "db_" routines, more fundamental than "rt_".

Definition in file mater.c.

Function Documentation

void rt_pr_mater ( register const struct mater *  mp)

Definition at line 51 of file mater.c.

References bu_log().

Referenced by _rt_check_overlap(), and rt_insert_color().

Here is the call graph for this function:

HIDDEN void _rt_check_overlap ( struct mater *  newp)

Definition at line 59 of file mater.c.

References bu_free(), bu_log(), and rt_pr_mater().

Referenced by rt_insert_color().

Here is the call graph for this function:

void rt_insert_color ( struct mater *  newp)

While any additional database records are created and written here, it is the responsibility of the caller to color_putrec(newp) if needed.

Definition at line 95 of file mater.c.

References _rt_check_overlap(), BU_ALLOC, bu_free(), bu_log(), and rt_pr_mater().

Referenced by ged_color(), and rt_color_addrec().

Here is the call graph for this function:

void rt_color_addrec ( int  low,
int  hi,
int  r,
int  g,
int  b,
off_t  addr 
)

Called from db_scan() when initially scanning database.

Definition at line 176 of file mater.c.

References BU_ALLOC, and rt_insert_color().

Referenced by db5_import_color_table(), and db_scan().

Here is the call graph for this function:

void rt_region_color_map ( register struct region regp)

If the GIFT regionid of this region falls into a mapped area of regionid-driven color override.

Definition at line 196 of file mater.c.

References bu_log(), mater_info::ma_color, mater_info::ma_color_valid, region::reg_mater, region::reg_regionid, and REGION_NULL.

Referenced by _rt_gettree_region_end().

Here is the call graph for this function:

void rt_vls_color_map ( struct bu_vls str)

Definition at line 221 of file mater.c.

References BU_CK_VLS, and bu_vls_printf().

Referenced by db5_export_color_table(), and ged_color().

Here is the call graph for this function:

struct mater* rt_material_head ( void  )

returns the material linked list head node

Definition at line 243 of file mater.c.

Referenced by ged_color(), ged_open(), ged_prcolor(), ged_reopen(), and rt_comb_get_color().

void rt_new_material_head ( struct mater *  newmat)

set the material linked list head node

Definition at line 253 of file mater.c.

Referenced by ged_open(), ged_reopen(), and main().

struct mater* rt_dup_material_head ( void  )

returns a copy of the material linked list head node

Definition at line 263 of file mater.c.

References BU_ALLOC.

void rt_color_free ( void  )

Really should be db_color_free(). Called from db_close().

Definition at line 294 of file mater.c.

References bu_free().

Referenced by db_close(), and ged_dbcopy().

Here is the call graph for this function: