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());
162 glutAddMenuEntry(
Block[b].Name,b+EL_BLOCK);
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);
192 for(
int d=0;d<3;d++) Dr->
Edge[d] =
pEdge(d);
270 for(
int d=0;d<3;d++) Dr->
Edge[d] =
pEdge(d);
468 if(option == EL_BLOCK + b){
473 if(option == EL_BLOCK +
pNBlock()){
483 Dr->
Dmouse(button,state,x,y);
486 if( glutGetModifiers() == GLUT_ACTIVE_CTRL){
493 case GLUT_WHEEL_DOWN:
494 if( glutGetModifiers() == GLUT_ACTIVE_CTRL){
559 sprintf(Dr->
info,
"Bonding visualisation");
568 sprintf(Dr->
info,
"Particle back fold");
570 sprintf(Dr->
info,
"Center of mass back fold");
572 sprintf(Dr->
info,
"Nano particle back fold");
574 sprintf(Dr->
info,
"No back fold");
586 sprintf(Dr->
info,
"Center of mass proximity");
588 sprintf(Dr->
info,
"Particle proximity");
593 char cSystem[STRSIZE];
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]]);
606 sprintf(
string,
"rm %s",cFile[
quando]);
614 sprintf(Dr->
info,
"%s %d",cFile[quando],NFile[0]);
656 sprintf(Dr->
info,
"initial configuration");
void DrDensity()
(rad,norm,dens) visualisation
GLfloat xp
Translation, wheel.
double InvScaleUn
Rescale the three orthogonal directions.
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.
double InvScaleUn
Define the shrink factor between the box edges.
int LineSize
Line size of the gl.
BLOCK * Block
Information for every block.
int NFileTot
Total number of file.
void SysInfo(char *cSystem)
Print a string with the system information.
Draw provides the basic configuration of the openGL libraries used in every derived program...
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.
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.
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.
int NChType
Type of chain selected.
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.
double ScaleFact
Normal scaling factor (z zooming)
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
double Saturation
Saturation of the color (increase intensity)
void ElDrawMouse(int button, int state, int x, int y)
Scaling.
int NPType
Type of particle selected.
void InitConstant()
Initializes all the view constants.
int pNBlock()
Number of blocks.
void DrPartList()
Create a list of all the particles.
int NEdge
Number of particles per edge.
void DrVoronoi()
Voronoi tassellation.
void DrSurface()
Draws the surface like a sheet using the chains position.
double ExtParam
External parameter (e.g. for MarchingCubes)
bool ShiftSys(int How)
Shift the system accordin to the SHIFT_ definitions.
int NBackFold
Type of backfold.
void DrSpectrum()
Calculate the spectrum of the surface and draws it in triangles.
void DrCrossLinks()
Visualize the cross links.
int Step
Current step for the picture's name.
int What2Draw
Draw the content in the appropriate visulization.
char Block2Draw[20]
Name of the block to draw.
void DrChains()
Position of every chain in hexagons.
int IfScript
Ignores the script file.
void ElMenuChoise(int option)
Choose what to visualize.
void Transform(int block)
Transform a block.
int NFile[2]
First and last file of the list.
void DrVectors()
Draw the chains as vectors.
void ChooseBlend(int Which)
Choose a different blending function.
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.
int IfIntorno
If it visualizes only the particles/chains within a certain distance.
void Dmouse(int button, int state, int x, int y)
To launch the menu.
int CNorm
Normal coordinate.