BRL-CAD
#include "common.h"
#include "bn/defines.h"
Include dependency graph for spm.h:

Go to the source code of this file.

Data Structures

struct  bn_spm_map_t
 

Macros

#define BN_SPM_MAP_NULL   (bn_spm_map_t *)0
 
#define BN_CK_SPM_MAP(_p)   BU_CKMAG(_p, BN_SPM_MAGIC, "bn_spm_map_t")
 

Functions

bn_spm_map_tbn_spm_init (int N, int elsize)
 Return a sphere map structure initialized for N points around the equator. More...
 
void bn_spm_free (bn_spm_map_t *mp)
 Free the storage associated with a sphere structure. More...
 
void bn_spm_read (register bn_spm_map_t *mapp, register unsigned char *valp, double u, double v)
 Read the value of the pixel at the given normalized (u, v) coordinates. It does NOT check the sanity of the coords. More...
 
void bn_spm_write (register bn_spm_map_t *mapp, register unsigned char *valp, double u, double v)
 Write the value of the pixel at the given normalized (u, v) coordinates. It does NOT check the sanity of the coords. More...
 
char * bn_spm_get (register bn_spm_map_t *mapp, double u, double v)
 Return a pointer to the storage element indexed by (u, v) coordinates. It does NOT check the sanity of the coords. More...
 
int bn_spm_load (bn_spm_map_t *mapp, char *filename)
 Read a saved sphere map from a file ("-" for stdin) into the given map structure. This does not check for conformity of size, etc. More...
 
int bn_spm_save (bn_spm_map_t *mapp, char *filename)
 Write a loaded sphere map to the given file ("-" for stdout). Returns -1 on error, else 0. More...
 
int bn_spm_pix_load (bn_spm_map_t *mapp, char *filename, int nx, int ny)
 Load an 'nx' by 'ny' pix file and filter it into the given sphere structure. More...
 
int bn_spm_pix_save (bn_spm_map_t *mapp, char *filename, int nx, int ny)
 Save a sphere structure as an 'nx' by 'ny' pix file. More...
 
void bn_spm_dump (bn_spm_map_t *mp, int verbose)
 Display a sphere structure on stderr. Used for debugging. More...