Stefan Orr
Stefan Orr

Reputation: 311

In a Quad tree of points, how do you partition a quad if your insert point falls exactly on the partition line?

E.g I have a root quad with (minx,maxx,width) = (0,2,2), a point at (0.5,0.5) and want to insert the point (1,1). What ways are there to deal with this case?

Upvotes: 1

Views: 808

Answers (1)

AlexWien
AlexWien

Reputation: 28727

The usual definition for rectangles is that the left and lower border is included (part of the rectangle), and the right and upper border is excluded.

This will be considered in the splitting code using the appropriate < and <= related to that rule.

Upvotes: 3

Related Questions