Skip to content

Commit 0f2a49d

Browse files
committed
Remove Point3D
... in favor of QgsPoint Reference qgis/qgis4.0_api#71
1 parent bf9021a commit 0f2a49d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+619
-808
lines changed

python/analysis/analysis.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
%Include interpolation/Node.sip
2424
%Include interpolation/NormVecDecorator.sip
2525
%Include interpolation/ParametricLine.sip
26-
%Include interpolation/Point3D.sip
2726
%Include interpolation/TriangleInterpolator.sip
2827
%Include interpolation/Triangulation.sip
2928
%Include interpolation/TriDecorator.sip

python/analysis/interpolation/Bezier3D.sip

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Bezier3D : ParametricLine
88
/** Default constructor*/
99
Bezier3D();
1010
/** Constructor, par is a pointer to the parent, controlpoly a controlpolygon*/
11-
Bezier3D( ParametricLine *par, QVector<Point3D*> *controlpoly );
11+
Bezier3D( ParametricLine *par, QVector<QgsPoint*> *controlpoly );
1212
/** Destructor*/
1313
virtual ~Bezier3D();
1414
/** Do not use this method, since a Bezier curve does not consist of other curves*/
@@ -17,26 +17,26 @@ class Bezier3D : ParametricLine
1717
virtual void calcFirstDer( float t, Vector3D *v );
1818
/** Calculates the second derivative and assigns it to v*/
1919
virtual void calcSecDer( float t, Vector3D *v );
20-
//virtual Point3D calcPoint(float t);
20+
//virtual QgsPoint calcPoint(float t);
2121
/** Calculates the point on the curve and assigns it to p*/
22-
virtual void calcPoint( float t, Point3D *p );
22+
virtual void calcPoint( float t, QgsPoint *p );
2323
/** Changes the order of control points*/
2424
virtual void changeDirection();
2525
//virtual void draw(QPainter *p);
2626
//virtual bool intersects(ParametricLine *pal);
2727
/** Do not use this method, since a Bezier curve does not consist of other curves*/
2828
virtual void remove( int i );
2929
/** Returns a control point*/
30-
virtual const Point3D *getControlPoint( int number ) const;
30+
virtual const QgsPoint *getControlPoint( int number ) const;
3131
/** Returns a pointer to the control polygon*/
32-
virtual const QVector<Point3D*> *getControlPoly() const;
32+
virtual const QVector<QgsPoint*> *getControlPoly() const;
3333
/** Returns the degree of the curve*/
3434
virtual int getDegree() const;
3535
/** Returns the parent*/
3636
virtual ParametricLine *getParent() const;
3737
/** Sets the parent*/
3838
virtual void setParent( ParametricLine *par );
3939
/** Sets the control polygon*/
40-
virtual void setControlPoly( QVector<Point3D*> *cp );
40+
virtual void setControlPoly( QVector<QgsPoint*> *cp );
4141

4242
};

python/analysis/interpolation/CloughTocherInterpolator.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ class CloughTocherInterpolator : TriangleInterpolator
1919
/** Calculates the normal vector and assigns it to vec (not implemented at the moment)*/
2020
virtual bool calcNormVec( double x, double y, Vector3D *result );
2121
/** Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point*/
22-
virtual bool calcPoint( double x, double y, Point3D *result );
22+
virtual bool calcPoint( double x, double y, QgsPoint *result );
2323
virtual void setTriangulation( NormVecDecorator *tin );
2424
};

