From 587080ee7622e07eb32baec58a28685bee49fb6c Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Thu, 23 Oct 2008 12:41:36 +0000 Subject: [PATCH] added case to isInside function --- .../edit_phototexturing/src/UVFaceTexture.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/meshlabplugins/edit_phototexturing/src/UVFaceTexture.cpp b/src/meshlabplugins/edit_phototexturing/src/UVFaceTexture.cpp index 6554f5048..5658d8994 100644 --- a/src/meshlabplugins/edit_phototexturing/src/UVFaceTexture.cpp +++ b/src/meshlabplugins/edit_phototexturing/src/UVFaceTexture.cpp @@ -136,12 +136,28 @@ bool UVFaceTexture::intersectionOfTwoLines(double *p1,double *p2,double *p3, dou bool UVFaceTexture::isInside(double x, double y, double w, double h){ + //qDebug()<<"isInside:" << x << y << w <=x && u[i]<=x+w)&& (v[i]>=y && v[i]<=y+h)){ return true; } } + + if(isInside(x,y)){ + return true; + } + if(isInside(x+w,y)){ + return true; + } + if(isInside(x+w,y+h)){ + return true; + } + if(isInside(x,y+h)){ + return true; + } + + double tmp_s[2]; double tmp_b[2];