Skip to content
Permalink
Browse files

Some bugfixes for interpolation plugin

git-svn-id: http://svn.osgeo.org/qgis/trunk@11214 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jul 30, 2009
1 parent 1b646c1 commit 5136ba944e53adda7c33cc2da292505709553be3
@@ -77,7 +77,7 @@ void DualEdgeTriangulation::addLine( Line3D* line, bool breakline )
for ( i = 0;i < line->getSize();i++ )
{
line->goToNext();
actpoint = /*mDecorator->*/addPoint( line->getPoint() );
actpoint = mDecorator->addPoint( line->getPoint() );
if ( actpoint != -100 )
{
i++;
@@ -94,7 +94,7 @@ void DualEdgeTriangulation::addLine( Line3D* line, bool breakline )
for ( ;i < line->getSize();i++ )
{
line->goToNext();
currentpoint = /*mDecorator->*/addPoint( line->getPoint() );
currentpoint = mDecorator->addPoint( line->getPoint() );
if ( currentpoint != -100 && actpoint != -100 && currentpoint != actpoint )//-100 is the return value if the point could not be not inserted
{
insertForcedSegment( actpoint, currentpoint, breakline );
@@ -43,6 +43,7 @@ class DualEdgeTriangulation: public Triangulation
DualEdgeTriangulation();
DualEdgeTriangulation( int nop, Triangulation* decorator );
virtual ~DualEdgeTriangulation();
void setDecorator(Triangulation* d){mDecorator = d;}
/**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*/
void addLine( Line3D* line, bool breakline );
/**Adds a point to the triangulation and returns the number of this point in case of success or -100 in case of failure*/
@@ -191,6 +192,10 @@ inline DualEdgeTriangulation::DualEdgeTriangulation( int nop, Triangulation* dec
{
mPointVector.reserve( nop );
mHalfEdge.reserve( nop );
if(!mDecorator)
{
mDecorator = this;
}
}

inline double DualEdgeTriangulation::getXMax() const
@@ -359,5 +359,6 @@ int QgsInterpolator::addVerticesToCache( QgsGeometry* geom, bool zCoord, double
default:
break;
}
mDataIsCached = true;
return 0;
}

0 comments on commit 5136ba9

Please sign in to comment.
You can’t perform that action at this time.