python/analysis/interpolation/DualEdgeTriangulation.sip

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ class DualEdgeTriangulation: Triangulation
1111
/** Adds a line (e.g. a break-, structure- or an isoline) to the triangulation. The class takes ownership of the line object and its points*/
1212
void addLine( Line3D *line /Transfer/, bool breakline );
1313
/** Adds a point to the triangulation and returns the number of this point in case of success or -100 in case of failure*/
14-
int addPoint( Point3D *p /Transfer/);
14+
int addPoint( QgsPoint *p /Transfer/);
1515
/** Performs a consistency check, remove this later*/
1616
virtual void performConsistencyTest();
1717
/** Calculates the normal at a point on the surface*/
1818
virtual bool calcNormal( double x, double y, Vector3D *result );
1919
/** Calculates x-, y and z-value of the point on the surface*/
20-
virtual bool calcPoint( double x, double y, Point3D *result );
20+
virtual bool calcPoint( double x, double y, QgsPoint *result );
2121
/** Draws the points, edges and the forced lines*/
2222
//virtual void draw(QPainter *p, double xlowleft, double ylowleft, double xupright, double yupright, double width, double height) const;
2323
/** Returns a pointer to the point with number i*/
24-
virtual Point3D *getPoint( unsigned int i ) const;
24+
virtual QgsPoint *getPoint( unsigned int i ) const;
2525
/** Returns the number of the point opposite to the triangle points p1, p2 (which have to be on a halfedge)*/
2626
int getOppositePoint( int p1, int p2 );
2727
/** Finds out, in which triangle the point with coordinates x and y is and assigns the numbers of the vertices to 'n1', 'n2' and 'n3' and the vertices to 'p1', 'p2' and 'p3'*/
28-
bool getTriangle( double x, double y, Point3D *p1, int *n1 /Out/, Point3D *p2 /Out/, int *n2 /Out/, Point3D *p3 /Out/, int *n3 /Out/ );
28+
bool getTriangle( double x, double y, QgsPoint *p1, int *n1 /Out/, QgsPoint *p2 /Out/, int *n2 /Out/, QgsPoint *p3 /Out/, int *n3 /Out/ );
2929
/** Finds out, in which triangle the point with coordinates x and y is and assigns addresses to the points at the vertices to 'p1', 'p2' and 'p3*/
30-
bool getTriangle( double x, double y, Point3D *p1 /Out/, Point3D *p2 /Out/, Point3D *p3 /Out/ );
30+
bool getTriangle( double x, double y, QgsPoint *p1 /Out/, QgsPoint *p2 /Out/, QgsPoint *p3 /Out/ );
3131
/** Returns a pointer to a value list with the information of the triangles surrounding (counterclockwise) a point. Four integer values describe a triangle, the first three are the number of the half edges of the triangle and the fourth is -10, if the third (and most counterclockwise) edge is a breakline, and -20 otherwise. The value list has to be deleted by the code which called the method*/
3232
QList<int> *getSurroundingTriangles( int pointno );
3333
/** Returns the largest x-coordinate value of the bounding box*/
@@ -80,7 +80,7 @@ class DualEdgeTriangulation: Triangulation
8080
/** Returns the number of an edge which points to the point with number 'point' or -1 if there is an error*/
8181
int baseEdgeOfPoint( int point );
8282
/** Returns the number of a HalfEdge from a triangle in which 'point' is in. If the number -10 is returned, this means, that 'point' is outside the convex hull. If -5 is returned, then numerical problems with the leftOfTest occurred (and the value of the possible edge is stored in the variable 'mUnstableEdge'. -20 means, that the inserted point is exactly on an edge (the number is stored in the variable 'mEdgeWithPoint'). -25 means, that the point is already in the triangulation (the number of the point is stored in the member 'mTwiceInsPoint'. If -100 is returned, this means that something else went wrong*/
83-
int baseEdgeOfTriangle( Point3D *point );
83+
int baseEdgeOfTriangle( QgsPoint *point );
8484
/** Checks, if 'edge' has to be swapped because of the empty circle criterion. If so, doSwap(...) is called.*/
8585
bool checkSwap( unsigned int edge, unsigned int recursiveDeep );
8686
/** Swaps 'edge' and test recursively for other swaps (delaunay criterion)*/
@@ -100,5 +100,5 @@ class DualEdgeTriangulation: Triangulation
100100
/** Returns true, if a half edge is on the convex hull and false otherwise*/
101101
bool edgeOnConvexHull( int edge );
102102
/** Function needed for the ruppert algorithm. Tests, if point is in the circle through both endpoints of edge and the endpoint of edge->dual->next->point. If so, the function calls itself recursively for edge->next and edge->next->next. Stops, if it finds a forced edge or a convex hull edge*/
103-
void evaluateInfluenceRegion( Point3D *point, int edge, QSet<int> &set );
103+
void evaluateInfluenceRegion( QgsPoint *point, int edge, QSet<int> &set );
104104
};

