File: ObjectSlice.h

package info (click to toggle)
pymol 1.7.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 42,668 kB
  • ctags: 25,775
  • sloc: ansic: 494,779; python: 75,446; cpp: 20,088; makefile: 351; sh: 172; csh: 21
file content (89 lines) | stat: -rw-r--r-- 2,522 bytes parent folder | download
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

/* 
A* -------------------------------------------------------------------
B* This file contains source code for the PyMOL computer program
C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific. 
D* -------------------------------------------------------------------
E* It is unlawful to modify or remove this copyright notice.
F* -------------------------------------------------------------------
G* Please see the accompanying LICENSE file for further information. 
H* -------------------------------------------------------------------
I* Additional authors of this source file include:
-* 
-* 
-*
Z* -------------------------------------------------------------------
*/
#ifndef _H_ObjectSlice
#define _H_ObjectSlice

#include"ObjectMap.h"

typedef struct {
  PyMOLGlobals *G;
  /* stored in a session */

  int Active;
  ObjectNameType MapName;
  int MapState;
  float MapMean;
  float MapStdev;

  float ExtentMin[3];
  float ExtentMax[3];
  int ExtentFlag;

  float origin[3];              /* the origin of the plane */
  float system[9];              /* x, y, and z of the system */

  /* not stored in session */

  int RefreshFlag;
  int min[2], max[2];           /* extents of the arrays */
  int displayList;
  int displayListInvalid;
  float last_scale;

  /* the data is normalized for easier ploting */
  int n_points;

  float *values;
  float *points;
  int *flags;
  float *colors;
  float *normals;

  int n_strips;
  int *strips;

  CGO *shaderCGO;
  float Corner[24];

  float outline_points[36];
  int outline_n_points;
  float outline_zaxis[3];
} ObjectSliceState;

typedef struct ObjectSlice {
  CObject Obj;
  ObjectSliceState *State;
  int NState;
} ObjectSlice;

ObjectSlice *ObjectSliceFromMap(PyMOLGlobals * G, ObjectSlice * obj, ObjectMap * map,
                                int state, int map_state);

/*void ObjectSliceDump(ObjectSlice *I,char *fname,int state);*/

PyObject *ObjectSliceAsPyList(ObjectSlice * I);
int ObjectSliceNewFromPyList(PyMOLGlobals * G, PyObject * list, ObjectSlice ** result);

ObjectSliceState *ObjectSliceStateGetActive(ObjectSlice * I, int state);
void ObjectSliceStateValue2RGB(ObjectSliceState * s, float normalized_value,
                               float *result);
//int ObjectSliceGetOrigin(ObjectSlice * I, int state, float *origin);
void ObjectSliceDrag(ObjectSlice * I, int state, int mode, float *pt, float *mov,
                     float *z_dir);
int ObjectSliceGetVertex(ObjectSlice * I, int index, int base, float *v);

#endif