#include <stdio.h>
#include "iup.h"
#include "cd.h"
#include "cdiup.h"
#include "vgl/vglc/vglc.h"
#include "vgl/vglc/vglciup.h"
#include "vgl/vglc/vglcglut.h"
Include dependency graph for prj.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Project manager module | |
Project specification: see class notes of course CIV-2801 "Fundamentos de Computacao Grafica Aplicada", period 2005.2. Revisions:
| |
void | prjInit (void) |
This function does everything is necessary to initialize the modeling and visualization part of this program. | |
void | prjQuit (void) |
This function does everything is necessary to close the modeling and visualization part of this program. | |
void | prjResize (int width, int height) |
This function initializes the display module as a result of of a canvas resize event. | |
void | prjRedisplay (void) |
This function clears the main canvas and redisplays the model described in the current database. | |
void | prjInfo (void) |
This function pops up a message dialog box with information about this program. | |
void | prjHelp (void) |
This function calls a display function to display a help list of the possible program actions and their associated keys. | |
int | prjOpenModel (FILE *fd) |
This function resets the current database, opens a new model data file, and creates the primitive data structure. | |
void | prjZbufferSnapShot (void) |
This function opens a dialog containing only one canvas and creates a snap shot image of the current model. | |
int | prjRaster2WorldXY (int x, int y, double *xw, double *yw) |
Given a mouse location point in raster canvas coordinates, this function returns the corresponding point in the XY plane in world coordinates. | |
int | prjSelectPrm (double x, double y) |
void | prjSetHeightFac (double fac) |
This function sets the height of the currently selected primitive according to the given factor and the maximum allowable height (which is equal to the maximum size in the XY plane). | |
double | prjGetHeightFac (void) |
This function returns the value of the primitive height factor. | |
void | prjResetView (void) |
This function resets the projection of the visualization. | |
void | prjFit (void) |
This function adjusts (fits) the current model on the screen. | |
void | prjPersp (void) |
This function sets the current projection type to perspective (conic projection). | |
void | prjOrtho (void) |
This function sets the current projection type to orthographic. | |
void | prjProjX (void) |
This function sets the current projection type to orthographic (cylinder projection) and specifies the camera paramaters such that the projection plane is parallel to plane X = const. | |
void | prjProjY (void) |
This function sets the current projection type to orthographic (cylinder projection) and specifies the camera paramaters such that the projection plane is parallel to plane Y = const. | |
void | prjProjZ (void) |
This function sets the current projection type to orthographic (cylinder projection) and specifies the camera paramaters such that the projection plane is parallel to plane Y = const. | |
void | prjManipMode (void) |
This function sets the mouse interaction mode to model manipulation (screen based visualization control). | |
void | prjNavigMode (void) |
This function sets the mouse interaction mode to navigation (walk-through visualization control). | |
void | prjZoomMode (void) |
This function sets the mouse interaction mode to zoom control. | |
void * | Odatascreen |
IUP handle to data canvas. | |
VglCanvas * | vglcanvas |
VGL handle to data canvas. |
|
This function adjusts (fits) the current model on the screen. That is, it keeps the current camera position and orientation parameters and resets the scaling such that the entire model fits on the screen. Definition at line 436 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(). |
|
This function returns the value of the primitive height factor. This factor is a ratio between the height of the currently selected primitive and the maximum allowable height (which is equal to the maximum size in the XY plane).
Definition at line 414 of file prj.c. References max_height, prmFirst(), and prmGetHeight(). Referenced by drvMouseBt(). |
|
This function calls a display function to display a help list of the possible program actions and their associated keys.
Definition at line 236 of file prj.c. References dspHelp(). Referenced by drvRedisplay(). |
|
This function pops up a message dialog box with information about this program.
Definition at line 229 of file prj.c. References trab_info. Referenced by drvKeyCrtl(). |
|
This function does everything is necessary to initialize the modeling and visualization part of this program. Currently it is doing nothing. Definition at line 187 of file prj.c. Referenced by main(). |
|
This function sets the mouse interaction mode to model manipulation (screen based visualization control).
Definition at line 499 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(). |
|
This function sets the mouse interaction mode to navigation (walk-through visualization control).
Definition at line 506 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(). |
|
This function resets the current database, opens a new model data file, and creates the primitive data structure. The new model is displayed on the main canvas.
Definition at line 243 of file prj.c. References MAX, max_height, prjPersp(), prjResetLocalParams(), prmDeleteList(), prmGetGlobalBox(), prmioInterpret(), and vglcanvas. Referenced by drvKeyCrtl(). |
|
This function sets the current projection type to orthographic.
Definition at line 457 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(). |
|
This function sets the current projection type to perspective (conic projection).
Definition at line 444 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(), and prjOpenModel(). |
|
This function sets the current projection type to orthographic (cylinder projection) and specifies the camera paramaters such that the projection plane is parallel to plane X = const.
Definition at line 466 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(). |
|
This function sets the current projection type to orthographic (cylinder projection) and specifies the camera paramaters such that the projection plane is parallel to plane Y = const.
Definition at line 477 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(). |
|
This function sets the current projection type to orthographic (cylinder projection) and specifies the camera paramaters such that the projection plane is parallel to plane Y = const.
Definition at line 488 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(). |
|
This function does everything is necessary to close the modeling and visualization part of this program.
Definition at line 193 of file prj.c. References Gzbuffercanvas, Ozbufferdialog, and prmDeleteList(). Referenced by drvKeyCrtl(). |
|
Given a mouse location point in raster canvas coordinates, this function returns the corresponding point in the XY plane in world coordinates. The point is found by the intersection of the pick ray with the plane z=0. A pick ray is a line between a point on the front (near) plane and a point on the back (far) plane. These two points correspond to the given point location in raster coordinates. If the ray is parallel to the z=0 plane, a false (0) status is returned.
Definition at line 336 of file prj.c. References dspGetPickRay(). Referenced by drvMouseBt(). |
|
This function clears the main canvas and redisplays the model described in the current database.
Definition at line 213 of file prj.c. References list_updated, Odatascreen, and prjBuildDisplayList(). Referenced by drvRedisplay(). |
|
This function resets the projection of the visualization. That is, it resets the camera parameters. Definition at line 428 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(). |
|
This function initializes the display module as a result of of a canvas resize event.
Definition at line 206 of file prj.c. References dspInit(). Referenced by drvResize(). |
|
Definition at line 362 of file prj.c. References prjBuildDisplayList(), prjPckPrm(), prmSelect(), and prmUnselectAll(). Referenced by drvMouseBt(). |
|
This function sets the height of the currently selected primitive according to the given factor and the maximum allowable height (which is equal to the maximum size in the XY plane). Nothing will happen if no primitive is selected.
Definition at line 388 of file prj.c. References max_height, prjBuildDisplayList(), prmFirst(), prmSetHeight(), and vglcanvas. Referenced by drvSetHeightFac(). |
|
This function opens a dialog containing only one canvas and creates a snap shot image of the current model. The image is created using the z-buffer algorithm and the CD (Canvas Draw) 2D graphics system. The current visualization parameters for camera and view volume specification are adopted. Definition at line 284 of file prj.c. References Gzbuffercanvas, Ozbufferdialog, prjDspZbufferCanvas(), prmFirst(), and zbfInit(). Referenced by drvKeyCrtl(). |
|
This function sets the mouse interaction mode to zoom control. A single zoom rectangle is defined, returning the the previous interation mode. Definition at line 513 of file prj.c. References vglcanvas. Referenced by drvKeyCrtl(). |
|
IUP handle to data canvas.
Definition at line 278 of file prj.h. Referenced by drvResize(), dspInit(), main(), and prjRedisplay(). |
|
VGL handle to data canvas.
Definition at line 280 of file prj.h. Referenced by drvKeyCrtl(), main(), prjFit(), prjManipMode(), prjNavigMode(), prjOpenModel(), prjOrtho(), prjPersp(), prjProjX(), prjProjY(), prjProjZ(), prjResetView(), prjSetHeightFac(), and prjZoomMode(). |