1 | #ifndef ARB_ALGO_H |
---|
2 | #include <arb_algo.h> |
---|
3 | #endif |
---|
4 | |
---|
5 | #define CHARACTERS 0 |
---|
6 | #define SHAPES 1 |
---|
7 | |
---|
8 | // the following macro is already defined in gmacros.h: |
---|
9 | // #define MIN(a, b) ((a)<(b) ? (a) : (b)) |
---|
10 | |
---|
11 | class Texture2D; |
---|
12 | class Structure3D; |
---|
13 | class OpenGLGraphics; |
---|
14 | |
---|
15 | struct GLRenderer : virtual Noncopyable { |
---|
16 | float ObjectSize; |
---|
17 | int iDisplayBases, iBaseMode; |
---|
18 | int iBaseHelix, iBaseUnpairHelix, iBaseNonHelix; |
---|
19 | int iShapeHelix, iShapeUnpairHelix, iShapeNonHelix; |
---|
20 | int iDisplayHelix, iHelixMidPoint, iHelixBackBone, iHelixNrs; |
---|
21 | int iDispTerInt; |
---|
22 | int iStartHelix, iEndHelix; |
---|
23 | float fHelixSize; |
---|
24 | float fSkeletonSize; |
---|
25 | int iColorise, iBackBone; |
---|
26 | int iDispPos; |
---|
27 | int iMapSpecies, iMapSpeciesBase, iMapSpeciesPos; |
---|
28 | int iMapSpeciesDels, iMapSpeciesMiss, iMapSpeciesIns, iMapSpeciesInsInfo; |
---|
29 | int iDispCursorPos; |
---|
30 | |
---|
31 | OpenGLGraphics *G; |
---|
32 | |
---|
33 | GLRenderer(); |
---|
34 | virtual ~GLRenderer(); |
---|
35 | |
---|
36 | void DisplayMolecule(Structure3D *cStr); |
---|
37 | void DisplayMoleculeName(int w, int h, Structure3D *cStr); |
---|
38 | void DisplayMoleculeMask(int w, int h); |
---|
39 | |
---|
40 | void DoHelixMapping(); |
---|
41 | void DisplayHelices(); |
---|
42 | void DisplayHelixBackBone(); |
---|
43 | void DisplayHelixNumbers(); |
---|
44 | void DisplayBasePositions(); |
---|
45 | void DisplayMappedSpBasePositions(); |
---|
46 | void DisplayMappedSpInsertions(); |
---|
47 | void DisplayHelixMidPoints(Texture2D *cImages); |
---|
48 | |
---|
49 | void BeginTexturizer(); |
---|
50 | void EndTexturizer(); |
---|
51 | void TexturizeStructure(Texture2D *cImages, Structure3D *cStructure); |
---|
52 | |
---|
53 | void fixInvalidHelixPositions(int maxHelixNumber) { |
---|
54 | iStartHelix = force_in_range(1, iStartHelix, maxHelixNumber); |
---|
55 | iEndHelix = force_in_range(iStartHelix, iEndHelix, maxHelixNumber); |
---|
56 | } |
---|
57 | }; |
---|