X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Fconstructionline.h;fp=src%2Fbase%2Fconstructionline.h;h=0000000000000000000000000000000000000000;hb=9f6ad3fe0b9cb30115a5d38e8af3aebed0d70c08;hp=e470c23c365107d2dbf469bf5404f2b201d7d091;hpb=43c13b052d069ba435277d93867380d00c04931f;p=architektonas diff --git a/src/base/constructionline.h b/src/base/constructionline.h deleted file mode 100644 index e470c23..0000000 --- a/src/base/constructionline.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef __CONSTRUCTIONLINE_H__ -#define __CONSTRUCTIONLINE_H__ - -#include "atomicentity.h" -#include "vector.h" - -/** - * Holds the data that defines a construction line (a line - * which is not limited to both directions). - */ -class ConstructionLineData -{ - public: - /** - * Default constructor. Leaves the data object uninitialized. - */ - ConstructionLineData() {} - - ConstructionLineData(const Vector & point1, const Vector & point2) - { - this->point1 = point1; - this->point2 = point2; - } - - friend class ConstructionLine; - - friend std::ostream & operator<<(std::ostream & os, const ConstructionLineData & ld) - { - os << "(" << ld.point1 << - "/" << ld.point2 << - ")"; - return os; - } - - private: - Vector point1; - Vector point2; -}; - -/** - * Class for a construction line entity. - * - * @author Andrew Mustun - */ -class ConstructionLine: public AtomicEntity -{ - public: - ConstructionLine(EntityContainer * parent, const ConstructionLineData & d); - virtual ~ConstructionLine(); - - virtual Entity * clone(); - virtual RS2::EntityType rtti() const; - virtual Vector getStartpoint() const; - virtual Vector getEndpoint() const; - ConstructionLineData getData() const; - Vector getPoint1() const; - Vector getPoint2() const; - virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL); - virtual Vector getNearestPointOnEntity(const Vector & coord, - bool onEntity = true, double * dist = NULL, Entity ** entity = NULL); - virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL); - virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL); - virtual Vector getNearestDist(double distance, const Vector & coord, - double * dist = NULL); - virtual double getDistanceToPoint(const Vector & coord, Entity ** entity = NULL, - RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE); - virtual void move(Vector offset); - virtual void rotate(Vector center, double angle); - virtual void scale(Vector center, Vector factor); - virtual void mirror(Vector axisPoint1, Vector axisPoint2); - virtual void draw(PaintInterface * /*painter*/, GraphicView * /*view*/, - double /*patternOffset*/); - - friend std::ostream & operator<<(std::ostream & os, const ConstructionLine & l); - virtual void calculateBorders(); - - protected: - ConstructionLineData data; -}; - -#endif