summaryrefslogtreecommitdiffstats
path: root/src/model/exp004state.h (plain)
blob: 1af8a5b1f63f88134a62af165da2ff74881bad8e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef EXP004STATE_H
#define EXP004STATE_H

#include "selection_info.h"
#include "zoom_info.h"

/*
 * Buffer object identifiers.
 */
#define BASE_VERTICES 0
#define BASE_COLORS 1

#define CLEAR_COLOR 1.0, 1.0, 1.0, 1.0
#define DRAW_COLOR 0.0, 0.0, 0.0

#define DEFAULT_COLOR_R 0.00
#define DEFAULT_COLOR_G 0.00
#define DEFAULT_COLOR_B 0.01
#define DEFAULT_COLOR_A 0.25

#define SELECT_COLOR_R 0.00
#define SELECT_COLOR_G 0.00
#define SELECT_COLOR_B 0.00
#define SELECT_COLOR_A 0.75

typedef enum { PROTEIN_GEOMETRY } LISTS;

/*
 * Maintain state of the model.
 */
typedef struct
{
  /*
   * Display lists.
   */
  unsigned int list_offset;

  /*
   * Track the bounding box of the points.
   */
  struct
  {
    float min_x;
    float max_x;
    float min_y;
    float max_y;
  } bb;

  /*
   * Minimum coordinate for the orthographic projection.
   */
  float ortho_min;

  /*
   * Maximum coordinate for the orthographic projection.
   */
  float ortho_max;

  /*
   * Orthographic coordinates after aspect preserving scaling.
   */
  struct
  {
    float min_x;
    float max_x;
    float min_y;
    float max_y;
  } ortho;

  /*
   * Viewport size.
   */
  struct
  {
    int w;
    int h;
  } viewport;

  /*
   * Buffer objects.
   */
  unsigned int buffers[1];

  /*
   * GI Identifiers indexed by row.
   */
  char gi_data[ROWS][20];

  /*
   * 2D coordinates for each protein.
   */
  float base_vertices_data[ROWS][2];

  /*
   * RGB color for each protein.
   */
  float base_colors_data[ROWS][4];

  SELECTION_INFO selection;

  ZOOM_INFO zoom;

} EXP004STATE;

#endif // EXP004STATE_H

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.