BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_STRUCTURE_SOLVENTACCESSIBLESURFACE_H 00006 #define BALL_STRUCTURE_SOLVENTACCESSIBLESURFACE_H 00007 00008 #ifndef BALL_STRUCTURE_SASEDGE_H 00009 # include <BALL/STRUCTURE/SASEdge.h> 00010 #endif 00011 00012 #ifndef BALL_STRUCTURE_SASFACE_H 00013 # include <BALL/STRUCTURE/SASFace.h> 00014 #endif 00015 00016 #ifndef BALL_STRUCTURE_SASVERTEX_H 00017 # include <BALL/STRUCTURE/SASVertex.h> 00018 #endif 00019 00020 #ifndef BALL_STRUCTURE_REDUCEDSURFACE_H 00021 # include <BALL/STRUCTURE/reducedSurface.h> 00022 #endif 00023 00024 #ifndef BALL_MATHS_SPHERE3_H 00025 # include <BALL/MATHS/sphere3.h> 00026 #endif 00027 00028 #include <vector> 00029 00030 namespace BALL 00031 { 00032 class TriangulatedSAS; 00033 class SASTriangulator; 00034 00038 class BALL_EXPORT SolventAccessibleSurface 00039 { 00040 public: 00041 00048 friend class TriangulatedSAS; 00049 friend class SASTriangulator; 00050 00051 BALL_CREATE(SolventAccessibleSurface) 00052 00053 00056 00057 00060 SolventAccessibleSurface(); 00061 00067 SolventAccessibleSurface(const SolventAccessibleSurface& sas, bool = false); 00068 00071 SolventAccessibleSurface(ReducedSurface* reduced_surface); 00072 00076 virtual ~SolventAccessibleSurface(); 00077 00079 00082 00085 void setVertex(SASVertex* vertex, Position i) 00086 throw(Exception::IndexOverflow); 00087 00090 SASVertex* getVertex(Position i) const 00091 throw(Exception::IndexOverflow); 00092 00095 Size numberOfVertices() const; 00096 00099 void setEdge(SASEdge* edge, Position i) 00100 throw(Exception::IndexOverflow); 00101 00104 SASEdge* getEdge(Position i) const 00105 throw(Exception::IndexOverflow); 00106 00109 Size numberOfEdges() const; 00110 00113 void setFace(SASFace* face, Position i) 00114 throw(Exception::IndexOverflow); 00115 00118 SASFace* getFace(Position i) const 00119 throw(Exception::IndexOverflow); 00120 00123 Size numberOfFaces() const; 00124 00127 void setRS(ReducedSurface* rs); 00128 00131 ReducedSurface* getRS() const; 00132 00135 void clear(); 00136 00139 void compute(); 00140 00142 00143 private: 00144 00145 /*_ @name SAS computation (private) 00146 */ 00148 00149 void preProcessing(); 00150 00151 void get(); 00152 00153 void createFace(Position j); 00154 void createVertex(Position j); 00155 void createEdge(Position j); 00156 00158 00159 00160 protected: 00161 00162 Position number_of_vertices_; 00163 00164 ::std::vector<SASVertex*> vertices_; 00165 00166 Position number_of_edges_; 00167 00168 ::std::vector<SASEdge*> edges_; 00169 00170 Position number_of_faces_; 00171 00172 ::std::vector<SASFace*> faces_; 00173 00174 ReducedSurface* reduced_surface_; 00175 }; 00176 00180 00183 BALL_EXPORT std::ostream& operator << (std::ostream& s, const SolventAccessibleSurface& sas); 00184 00186 00187 } // namespace BALL 00188 00189 #endif // BALL_STRUCTURE_SOLVENTACCESSIBLESURFACE_H 00190