Allink  v0.1
ElPolyDrawControl.cpp
1 /***********************************************************************
2 ElPolyDrawControl: OpenGL menus, keyboards and mouse functions
3 Copyright (C) 2008-2010 by Giovanni Marelli <sabeiro@virgilio.it>
4 
5 
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; If not, see <http://www.gnu.org/licenses/>.
17 ***********************************************************************/
18 #include "ElPoly.h"
19 
20 #ifdef __glut_h__
21 extern Draw *Dr;
23 enum ElType{
25  EL_EVERY = 0x0021 ,
27  EL_POLY ,
29  EL_HOMO ,
31  EL_ADDED ,
33  EL_UP ,
35  EL_DOWN ,
37  EL_INNER ,
39  EL_OUTER ,
41  EL_STRETCH ,
43  EL_FLABBY ,
45  EL_TILTED ,
47  EL_PHOB ,
49  EL_PHIL ,
51  EL_OIL ,
53  EL_ALL
54 };
55 enum ElExtra{
56  EL_FULL = 0x0031,
57  EL_BOND,
58  EL_PICTURE,
59  EL_RESTORE,
60  EL_SCRIPT,
61  EL_RENDER,
62 };
63 enum ElEffect{
64  EL_NANOPOS = 0x0041,
65  EL_DENSPOS,
66  EL_CMPOS,
67  EL_CICCIA
68 };
69 enum ElBackFold{
70  EL_BF_NANO = 0x0051,
71  EL_BF_CM,
72  EL_BF_PARTICLE
73 };
74 enum ElBlend{
75  EL_BLEND1 = 0x0061,
76  EL_BLEND2,
77  EL_BLEND3,
78  EL_BLEND4,
79  EL_BLEND5,
80  EL_BLEND6,
81  EL_BLEND7,
82  EL_BLEND8,
83  EL_BLEND9,
84  EL_BLEND10
85 };
86 enum ElBlock{
87  EL_BLOCK = 0x0071,
88 };
89 enum ElLineSize{
90  EL_LSIZE1 = 0x0081,
91  EL_LSIZE2 ,
92  EL_LSIZE3 ,
93  EL_LSIZE4 ,
94  EL_LSIZE5 ,
95  EL_LSIZE6 ,
96  EL_LSIZE7 ,
97  EL_LSIZE20 ,
98 };
100  int SubMenu1 = 0, SubMenu2 = 0, SubMenu3 = 0;
101  int SubMenu4 = 0, SubMenu5 = 0, SubMenu6 = 0;
102  int SubMenu7 = 0, SubMenu8 = 0, SubMenu9 = 0;
103  SubMenu1 = glutCreateMenu(MenuVisual);
104  glutAddMenuEntry("Particles",EL_PART);
105  glutAddMenuEntry("Chains",EL_CHAIN);
106  glutAddMenuEntry("Vectors",EL_VECTORS);
107  glutAddMenuEntry("Triangulate",EL_TRIA);
108  glutAddMenuEntry("IsoLevel",EL_ISOLEVEL);
109  glutAddMenuEntry("Color",EL_COLOR);
110  glutAddMenuEntry("Quad",EL_QUAD);
111  glutAddMenuEntry("Quad1",EL_QUAD1);
112  glutAddMenuEntry("Potential",EL_POTENTIAL);
113  glutAddMenuEntry("Density",EL_DENS);
114  glutAddMenuEntry("Polygon",EL_POLYGON);
115  glutAddMenuEntry("SquareMesh",EL_SQUAREMESH);
116  glutAddMenuEntry("Sample",EL_SAMPLE);
117  glutAddMenuEntry("Spectrum",EL_SPECTRUM);
118  glutAddMenuEntry("Surface",EL_SURF);
119  glutAddMenuEntry("Voronoi",EL_VORONOI);
120  glutAddMenuEntry("Skin",EL_SKIN);
121  glutAddMenuEntry("Mesh",EL_MESH);
122  glutAddMenuEntry("Isoipse",EL_ISOIPSE);
123  SubMenu2 = glutCreateMenu(MenuChoise);
124  glutAddMenuEntry("Every",EL_EVERY);
125  glutAddMenuEntry("Poly",EL_POLY);
126  glutAddMenuEntry("Homo",EL_HOMO);
127  glutAddMenuEntry("Added",EL_ADDED);
128  glutAddMenuEntry("Up",EL_UP);
129  glutAddMenuEntry("Down",EL_DOWN);
130  glutAddMenuEntry("Inner",EL_INNER);
131  glutAddMenuEntry("Outer",EL_OUTER);
132  glutAddMenuEntry("Stretch",EL_STRETCH);
133  glutAddMenuEntry("Flabby",EL_FLABBY);
134  glutAddMenuEntry("Tilted",EL_TILTED);
135  SubMenu3 = glutCreateMenu(MenuChoise);
136  glutAddMenuEntry("All",EL_ALL);
137  glutAddMenuEntry("Phob",EL_PHOB);
138  glutAddMenuEntry("Phil",EL_PHIL);
139  glutAddMenuEntry("Oil",EL_OIL);
140  SubMenu4 = glutCreateMenu(MenuChoise);
141  glutAddMenuEntry("NanoPos",EL_NANOPOS);
142  glutAddMenuEntry("DensPos",EL_DENSPOS);
143  glutAddMenuEntry("CmPos",EL_CMPOS);
144  SubMenu5 = glutCreateMenu(MenuChoise);
145  glutAddMenuEntry("Part",EL_BF_PARTICLE);
146  glutAddMenuEntry("Nano",EL_BF_NANO);
147  glutAddMenuEntry("CM",EL_BF_CM);
148  SubMenu6 = glutCreateMenu(MenuChoise);
149  glutAddMenuEntry("1",EL_BLEND1);
150  glutAddMenuEntry("2",EL_BLEND2);
151  glutAddMenuEntry("3",EL_BLEND3);
152  glutAddMenuEntry("4",EL_BLEND4);
153  glutAddMenuEntry("5",EL_BLEND5);
154  glutAddMenuEntry("6",EL_BLEND6);
155  glutAddMenuEntry("7",EL_BLEND7);
156  glutAddMenuEntry("8",EL_BLEND8);
157  glutAddMenuEntry("9",EL_BLEND9);
158  glutAddMenuEntry("10",EL_BLEND10);
159  SubMenu7 = glutCreateMenu(MenuChoise);
160  glutAddMenuEntry("Every",EL_BLOCK+pNBlock());
161  for(int b=0;b<pNBlock();b++){
162  glutAddMenuEntry(Block[b].Name,b+EL_BLOCK);
163  }
164  SubMenu8 = glutCreateMenu(MenuChoise);
165  glutAddMenuEntry("1",EL_LSIZE1);
166  glutAddMenuEntry("2",EL_LSIZE2);
167  glutAddMenuEntry("3",EL_LSIZE3);
168  glutAddMenuEntry("4",EL_LSIZE4);
169  glutAddMenuEntry("5",EL_LSIZE5);
170  glutAddMenuEntry("6",EL_LSIZE6);
171  glutAddMenuEntry("7",EL_LSIZE7);
172  glutAddMenuEntry("20",EL_LSIZE20);
173  glutCreateMenu(MenuChoise);
174  glutAddSubMenu("Visualisation",SubMenu1);
175  glutAddSubMenu("Chain",SubMenu2);
176  glutAddSubMenu("Bead",SubMenu3);
177  glutAddSubMenu("Move",SubMenu4);
178  glutAddSubMenu("BackFold",SubMenu5);
179  glutAddSubMenu("Blend",SubMenu6);
180  glutAddSubMenu("Block",SubMenu7);
181  glutAddSubMenu("Line size",SubMenu8);
182  glutAddMenuEntry("Fullscreen",EL_FULL);
183  glutAddMenuEntry("Bond",EL_BOND);
184  glutAddMenuEntry("Picture",EL_PICTURE);
185  glutAddMenuEntry("Restore",EL_RESTORE);
186  glutAddMenuEntry("Script",EL_SCRIPT);
187  glutAddMenuEntry("Render",EL_RENDER);
188  glutAttachMenu(GLUT_RIGHT_BUTTON);
189 }
190 extern void ElPoly::ElMenuVisual(int option){
191  InvScaleUn = 1./pEdge(0);
192  for(int d=0;d<3;d++) Dr->Edge[d] = pEdge(d);
193  Dr->InvScaleUn = InvScaleUn;
194  Point = Dr->DefPoint();
195  What2Draw = option;
196  //option = EL_PART;
197  switch(option){
198  case EL_PART:
199  DrPartList();
200  break;
201  case EL_COLOR:
202  //glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_DST_COLOR);
203  DrColor();
204  break;
205  case EL_CHAIN:
206  BfDefChain();
207  Hexagon = Dr->DefHexagon();
208  DrChains();
209  break;
210  case EL_VECTORS:
211  Arrow = Dr->DefArrowThin();
212  DrVectors();
213  break;
214  case EL_SURF:
215  DrSurface();
216  break;
217  case EL_POLYGON:
218  DrPolygon();
219  break;
220  case EL_SQUAREMESH:
221  DrSquareMesh();
222  break;
223  case EL_SAMPLE:
224  DrSample(NEdge);
225  //ChooseDraw("sample");
226  break;
227  case EL_SKIN:
228  //DrStalk();
229  //DefineSkin(5);
230  //Tile();
231  break;
232  case EL_TRIA:
233  DrTriangulate();
234  break;
235  case EL_MESH:
236  //DefineSurf();
237  //DrGenMesh();
238  break;
239  case EL_ISOLEVEL:
240  DrIsolevel(10,ExtParam);
241  break;
242  case EL_ISOIPSE:
243  DrIsoipse(100,10,1);
244  break;
245  case EL_QUAD:
246  Quad = Dr->DefQuad(NEdge-2);
247  DrQuad();
248  break;
249  case EL_QUAD1:
250  Quad = Dr->DefQuad(NEdge-2);
251  DrQuad1();
252  break;
253  case EL_POTENTIAL:
254  DrPotential();
255  break;
256  case EL_DENS:
257  Dr->xp = .5*pEdge(0)*InvScaleUn;
258  Dr->yp = 0.;
259  Dr->zp = .5*pEdge(2)*InvScaleUn;
260  DrDensity();
261  break;
262  case EL_CROSS:
263  DrCrossLinks();
264  break;
265  }
266 }
267 extern void ElPoly::ElMenuChoise(int option){
268  int OldIf = 0;
269  InvScaleUn = 1./pEdge(0);
270  for(int d=0;d<3;d++) Dr->Edge[d] = pEdge(d);
271  Dr->InvScaleUn = InvScaleUn;
272  Point = Dr->DefPoint();
273  //option = EL_PART;
274  switch(option){
275  case EL_EVERY:
276  NChType = CHAIN_EVERY;
277  //sprintf(Dr->info,"Chain type %d",NChType);
278  RenderPart();
279  break;
280  case EL_POLY:
281  NChType = CHAIN_POLY;
282  RenderPart();
283  break;
284  case EL_HOMO:
285  NChType = CHAIN_HOMO;
286  RenderPart();
287  break;
288  case EL_ADDED:
289  NChType = CHAIN_ADDED;
290  RenderPart();
291  break;
292  case EL_UP:
293  NChType = CHAIN_UP;
294  RenderPart();
295  break;
296  case EL_DOWN:
297  NChType = CHAIN_DOWN;
298  RenderPart();
299  break;
300  case EL_INNER:
301  NChType = CHAIN_INNER;
302  RenderPart();
303  break;
304  case EL_OUTER:
305  NChType = CHAIN_OUTER;
306  RenderPart();
307  break;
308  case EL_STRETCH:
309  NChType = CHAIN_STRETCH;
310  RenderPart();
311  break;
312  case EL_FLABBY:
313  NChType = CHAIN_FLABBY;
314  RenderPart();
315  break;
316  case EL_TILTED:
317  NChType = CHAIN_TILTED;
318  RenderPart();
319  break;
320  case EL_PHOB:
321  NPType = BEAD_PHOB;
322  RenderPart();
323  break;
324  case EL_PHIL:
325  NPType = BEAD_PHIL;
326  RenderPart();
327  break;
328  case EL_OIL:
329  NPType = BEAD_OIL;
330  RenderPart();
331  break;
332  case EL_ALL:
333  NPType = BEAD_EVERY;
334  RenderPart();
335  break;
336  case EL_FULL:
337  glutFullScreen();
338  glutPostRedisplay();
339  break;
340  case EL_BOND:
341  if(!pNLink()) IfLine += 1;
342  if(IfLine == 2) IfLine =0;
343  RenderPart();
344  break;
345  case EL_PICTURE:
346  Dr->Step++;
347  Dr->IfInfo = 0;
348  Dr->Picture();
349  Dr->IfInfo = 1;
350  break;
351  case EL_RESTORE:
352  glutIdleFunc(NULL);
353  RenderPart();
354  Dr->InitConstant();
355  glutPostRedisplay();
356  break;
357  case EL_SCRIPT:
358  Dr->IfScript = !Dr->IfScript;
359  Dr->ReadScript();
360  break;
361  case EL_RENDER:
362  DrawOutput = EL_POVRAY;
363  RenderPart();
364  DrawOutput = EL_OPENGL;
365  //Conv2Povray();
366  break;
367  case EL_NANOPOS:
368  Dr->xp = pNanoPos(0,0)*InvScaleUn;
369  Dr->yp = pNanoPos(0,1)*InvScaleUn;
370  Dr->zp = pNanoPos(0,2)*InvScaleUn;
371  break;
372  case EL_DENSPOS:
373  Dr->xp = .5*pEdge(0)*InvScaleUn;
374  Dr->yp = 0.;
375  Dr->zp = .5*pEdge(2)*InvScaleUn;
376  break;
377  case EL_CMPOS:
378  ShiftSys(SHIFT_CM);
379  break;
380  case EL_SAMPLE:
381  DrSample(NEdge);
382  break;
383  case EL_SPECTRUM:
384  DrSpectrum();
385  break;
386  case EL_VORONOI:
387  DrVoronoi();
388  break;
389  case EL_BF_NANO:
390  BackFold(BF_NANO);
391  RenderPart();
392  break;
393  case EL_BF_PARTICLE:
394  BackFold(BF_PART);
395  RenderPart();
396  break;
397  case EL_BF_CM:
398  BackFold(BF_CHAIN);
399  RenderPart();
400  break;
401  case EL_BLEND1:
402  Dr->ChooseBlend(1);
403  break;
404  case EL_BLEND2:
405  Dr->ChooseBlend(2);
406  break;
407  case EL_BLEND3:
408  Dr->ChooseBlend(3);
409  break;
410  case EL_BLEND4:
411  Dr->ChooseBlend(4);
412  break;
413  case EL_BLEND5:
414  Dr->ChooseBlend(5);
415  break;
416  case EL_BLEND6:
417  Dr->ChooseBlend(6);
418  break;
419  case EL_BLEND7:
420  Dr->ChooseBlend(7);
421  break;
422  case EL_BLEND8:
423  Dr->ChooseBlend(8);
424  break;
425  case EL_BLEND9:
426  Dr->ChooseBlend(9);
427  break;
428  case EL_BLEND10:
429  Dr->ChooseBlend(10);
430  break;
431  case EL_LSIZE1:
432  glLineWidth(1);
433  glPointSize(1);
434  break;
435  case EL_LSIZE2:
436  glLineWidth(2);
437  glPointSize(2);
438  break;
439  case EL_LSIZE3:
440  glLineWidth(3);
441  glPointSize(3);
442  break;
443  case EL_LSIZE4:
444  glLineWidth(4);
445  glPointSize(4);
446  break;
447  case EL_LSIZE5:
448  glLineWidth(5);
449  glPointSize(5);
450  break;
451  case EL_LSIZE6:
452  glLineWidth(6);
453  glPointSize(6);
454  break;
455  case EL_LSIZE7:
456  glLineWidth(7);
457  glPointSize(7);
458  break;
459  case EL_LSIZE20:
460  glLineWidth(20);
461  glPointSize(20);
462  break;
463  //DrPosCol();
464  //DrQuad1();
465  //DrInterpSurface();
466  }
467  for(int b=0;b<pNBlock();b++){
468  if(option == EL_BLOCK + b){
469  sprintf(Block2Draw,"%s",Block[b].Name);
470  RenderPart();
471  }
472  }
473  if(option == EL_BLOCK + pNBlock()){
474  sprintf(Block2Draw,"ALL");
475  RenderPart();
476  }
477  //glEndList();
478 }
481 }
482 extern void ElPoly::ElDrawMouse(int button, int state,int x,int y){
483  Dr->Dmouse(button,state,x,y);
484  switch (button){
485  case GLUT_WHEEL_UP:
486  if( glutGetModifiers() == GLUT_ACTIVE_CTRL){
487  ScaleFact += .2;
488  Dr->zp -= .12*pEdge(CNorm)*InvScaleUn;
490  glutPostRedisplay();
491  }
492  break;
493  case GLUT_WHEEL_DOWN:
494  if( glutGetModifiers() == GLUT_ACTIVE_CTRL){
495  ScaleFact -= .2;
496  Dr->zp += .12*pEdge(CNorm)*InvScaleUn;
498  glutPostRedisplay();
499  }
500  break;
501  default:
502  break;
503  }
504 }
505 extern void ElPoly::keyboard(unsigned char key,int x, int y){
506  Dr->keyboardDraw(key);
507  char string[60];
508  switch (key){
509  case '+':
510  quando+=10;
511  if(quando >= NFileTot){
512  quando = 0;
513  }
514  if(quando >= 0){
515  OpenFile(quando);
516  sprintf(Dr->info,"%s %d",cFile[quando],NFile[0]);
517  }
518  RenderPart();
519  glutPostRedisplay();
520  break;
521  case '-':
522  quando-=10;
523  if(quando < 0){
524  quando = NFileTot-1;
525  }
526  if(quando <=NFileTot){
527  OpenFile(quando);
528  sprintf(Dr->info,"%s %d",cFile[quando],NFile[0]);
529  }
530  RenderPart();
531  glutPostRedisplay();
532  break;
533  case '>':
534  quando++;
535  if(quando >= NFileTot){
536  quando = 0;
537  }
538  if(quando >= 0){
539  OpenFile(quando);
540  sprintf(Dr->info,"%s %d",cFile[quando],NFile[0]);
541  }
542  RenderPart();
543  glutPostRedisplay();
544  break;
545  case '<':
546  quando--;
547  if(quando < 0){
548  quando = NFileTot-1;
549  }
550  if(quando <=NFileTot){
551  OpenFile(quando);
552  sprintf(Dr->info,"%s %d",cFile[quando],NFile[0]);
553  }
554  RenderPart();
555  glutPostRedisplay();
556  break;
557  case 'b':
558  if(!pNLink()) IfLine = !IfLine;
559  sprintf(Dr->info,"Bonding visualisation");
560  RenderPart();
561  glutPostRedisplay();
562  break;
563  case 'c':
564  NBackFold++;
565  if(NBackFold > 3)
566  NBackFold = 0;
567  if(NBackFold == BF_PART)
568  sprintf(Dr->info,"Particle back fold");
569  else if(NBackFold == BF_CHAIN)
570  sprintf(Dr->info,"Center of mass back fold");
571  else if(NBackFold == BF_NANO)
572  sprintf(Dr->info,"Nano particle back fold");
573  else if(NBackFold == BF_NO)
574  sprintf(Dr->info,"No back fold");
576  RenderPart();
577  glutPostRedisplay();
578  break;
579  case 'C':
580  Conv2Povray();
581  break;
582  case 'i':
583  IfIntorno += 1;
584  if(IfIntorno == 3) IfIntorno = 0;
585  if(IfIntorno == 1)
586  sprintf(Dr->info,"Center of mass proximity");
587  if(IfIntorno == 2)
588  sprintf(Dr->info,"Particle proximity");
589  RenderPart();
590  glutPostRedisplay();
591  break;
592  case 'I':
593  char cSystem[STRSIZE];
594  SysInfo(cSystem);
595  printf("%s %d %s\n",cSystem,NFile[0],cFile[NFile[0]]);
596  sprintf(Dr->info,"%s %d %s\n",cSystem,NFile[0],cFile[NFile[0]]);
597  glutPostRedisplay();
598  break;
599  case 'k':
600  Dr->IfInfo = 0;
601  glutPostRedisplay();
602  Dr->Picture();
603  Dr->IfInfo = 1;
604  break;
605  case 'K':
606  sprintf(string,"rm %s",cFile[quando]);
607  system(string);
608  quando++;
609  if(quando >= NFileTot){
610  quando = 0;
611  }
612  if(quando >= 0){
613  OpenFile(quando);
614  sprintf(Dr->info,"%s %d",cFile[quando],NFile[0]);
615  }
616  RenderPart();
617  glutPostRedisplay();
618  break;
619  case 'l':
620  LineSize += 1;
621  glLineWidth(LineSize);
622  glPointSize(LineSize);
623  RenderPart();
624  glutPostRedisplay();
625  break;
626  case 'L':
627  LineSize -= 1.;
628  glLineWidth(LineSize);
629  glPointSize(LineSize);
630  RenderPart();
631  glutPostRedisplay();
632  break;
633  case 'm':
634  glutPostRedisplay();
635  break;
636  case 'n':
637  Saturation *= 1.1;
638  RenderPart();
639  break;
640  case 'N':
641  Saturation /= 1.1;
642  RenderPart();
643  break;
644  case 'p':
645  ExtParam *= 1.5;
646  RenderPart();
647  break;
648  case 'P':
649  ExtParam /= 1.5;
650  RenderPart();
651  break;
652  case 'r':
653  glutIdleFunc(NULL);
654  RenderPart();
655  Dr->InitConstant();
656  sprintf(Dr->info,"initial configuration");
657  glutPostRedisplay();
658  break;
659  case 'R':
660  RenderPart();
661  glutPostRedisplay();
662  break;
663  case 'S':
664  glutIdleFunc(Slide);
665  break;
666  case 't':
667  Transform(2);
668  RenderPart();
669  break;
670  case 27:
671  exit(0);
672  break;
673  case 40:
674  //glutIdleFunc(Expand);
675  break;
676  default:
677  break;
678  }
679 }
680 #endif
681 
void DrDensity()
(rad,norm,dens) visualisation
GLfloat xp
Translation, wheel.
Definition: Draw.h:155
double InvScaleUn
Rescale the three orthogonal directions.
Definition: Draw.h:181
int pNLink()
Maximum number of bonds.
void RenderPart(void)
Choose the visualisation (obsolete)
void Conv2Povray()
esport the data in pov file format for rendering
int IfInfo
Removes the info line.
Definition: Draw.h:232
double InvScaleUn
Define the shrink factor between the box edges.
Definition: ElPoly.h:457
int LineSize
Line size of the gl.
Definition: ElPoly.h:427
BLOCK * Block
Information for every block.
Definition: VarData.h:1054
int NFileTot
Total number of file.
Definition: ElPoly.h:420
void SysInfo(char *cSystem)
Print a string with the system information.
Definition: VarData.cpp:164
Draw provides the basic configuration of the openGL libraries used in every derived program...
Definition: Draw.h:15
void DrIsoipse(int NBin, int NIsoipse, int CoordN)
Draws all the same quotes surfaces.
void DrQuad()
Call a square in every particle position.
void ReadScript()
Reads and draw a script file.
Definition: DrawFile.cpp:285
void keyboard(unsigned char key, int x, int y)
Draws all the particles and bonds.
void DrIsolevel(int NSample, double IsoLevel)
Defines the triangles at the boundaries of the density close to the IsoLevel value.
int OpenFile(int f)
Opens the f file of the list open.
Definition: ElPolyEl.cpp:147
void DrPolygon()
Every particle is traeted as a vertex.
void DrPotential()
Potential function.
void ElMenuVisual(int option)
Choose what to visualize.
int BfDefChain()
Definition of the chain.
int quando
Current number of the file list.
Definition: ElPoly.h:424
int NChType
Type of chain selected.
Definition: VarData.h:1080
void DrTriangulate()
Triangulate a surface.
void DrSample(int NSample)
Samples the surface and draws it in triangles.
void CreateMenu()
Creates the menu.
int Picture()
Write a tiff file of the data in pixel.
Definition: DrawFile.cpp:183
double ScaleFact
Normal scaling factor (z zooming)
Definition: ElPoly.h:461
int DefQuad(int NSquare)
Quad.
void keyboardDraw(unsigned char key)
Combines the key with the functions.
void DrQuad1()
Intensity scheme.
double pNanoPos(int n, int d)
Return back folded nano position.
double pEdge(int d)
xyzr edges of the simulation box
Definition: VarData.h:918
double Saturation
Saturation of the color (increase intensity)
Definition: ElPoly.h:388
void ElDrawMouse(int button, int state, int x, int y)
Scaling.
int NPType
Type of particle selected.
Definition: VarData.h:1082
void InitConstant()
Initializes all the view constants.
int pNBlock()
Number of blocks.
void DrPartList()
Create a list of all the particles.
Definition: ElPolyDraw.cpp:218
int NEdge
Number of particles per edge.
Definition: VarData.h:1084
void DrVoronoi()
Voronoi tassellation.
void DrSurface()
Draws the surface like a sheet using the chains position.
double ExtParam
External parameter (e.g. for MarchingCubes)
Definition: ElPoly.h:459
bool ShiftSys(int How)
Shift the system accordin to the SHIFT_ definitions.
int NBackFold
Type of backfold.
Definition: ElPoly.h:439
int DefHexagon()
Hexagon.
int DrawOutput
Boh.
Definition: ElPoly.h:447
void DrSpectrum()
Calculate the spectrum of the surface and draws it in triangles.
int IfLine
Boh.
Definition: ElPoly.h:435
void DrCrossLinks()
Visualize the cross links.
Definition: ElPolyDraw.cpp:642
int Step
Current step for the picture&#39;s name.
Definition: Draw.h:244
int What2Draw
Draw the content in the appropriate visulization.
Definition: ElPoly.h:441
char Block2Draw[20]
Name of the block to draw.
Definition: ElPoly.h:390
int DefArrowThin()
Arrow.
void DrChains()
Position of every chain in hexagons.
Definition: ElPolyDraw.cpp:556
int IfScript
Ignores the script file.
Definition: Draw.h:234
void ElMenuChoise(int option)
Choose what to visualize.
void Transform(int block)
Transform a block.
Definition: VarDataEl.cpp:475
int NFile[2]
First and last file of the list.
Definition: ElPoly.h:418
void DrVectors()
Draw the chains as vectors.
Definition: ElPolyDraw.cpp:481
double Edge[3]
Box size.
Definition: Draw.h:262
int DefPoint()
Point.
void ChooseBlend(int Which)
Choose a different blending function.
char * info
Info line.
Definition: Draw.h:276
bool BackFold(int How)
Backfold the particle position.
void DrSquareMesh()
Draw the polygons for a square mesh.
void DrColor()
Visualisation of the particle system with velocity color scheme.
Definition: ElPolyDraw.cpp:420
int IfIntorno
If it visualizes only the particles/chains within a certain distance.
Definition: ElPoly.h:429
void Dmouse(int button, int state, int x, int y)
To launch the menu.
Definition: DrawControl.cpp:86
int CNorm
Normal coordinate.
Definition: VarData.h:1074