Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

canvas3d.cpp File Reference

#include <math.h>
#include "haio.h"
#include "canvas3d.h"
#include "abstree.h"
#include "font.h"

Defines

#define CANVAS3D_CPP
#define PIXUTILS
#define InvertY(y)   ((y))
#define BitAbove   0x01
#define BitBelow   0x02
#define BitRight   0x04
#define BitLeft   0x08
#define BitFront   0x10
#define Reject(x, y)   ((x)&(y))
#define Accept(x, y)   (!((x)|(y)))
#define SETPIXEL(dptr, fptr, d, c)
#define LightDot(x, y, z)   ((x)+(y)+(z)+(z))
#define ARCSIZE   2048
#define CommonStep(s)
#define XStep
#define YStep
#define CommonVectStep(s)
#define XVectStep
#define YVectStep
#define CalcInten(dz)   inten = LightDot(dx,InvertY(dy),(dz))
#define UpdateAcross(dz)
#define UpdateLine

Detailed Description

Classes to plot 3D images in a window

Author:
Igor Kurnikov
Date:
1998-2002
Derived from:

pixutils.c RasMol2 Molecular Graphics Roger Sayle, August 1995 Version 2.6


Define Documentation

#define SETPIXEL dptr,
fptr,
d,
 ) 
 

Value:

if( (d) > *(dptr) )              \
                                   {   *(dptr) = (d);               \
                                       *(fptr) = (c);               \
                                   }

#define CommonStep  ) 
 

Value:

z1 += zrate; SETPIXEL(dptr,fptr,z1,c);     \
                       if( (zerr+=dz)>0 ) { zerr-=(s); z1+=iz; }

#define XStep
 

Value:

{ if((err+=dy)>0) { fptr+=ystep; dptr+=ystep; err-=dx; } \
                 fptr+=ix; dptr+=ix; x1+=ix; CommonStep(dx); }

#define YStep
 

Value:

{ if((err+=dx)>0) { fptr+=ix; dptr+=ix; err-=dy; } \
                 fptr+=ystep; dptr+=ystep; y1+=iy; CommonStep(dy); }

#define CommonVectStep  ) 
 

Value:

z1 += zrate;   c1 += crate;                    \
                           SETPIXEL(dptr,fptr,z1,Lut[col+c1]);            \
                           if( (zerr+=dz)>0 ) { zerr -= (s); z1 += iz; }  \
                           if( (cerr+=dc)>0 ) { cerr -= (s); c1 += iz; }

#define XVectStep
 

Value:

{ if((err+=dy)>0) { fptr+=ystep; dptr+=ystep; err-=dx; } \
                     fptr+=ix; dptr+=ix; x1+=ix; CommonVectStep(dx); }

#define YVectStep
 

Value:

{ if((err+=dx)>0) { fptr+=ix; dptr+=ix; err-=dy; } \
                     fptr+=ystep; dptr+=ystep; y1+=iy; CommonVectStep(dy); }

#define UpdateAcross dz   ) 
 

Value:

depth = (dz)+z;                    \
        if( depth > *dptr )                \
        {   *dptr = depth;                 \
            fptr = fold+dx;                \
            CalcInten((dz));               \
            if( inten>0 )                  \
            {      inten = (int)((inten*ColConst[rad])>>ColBits); \
                   *fptr = Lut[col+inten]; \
            } else *fptr = Lut[col];       \
        }                                  \
        dptr++;  dx++;

#define UpdateLine
 

Value:

dx = -wide;                   \
        dptr = dold-wide;             \
        tptr = LookUp[wide]+wide;     \
        while( dx<0 ) { UpdateAcross(*tptr); tptr--; }       \
        do { UpdateAcross(*tptr); tptr++; } while(dx<=wide); \
        dold += View.yskip;  fold += View.yskip;             \
        dy++;


Generated on Tue Feb 17 02:03:08 2004 for harlem by doxygen 1.3.6