#include <stdio.h>#include <math.h>#include "cd.h"#include "wd.h"#include "crs.h"#include "dsp.h"#include "t2d.h"Gráfico de dependência de inclusões para dsp.c:

Vá para o código-fonte deste arquivo.
Display module | |
The adopted model data structure is described in module "crs.c". The basic graphics system used to display primitives is the "CD - Canvas Drawing". Please refer to CD documentation for additional information. This file must be completed as part of this assignment. The points to complete are indicated by a comment of the type: **** COMPLETE AQUI: xxx **** Revisions:
| |
| #define | ToDegree(a) ((a)*(double)57.295779513) |
| Defines factor to transform angles in radians to degree. | |
| #define | ANGLE_TOL 0.01 |
| Defines a tolerance value for angles in degrees. | |
| #define | LOAD_TOL 0.01 |
| Defines a tolerance value for load values. | |
| #define | BACKGROUND_COLOR CD_WHITE |
| Defines white as background color. | |
| #define | MEMBER_COLOR CD_DARK_YELLOW |
| Defines dark yellow as foreground color for beam members. | |
| #define | LOAD_COLOR CD_DARK_BLUE |
| Defines dark blue as foreground color for beam loads. | |
| #define | MOMENT_COLOR CD_BLACK |
| Defines black as foreground color for beam end moments. | |
| #define | UNBALANCED_COLOR CD_RED |
| Defines red color for unbalanced nodes. | |
| #define | BALANCED_COLOR CD_GREEN |
| Defines green color for balanced nodes. | |
| #define | FIXED_COLOR CD_BLACK |
| Defines black color for fixed-rotation nodes. | |
| #define | UNBALANCED_MARK CD_BOX |
| Defines box mark for unbalanced nodes. | |
| #define | BALANCED_MARK CD_DIAMOND |
| Defines diamond mark for balanced nodes. | |
| #define | FIXED_MARK CD_BOX |
| Defines box mark for fixed-rotation nodes. | |
| #define | NODE_MARK_SIZE 7 |
| Defines size in pixels for node marks. | |
| #define | HINGE_BACKGROUND_MARK CD_CIRCLE |
| Define circle mark for hinge background. | |
| #define | HINGE_FOREGROUND_MARK CD_HOLLOW_CIRCLE |
| Define hollow circle mark for hinge background. | |
| #define | HINGE_MARK_SIZE 9 |
| Define size in pixels for hinge mark. | |
| #define | HINGE_AXIAL_SHIFT 0.015 |
| Defines factor of axial shift for member end hinge. | |
| #define | MOMENT_AXIAL_SHIFT 0.01 |
| Defines factor of axial shift for moment value display with respect to window maximum size. | |
| #define | MOMENT_TRANSV_SHIFT 0.007 |
| Defines factor of transversal shift for moment value display with respect to window maximum size. | |
| #define | LOAD_AXIAL_SHIFT 0.01 |
| Defines factor of axial shift for member uniform load display with respect to window maximum size. | |
| #define | LOAD_TRANSV_SHIFT 0.008 |
| Defines factor of transversal shift for member uniform load and load value display with respect to window maximum size. | |
| #define | LOAD_ARROW_SIZE 0.02 |
| Defines factor of member uniform load arrow size with respect to window maximum size. | |
| #define | LOAD_TIP_SIZE 0.004 |
| Defines factor of member uniform load tip size with respect to window maximum size. | |
| #define | LOAD_STEP_SIZE 0.02 |
| Defines factor of member uniform load step size with respect to window maximum size. | |
| void | _dspAttSizes (void) |
| This function computes the attributes sizes according to the defined factors and the maximum window size. | |
| void | _dspMember (int id) |
| This function displays a member that is given by its index in the global axis system. | |
| void | _dspMemberAtt (double x0, double y0, double len, double angle, double q, int rotlib0, int rotlib1, double m0, double m1) |
| This function displays the attributes of a member. | |
| void | _dspMemberLoad (double len, double q, int def_orient) |
| This function displays the load of a member. | |
| void | _dspLoadArrow (double x, double q, int def_orient) |
| This function displays the a load arrow load. | |
| void | dspInit (void) |
| This function initializes the dsp module. | |
| void | dspWindow (double scale, double *xmin, double *xmax, double *ymin, double *ymax) |
| This function adjusts the given window limits according to the given scaling factor. | |
| void | dspPanWindow (double dx, double dy, double *xmin, double *xmax, double *ymin, double *ymax) |
| This function shifts the given window limits according to the given pan (displacement) factors. | |
| void | dspLoadDisplay (int on_off) |
| This function sets the flag for displaying member loads. | |
| void | dspModel (void) |
| This function displays the current active model according to its current solution status. | |
| double | hinge_axial_shift |
| Axial shift for member end hinge display. | |
| double | moment_axial_shift |
| Axial shift for moment value display. | |
| double | moment_transv_shift |
| Tranversal shift for moment value display. | |
| double | load_axial_shift |
| Axial shift for member uniform load display. | |
| double | load_transv_shift |
| Transversal shift for member uniform load and load value display. | |
| double | load_arrow_size |
| Member uniform load arrow size. | |
| double | load_tip_size |
| Member uniform load tip size. | |
| double | load_step_size |
| Member uniform load step size. | |
| int | dsp_load = 1 |
| Visibility flag for member loads. | |
|
|
Defines a tolerance value for angles in degrees.
Definição na linha 59 do arquivo dsp.c. Referenciado por _dspMember(). |
|
|
Defines white as background color.
Definição na linha 65 do arquivo dsp.c. Referenciado por _dspMemberAtt() e dspInit(). |
|
|
Defines green color for balanced nodes.
|
|
|
Defines diamond mark for balanced nodes.
|
|
|
Defines black color for fixed-rotation nodes.
|
|
|
Defines box mark for fixed-rotation nodes.
|
|
|
Defines factor of axial shift for member end hinge.
Definição na linha 107 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Define circle mark for hinge background.
Definição na linha 98 do arquivo dsp.c. Referenciado por _dspMemberAtt(). |
|
|
Define hollow circle mark for hinge background.
Definição na linha 101 do arquivo dsp.c. Referenciado por _dspMemberAtt(). |
|
|
Define size in pixels for hinge mark.
Definição na linha 104 do arquivo dsp.c. Referenciado por _dspMemberAtt(). |
|
|
Defines factor of member uniform load arrow size with respect to window maximum size.
Definição na linha 142 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Defines factor of axial shift for member uniform load display with respect to window maximum size.
Definição na linha 128 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Defines dark blue as foreground color for beam loads.
Definição na linha 71 do arquivo dsp.c. Referenciado por _dspMemberLoad(). |
|
|
Defines factor of member uniform load step size with respect to window maximum size.
Definição na linha 156 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Defines factor of member uniform load tip size with respect to window maximum size.
Definição na linha 149 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Defines a tolerance value for load values.
Definição na linha 62 do arquivo dsp.c. Referenciado por _dspMemberAtt(). |
|
|
Defines factor of transversal shift for member uniform load and load value display with respect to window maximum size.
Definição na linha 135 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Defines dark yellow as foreground color for beam members.
Definição na linha 68 do arquivo dsp.c. Referenciado por _dspMemberAtt(). |
|
|
Defines factor of axial shift for moment value display with respect to window maximum size.
Definição na linha 114 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Defines black as foreground color for beam end moments.
Definição na linha 74 do arquivo dsp.c. Referenciado por _dspMemberAtt(). |
|
|
Defines factor of transversal shift for moment value display with respect to window maximum size.
Definição na linha 121 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Defines size in pixels for node marks.
|
|
|
Defines factor to transform angles in radians to degree.
Definição na linha 56 do arquivo dsp.c. Referenciado por _dspMember(). |
|
|
Defines red color for unbalanced nodes.
|
|
|
Defines box mark for unbalanced nodes.
|
|
|
This function computes the attributes sizes according to the defined factors and the maximum window size.
Definição na linha 181 do arquivo dsp.c. Referências HINGE_AXIAL_SHIFT, hinge_axial_shift, LOAD_ARROW_SIZE, load_arrow_size, LOAD_AXIAL_SHIFT, load_axial_shift, LOAD_STEP_SIZE, load_step_size, LOAD_TIP_SIZE, load_tip_size, LOAD_TRANSV_SHIFT, load_transv_shift, MOMENT_AXIAL_SHIFT, moment_axial_shift, MOMENT_TRANSV_SHIFT e moment_transv_shift. Referenciado por dspModel(). |
|
||||||||||||||||
|
This function displays the a load arrow load.
Definição na linha 445 do arquivo dsp.c. Referenciado por _dspMemberLoad(). |
|
|
This function displays a member that is given by its index in the global axis system. The function displays hinges for member end rotation liberations (if they exist), the member uniform load (if there one), and the bending moments values at its ends.
Definição na linha 218 do arquivo dsp.c. Referências _dspMemberAtt(), ANGLE_TOL, crsGetMemberMoments(), crsGetMemberNodes(), crsGetMemberRotLibs(), crsGetMemberUnifLoad(), crsGetNodeCoords() e ToDegree. Referenciado por dspModel(). |
|
||||||||||||||||||||||||||||||||||||||||
|
This function displays the attributes of a member.
Definição na linha 297 do arquivo dsp.c. Referências _dspMemberLoad(), BACKGROUND_COLOR, dsp_load, hinge_axial_shift, HINGE_BACKGROUND_MARK, HINGE_FOREGROUND_MARK, HINGE_MARK_SIZE, LOAD_TOL, MEMBER_COLOR, moment_axial_shift, MOMENT_COLOR, moment_transv_shift, ROT_FIX, ROT_FREE, t2dIdentity(), t2dRotate(), t2dTransform() e t2dTranslate(). Referenciado por _dspMember(). |
|
||||||||||||||||
|
This function displays the load of a member.
Definição na linha 397 do arquivo dsp.c. Referências _dspLoadArrow(), load_axial_shift, LOAD_COLOR e load_step_size. Referenciado por _dspMemberAtt(). |
|
|
This function initializes the dsp module. It sets the background color as white. It sets the font type as Courier small. Definição na linha 462 do arquivo dsp.c. Referências BACKGROUND_COLOR. Referenciado por prjInit(). |
|
|
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 556 do arquivo dsp.c. Referências dsp_load. Referenciado por prjLoadDisplay(). |
|
|
This function displays the current active model according to its current solution status.
Definição na linha 566 do arquivo dsp.c. Referências _dspAttSizes(), _dspMember() e crsGetNumMembers(). Referenciado por prjClipboard(), prjPrint() e prjRedisplay(). |
|
||||||||||||||||||||||||||||
|
This function shifts the given window limits according to the given pan (displacement) factors. A negative horizontal displacement will result in a shift to the right of the displayed objects in the canvas viewport. A positive horizontal displacement will result in a shift to the left. A negative vertical displacement will result in a upward shift and a positive vertical displacement in a downward shift.
Definição na linha 535 do arquivo dsp.c. Referenciado por prjPanDown(), prjPanLeft(), prjPanRight() e prjPanUp(). |
|
||||||||||||||||||||||||
|
This function adjusts the given window limits according to the given scaling factor. A factor less than one indicates that the window will be decreased, and the result is that the displayed objects will appear bigger in the canvas viewport. A factor greater than one will result in smaller displayed objects in the canvas viewport. The limits are adjusted to be consistent with the current active canvas viewport aspect ratio. The adjustment is such that the center of the given window is maintained.
Definição na linha 486 do arquivo dsp.c. Referenciado por prjFit(), prjHelp(), prjInit(), prjNew(), prjOpenModel(), prjResize(), prjZoomIn() e prjZoomOut(). |
|
|
Visibility flag for member loads.
Definição na linha 162 do arquivo dsp.c. Referenciado por _dspMemberAtt() e dspLoadDisplay(). |
|
|
Axial shift for member end hinge display.
Definição na linha 110 do arquivo dsp.c. Referenciado por _dspAttSizes() e _dspMemberAtt(). |
|
|
Member uniform load arrow size.
Definição na linha 145 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Axial shift for member uniform load display.
Definição na linha 131 do arquivo dsp.c. Referenciado por _dspAttSizes() e _dspMemberLoad(). |
|
|
Member uniform load step size.
Definição na linha 159 do arquivo dsp.c. Referenciado por _dspAttSizes() e _dspMemberLoad(). |
|
|
Member uniform load tip size.
Definição na linha 152 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Transversal shift for member uniform load and load value display.
Definição na linha 138 do arquivo dsp.c. Referenciado por _dspAttSizes(). |
|
|
Axial shift for moment value display.
Definição na linha 117 do arquivo dsp.c. Referenciado por _dspAttSizes() e _dspMemberAtt(). |
|
|
Tranversal shift for moment value display.
Definição na linha 124 do arquivo dsp.c. Referenciado por _dspAttSizes() e _dspMemberAtt(). |
1.3.4