c************
c  Description:	Includes for the XP3D primitive
c
c  Author:	JGS	
c
c  Revisions:	
c
c************
	implicit none
	include 'primitive.inc'
	include 'type5000.inc'
	include 'xdsprim.inc'
	include 'xfacilities.inc'
	include 'msgmask.inc'

	integer*4 L_colors,L_layersz,L_layermx
	parameter (L_colors=64,L_layermx=32)

	structure /IPIXSTRUCT/ 
	  integer*4 x,y
	endstructure

	structure /LAYER/ 
	  character*32	name
	  integer*4	spa,dim
	  integer*4	bufloc,bufsize,offset,type
	  integer*4	nelem,nx,ny
	  integer*4	line,thick,symbol,radius,color
	  integer*4	enable,t2mode
	  real*4	x1,xd,y1,yd
	endstructure
	record /LAYER/ ly
	parameter (L_layersz = 1*32 + 2*4 + 4*4 + 8*4 + 2*4 + 4*4)

	structure /BS/
	  integer*2     x,y,w,h
	  integer*4     ip,wid
	  integer*4	mask
	endstructure

	structure /COLORMAP/
	  integer*2	map(4,7)
	endstructure

	structure /GX/ 
	  real*8	retx,rety,retz,mrkx,mrky,mrkz
	  real*8	x1,x2,y1,y2,z1,z2,c1,c2
	  real*4	azim,elev,roll,pdis
	  real*4	x1p,x2p,y1p,y2p
	  integer*4	xu,yu,zu
	  integer*4	nlayer,lloc(L_layermx)
	  integer*4	zx,zy,zw,zh,zk,cmap,t2mode,mimic
	  real*4	speed, zspec
	  integer*4	status,view,cntrls,ncolors,bsmask,lfill
	  UNION
	  MAP
	  logical*1	axes,autof,cross,spec,prop,pan,split,cbar
	  logical*1	bs,fast,hide,hold,zfill,zs,l7,l8
	  ENDMAP
	  MAP
	  logical*1	options(16)
	  ENDMAP
	  ENDUNION
	  record /TRANSMATRIX/ M, MI
	  record /BS/	bsmap(L_stack)
	  record /XFACILITIES/ xf
	  record /COLORMAP/ color(5)
	endstructure
	record /GX/ Gx

	integer*4 P_ENABLE,P_DISABLE
	parameter (P_ENABLE=255,P_DISABLE=P_ENABLE-2)

	integer*4 PM_GLOBAL,PM_LABEL,PM_BS
	integer*4 PM_BASE,PM_ZOOM,PM_FBASE,PM_FZOOM
	parameter (PM_GLOBAL=1,PM_LABEL=2,PM_BS=3)
	parameter (PM_BASE=4,PM_ZOOM=5,PM_FBASE=6,PM_FZOOM=7)

	integer*4 P_MESH,P_DOTS,P_FILL,P_CONT
	parameter (P_MESH=1,P_DOTS=3,P_FILL=5,P_CONT=7)
	integer*4 P_MESHC,P_DOTSC,P_FILLC,P_CONTC
	parameter (P_MESHC=2,P_DOTSC=4,P_FILLC=6,P_CONTC=8)

	integer*4 P_LAYER
	parameter (P_LAYER=1)

	integer*4 PC_GREY1,PC_GREY2
	parameter (PC_GREY1=63,PC_GREY2=64)

	integer*4 i,j,k,l,m,n		! generic loop counters
	integer*4 ii,jj,kk,ll,mm,nn	! generic loop counters
	integer*4 ix,iy,ix1,ix2,iy1,iy2	! screen cursor coords
	integer*4 lval,flag
	real*8    dval,time,ratio
	real*4    fval
	character*256 str

	logical*4 XP3D_PAN_HANDLE, XP3D_ENABLED

	common /xp3d/ Mx,Gx
