/**
* Constructor.
*/
-RS_InfoArea::RS_InfoArea()
+InfoArea::InfoArea()
{
}
/**
* Destructor.
*/
-RS_InfoArea::~RS_InfoArea()
+InfoArea::~InfoArea()
{
}
*
* @param p co-ordinate of the point
*/
-void RS_InfoArea::addPoint(const Vector & p)
+void InfoArea::addPoint(const Vector & p)
{
if (thePoints.empty())
baseY = p.y;
/**
* Resets the points.
*/
-void RS_InfoArea::reset()
+void InfoArea::reset()
{
thePoints.clear();
area = 0.0;
/**
* Closes the polygon if it is not closed already.
*/
-void RS_InfoArea::close()
+void InfoArea::close()
{
if (isValid() && isClosed() == false)
{
thePoints.append(thePoints.first());
- RS_DEBUG->print("RS_InfoArea::close: closed");
+ DEBUG->print("InfoArea::close: closed");
}
}
* identical)
* @retval false Otherwise.
*/
-bool RS_InfoArea::isClosed()
+bool InfoArea::isClosed()
{
return (thePoints.first().distanceTo(thePoints.last()) < 1.0e-4);
}
* @retval true If the area is defined (i.e. there are at least 3 points)
* @retval false If there are only two or less points.
*/
-bool RS_InfoArea::isValid()
+bool InfoArea::isValid()
{
- RS_DEBUG->print("RS_InfoArea::isValid: count: %d", thePoints.count());
+ DEBUG->print("InfoArea::isValid: count: %d", thePoints.count());
return (thePoints.count() > 2);
}
/**
* Calculates the area and the circumference of the area.
*/
-void RS_InfoArea::calculate()
+void InfoArea::calculate()
{
area = 0.0;
circumference = 0.0;
area = fabs(area);
}
-double RS_InfoArea::getArea()
+double InfoArea::getArea()
{
return area;
}
-double RS_InfoArea::getCircumference()
+double InfoArea::getCircumference()
{
return circumference;
}
-int RS_InfoArea::count()
+int InfoArea::count()
{
return thePoints.count();
}
* @param p1 first point
* @param p2 second point
*/
-double RS_InfoArea::calcSubArea(const Vector & p1, const Vector & p2)
+double InfoArea::calcSubArea(const Vector & p1, const Vector & p2)
{
double width = p2.x - p1.x;
double height = (p1.y - baseY) + (p2.y - baseY);
\param _p2 second point
*/
/*double
-RS_InfoArea::calcDistance(Vector *_p1, Vector *_p2)
+InfoArea::calcDistance(Vector *_p1, Vector *_p2)
{
return mtGetDistance(_p1->getX(), _p1->getY(), _p2->getX(), _p2->getY());
}*/