Debian Codegraph @

MoleculesToTriangles/CXXSurface/CXXTorusElement.h

raw symbols SCIP
1 /*
2 * MoleculesToTriangles/CXXSurface/CXXTorusElement.h
3 *
4 * Copyright 2009 by Martin Noble, University of Oxford
5 * Author: Martin Noble
6 *
7 * This file is part of Coot
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published
11 * by the Free Software Foundation; either version 3 of the License, or (at
12 * your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * 02110-1301, USA
23 */
24 #ifndef CXXTorusElement_included
25 #define CXXTorusElement_includedcxx . . $ `MoleculesToTriangles/CXXSurface/CXXTorusElement.h:25:9`!
26 //#include <CXXTorusTriangle.h>
27 #include "CXXTorusNode.h"cxx . . $ `<file>/MoleculesToTriangles/CXXSurface/CXXTorusNode.h`/
28 #include "CXXTriangle.h"cxx . . $ `<file>/MoleculesToTriangles/CXXSurface/CXXTriangle.h`/
29 #include "CXXCircleNode.h"cxx . . $ `<file>/MoleculesToTriangles/CXXSurface/CXXCircleNode.h`/
30
31 #include <vector>
32 #include <list>
33
34 class CXXSurfacecxx . . $ CXXSurface#;
35 class CXXTrianglecxx . . $ CXXTriangle#;
36 class CXXCirclecxx . . $ CXXCircle#;
37 #include "CXXCoord.h"cxx . . $ `<file>/MoleculesToTriangles/CXXSurface/CXXCoord.h`/
38
39 using stdcxx . . $ std/::vectorcxx . . $ std/vector#;
40
41 class CXXTorusElementcxx . . $ CXXTorusElement# {
42 private:
43 static CXXCirclecxx . . $ CXXCircle# nullCirclecxx . . $ CXXTorusElement#nullCircle.;
44 const CXXCirclecxx . . $ CXXCircle# &theCirclecxx . . $ CXXTorusElement#theCircle.;
45 vectorcxx . . $ vector# <CXXTorusNodecxx . . $ CXXTorusNode#> nodescxx . . $ CXXTorusElement#nodes.;
46 listcxx . . $ std/__cxx11/list# <CXXTrianglecxx . . $ CXXTriangle# > flatTrianglescxx . . $ CXXTorusElement#flatTriangles.;
47 //omega1 and omega2 are the limits of the arc on the surface of a torus
48 // that is in the plane of the axis of the torus
49 double omega1cxx . . $ CXXTorusElement#omega1.;
50 double omega2cxx . . $ CXXTorusElement#omega2.;
51 //When triangulated, the torus is divided up into 2**N (N>=0) in omega and
52 //theta. The corresponding angular step sizes are stored here
53 int nOmegaStepscxx . . $ CXXTorusElement#nOmegaSteps.;
54 double deltaOmegacxx . . $ CXXTorusElement#deltaOmega.;
55 int nThetaStepscxx . . $ CXXTorusElement#nThetaSteps.;
56 double deltaThetacxx . . $ CXXTorusElement#deltaTheta.;
57 //absoluteStartOmega is the value of the omega angle of the start
58 //of this arc, defined with respect to the referenceUnitVector of the
59 //parent circle
60 double absoluteStartOmegacxx . . $ CXXTorusElement#absoluteStartOmega.;
61 //theta1 and theta2 are the limits of the arc on the surface of a torus
62 // that is in the plane of the axis of the torus
63 double theta1cxx . . $ CXXTorusElement#theta1.;
64 double theta2cxx . . $ CXXTorusElement#theta2.;
65 //Here a set of triangles that point into the flatTriangles array to identify
66 //triangles that constitute the edge strip (i.e. last step in theta
67 listcxx . . $ std/__cxx11/list#<CXXTrianglecxx . . $ CXXTriangle# *> edgeTrianglescxx . . $ CXXTorusElement#edgeTriangles.;
68 // v1unit and v2unit are unit vectors from the centre of the circle that defines
69 //the trajectory of the probe around a torus, to the start and end point around that
70 //orbit
71 CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>v1unitcxx . . $ CXXTorusElement#v1unit.;
72 CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>v2unitcxx . . $ CXXTorusElement#v2unit.;
73 CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>n1unitcxx . . $ CXXTorusElement#n1unit.;
74 //torusUnit and torusCentre are the axis and the centre of the torus respectively
75 CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>torusAxiscxx . . $ CXXTorusElement#torusAxis.;
76 CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>torusCentrecxx . . $ CXXTorusElement#torusCentre.;
77 //rProbe and rTraj are the two radiuses that define the shape of the torus
78 double rProbecxx . . $ CXXTorusElement#rProbe., rTrajcxx . . $ CXXTorusElement#rTraj.;
79 void initcxx . . $ CXXTorusElement#init(49f6e7a06ebc5aa8).();
80 int debugcxx . . $ CXXTorusElement#debug.;
81
82 public:
83 CXXTorusElementcxx . . $ CXXTorusElement#CXXTorusElement(49f6e7a06ebc5aa8).();
84 ~cxx . . $ CXXTorusElement#`~CXXTorusElement`(49f6e7a06ebc5aa8).CXXTorusElementcxx . . $ CXXTorusElement#();
85 CXXTorusElementcxx . . $ CXXTorusElement#CXXTorusElement(a5b2200015a6e3ea).(const CXXCirclecxx . . $ CXXCircle# &aCircle, int iEdge, double delta, double probeRadius);
86 void deleteLastTrianglecxx . . $ CXXTorusElement#deleteLastTriangle(49f6e7a06ebc5aa8).(void);
87 size_t addNodecxx . . $ CXXTorusElement#addNode(4010f4340ae01ee5).(CXXTorusNodecxx . . $ CXXTorusNode# &aNode);
88 const size_t numberOfTorusNodescxx . . $ CXXTorusElement#numberOfTorusNodes(c641e4c70163b4a8).(void);
89 const CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>coordFromThetaOmegacxx . . $ CXXTorusElement#coordFromThetaOmega(d4e15a09854355a5).(double theta, double omega) const;
90 const CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>normalToProbeAtThetacxx . . $ CXXTorusElement#normalToProbeAtTheta(4e81301fd523f1e).(CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>&p, double theta) const;
91 const CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>probeAtOmegacxx . . $ CXXTorusElement#probeAtOmega(950066f42341bc7e).(double omega) const;
92 const CXXTorusNodecxx . . $ CXXTorusNode# &getNodecxx . . $ CXXTorusElement#getNode(b7ea632123461728).(const int i) const;
93 int uploadcxx . . $ CXXTorusElement#upload(cf7e077315b06e0c).(CXXSurfacecxx . . $ CXXSurface# *aSurface);
94 void addEdgeVertexcxx . . $ CXXTorusElement#addEdgeVertex(81a6346f2f54b456).(CXXCircleNodecxx . . $ CXXCircleNode# &aNode);
95 int getNOmegaStepscxx . . $ CXXTorusElement#getNOmegaSteps(455f465bc33b4cdf).() const {
96 return nOmegaStepscxx . . $ CXXTorusElement#nOmegaSteps.;
97 };
98 double getDeltaOmegacxx . . $ CXXTorusElement#getDeltaOmega(21b6c25e127938e2).() const {
99 return deltaOmegacxx . . $ CXXTorusElement#deltaOmega.;
100 };
101 double getAbsoluteStartOmegacxx . . $ CXXTorusElement#getAbsoluteStartOmega(21b6c25e127938e2).() const {
102 return absoluteStartOmegacxx . . $ CXXTorusElement#absoluteStartOmega.;
103 };
104 const CXXCirclecxx . . $ CXXCircle# &getCirclecxx . . $ CXXTorusElement#getCircle(708a79ed6ebcc773).() const {
105 return theCirclecxx . . $ CXXTorusElement#theCircle.;
106 };
107 double getTheta2cxx . . $ CXXTorusElement#getTheta2(21b6c25e127938e2).() const {
108 return theta2cxx . . $ CXXTorusElement#theta2.;
109 };
110 const CXXTorusNodecxx . . $ CXXTorusNode# &nodecxx . . $ CXXTorusElement#node(89214395a8b9db38).(size_t i) const {
111 return nodescxx . . $ CXXTorusElement#nodes.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).i];
112 };
113 size_t nTorusNodescxx . . $ CXXTorusElement#nTorusNodes(fe4d2d262d4164a8).() const {
114 return nodescxx . . $ CXXTorusElement#nodes..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).();
115 };
116 size_t nFlatTrianglescxx . . $ CXXTorusElement#nFlatTriangles(fe4d2d262d4164a8).() const {
117 return flatTrianglescxx . . $ CXXTorusElement#flatTriangles..sizecxx . . $ std/__cxx11/list#size(c9b1e749b64d5edc).();
118 };
119 listcxx . . $ std/__cxx11/list# <CXXTriangle >::const_iteratorcxx . . $ std/__cxx11/list#const_iterator# firstTrianglecxx . . $ CXXTorusElement#firstTriangle(1f93b71dc832b5b2).() const {
120 return flatTrianglescxx . . $ CXXTorusElement#flatTriangles..begincxx . . $ std/__cxx11/list#begin(9afe7339530a999).();
121 };
122 listcxx . . $ std/__cxx11/list# <CXXTriangle >::const_iteratorcxx . . $ std/__cxx11/list#const_iterator# endOfTrianglescxx . . $ CXXTorusElement#endOfTriangles(1f93b71dc832b5b2).() const {
123 return flatTrianglescxx . . $ CXXTorusElement#flatTriangles..endcxx . . $ std/__cxx11/list#end(9afe7339530a999).();
124 };
125 };
126
127 #endif