python/analysis/interpolation/LinTriangleInterpolator.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class LinTriangleInterpolator : TriangleInterpolator
1313
/** Calculates the normal vector and assigns it to vec*/
1414
virtual bool calcNormVec( double x, double y, Vector3D *result );
1515
/** Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point*/
16-
virtual bool calcPoint( double x, double y, Point3D *result );
16+
virtual bool calcPoint( double x, double y, QgsPoint *result );
1717
/** Returns a pointer to the current Triangulation object*/
1818
virtual DualEdgeTriangulation *getTriangulation() const;
1919
/** Sets a Triangulation*/

python/analysis/interpolation/Line3D.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ class Line3D /NoDefaultCtors/
66
public:
77
Line3D();
88
~Line3D();
9-
/** Returns true, if the Line contains no Point3D, otherwise false*/
9+
/** Returns true, if the Line contains no QgsPoint, otherwise false*/
1010
bool empty() const;
1111
/** Inserts a node behind the current position and sets the current position to this new node*/
12-
void insertPoint( Point3D *p );
12+
void insertPoint( QgsPoint *p );
1313
/** Removes the point behind the current position*/
1414
void removePoint();
1515
/** Gets the point at the current position*/
16-
Point3D *getPoint() const;
16+
QgsPoint *getPoint() const;
1717
/** Returns the current position*/
1818
unsigned int getCurrent() const;
1919
/** Returns the size of the line (the numbero of inserted Nodes without 'head' and 'z'*/

python/analysis/interpolation/Node.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ class Node
1111
// Node &operator=( const Node &n );
1212
/** Returns a pointer to the next element in the linked list*/
1313
Node *getNext() const;
14-
/** Returns a pointer to the Point3D object associated with the node*/
15-
Point3D *getPoint() const;
14+
/** Returns a pointer to the QgsPoint object associated with the node*/
15+
QgsPoint *getPoint() const;
1616
/** Sets the pointer to the next node*/
1717
void setNext( Node *n );
18-
/** Sets a new pointer to an associated Point3D object*/
19-
void setPoint( Point3D *p );
18+
/** Sets a new pointer to an associated QgsPoint object*/
19+
void setPoint( QgsPoint *p );
2020
};

