FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


SVG, collision detection/intersection





jcreus
Hi,

I wonder if it's possible to check if a path intersects with another path, or a path with a polygon/rect and so on. As far as I know, it can be done with rectangles, but I need it for paths. Ideas? Any help would be appreciated.

Thanks a lot.
Peterssidan
I'm not familiar with how the SVG format works. Do you to get paths from the image? What exactly is a path here?
jcreus
Peterssidan wrote:
I'm not familiar with how the SVG format works. Do you to get paths from the image? What exactly is a path here?

A path is an XML node which describes a... hmm path, as defined by a series of points. I'd like to check if at some point it collides with another path, or any other node.

Thanks anyway.
boinsterman
A path in SVG does not appear visually unless you specify a color in its attributes.

I'm guessing you need this in order to determine if two paths meet at the same point, such as with roads? A common application is the shortest-path problem, for example.

I don't know of any such functions in SVG, but I believe you could specify the data in another source. I suggest you check out GML at http://www.opengeospatial.org/standards/gml. Supposedly it is for displaying maps and analyzing associated data.
jcreus
boinsterman wrote:
A path in SVG does not appear visually unless you specify a color in its attributes.

I'm guessing you need this in order to determine if two paths meet at the same point, such as with roads? A common application is the shortest-path problem, for example.

I don't know of any such functions in SVG, but I believe you could specify the data in another source. I suggest you check out GML at http://www.opengeospatial.org/standards/gml. Supposedly it is for displaying maps and analyzing associated data.


Thanks a lot for your link, I'll look into it!
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.