00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_STRUCTURE_SESFACE_H
00008 #define BALL_STRUCTURE_SESFACE_H
00009
00010 #ifndef BALL_STRUCTURE_GRAPHFACE_H
00011 # include <BALL/STRUCTURE/graphFace.h>
00012 #endif
00013
00014 #ifndef BALL_STRUCTURE_RSEDGE_H
00015 # include <BALL/STRUCTURE/RSEdge.h>
00016 #endif
00017
00018 #ifndef BALL_STRUCTURE_RSFACE_H
00019 # include <BALL/STRUCTURE/RSFace.h>
00020 #endif
00021
00022 #ifndef BALL_STRUCTURE_RSVERTEX_H
00023 # include <BALL/STRUCTURE/RSVertex.h>
00024 #endif
00025
00026 namespace BALL
00027 {
00028 class SESEdge;
00029 class SESVertex;
00030 class SolventExcludedSurface;
00031 class TriangulatedSES;
00032 class SESComputer;
00033 class SESSingularityCleaner;
00034 class SESTriangulator;
00035
00039 class BALL_EXPORT SESFace : public GraphFace< SESVertex,SESEdge,SESFace >
00040 {
00041 public:
00042
00054 friend class SESEdge;
00055 friend class SESVertex;
00056 friend class SolventExcludedSurface;
00057 friend class SESComputer;
00058 friend class SESSingularityCleaner;
00059 friend class TriangulatedSES;
00060 friend class SESTriangulator;
00061
00062 BALL_CREATE(SESFace)
00063
00064
00067
00074 enum Type
00075 {
00076 TYPE_SPHERIC = 0,
00077 TYPE_TORIC = 1,
00078 TYPE_CONTACT = 2,
00079 TYPE_TORIC_SINGULAR = 3
00080 };
00081
00083
00086
00090 SESFace()
00091 ;
00092
00100 SESFace(const SESFace& sesface, bool deep = false)
00101 ;
00102
00110 SESFace
00111 (Type type,
00112 RSVertex* rsvertex,
00113 RSEdge* rsedge,
00114 RSFace* rsface)
00115 ;
00116
00120 virtual ~SESFace()
00121 ;
00122
00124
00127
00134 void set(const SESFace& sesface, bool deep = false)
00135 ;
00136
00142 SESFace& operator = (const SESFace& sesface)
00143 ;
00144
00148 void setType(Type type)
00149 ;
00150
00154 Type getType() const
00155 ;
00156
00160 void setRSVertex(RSVertex* rsvertex)
00161 ;
00162
00166 RSVertex* getRSVertex() const
00167 ;
00168
00172 void setRSEdge(RSEdge* rsedge)
00173 ;
00174
00178 RSEdge* getRSEdge() const
00179 ;
00180
00184 void setRSFace(RSFace* rsface)
00185 ;
00186
00190 RSFace* getRSFace() const
00191 ;
00192
00194
00197
00200 void normalize(bool singular)
00201 ;
00202
00204
00207
00211 virtual bool operator == (const SESFace&) const
00212 ;
00213
00217 virtual bool operator != (const SESFace&) const
00218 ;
00219
00223 virtual bool operator *= (const SESFace&) const
00224 ;
00225
00232 bool isNeighbouredTo(SESFace* face) const
00233 ;
00234
00239 bool isFree() const
00240 ;
00241
00246 bool hasSingularEdges() const
00247 ;
00248
00250
00251 private:
00252
00253 void normalizeNonSingularToricFace_()
00254 ;
00255
00256 void normalizeSingularToricFace_()
00257 ;
00258
00259 void findTriangle_
00260 (bool first,
00261 SESEdge*& edge0,
00262 SESEdge*& edge1,
00263 SESEdge*& edge2,
00264 SESVertex*& vertex0,
00265 SESVertex*& vertex1,
00266 SESVertex*& vertex2)
00267 ;
00268
00269 protected:
00270
00274
00275
00276
00277 Type type_;
00278
00279
00280
00281 RSVertex* rsvertex_;
00282
00283
00284
00285 RSEdge* rsedge_;
00286
00287
00288
00289 RSFace* rsface_;
00290
00292 };
00293
00297
00300 BALL_EXPORT std::ostream& operator << (std::ostream& s, const SESFace& sesface);
00301
00303
00304
00305 }
00306
00307 #endif // BALL_STRUCTURE_SESFACE_H