MeshKit  1.0
AF2Edge3D.hpp
Go to the documentation of this file.
00001 /*
00002  * AF2Edge3D.hpp
00003  *
00004  * An edge (or half-edge) that connects two AF2Point3D points, one labeled
00005  * as the start of the edge, and the other labeled as the end of the edge.
00006  *
00007  * This class holds on to its endpoints with pointers, but it does not
00008  * manage the memory for its endpoints.  It is the reponsibility of the
00009  * context that uses AF2Edge3D to ensure that pointers to endpoints of edges
00010  * remain valid as long as they may be referenced by an AF2Edge3D instance.
00011  */
00012 #ifndef AF2EDGE3D_HPP
00013 #define AF2EDGE3D_HPP
00014 
00015 // C++
00016 #include <list>
00017 
00018 // MeshKit
00019 #include "meshkit/AF2Point3D.hpp"
00020 
00021 class QualityDecreaseObserver;
00022 
00023 class AF2Edge3D
00024 {
00025   private:
00026 
00027     AF2Point3D* startPnt;
00028     AF2Point3D* endPnt;
00029     unsigned int qualityLevel;
00030     QualityDecreaseObserver* observer;
00031 
00032   public:
00033 
00045     AF2Edge3D(AF2Point3D* start, AF2Point3D* end);
00046 
00054     void decreaseQuality();
00055 
00059     AF2Point3D* getStart() const;
00060 
00064     AF2Point3D* getEnd() const;
00065 
00075     unsigned int getQualityLevel() const;
00076 
00090     void setObserver(QualityDecreaseObserver* observerArg);
00091 };
00092 
00093 class QualityDecreaseObserver
00094 {
00095   friend void AF2Edge3D::decreaseQuality();
00096 
00097   protected:
00104     virtual void qualityDecreased(const AF2Edge3D* const & anEdge) = 0;
00105 };
00106 
00107 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines