44#define BN_SPM_MAP_NULL (bn_spm_map_t *)0
45#define BN_CK_SPM_MAP(_p) BU_CKMAG(_p, BN_SPM_MAGIC, "bn_spm_map_t")
Header file for the BRL-CAD common definitions.
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...
bn_spm_map_t * bn_spm_init(int N, int elsize)
Return a sphere map structure initialized for N points around the equator.
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...
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.
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,...
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 o...
void bn_spm_free(bn_spm_map_t *mp)
Free the storage associated with a sphere structure.
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 ...
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.
void bn_spm_dump(bn_spm_map_t *mp, int verbose)
Display a sphere structure on stderr. Used for debugging.
int ny
Number of "y" bins.
unsigned char * _data
For freeing purposes, start of data.
unsigned char ** xbin
staring addresses of "x" bins
int elsize
Size of each bin element.
int * nx
Number of "x" bins per "y" bin.