comparing the points..

there are numbers of lines connected to each other. i ve extracted the line start point and end points but i am confused how to compare the end point of one line with the start point of adjoining line? Please help me.

thanks in advance

regards
cjan
Something like this, maybe?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
struct Point
{
	int startX;
	int startY;
	int endX;
	int endY;
};

Point point1;
Point point2;

// Set the variables of point1 and point2... 

if (point1.endX == point2.startX && point1.endY == point2.startY)
{
	// Do something...
}
this is just comparing two points i need to compare all the points of all line.
Topic archived. No new replies allowed.