source: trunk/vizservers/nanovis/nanovis.h @ 829

Last change on this file since 829 was 829, checked in by vrinside, 13 years ago

Moved all the functions related to TCL to Command.cpp

File size: 3.1 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  nanovis.h: package header
4 *
5 * ======================================================================
6 *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
7 *           Purdue Rendering and Perceptualization Lab (PURPL)
8 *
9 *  Copyright (c) 2004-2006  Purdue Research Foundation
10 *
11 *  See the file "license.terms" for information on usage and
12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 * ======================================================================
14 */
15#ifndef __NANOVIS_H__
16#define __NANOVIS_H__
17
18#include <GL/glew.h>
19#include <GL/glut.h>
20#include <Cg/cgGL.h>
21#include <stdlib.h>
22#include <math.h>
23#include <time.h>
24#include <iostream>
25#include <stdio.h>
26#include <assert.h>
27#include <float.h>
28#include <getopt.h>
29#include <stdio.h>
30#include <math.h>
31#include <fstream>
32#include <sstream>
33#include <string>
34#include <sys/time.h>
35#include <sys/types.h>
36#include <unistd.h>
37#include <fcntl.h>
38#include <signal.h>
39
40#include "define.h"
41#include "global.h"
42#include "socket/Socket.h"
43#include "Camera.h"
44#include "ConvexPolygon.h"
45#include "Texture3D.h"
46#include "Texture2D.h"
47#include "Texture1D.h"
48#include "TransferFunction.h"
49#include "Mat4x4.h"
50#include "Volume.h"
51#include "ParticleSystem.h"
52#include "PerfQuery.h"
53#include "Event.h"
54#include "Lic.h"
55#include "VolumeRenderer.h"
56#include "PlaneRenderer.h"
57
58#include "config.h"
59
60#include <tcl.h>
61#ifndef CONST84
62# define CONST84
63#endif
64
65
66//defines for the image based flow visualization
67#define NPN 256         //resolution of background pattern
68#define NMESH 256       //resolution of flow mesh
69#define DM  ((float) (1.0/(NMESH-1.0))) //distance in world coords between mesh lines
70#define NPIX  512       //display size
71#define SCALE 3.0       //scale for background pattern. small value -> fine texture
72
73
74typedef struct Vector2{
75  float x,y;
76  float mag(){
77    return sqrt(x*x+y*y);
78  }
79};
80
81
82typedef struct RegGrid2{
83  int width, height;
84  Vector2* field;
85
86  RegGrid2(int w, int h){
87    width = w;
88    height = h;
89    field = new Vector2[w*h];
90  }
91
92  void put(Vector2& v, int x ,int y){
93    field[x+y*width] = v;
94  }
95
96  Vector2& get(int x, int y){
97    return field[x+y*width];
98  }
99};
100
101
102/*
103//variables for mouse events
104float live_rot_x = 90.;         //object rotation angles
105float live_rot_y = 180.;
106float live_rot_z = -135;
107
108float live_obj_x = -0.0;        //object translation location from the origin
109float live_obj_y = -0.0;
110float live_obj_z = -2.5;
111
112float live_diffuse = 1.;
113float live_specular = 3.;
114
115int left_last_x, left_last_y, right_last_x, right_last_y;       //last locations mouse events
116bool left_down = false;                                         
117bool right_down = false;
118
119float lic_slice_x=0, lic_slice_y=0, lic_slice_z=0.3;//image based flow visualization slice location
120
121int win_width = NPIX;                   //size of the render window
122int win_height = NPIX;                  //size of the render window
123
124
125//image based flow visualization variables
126int    iframe = 0;
127int    Npat   = 64;
128int    alpha  = (int)round(0.12*255);
129float  sa;
130float  tmax   = NPIX/(SCALE*NPN);
131float  dmax   = SCALE/NPIX;
132
133
134//currently active shader, default renders one volume only
135int cur_shader = 0;
136*/
137
138#endif
Note: See TracBrowser for help on using the repository browser.