/**
* Holds the data that defines an ellipse.
*/
-class RS_EllipseData
+class EllipseData
{
public:
- RS_EllipseData(const Vector & center, const Vector & majorP, double ratio, double angle1, double angle2, bool reversed)
+ EllipseData(const Vector & center, const Vector & majorP, double ratio, double angle1, double angle2, bool reversed)
{
this->center = center;
this->majorP = majorP;
this->reversed = reversed;
}
- friend class RS_Ellipse;
+ friend class Ellipse;
- friend std::ostream & operator<<(std::ostream & os, const RS_EllipseData & ed)
+ friend std::ostream & operator<<(std::ostream & os, const EllipseData & ed)
{
os << "(" << ed.center
<< "/" << ed.majorP
*
* @author Andrew Mustun
*/
-class RS_Ellipse: public RS_AtomicEntity
+class Ellipse: public AtomicEntity
{
public:
- RS_Ellipse(RS_EntityContainer * parent, const RS_EllipseData & d);
- virtual ~RS_Ellipse();
+ Ellipse(EntityContainer * parent, const EllipseData & d);
+ virtual ~Ellipse();
- virtual RS_Entity * clone();
+ virtual Entity * clone();
virtual RS2::EntityType rtti() const;
virtual Vector getStartpoint() const;
virtual Vector getEndpoint() const;
virtual void moveEndpoint(const Vector & pos);
virtual RS2::Ending getTrimPoint(const Vector & coord, const Vector & trimPoint);
double getEllipseAngle(const Vector & pos);
- RS_EllipseData getData();
+ EllipseData getData();
virtual VectorSolutions getRefPoints();
bool isReversed() const;
void setReversed(bool r);
double getMinorRadius() const;
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 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, RS_Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
+ virtual double getDistanceToPoint(const Vector & coord, Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
virtual bool isPointOnEntity(const Vector & coord, double tolerance = RS_TOLERANCE);
virtual void move(Vector offset);
virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
- friend std::ostream & operator<<(std::ostream & os, const RS_Ellipse & a);
+ friend std::ostream & operator<<(std::ostream & os, const Ellipse & a);
//virtual void calculateEndpoints();
virtual void calculateBorders();
protected:
- RS_EllipseData data;
+ EllipseData data;
};
#endif