Edge.h

Go to the documentation of this file.
00001 
00007 #ifndef EDGE_CM
00008 #define EDGE_CM
00009 #include "Vector3.h"
00010 #include "CirclePattern.h"
00011 
00012 class Vertex;
00013 class Face;
00014 
00031 class Edge
00032 {
00033 private:
00035    double th;
00036    double cTheta;
00037    double sTheta;
00038    double cl2TS;
00039    double tanHTS;
00040 
00041 public:
00042 
00043    // pointers for mesh structure
00044    Edge * next;
00045    Edge * pair;
00046    Vertex * vertex;
00047    Face * face;
00048 
00050    double alphaOposite;
00051 
00053    bool check;
00054 
00056    double length;
00057 
00059    int ID;
00060 
00063    int patchID;
00064 
00065 
00066    Edge(void) : next(NULL), pair(NULL), vertex(NULL), face(NULL),
00067       length(0)
00068    {
00069       patchID = 0;
00070       th = 0;
00071       alphaOposite = 0;
00072    }
00073 
00074    // Assignment (copy only geometrical information)
00075    void assignData(const Edge& rhs){
00076       if (this != &rhs) {
00077           alphaOposite = rhs.alphaOposite;
00078           length = rhs.length; 
00079           th = rhs.th; 
00080           cTheta = rhs.cTheta; 
00081           sTheta = rhs.sTheta; 
00082           cl2TS = rhs.cl2TS; 
00083           tanHTS = rhs.tanHTS;
00084       }
00085    }
00086 
00087    bool isBoundary() const {return !(face && pair->face);}
00088    Vertex * oppositeVertex() {return next->next->vertex;}
00089 
00090    const double & Cl2TStar() const {return cl2TS;}
00091    const double & tanHalfTStar() const {return tanHTS;}
00092    const double & sinTheta() const {return sTheta;}
00093    const double & cosTheta() const {return cTheta;}
00094 
00095    const double & theta() const {return th;}
00096    void setTheta(const double & _th) {
00097       th = _th;
00098       cTheta = cos(th);
00099       sTheta = sin(th);
00100       tanHTS = tan(0.5*(M_PI - th));
00101       cl2TS = CirclePattern::Cl2(2.0*(M_PI - th));   
00102    }
00103 
00104 };
00105 #endif
00106 

Generated on Sat Jun 3 13:33:41 2006 for CirclePatterns by  doxygen 1.4.5