Diff

Differences From Artifact [689cfd7a37]:

To Artifact [aa90c4a5c9]:


1
2
3
4
5
6
7
8
9
10

11


12
13
14
15
16
17
18
1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19
20










+
-
+
+







#ifndef GEOMETRY_H
#define GEOMETRY_H
#include <cmath>
#include <vector>
#define EPSILON 0.0001
/**
 * Contains two coordinates on different axises, often referred to as x and y.
 */
class Point{
    public:
        
        double x,y;
        double x,//! \var The coordinate of the Point on the "x" axis
               y;//! \var The coordinate of the Point on the "y" axis
        Point():x(0.0),y(0.0)
    {}
        Point(double x,double y):
            x(x),y(y){}
        /**
         * Obtains the cross product of this point and another.
         */
108
109
110
111
112
113
114

115
116
117
118
119
120
121
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124







+







         * Alias for doLinesIntersect conforming to the Shape.intersects
         * specification.
         */
        bool intersects(const Line& b)const;
        /**
         * Calculates the distance between the start point and the end point,
         * and returns it.
         * 
         */
        double length()const;
        /**
         * Returns the points along the line.
         */
        std::vector<Point> getPoints()const;
};