boundary.h

00001 #ifndef BOUNDARY_H
00002 #define BOUNDARY_H
00003 #include "afltypes.h"
00004 
00005 #include <iostream>
00006 #include <list>
00007 
00008 namespace afl
00009 {
00010     class Field;
00011 
00015     class Boundary 
00016     {
00020         public:
00025             Boundary( const Field* field );
00026 
00030             virtual ~Boundary(  ) { }
00031 
00040             virtual troolean locate( const Point& p ) const = 0;
00041 
00048             virtual Point findNearest( const Point& p ) const = 0;
00049 
00056             virtual Value getNormal( const Point& p ) const = 0;
00057             
00069             virtual data_t intersect( const Point& p, const Point& v ) const = 0;
00070 
00081             virtual void addSegment( const Point& from, const Point& to ) = 0;
00082 
00093             virtual void addSegment( const Field* field ) = 0;
00094 
00103              virtual void toXML( std::ostream& doc, 
00104                      const std::string& componentsDir, 
00105                      const std::string& baseURI ) const = 0;
00106 
00113             virtual Point getBoundingBoxMin(  ) const = 0;
00114 
00121             virtual Point getBoundingBoxMax(  ) const = 0;
00122 
00126             virtual Boundary* clone(  ) = 0;
00127 
00134             virtual bool hasNoSegments(  ) const = 0;
00135 
00139             const Field* getParent(  ) const { return _field; }
00140 
00145             void setParentField( const Field* parent ) { _field = parent; }
00146 
00147 
00148             protected:
00152                 const Field* _field;
00153             
00154         }; //class Boundary
00155 
00156 } // namespace afl
00157 
00158 #endif //BOUNDARY_H
00159 

Generated on Fri Dec 22 07:17:50 2006 for afl by  doxygen 1.4.6