BRL-CAD
sphmap.c File Reference
#include "common.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "bu/parallel.h"
#include "bu/log.h"
#include "bu/malloc.h"
#include "bu/str.h"
#include "vmath.h"
#include "spm.h"
Include dependency graph for sphmap.c:

Go to the source code of this file.

Functions

void bn_spm_free (bn_spm_map_t *mp)
 
bn_spm_map_t * bn_spm_init (int N, int elsize)
 
void bn_spm_read (register bn_spm_map_t *mapp, register unsigned char *valp, double u, double v)
 
void bn_spm_write (register bn_spm_map_t *mapp, register unsigned char *valp, double u, double v)
 
char * bn_spm_get (register bn_spm_map_t *mapp, double u, double v)
 
int bn_spm_load (bn_spm_map_t *mapp, char *filename)
 
int bn_spm_save (bn_spm_map_t *mapp, char *filename)
 
int bn_spm_pix_load (bn_spm_map_t *mapp, char *filename, int nx, int ny)
 
int bn_spm_pix_save (bn_spm_map_t *mapp, char *filename, int nx, int ny)
 
void bn_spm_dump (bn_spm_map_t *mp, int verbose)
 

Function Documentation

void bn_spm_free ( bn_spm_map_t *  mp)

Definition at line 36 of file sphmap.c.

References bu_free().

Referenced by bn_spm_init(), points_mfree(), and spm_mfree().

Here is the call graph for this function:

bn_spm_map_t* bn_spm_init ( int  N,
int  elsize 
)

Definition at line 62 of file sphmap.c.

References bn_spm_free(), BN_SPM_MAGIC, BU_ALLOC, bu_calloc(), bu_malloc(), and memset().

Referenced by points_setup(), and spm_setup().

Here is the call graph for this function:

void bn_spm_read ( register bn_spm_map_t *  mapp,
register unsigned char *  valp,
double  u,
double  v 
)

Definition at line 113 of file sphmap.c.

Referenced by bn_spm_pix_save().

void bn_spm_write ( register bn_spm_map_t *  mapp,
register unsigned char *  valp,
double  u,
double  v 
)

Definition at line 133 of file sphmap.c.

char* bn_spm_get ( register bn_spm_map_t *  mapp,
double  u,
double  v 
)

Definition at line 153 of file sphmap.c.

Referenced by points_setup().

int bn_spm_load ( bn_spm_map_t *  mapp,
char *  filename 
)

Definition at line 169 of file sphmap.c.

References BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), and BU_STR_EQUAL.

Referenced by spm_setup().

Here is the call graph for this function:

int bn_spm_save ( bn_spm_map_t *  mapp,
char *  filename 
)

Definition at line 203 of file sphmap.c.

References bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), and BU_STR_EQUAL.

Here is the call graph for this function:

int bn_spm_pix_load ( bn_spm_map_t *  mapp,
char *  filename,
int  nx,
int  ny 
)

Definition at line 244 of file sphmap.c.

References bu_free(), bu_log(), bu_malloc(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), and BU_STR_EQUAL.

Here is the call graph for this function:

int bn_spm_pix_save ( bn_spm_map_t *  mapp,
char *  filename,
int  nx,
int  ny 
)

Definition at line 312 of file sphmap.c.

References bn_spm_read(), bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), and BU_STR_EQUAL.

Here is the call graph for this function:

void bn_spm_dump ( bn_spm_map_t *  mp,
int  verbose 
)

Definition at line 356 of file sphmap.c.

References bu_log().

Referenced by spm_print().

Here is the call graph for this function: