bool StructureUtil::isCenterEdge(int firstPosX, int firstPosZ, int newPosX, int newPosZ, int edgeDistance) { if ((getEdgeDistance(firstPosX, newPosX) == edgeDistance) && (getEdgeDistance(firstPosZ, newPosZ) == 0)) { return true; } if ((getEdgeDistance(firstPosZ, newPosZ) == edgeDistance) && (getEdgeDistance(firstPosX, newPosX) == 0)) { return true; } return false; }
/*private*/ void LineIntersector::computeIntLineIndex(int segmentIndex) { double dist0=getEdgeDistance(segmentIndex,0); double dist1=getEdgeDistance(segmentIndex,1); if (dist0>dist1) { intLineIndex[segmentIndex][0]=0; intLineIndex[segmentIndex][1]=1; } else { intLineIndex[segmentIndex][0]=1; intLineIndex[segmentIndex][1]=0; } }
bool StructureUtil::isCorner(int firstPosX, int firstPosZ, int newPosX, int newPosZ, int cornerDistance) { if ((getEdgeDistance(firstPosX, newPosX) == cornerDistance) && (getEdgeDistance(firstPosZ, newPosZ) == cornerDistance)) { return true; } return false; }
bool StructureUtil::isEdgeSingleSide(int firstPos, int newPos, int edgeDistance) { if (getEdgeDistance(firstPos, newPos) == edgeDistance) { return true; } return false; }
bool Pp::included(int *i, double *r){ return (getEdgeDistance(i) >= *r); } // check border