duanqinqian5299 2009-08-24 03:44
浏览 39
已采纳

如何在PHP中执行矩形命中测试

I have WYSIWYG style javascript interface that allows a designer to create rectangular regions to generate a document server side. It is important that these regions do not overlap.

I was wondering what is the single most efficent way to perform a hit test on 2 rectangular regions, there could potentially be hundreds, so efficency is a high priority.

I want to implement the same functionality in Javascript client side, and PHP server side, so an algorithm / PDL snippet would be great.

Thanks

  • 写回答

1条回答 默认 最新

  • duanchandun1860 2009-08-24 03:54
    关注

    I recommend to use some smart data structure, such as an R-Tree, or a Quad Tree.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部