File: Extrude.h

package info (click to toggle)
pymol 1.8.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 42,248 kB
  • ctags: 24,095
  • sloc: cpp: 474,635; python: 75,034; ansic: 22,888; sh: 236; makefile: 78; csh: 21
file content (85 lines) | stat: -rw-r--r-- 3,336 bytes parent folder | download | duplicates (2)
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

/* 
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_Extrude
#define _H_Extrude

#include"Ray.h"
#include"CGO.h"
#include"ObjectMolecule.h"
#include"CoordSet.h"

typedef struct {
  PyMOLGlobals *G;
  int N;                        /* number of points in the extrusion segment */

  float *p;                     /* points */
  float *n;                     /* normals (3x3f) at each point */
  float *c;                     /* colors */
  int *i;                       /* atom indices */

  float r;
  float *sf;                    /* scale factors for variable-width extrusions (single point) */

  float *sv, *tv;
  float *sn, *tn;
  int Ns;

} CExtrude;

CExtrude *ExtrudeNew(PyMOLGlobals * G);

CExtrude *ExtrudeCopyPointsNormalsColors(CExtrude * orig);

int ExtrudeAllocPointsNormalsColors(CExtrude * I, int n);
void ExtrudeTruncate(CExtrude * I, int n);

/* SAUSAGE: look-up table -- nearest neighbors to extrusion points */
void ExtrudeMakePuttyLUT(CExtrude * I, ObjectMolecule * Sauce_obj);

void ExtrudeFree(CExtrude * I);

int ExtrudeCircle(CExtrude * I, int n, float size);
int ExtrudeRectangle(CExtrude * I, float width, float length, int mode);
int ExtrudeOval(CExtrude * I, int n, float width, float length);

int ExtrudeComputePuttyScaleFactors(CExtrude * I, ObjectMolecule * obj,
				    int transform,
				    float mean, float stdev, float min, float max,
				    float power, float range,
				    float min_scale, float max_scale, int smooth_window);

void ExtrudeBuildNormals1f(CExtrude * I);
void ExtrudeBuildNormals2f(CExtrude * I);
int ExtrudeComputeTangents(CExtrude * I);
int ExtrudeCylindersToCGO(CExtrude * I, CGO *cgo, float tube_radius, short is_picking);
int ExtrudeCGOSurfaceTube(CExtrude * I, CGO * cgo, int cap, float *color_override, bool use_spheres, int dash=0);
void ExtrudeCGOSurfaceTubeToCylinders(CExtrude * I, CGO * cgo, int cap, float *color_override);
int ExtrudeCGOSurfaceVariableTube(CExtrude * I, CGO * cgo, int cap);

int ExtrudeCGOSurfacePolygon(CExtrude * I, CGO * cgo, int cap, float *color_override);
int ExtrudeCGOSurfacePolygonTaper(CExtrude * I, CGO * cgo,
                                   int sampling, float *color_override);
int ExtrudeCGOSurfaceStrand(CExtrude * I, CGO * cgo, int sampling,
                             float *color_override);
void ExtrudeCGOTraceFrame(CExtrude * I, CGO * cgo);
void ExtrudeCGOTrace(CExtrude * I, CGO * cgo);
void ExtrudeCGOTraceAxes(CExtrude * I, CGO * cgo);
int ExtrudeDumbbell1(CExtrude * I, float width, float length, int mode);
int ExtrudeDumbbell2(CExtrude * I, int n, int sign, float length, float size);
void ExtrudeDumbbellEdge(CExtrude * I, int samp, int sign, float length);

#endif