00001
00002
00003
00004
00005 #ifndef BALL_STRUCTURE_SESFACE_H
00006 #define BALL_STRUCTURE_SESFACE_H
00007
00008 #ifndef BALL_STRUCTURE_GRAPHFACE_H
00009 # include <BALL/STRUCTURE/graphFace.h>
00010 #endif
00011
00012 #ifndef BALL_STRUCTURE_RSEDGE_H
00013 # include <BALL/STRUCTURE/RSEdge.h>
00014 #endif
00015
00016 #ifndef BALL_STRUCTURE_RSFACE_H
00017 # include <BALL/STRUCTURE/RSFace.h>
00018 #endif
00019
00020 #ifndef BALL_STRUCTURE_RSVERTEX_H
00021 # include <BALL/STRUCTURE/RSVertex.h>
00022 #endif
00023
00024 namespace BALL
00025 {
00026 class SESEdge;
00027 class SESVertex;
00028 class SolventExcludedSurface;
00029 class TriangulatedSES;
00030 class SESComputer;
00031 class SESSingularityCleaner;
00032 class SESTriangulator;
00033
00037 class BALL_EXPORT SESFace : public GraphFace< SESVertex,SESEdge,SESFace >
00038 {
00039 public:
00040
00052 friend class SESEdge;
00053 friend class SESVertex;
00054 friend class SolventExcludedSurface;
00055 friend class SESComputer;
00056 friend class SESSingularityCleaner;
00057 friend class TriangulatedSES;
00058 friend class SESTriangulator;
00059
00060 BALL_CREATE(SESFace)
00061
00062
00065
00072 enum Type
00073 {
00074 TYPE_SPHERIC = 0,
00075 TYPE_TORIC = 1,
00076 TYPE_CONTACT = 2,
00077 TYPE_TORIC_SINGULAR = 3
00078 };
00079
00081
00084
00088 SESFace()
00089 ;
00090
00098 SESFace(const SESFace& sesface, bool deep = false)
00099 ;
00100
00108 SESFace
00109 (Type type,
00110 RSVertex* rsvertex,
00111 RSEdge* rsedge,
00112 RSFace* rsface)
00113 ;
00114
00118 virtual ~SESFace()
00119 ;
00120
00122
00125
00132 void set(const SESFace& sesface, bool deep = false)
00133 ;
00134
00140 SESFace& operator = (const SESFace& sesface)
00141 ;
00142
00146 void setType(Type type)
00147 ;
00148
00152 Type getType() const
00153 ;
00154
00158 void setRSVertex(RSVertex* rsvertex)
00159 ;
00160
00164 RSVertex* getRSVertex() const
00165 ;
00166
00170 void setRSEdge(RSEdge* rsedge)
00171 ;
00172
00176 RSEdge* getRSEdge() const
00177 ;
00178
00182 void setRSFace(RSFace* rsface)
00183 ;
00184
00188 RSFace* getRSFace() const
00189 ;
00190
00192
00195
00198 void normalize(bool singular)
00199 ;
00200
00202
00205
00209 virtual bool operator == (const SESFace&) const
00210 ;
00211
00215 virtual bool operator != (const SESFace&) const
00216 ;
00217
00221 virtual bool operator *= (const SESFace&) const
00222 ;
00223
00230 bool isNeighbouredTo(SESFace* face) const
00231 ;
00232
00237 bool isFree() const
00238 ;
00239
00244 bool hasSingularEdges() const
00245 ;
00246
00248
00249 private:
00250
00251 void normalizeNonSingularToricFace_()
00252 ;
00253
00254 void normalizeSingularToricFace_()
00255 ;
00256
00257 void findTriangle_
00258 (bool first,
00259 SESEdge*& edge0,
00260 SESEdge*& edge1,
00261 SESEdge*& edge2,
00262 SESVertex*& vertex0,
00263 SESVertex*& vertex1,
00264 SESVertex*& vertex2)
00265 ;
00266
00267 protected:
00268
00272
00273
00274
00275 Type type_;
00276
00277
00278
00279 RSVertex* rsvertex_;
00280
00281
00282
00283 RSEdge* rsedge_;
00284
00285
00286
00287 RSFace* rsface_;
00288
00290 };
00291
00295
00298 BALL_EXPORT std::ostream& operator << (std::ostream& s, const SESFace& sesface);
00299
00301
00302
00303 }
00304
00305 #endif // BALL_STRUCTURE_SESFACE_H