#ifndef _JRN_SEEGRAPH_H_
#define _JRN_SEEGRAPH_H_

#include "SeeGraphHelper.h"

/* Windows, size and position constants */
extern int mainWindow, queryWindow;
const int GL_WIN_INITIAL_X = 0;
const int GL_WIN_INITIAL_Y = 0;
extern int GL_WIN_WIDTH;
extern int GL_WIN_HEIGHT;
const int ESC              = 27;

/* Data */
extern int viewMode;
extern int viewOption;
extern graph* g;
extern int numSGs;
extern graph* sg[];


/* Render info */
extern viewData view;
extern unsigned char* voxels;
extern int* dimSize;
extern float** tlut;
extern GLubyte*** colorBar;
extern float degreeRot;
extern float degreeStep;

/* Viewing data structs */
extern ArcBall Spaceball;
extern GLUquadricObj* quadratic;
extern int resX, resY;

/* Viewing Options */
extern bool blackBackground;
extern bool fullScreen;
extern bool showText;
extern bool calcFrameRate;
extern bool showNormals;
extern bool updateNormals;
extern bool showDisconnected;
extern bool showUnselected;
extern bool showVertHalos;
extern bool showEdges;
extern bool showEdgesVisibleVerts;
extern bool normalizeEdgeColors;
extern bool separateEdgeColors;
extern bool showOnlyLCC;
extern bool showFullEdges;
extern bool showFullVerts;
extern bool activeQuery;
extern bool allowPicking;
extern bool allowPicking;
extern bool showBTDMatrix;
extern bool showBTDMatrixStretch;
extern bool showBTDMatrixBelt;
extern bool showBTDSelections;
extern bool showBTDasLOD;
extern bool showSubgraphs;
extern bool showSeeEdit;
extern bool showVertLabels;
extern bool saveAndExit;
extern bool useTwoDLayout;

/* Command line parameters */
extern float threshold;
extern int absoluteValue;

/* Dynamic threshold handling */
extern int numFiles;
extern int displayThresh;
extern float startThresh;
extern float stopThresh;
extern float stepThresh;

/* Neural Net data */
extern NeuralNet* n;
extern Data *learn, *test;

/* BTD Matrix data */
extern BTD* d2;
extern graph* lod;
extern graph* glod;

/* Hypothesis definition */
extern int currentQuery;
extern int numFeatures;
extern float textX;
extern float textY;


/* Useful things */
extern int numDisplayVerts;
extern int numDisplayEdges;
extern int geneNodeColor;
extern int geneTransparentColor;
extern int geneTransparentAlpha;
extern clock_t oldTime, newTime;
extern unsigned char* pixels;
extern int pixCount;
extern int karCount;
extern char* pixFile;
extern char* karFile;

/* For automating */
void glutSpecial(int value, int x, int y);
void glutKeyboard(unsigned char key, int x, int y);
void mouseHandler(int button, int bstate, int x, int y);

#endif
