spm.h

Go to the documentation of this file.
00001 /*                           S P M . H
00002  * BRL-CAD
00003  *
00004  * Copyright (c) 1986-2006 United States Government as represented by
00005  * the U.S. Army Research Laboratory.
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public License
00009  * as published by the Free Software Foundation; either version 2.1 of
00010  * the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this file; see the file named COPYING for more
00019  * information.
00020  */
00021 /** @addtogroup sphmap */
00022 /*@{*/
00023 /** @file spm.h
00024  *@brief
00025  *  Sphere data structure and function declarations.
00026  *
00027  *  @author
00028  *      Phillip Dykstra
00029  *
00030  *  @par Source
00031  *      SECAD/VLD Computing Consortium, Bldg 394
00032  *      The U. S. Army Ballistic Research Laboratory
00033  *      Aberdeen Proving Ground, Maryland  21005-5066
00034  *
00035  *  $Header: /cvsroot/brlcad/brlcad/include/spm.h,v 14.9 2006/09/18 05:24:07 lbutler Exp $
00036  */
00037 
00038 #ifndef SEEN_SPM_H
00039 #define SEEN_SPM_H seen
00040 
00041 #ifndef BN_EXPORT
00042 #   if defined(_WIN32) && !defined(__CYGWIN__) && defined(BRLCAD_DLL)
00043 #      ifdef BN_EXPORT_DLL
00044 #         define BN_EXPORT __declspec(dllexport)
00045 #      else
00046 #         define BN_EXPORT __declspec(dllimport)
00047 #      endif
00048 #   else
00049 #      define BN_EXPORT
00050 #   endif
00051 #endif
00052 
00053 typedef struct  {
00054         long    magic;
00055         int     ny;             /**< @brief  Number of "y" bins */
00056         int     *nx;            /**< @brief  Number of "x" bins per "y" bin */
00057         int     elsize;         /**< @brief  Size of each bin element */
00058         unsigned char **xbin;   /**< @brief  staring addresses of "x" bins */
00059         unsigned char *_data;   /**< @brief  For freeing purposes, start of data */
00060 } spm_map_t;
00061 
00062 #define SPM_NULL (spm_map_t *)0
00063 
00064 #define SPM_MAGIC       0x41278678
00065 
00066 #define RT_CK_SPM(smp)          BU_CKMAG(smp, SPM_MAGIC, "spm_map_t" )
00067 #define BN_CK_SPM(smp)          BU_CKMAG(smp, SPM_MAGIC, "spm_map_t" )
00068 
00069 /* XXX These should all have bn_ prefixes */
00070 
00071 BN_EXPORT extern spm_map_t *spm_init();
00072 BN_EXPORT extern void   spm_free();
00073 BN_EXPORT extern void   spm_read();
00074 BN_EXPORT extern void   spm_write();
00075 BN_EXPORT extern char   *spm_get();
00076 BN_EXPORT extern int    spm_load();
00077 BN_EXPORT extern int    spm_save();
00078 BN_EXPORT extern int    spm_pix_load();
00079 BN_EXPORT extern int    spm_pix_save();
00080 BN_EXPORT extern void   spm_dump();
00081 
00082 /*----------------------------------------------------------------------*/
00083 /* sphmap.c */
00084 BN_EXPORT extern int spm_px_load( spm_map_t *mapp, char *filename, int nx, int ny);
00085 
00086 #endif /* SEEN_SPM_H */
00087 
00088 /*@}*/
00089 /*
00090  * Local Variables:
00091  * mode: C
00092  * tab-width: 8
00093  * c-basic-offset: 4
00094  * indent-tabs-mode: t
00095  * End:
00096  * ex: shiftwidth=4 tabstop=8
00097  */
00098 

Generated on Mon Sep 18 01:24:42 2006 for BRL-CAD by  doxygen 1.4.6