NCBI C Toolkit Cross Reference

C/vibrant/ppict3d.h


  1 /*   ppict3d.h
  2 * ===========================================================================
  3 *
  4 *                            PUBLIC DOMAIN NOTICE
  5 *            National Center for Biotechnology Information (NCBI)
  6 *
  7 *  This software/database is a "United States Government Work" under the
  8 *  terms of the United States Copyright Act.  It was written as part of
  9 *  the author's official duties as a United States Government employee and
 10 *  thus cannot be copyrighted.  This software/database is freely available
 11 *  to the public for use. The National Library of Medicine and the U.S.
 12 *  Government do not place any restriction on its use or reproduction.
 13 *  We would, however, appreciate having the NCBI and the author cited in
 14 *  any work or product based on this material
 15 *
 16 *  Although all reasonable efforts have been taken to ensure the accuracy
 17 *  and reliability of the software and data, the NLM and the U.S.
 18 *  Government do not and cannot warrant the performance or results that
 19 *  may be obtained by using this software or data. The NLM and the U.S.
 20 *  Government disclaim all warranties, express or implied, including
 21 *  warranties of performance, merchantability or fitness for any particular
 22 *  purpose.
 23 *
 24 * ===========================================================================
 25 *
 26 * File Name:  ppict3d.h
 27 *
 28 * Author:  Alex Smirnov
 29 *
 30 * Version Creation Date:   03/29/95
 31 *
 32 * $Revision: 6.1 $
 33 *
 34 * File Description: 
 35 *  3D picture private header file.
 36 *
 37 * Modifications:  
 38 * --------------------------------------------------------------------------
 39 * Date     Name        Description of modification
 40 * -------  ----------  -----------------------------------------------------
 41 *
 42 * ==========================================================================
 43 */
 44 
 45 #ifndef _PPICT3D_
 46 #define _PPICT3D_
 47 
 48 #ifndef _PICTUR3D_
 49 #include <pictur3d.h>
 50 #endif
 51 
 52 #ifndef _PDIAGNOS_
 53 #include <pdiagnos.h>
 54 #endif
 55 
 56 #ifdef __cplusplus
 57 extern "C" {
 58 #endif
 59 
 60 /*****************************************************************************
 61 *
 62 *   DEFINES
 63 *
 64 *****************************************************************************/
 65 #define HL_PRIMITIVE   0x1
 66 #define HL_SEGMENT     0x2
 67 #define HL_MASK        0x3
 68 
 69 #ifdef WIN_MSWIN
 70 #define NEGYSCREEN
 71 #define Y_MINUS    -
 72 #define Y_PLUS     +
 73 #else
 74 #define Y_MINUS    +
 75 #define Y_PLUS     -
 76 #endif
 77 
 78 /*****************************************************************************
 79 *
 80 *   TYPEDEFS
 81 *
 82 *****************************************************************************/
 83 typedef long PNTR longPtr;
 84 
 85 typedef struct {
 86   Nlm_Picture3D pic;                      /* Current picture */
 87   Uint1Ptr      image;                    /* pointer to Image */
 88   Uint2Ptr      zBuffer;                  /* pointer to zBuffer */
 89   VoidPtr*      idBuffer;                 /* pointer to id Buffer */
 90   Int4          width;
 91   Int4          height;
 92   Int4          widthCur;
 93   Int4          heightCur;
 94   Int4          xmin, ymin;               /* Intrested area */
 95   Int4          xmax, ymax;
 96   Int4          zmax;
 97   Int4          a[3][3];                  /* xSCRN = x/a[0][0]+y/a[0][1]+ */
 98   Int4          c[3];                     /*        +z/a[0][2]+c[0]       */
 99   Int4          scale;
100   Int4          colorOffset;              /* curColor = colorOffset +     */
101   Int4          colorStep;                /*         3DColor*colorStep +  */
102   Int4          colorScale;               /*         (curZ<<8)/colorScale */
103   Int4          perspect;                 /* 1-10 */
104   Int4          zmaxPersp;                /* zmax * perspect */
105   Int4          zmaxPersp1;               /* zmax * (perspect + 1)*/
106   Uint1         colorHL;
107   Boolean       layerTable[256];
108 } Nlm_Context3D, PNTR Nlm_Context3DPtr;
109 
110 typedef void        (*Nlm_PrimDraw3D)      PROTO((Nlm_VoidPtr objRef));
111 typedef void        (*Nlm_PrimHitTest3D)   PROTO((Nlm_VoidPtr objRef));
112 typedef void        (*Nlm_PrimGetLimits3D) PROTO((Nlm_VoidPtr objRef));
113 typedef void        (*Nlm_PrimCleanup3D)   PROTO((Nlm_VoidPtr objRef));
114 
115 typedef struct Nlm_primDef3D {
116   Nlm_PrimDraw3D        draw;
117   Nlm_PrimHitTest3D     hittest;
118   Nlm_PrimGetLimits3D   getlimits;
119   Nlm_PrimCleanup3D     cleanup;
120   Nlm_Int2              code;
121 }Nlm_PrimDef3D, PNTR Nlm_PrimDef3DPtr;
122 
123 typedef struct Nlm_base3d {
124   struct Nlm_base3d PNTR   parent;
125   struct Nlm_base3d PNTR   next;
126   Nlm_PrimDef3DPtr         fTable;
127   BigScalar                   userData;
128   Uint1                    layer;
129   Uint1                    color;
130   Uint2                    status;
131 }Nlm_Base3D, PNTR Nlm_Base3DPtr;
132 
133 typedef struct Nlm_pseg3d {
134   Nlm_Base3D     base;
135   Nlm_Base3DPtr  last;
136   Nlm_Base3DPtr  first;
137   Nlm_Box3D      segBox;
138   Nlm_Spher3D    segSph;
139 }Nlm_PSeg3D, PNTR Nlm_PSeg3DPtr;
140 
141 typedef struct Nlm_ppict3d {
142   Int4           version;
143   Int4           versionPrev;
144   Nlm_PSeg3D     seg;
145   Boolean        layerTable[256];
146   Uint1          colorR[256];
147   Uint1          colorG[256];
148   Uint1          colorB[256];
149   Uint4          totalColors;
150 }Nlm_PPict3D, PNTR Nlm_PPict3DPtr;
151 
152 /*****************************************************************************
153 *
154 *   EXTERN FUNCTION
155 *
156 *****************************************************************************/
157 extern Nlm_Base3DPtr Nlm_AddPrim3D  PROTO((Nlm_PSeg3DPtr seg, 
158          Nlm_Base3DPtr prim, size_t pSize, CharPtr funName));
159 extern Nlm_Boolean   Nlm_UpdateGver PROTO((Nlm_PPict3DPtr pic));
160 
161 #ifdef __cplusplus
162 }
163 #endif
164 
165 #endif
166 
167 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.