Homepage Demos Overview Downloads Tutorials Reference
Credits

ShapeLine.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef _SHAPELINE_H_
00003 #define _SHAPELINE_H_
00004 
00005 #include "Measures.h"
00006 #include "ShapeRoot.h"
00007 #include "LineData.h"
00008 
00009 namespace DualCoding {
00010 
00011 class ShapeSpace;
00012 class Point;
00013 
00014 template<> class Shape<LineData> : public ShapeRoot {
00015 public:
00016 
00017   SHAPESTUFF_H(LineData);  // defined in ShapeRoot.h
00018 
00019   //! Make a line from two points.
00020   Shape<LineData>(ShapeSpace &s, const Point &end1pt, const Point &end2pt)
00021     : ShapeRoot(addShape(new LineData(s, end1pt, end2pt))) { };
00022   
00023   //! Make a line from a point and an orientation.
00024   Shape<LineData>(ShapeSpace &s, const Point &colinear_pt, AngPi orientation);
00025 
00026   //! Make a line from a point and a slope.
00027   Shape<LineData>(ShapeSpace &s, const Point &colinear_pt, Slope slope);
00028 
00029   //! Copy constructor.
00030   Shape<LineData>(const LineData& newData) : ShapeRoot(addShape(new LineData(newData))) {};
00031 
00032 };
00033 
00034 } // namespace
00035 
00036 #endif

DualCoding 3.0beta
Generated Wed Oct 4 00:01:54 2006 by Doxygen 1.4.7