Arc.hpp
Go to the documentation of this file.
00001 // Copyright (c) by Wayne C. Gramlich.  All rights reserved.
00002 
00003 #if !defined(ARC_H_INCLUDED)
00004 #define ARC_H_INCLUDED 1
00005 
00007 
00008 #include "File.hpp"
00009 #include "Map.hpp"
00010 #include "SVG.hpp"
00011 
00049 
00050 class Tag;
00051 
00052 class Arc {
00053   public:
00056     double angle;
00057 
00059     double distance;
00060 
00062     Tag * from_tag;
00063 
00065     double from_twist;
00066 
00068     double goodness;
00069 
00071     bool in_tree;
00072 
00074     Tag * to_tag;
00075 
00077     double to_twist;
00078 
00080     unsigned int visit;
00081 
00082   public:
00083     Arc();
00084 
00085     Arc(Tag *from_tag, double from_twist, double distance, Tag *to_tag,
00086         double to_twist, double goodness);
00087 
00088     void svg_write(SVG *svg);
00089     void update(double distance, double angle, double twist, double goodness);
00090     void write(File out_file);
00091 
00092     // static comparisons for sorting
00093     static bool equal(Arc *arc1, Arc *arc2);
00094     static bool less(Arc *arc1, Arc *arc2);
00095     static bool distance_less(Arc *arc1, Arc *arc2);
00096 
00097     static Arc * read(File out_file, Map map);
00098 };
00099 
00100 // *Arc* routines:
00101 
00102 
00103 #endif // !defined(ARC_H_INCLUDED)
00104 


fiducial_lib
Author(s): Wayne Gramlich
autogenerated on Thu Jun 6 2019 18:08:04