-public:
- RS_Solid(RS_EntityContainer* parent,
- const RS_SolidData& d);
-
- virtual RS_Entity* clone() {
- RS_Solid* s = new RS_Solid(*this);
- s->initId();
- return s;
- }
-
- /** @return RS_ENTITY_POINT */
- virtual RS2::EntityType rtti() const {
- return RS2::EntitySolid;
- }
-
- /**
- * @return Start point of the entity.
- */
- virtual Vector getStartpoint() const {
- return Vector(false);
- }
- /**
- * @return End point of the entity.
- */
- virtual Vector getEndpoint() const {
- return Vector(false);
- }
-
-
- /** @return Copy of data that defines the point. */
- RS_SolidData getData() const {
- return data;
- }
-
- /** @return true if this is a triangle. */
- bool isTriangle() {
- return !data.corner[3].valid;
- }
-
- Vector getCorner(int num);
-
- void shapeArrow(const Vector & point, double angle, double arrowSize);
-
- virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
- virtual Vector getNearestPointOnEntity(const Vector & coord,
- bool onEntity = true, double * dist = NULL, RS_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, RS_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(RS_Painter* painter, RS_GraphicView* view, double patternOffset=0.0);
- virtual void draw(PaintInterface * painter, RS_GraphicView * view, double patternOffset = 0.0);
-
- friend std::ostream & operator<<(std::ostream & os, const RS_Solid & p);
-
- /** Recalculates the borders of this entity. */
- virtual void calculateBorders ();
-
-protected:
- RS_SolidData data;
- //Vector point;
+ public:
+ RS_Solid(RS_EntityContainer * parent, const RS_SolidData & d);
+
+ virtual RS_Entity * clone();
+ virtual RS2::EntityType rtti() const;
+ virtual Vector getStartpoint() const;
+ virtual Vector getEndpoint() const;
+ RS_SolidData getData() const;
+ bool isTriangle();
+ Vector getCorner(int num);
+ void shapeArrow(const Vector & point, double angle, double arrowSize);
+
+ virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
+ virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true,
+ double * dist = NULL, RS_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, RS_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 = 0.0);
+
+ friend std::ostream & operator<<(std::ostream & os, const RS_Solid & p);
+
+ /** Recalculates the borders of this entity. */
+ virtual void calculateBorders ();
+
+ protected:
+ RS_SolidData data;