SESEdge.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: SESEdge.h,v 1.25 2005/12/23 17:02:02 amoll Exp $
00005 //
00006 
00007 #ifndef BALL_STRUCTURE_SESEDGE_H
00008 #define BALL_STRUCTURE_SESEDGE_H
00009 
00010 #ifndef BALL_STRUCTURE_GRAPHEDGE_H
00011 # include <BALL/STRUCTURE/graphEdge.h>
00012 #endif
00013 
00014 #ifndef BALL_STRUCTURE_RSEDGE_H
00015 # include <BALL/STRUCTURE/RSEdge.h>
00016 #endif
00017 
00018 #ifndef BALL_MATHS_CIRCLE3_H
00019 # include <BALL/MATHS/circle3.h>
00020 #endif
00021 
00022 namespace BALL
00023 {
00024   class SESFace;
00025   class SESVertex;
00026   class SolventExcludedSurface;
00027   class TriangulatedSES;
00028   class SESComputer;
00029   class SESSingularityCleaner;
00030   class SESTriangulator;
00031 
00035   class BALL_EXPORT SESEdge : public GraphEdge< SESVertex,SESEdge,SESFace >
00036   {
00037     public:
00038 
00050     friend class SESFace;
00051     friend class SESVertex;
00052     friend class SolventExcludedSurface;
00053     friend class SESComputer;
00054     friend class SESSingularityCleaner;
00055     friend class TriangulatedSES;
00056     friend class SESTriangulator;
00057 
00058     BALL_CREATE(SESEdge)
00059 
00060     
00063 
00069     enum Type
00070     {
00071       TYPE_CONCAVE  = 0,
00072       TYPE_CONVEX = 1,
00073       TYPE_SINGULAR = 2
00074     };
00075 
00076 
00078 
00081 
00085     SESEdge()
00086       ;
00087 
00095     SESEdge(const SESEdge& sesedge, bool deep = false)
00096       ;
00097 
00109     SESEdge
00110         (SESVertex*     vertex0,
00111          SESVertex*     vertex1,
00112          SESFace*       face0,
00113          SESFace*       face1,
00114          const TCircle3<double>&  circle,
00115          RSEdge*        rsedge,
00116          Type           type,
00117          Index          index)
00118       ;
00119 
00123     virtual ~SESEdge()
00124       ;
00125 
00127 
00130 
00137     void set(const SESEdge& sesedge, bool deep = false)
00138       ;
00139 
00145     SESEdge& operator = (const SESEdge& sesedge)
00146       ;
00147 
00158     void set(SESVertex* vertex0,
00159         SESVertex*      vertex1,
00160         SESFace*        face0,
00161         SESFace*        face1,
00162         const TCircle3<double>& circle,
00163         RSEdge*         rsedge,
00164         Type            type,
00165         Index           index)
00166       ;
00167 
00169 
00172 
00176     void setCircle(const TCircle3<double>& center)
00177       ;
00178 
00182     TCircle3<double> getCircle() const
00183       ;
00184 
00188     void setRSEdge(RSEdge* rsedge)
00189       ;
00190 
00194     RSEdge* getRSEdge() const
00195       ;
00196 
00200     void setType(Type type)
00201       ;
00202 
00206     Type getType() const
00207       ;
00208 
00210 
00213 
00218     virtual bool operator == (const SESEdge& sesedge) const
00219       ;
00220 
00225     virtual bool operator != (const SESEdge& sesedge) const
00226       ;
00227 
00231     virtual bool operator *= (const SESEdge&) const
00232       ;
00233 
00238     bool isFree() const
00239       ;
00240 
00242 
00243     protected:
00244 
00245     /*_ @name Attributes
00246     */
00248 
00249     /*_ The circle on which the SESEdge lies.
00250     */
00251     TCircle3<double> circle_;
00252     /*_ A pointer to the corresponding RSEdge.
00253     */
00254     RSEdge* rsedge_;
00255     /*_ The type of the SESEdge.
00256     */
00257     //int type;
00258     Type type_;
00259 
00261   };
00262 
00266 
00269   BALL_EXPORT std::ostream& operator << (std::ostream& s, const SESEdge& sesedge);
00270 
00272 
00273    
00274 } // namespace BALL
00275 
00276 #endif // BALL_STRUCTURE_SESEDGE_H