4 #include "../include/Matematica.h" 10 #if !defined(GLUT_WHEEL_UP) 11 # define GLUT_WHEEL_UP 3 12 # define GLUT_WHEEL_DOWN 4 24 void spinDisplay(
void);
26 void Illuminazione(
void);
34 void processEvent(
int value);
36 void ChangeSize(GLsizei w,GLsizei h);
38 void Shout(
const char *s, ... );
56 void Window(
int argc,
char **argv);
76 void PutString(
double Posx,
double Posy,
double Posz,
char *String);
78 void Numera(
double *Pos,
int n);
81 void Lista(
int NSquare);
107 double Normal(
double *v,
double *u,
double *w,
double *n);
115 void DepthMap1(
double Val,GLfloat *Color);
122 void Dmouse(
int button,
int state,
int x,
int y);
137 void abort_(
const char * s, ...);
173 scale, dscale,tscale,
175 Rback, Gback,Bback,Aback;
279 extern void keyboard(
unsigned char key,
int x,
int y);
280 extern void MenuChoise(
int option);
281 extern void MenuVisual(
int option);
282 extern void ParticleList(
void);
283 extern void ParticleRealTime();
284 extern void Figure();
285 extern void Figure1();
286 extern void Timer(
int v);
287 extern void reshape(
int w,
int h);
288 extern void mouse(
int button,
int state,
int x,
int y);
289 extern void MouseMove(
int x,
int y);
290 extern void special(
int k,
int x,
int y);
292 static const GLfloat DrAmbientWhite [] = {0.25, 0.25, 0.25, 1.00};
293 static const GLfloat DrAmbientRed [] = {0.25, 0.00, 0.00, 1.00};
294 static const GLfloat DrAmbientGreen [] = {0.00, 0.25, 0.00, 1.00};
295 static const GLfloat DrAmbientBlue [] = {0.00, 0.00, 0.25, 1.00};
296 static const GLfloat DrDiffuseWhite [] = {0.75, 0.75, 0.75, 1.00};
297 static const GLfloat DrDiffuseRed [] = {0.75, 0.00, 0.00, 1.00};
298 static const GLfloat DrDiffuseGreen [] = {0.00, 0.75, 0.00, 1.00};
299 static const GLfloat DrDiffuseBlue [] = {0.00, 0.00, 0.75, 1.00};
300 static const GLfloat DrSpecularWhite[] = {1.00, 1.00, 1.00, 1.00};
301 static const GLfloat DrSpecularRed [] = {1.00, 0.25, 0.25, 1.00};
302 static const GLfloat DrSpecularGreen[] = {0.25, 1.00, 0.25, 1.00};
303 static const GLfloat DrSpecularBlue [] = {0.25, 0.25, 1.00, 1.00};
306 static float ColorType[12][4] =
void DepthMap1(double Val, GLfloat *Color)
Depth map.
GLfloat xp
Translation, wheel.
int GridEdge[3]
Number of lines per edge.
double InvScaleUn
Rescale the three orthogonal directions.
void DMouseMove(int x, int y)
How the scene rotate (Camera view should be implemented)
void ChangeDxSx(GLfloat Movement)
Movement right left.
int IfInfo
Removes the info line.
GLuint Hexagon
Refers to the list of a hexagon.
void Dreshape(int w, int h)
Principal reshape function.
GLfloat IncrVisDxSx
Increment visual DxSx, SuGiu.
int DefMetalCylinder(double Rad, double Height)
Metallic cylinder.
Draw provides the basic configuration of the openGL libraries used in every derived program...
double Normal(double *v, double *u, double *w, double *n)
Calculate the normal.
void ReadScript()
Reads and draw a script file.
int ne
Enables/disables fog.
void DrTriangles(int NPoint)
Boh.
void DMinimal(void)
A empty scene (only the list)
int Diap
Number of frames.
void DFigure(void)
Definition of the scene on which the objects will be drawn.
int ApplyTexture()
Apply the texture to a square.
GLuint Arrow
Refers to the list of a arrow.
GLuint DrLegend
Refers to the list of the legend.
int DefCube(int NSquare)
Cube.
GLfloat Rback
Background color.
int WritePngwriter()
Write a png file of the data in pixel (uses libpngwriter)
GLuint XCenter
Center of the frame.
void Dspecial(int k, int x, int y)
Boh.
int sp
Enables/disables spot light.
void DepthMap(double Val, GLfloat *Color)
Pointer to a generic function.
GLfloat xl1
Position of the light1.
int Picture()
Write a tiff file of the data in pixel.
int Values
Number of values to divide the edge in squares.
int WinHeight
Height of the window.
int gr
Puts/removes the grid.
int DefQuad(int NSquare)
Quad.
GLuint YCenter
Center of the frame.
void(Draw::* DEPTH_MAP)(double Val, GLfloat *Color)
Data type for distance/field functions.
void keyboardDraw(unsigned char key)
Combines the key with the functions.
int ImWidth
Width and height of the image.
GLuint GlWall
Refers to the list of a wall.
int MainWindow
Refers to optional different windows.
void DTimer(int v)
Not working.
void ChooseDepthMap(int n)
Choose Depth map.
GLuint Point
Refers to the list of the point.
GLuint Quad
Refers to the list of the square.
int la
Puts/removes the box edges.
int DefCylinder(double Rad, double Height)
Cylinder.
void InitConstant()
Initializes all the view constants.
int OpenImage(const char *FileName)
Open a image to be store in pixel.
GLuint Griglia
Refers to the list of the grid.
DEPTH_MAP Depth_Map
Pointer to a distance/field function.
int IfMaterial
Activate the illumination for a specific material.
void CameraQuat()
Quaternion camera implementation.
GLuint Cube
Refers to the list of the texture.
void DrCube()
Line in a cube.
GLuint ScriptList
Refers to the list of the objects called by the script file.
int IfPoint
Decides to draw points or spheres.
GLfloat AngleDxSx
Angle DxSx, SuGiu.
GLuint Particles
Refers to the list of the total position of the particles which will be generated in another program...
int ShowTexture()
Call the texture in the scene.
void Draw1(void)
A scene for debugging.
void Transform()
Transform the system coordinates.
double ExtRad
Cylinder radius.
GLfloat xl0
Position of the light0.
int yRem
Old y position of the mouse.
void Lista(int NSquare)
Definition of the primitives.
GLfloat xLeg
Position of the legend.
int WritePng()
Write a png file of the data in pixel (not working)
void abort_(const char *s,...)
Check.
GLuint MetalCylinder
Refers to the list of another cylinder (obsolete)
int Step
Current step for the picture's name.
int DefTexture()
Define a simple texture.
GLfloat xf
Orientation of the light.
int IfScript
Ignores the script file.
int IfBlend
Activate the blending.
double ExtHeight
Cylinder height.
GLfloat dxLeg
Width of the legend.
GLfloat xi
Position of the info string.
GLuint Texture
Refers to the list of the texture.
int xRem
Old x position of the mouse.
void ShowImage()
Displays the data stored in pixel.
void ChooseBlend(int Which)
Choose a different blending function.
void Window(int argc, char **argv)
Initial definition of the window.
int WinWidth
Width of the window.
void PutString(double *Pos, char *String)
Put a string.
GLuint Cylinder
Refers to the list of the cylinder.
char * Number
Characters for the grid.
int NLevel
Levels of the images data (usually 4=RGBA)
void Numera(double *Pos, int n)
Print the.
int lu
Enables/disables illumination.
GLubyte * pixel
Principal image (always allocated)
void Dmouse(int button, int state, int x, int y)
To launch the menu.
int DefLegend()
Depth map.
void ReadConf()
Reads and applies external configurations.
void ChangeSuGiu(GLfloat Movement)
Movement up-down.
double GridStep
Finess of the grid.