python/analysis/interpolation/NormVecDecorator.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ class NormVecDecorator : TriDecorator
1111
NormVecDecorator( Triangulation *tin );
1212
virtual ~NormVecDecorator();
1313
/** Adds a point to the triangulation*/
14-
int addPoint( Point3D *p );
14+
int addPoint( QgsPoint *p );
1515
/** Calculates the normal at a point on the surface and assigns it to 'result'. Returns true in case of success and false in case of failure*/
1616
bool calcNormal( double x, double y, Vector3D *result );
1717
/** Calculates the normal of a triangle-point for the point with coordinates x and y. This is needed, if a point is on a break line and there is no unique normal stored in 'mNormVec'. Returns false, it something went wrong and true otherwise*/
1818
bool calcNormalForPoint( double x, double y, int point, Vector3D *result );
1919
/** Calculates x-, y and z-value of the point on the surface and assigns it to 'result'. Returns true in case of success and flase in case of failure*/
20-
bool calcPoint( double x, double y, Point3D *result );
20+
bool calcPoint( double x, double y, QgsPoint *result );
2121
/** Eliminates the horizontal triangles by swapping or by insertion of new points. If alreadyestimated is true, a re-estimation of the normals will be done*/
2222
virtual void eliminateHorizontalTriangles();
2323
/** Estimates the first derivative a point. Return true in case of succes and false otherwise*/
@@ -27,11 +27,11 @@ class NormVecDecorator : TriDecorator
2727
/** Returns a pointer to the normal vector for the point with the number n*/
2828
Vector3D *getNormal( int n ) const;
2929
/** Finds out, in which triangle a point with coordinates x and y is and assigns the triangle points to p1, p2, p3 and the estimated normals to v1, v2, v3. The vectors are normally taken from 'mNormVec', except if p1, p2 or p3 is a point on a breakline. In this case, the normal is calculated on-the-fly. Returns false, if something went wrong and true otherwise*/
30-
bool getTriangle( double x, double y, Point3D *p1 /Out/, Vector3D *v1 /Out/, Point3D *p2 /Out/, Vector3D *v2 /Out/, Point3D *p3 /Out/, Vector3D *v3 /Out/ );
30+
bool getTriangle( double x, double y, QgsPoint *p1 /Out/, Vector3D *v1 /Out/, QgsPoint *p2 /Out/, Vector3D *v2 /Out/, QgsPoint *p3 /Out/, Vector3D *v3 /Out/ );
3131
/** This function behaves similar to the one above. Additionally, the numbers of the points are returned (ptn1, ptn2, ptn3) as well as the PointStates of the triangle points (state1, state2, state3)
3232
* @note not available in Python bindings
3333
*/
34-
//bool getTriangle( double x, double y, Point3D *p1 /Out/, int *ptn1 /Out/, Vector3D *v1 /Out/, PointState *state1 /Out/, Point3D *p2 /Out/, int *ptn2 /Out/, Vector3D *v2 /Out/, PointState *state2 /Out/, Point3D *p3 /Out/, int *ptn3 /Out/, Vector3D *v3 /Out/, PointState *state3 /Out/);
34+
//bool getTriangle( double x, double y, QgsPoint *p1 /Out/, int *ptn1 /Out/, Vector3D *v1 /Out/, PointState *state1 /Out/, QgsPoint *p2 /Out/, int *ptn2 /Out/, Vector3D *v2 /Out/, PointState *state2 /Out/, QgsPoint *p3 /Out/, int *ptn3 /Out/, Vector3D *v3 /Out/, PointState *state3 /Out/);
3535
/** Returns the state of the point with the number 'pointno'*/
3636
PointState getState( int pointno ) const;
3737
/** Sets an interpolator*/

python/analysis/interpolation/ParametricLine.sip

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ class ParametricLine
88
ParametricLine();
99
/** Constructor, par is a pointer to the parent object, controlpoly the controlpolygon
1010
*/
11-
ParametricLine( ParametricLine *par /Transfer/, QVector<Point3D*> *controlpoly );
11+
ParametricLine( ParametricLine *par /Transfer/, QVector<QgsPoint*> *controlpoly );
1212
/** Destructor*/
1313
virtual ~ParametricLine();
1414
virtual void add( ParametricLine *pl ) = 0;
1515
virtual void calcFirstDer( float t, Vector3D *v ) = 0;
1616
virtual void calcSecDer( float t, Vector3D *v ) = 0;
17-
//virtual Point3D calcPoint(float t);
18-
virtual void calcPoint( float t, Point3D* ) = 0;
17+
//virtual QgsPoint calcPoint(float t);
18+
virtual void calcPoint( float t, QgsPoint* ) = 0;
1919
virtual void changeDirection() = 0;
2020
//virtual void draw(QPainter *p);
21-
virtual const Point3D *getControlPoint( int number ) const = 0;
22-
virtual const QVector<Point3D*> *getControlPoly() const = 0;
21+
virtual const QgsPoint *getControlPoint( int number ) const = 0;
22+
virtual const QVector<QgsPoint*> *getControlPoly() const = 0;
2323
virtual int getDegree() const = 0;
2424
virtual ParametricLine *getParent() const = 0;
2525
//virtual bool intersects(ParametricLine *pal);
2626
virtual void remove( int i ) = 0;
27-
virtual void setControlPoly( QVector<Point3D*> *cp ) = 0;
27+
virtual void setControlPoly( QVector<QgsPoint*> *cp ) = 0;
2828
virtual void setParent( ParametricLine *paral ) = 0;
2929
};

python/analysis/interpolation/Point3D.sip

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)