#include <stdio.h>#include "iup.h"#include "cd.h"#include "cdiup.h"#include "cdclipbd.h"#include "cdprint.h"#include "wd.h"#include "prj.h"#include "crs.h"#include "nfr.h"#include "dsp.h"Gráfico de dependência de inclusões para prj.c:

Vá para o código-fonte deste arquivo.
Project manager module. | |
See specification of model manipulation module in hearder file "crs.h". See specification of model Input functions in hearder file "nfr.h". See specification of primitive display functions in hearder file "dsp.h". Project specification: see class notes of course CIV-2801 "Fundamentos de Computacao Grafica Aplicada", period 2004.2. Revisions:
| |
| #define | SOLUTION_TOL 0.01 |
| Defines the iterative solution tolerance value. | |
| #define | FIT_FACTOR 0.10 |
| Defines the factor for adjusting (fitting) image of the entire model on the canvas. | |
| #define | ZOOM_FACTOR 0.20 |
| Defines the factor for zooming in and out image of model on canvas. | |
| #define | PAN_FACTOR 0.05 |
| Defines the factor with respect of window size for translating (pan) image of model on canvas. | |
| #define | PICK_FACTOR 0.01 |
| Defines the factor with respect to minimum window size of tolerance for picking nodes. | |
| void | prjResetWindow (void) |
| This function resets the limiting values of the visualization window. | |
| 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. | |
| int | prjChkEmptyModel (void) |
| This function verifies whether there is no active model in memory. | |
| void | prjResize (int width, int height) |
| This function sets the main canvas viewport according to given canvas sizes. | |
| void | prjRedisplay (void) |
| This function clears the main canvas and redisplays the current active model. | |
| void | prjInfo (void) |
| This function pops up a message dialog box with information about this program. | |
| void | prjHelp (void) |
| This function displays a help list of the possible program actions and their associated keys. | |
| void | prjNew (void) |
| This function resets the current database so that the user can start a new model. | |
| int | prjOpenModel (FILE *fd) |
| This function resets the current database, opens a new model data file, and creates the model data structure. | |
| void | prjSaveResults (FILE *fd) |
| This function writes the results of the current model in memory in a file. | |
| void | prjProcessInit (void) |
| This function reinitializes the iterative solution process of the current ative model. | |
| int | prjProcessGoThru (void) |
| This function goes through the entire iterative solution process of the current ative model. | |
| int | prjProcessStep (void) |
| This function processes the equilibrium of a node that has the maximum unbalanced moment in absolute value. | |
| int | prjProcessNode (double x, double y) |
| This function processes the equilibrium of a node that is close to the given point (x,y). | |
| void | prjLoadDisplay (int on_off) |
| This function sets the flag for displaying member loads. | |
| void | prjPrint (void) |
| This function sends the current image on the screen to the active printer. | |
| void | prjClipboard (void) |
| This function copies the current image on the screen to the clipboard (transfering area). | |
| void | prjFit (void) |
| This function adjusts the world coordinate limits of the visualization window to fit the entire model. | |
| void | prjZoomIn (void) |
| This function adjusts the world coordinate limits of the visualization window based on a zoom factor. | |
| void | prjZoomOut (void) |
| This function adjusts the world coordinate limits of the visualization window based on a zoom factor. | |
| void | prjPanLeft (void) |
| This function moves to the right the world coordinate limits of the visualization window based on a pan factor. | |
| void | prjPanRight (void) |
| This function moves to the left the world coordinate limits of the visualization window based on a pan factor. | |
| void | prjPanDown (void) |
| This function moves upwards the world coordinate limits of the visualization window based on a pan factor. | |
| void | prjPanUp (void) |
| This function moves downwards the world coordinate limits of the visualization window based on a pan factor. | |
| char * | trab_info |
| String for project information text. | |
| double | win_xmin = 0.0 |
| Current visualization window left limit. | |
| double | win_xmax = 50.0 |
| Current visualization window right limit. | |
| double | win_ymin = 0.0 |
| Current visualization window bottom limit. | |
| double | win_ymax = 50.0 |
| Current visualization window top limit. | |
| void * | crs_model = NULL |
| Pointer to model data. | |
Definições e Macros | |
| #define | _PRJ_C |
|
|
|
|
|
Defines the factor for adjusting (fitting) image of the entire model on the canvas.
Definição na linha 65 do arquivo prj.c. Referenciado por prjFit(), prjHelp() e prjOpenModel(). |
|
|
Defines the factor with respect of window size for translating (pan) image of model on canvas.
Definição na linha 72 do arquivo prj.c. Referenciado por prjPanDown(), prjPanLeft(), prjPanRight() e prjPanUp(). |
|
|
Defines the factor with respect to minimum window size of tolerance for picking nodes.
Definição na linha 76 do arquivo prj.c. Referenciado por prjProcessNode(). |
|
|
Defines the iterative solution tolerance value.
Definição na linha 61 do arquivo prj.c. Referenciado por prjOpenModel() e prjProcessInit(). |
|
|
Defines the factor for zooming in and out image of model on canvas.
Definição na linha 68 do arquivo prj.c. Referenciado por prjZoomIn() e prjZoomOut(). |
|
|
This function verifies whether there is no active model in memory.
Definição na linha 188 do arquivo prj.c. Referências crsGetNumMembers(). Referenciado por drvMouseBt() e drvRedisplay(). |
|
|
This function copies the current image on the screen to the clipboard (transfering area). Only works in Windows environment. Definição na linha 579 do arquivo prj.c. Referências crsGetNumMembers(), dspModel() e Gdatascreen. Referenciado por drvKeyCrtl(). |
|
|
This function adjusts the world coordinate limits of the visualization window to fit the entire model. It gets the bounding box of the current model and increases the window sizes based on a fit factor, maintaining its current center. Definição na linha 601 do arquivo prj.c. Referências CRS_SUCCESS, crsGetGlobalBox(), dspWindow(), FIT_FACTOR, prjRedisplay(), win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvKeyCrtl(). |
|
|
This function displays a help list of the possible program actions and their associated keys.
Definição na linha 244 do arquivo prj.c. Referências dspWindow(), FIT_FACTOR, win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvKeyCrtl() e drvRedisplay(). |
|
|
This function pops up a message dialog box with information about this program.
Definição na linha 234 do arquivo prj.c. Referências trab_info. Referenciado por drvKeyCrtl(). |
|
|
This function does everything is necessary to initialize the modeling and visualization part of this program.
Definição na linha 145 do arquivo prj.c. Referências dspInit(), dspWindow(), Gdatascreen, Odatascreen, win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por main(). |
|
|
This function sets the flag for displaying member loads. If the given on_off parameter is true (1), the member loads are displayed. If this parameter is false (0), no load is displayed.
Definição na linha 554 do arquivo prj.c. Referências dspLoadDisplay() e prjRedisplay(). Referenciado por drvKeyCrtl(). |
|
|
This function resets the current database so that the user can start a new model.
Definição na linha 317 do arquivo prj.c. Referências crs_model, crsFreeModel(), dspWindow(), prjRedisplay(), prjResetWindow(), win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvKeyCrtl(). |
|
|
This function resets the current database, opens a new model data file, and creates the model data structure. It also initializes the iterative solution. The new model is displayed on the main canvas.
Definição na linha 343 do arquivo prj.c. Referências crs_model, CRS_SUCCESS, crsActivateModel(), crsCompleteModel(), crsFreeModel(), crsGetGlobalBox(), crsResetSolution(), dspWindow(), FIT_FACTOR, nfrCrsMembers(), nfrCrsModel(), nfrCrsNodes(), prjRedisplay(), prjResetWindow(), SOLUTION_TOL, win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvKeyCrtl(). |
|
|
This function moves upwards the world coordinate limits of the visualization window based on a pan factor. The result is that the displayed model will appear shifted downwards in the canvas viewport. Definição na linha 692 do arquivo prj.c. Referências crsGetNumMembers(), dspPanWindow(), PAN_FACTOR, prjRedisplay(), win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvKeyCrtl(). |
|
|
This function moves to the right the world coordinate limits of the visualization window based on a pan factor. The result is that the displayed model will appear shifted to left in the canvas viewport. Definição na linha 652 do arquivo prj.c. Referências crsGetNumMembers(), dspPanWindow(), PAN_FACTOR, prjRedisplay(), win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvKeyCrtl(). |
|
|
This function moves to the left the world coordinate limits of the visualization window based on a pan factor. The result is that the displayed model will appear shifted to right in the canvas viewport. Definição na linha 672 do arquivo prj.c. Referências crsGetNumMembers(), dspPanWindow(), PAN_FACTOR, prjRedisplay(), win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvKeyCrtl(). |
|
|
This function moves downwards the world coordinate limits of the visualization window based on a pan factor. The result is that the displayed model will appear shifted upwards in the canvas viewport. Definição na linha 712 do arquivo prj.c. Referências crsGetNumMembers(), dspPanWindow(), PAN_FACTOR, prjRedisplay(), win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvKeyCrtl(). |
|
|
This function sends the current image on the screen to the active printer.
Definição na linha 565 do arquivo prj.c. Referências crsGetNumMembers(), dspModel() e Gdatascreen. Referenciado por drvKeyCrtl(). |
|
|
This function goes through the entire iterative solution process of the current ative model. Nothing will happen if there is no model currently active or if all the nodes of the model are already balanced.
Definição na linha 466 do arquivo prj.c. Referências CRS_NO_MODEL_DEFINED, CRS_SUCCESS, crsGetNumMembers(), crsSolveModel() e prjRedisplay(). Referenciado por drvKeyCrtl(). |
|
|
This function reinitializes the iterative solution process of the current ative model. Nothing will happen if there is no model currently active. Definição na linha 447 do arquivo prj.c. Referências crsGetNumMembers(), crsResetSolution(), prjRedisplay() e SOLUTION_TOL. Referenciado por drvKeyCrtl(). |
|
||||||||||||
|
This function processes the equilibrium of a node that is close to the given point (x,y). Nothing will happen if there is no model currently active or there is no node close to the given point.
Definição na linha 518 do arquivo prj.c. Referências CRS_FAILURE, CRS_NO_MODEL_DEFINED, CRS_SUCCESS, crsGetNumMembers(), crsPickNode(), crsProcessNode(), PICK_FACTOR, prjRedisplay(), win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvMouseBt(). |
|
|
This function processes the equilibrium of a node that has the maximum unbalanced moment in absolute value. Nothing will happen if there is no model currently active or if all the nodes of the model are already balanced.
Definição na linha 490 do arquivo prj.c. Referências CRS_NO_MODEL_DEFINED, CRS_SUCCESS, crsGetNumMembers(), crsStepSolution() e prjRedisplay(). Referenciado por drvKeyCrtl(). |
|
|
This function does everything is necessary to close the modeling and visualization part of this program.
Definição na linha 172 do arquivo prj.c. Referências crs_model, crsFreeModel() e Gdatascreen. Referenciado por drvKeyCrtl(). |
|
|
This function clears the main canvas and redisplays the current active model.
Definição na linha 223 do arquivo prj.c. Referências dspModel(). Referenciado por drvRedisplay(), prjFit(), prjLoadDisplay(), prjNew(), prjOpenModel(), prjPanDown(), prjPanLeft(), prjPanRight(), prjPanUp(), prjProcessGoThru(), prjProcessInit(), prjProcessNode(), prjProcessStep(), prjZoomIn() e prjZoomOut(). |
|
|
This function resets the limiting values of the visualization window.
Definição na linha 127 do arquivo prj.c. Referências win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por prjNew() e prjOpenModel(). |
|
||||||||||||
|
This function sets the main canvas viewport according to given canvas sizes.
Definição na linha 204 do arquivo prj.c. Referências dspWindow(), Gdatascreen, win_xmax, win_xmin, win_ymax e win_ymin. Referenciado por drvResize(). |
|
|
This function writes the results of the current model in memory in a file.
Definição na linha 415 do arquivo prj.c. Referências crsGetMemberMoments(), crsGetMemberNodes(), crsGetNodeCoords() e crsGetNumMembers(). Referenciado por drvKeyCrtl(). |
|
|
This function adjusts the world coordinate limits of the visualization window based on a zoom factor. It decreases the window sizes, maintaining its current center. The result is that the displayed model will appear bigger in the canvas viewport. Definição na linha 619 do arquivo prj.c. Referências crsGetNumMembers(), dspWindow(), prjRedisplay(), win_xmax, win_xmin, win_ymax, win_ymin e ZOOM_FACTOR. Referenciado por drvKeyCrtl(). |
|
|
This function adjusts the world coordinate limits of the visualization window based on a zoom factor. It increases the window sizes, maintaining its current center. The result is that the displayed model will appear smaller in the canvas viewport. Definição na linha 636 do arquivo prj.c. Referências crsGetNumMembers(), dspWindow(), prjRedisplay(), win_xmax, win_xmin, win_ymax, win_ymin e ZOOM_FACTOR. Referenciado por drvKeyCrtl(). |
|
|
Pointer to model data.
Definição na linha 115 do arquivo prj.c. Referenciado por prjNew(), prjOpenModel() e prjQuit(). |
|
|
Valor Inicial:
{
"\n"
"\n"
" CIV-2801 -- 2004.2 \n"
"\n"
" Fundamentos de Computacao Grafica Aplicada \n"
"\n"
" Departamento de Engenharia Civil \n"
" PUC-Rio \n"
"\n"
" Trabalho No.: 3 \n"
" Aluno: \n"
" Data: \n"
"\n"
}
Definição na linha 80 do arquivo prj.c. Referenciado por prjInfo(). |
|
|
Current visualization window right limit.
Definição na linha 103 do arquivo prj.c. Referenciado por prjFit(), prjHelp(), prjInit(), prjNew(), prjOpenModel(), prjPanDown(), prjPanLeft(), prjPanRight(), prjPanUp(), prjProcessNode(), prjResetWindow(), prjResize(), prjZoomIn() e prjZoomOut(). |
|
|
Current visualization window left limit.
Definição na linha 99 do arquivo prj.c. Referenciado por prjFit(), prjHelp(), prjInit(), prjNew(), prjOpenModel(), prjPanDown(), prjPanLeft(), prjPanRight(), prjPanUp(), prjProcessNode(), prjResetWindow(), prjResize(), prjZoomIn() e prjZoomOut(). |
|
|
Current visualization window top limit.
Definição na linha 111 do arquivo prj.c. Referenciado por prjFit(), prjHelp(), prjInit(), prjNew(), prjOpenModel(), prjPanDown(), prjPanLeft(), prjPanRight(), prjPanUp(), prjProcessNode(), prjResetWindow(), prjResize(), prjZoomIn() e prjZoomOut(). |
|
|
Current visualization window bottom limit.
Definição na linha 107 do arquivo prj.c. Referenciado por prjFit(), prjHelp(), prjInit(), prjNew(), prjOpenModel(), prjPanDown(), prjPanLeft(), prjPanRight(), prjPanUp(), prjProcessNode(), prjResetWindow(), prjResize(), prjZoomIn() e prjZoomOut(). |
1.3.4