Since FillContainsWithDetail(Geometry) is not available for SL, I am wondering if anyone could offer some tip on how to do geometry collsion test (not testing a point and geometry but two
geometries).
Thanks for trying to help here. Actually I ran across that page in my search. Adapting the two functions for Geometry may be doable. I thought there might be a simpler way. I need to do a large number of tests very quickly. I was wondiering if the method
that checks every pixel of intersected area is fast enough. I may end up writing a my own method to test the specific geometries in my code.
To make my point, let me use EllipseGeometry with equal RadiusX and RadiusY (i.e. circle) as an example. All one needs to do is to check if the distance between two centers is less than the sum of their radii to tell whether there is collision.
zipswich
Member
108 Points
106 Posts
Geometry collision test
Dec 07, 2010 11:27 PM | LINK
Since FillContainsWithDetail(Geometry) is not available for SL, I am wondering if anyone could offer some tip on how to do geometry collsion test (not testing a point and geometry but two geometries).
swo
Contributor
6171 Points
921 Posts
Re: Geometry collision test
Dec 07, 2010 11:53 PM | LINK
hi
see http://www.andybeaulieu.com/Home/tabid/67/EntryID/160/Default.aspx and the demo at http://www.spritehand.com/silverlight/3.0/hittest/testpage.html
Wolfgang Schneider MCPD - www.EasyByte.at
zipswich
Member
108 Points
106 Posts
Re: Geometry collision test
Dec 08, 2010 02:06 AM | LINK
Thanks for trying to help here. Actually I ran across that page in my search. Adapting the two functions for Geometry may be doable. I thought there might be a simpler way. I need to do a large number of tests very quickly. I was wondiering if the method that checks every pixel of intersected area is fast enough. I may end up writing a my own method to test the specific geometries in my code.
swo
Contributor
6171 Points
921 Posts
Re: Geometry collision test
Dec 08, 2010 03:21 AM | LINK
Hi
coud you provide your solution ?
Wolfgang Schneider MCPD - www.EasyByte.at
zipswich
Member
108 Points
106 Posts
Re: Geometry collision test
Dec 08, 2010 09:14 AM | LINK
To make my point, let me use EllipseGeometry with equal RadiusX and RadiusY (i.e. circle) as an example. All one needs to do is to check if the distance between two centers is less than the sum of their radii to tell whether there is collision.