0ad/source/tools
Yves 8e30410109 Improve PickEntitiesAtPoint
First, do a ray intersection test with the bounding-sphere for all
entities on the map and then check the more detailed selection shape for
the remaining candidates. Do checks that require component lookups after
the ray intersection tests because these are relatively expensive.
The old method for figuring out which entities are below the mouse
cursor was incorrect because it does a 2D check to filter out the first
candidates which can lead to incorrect results with lower camera angles
and high buildings or buildings with a large footprint. Such problems
were avoided with quite a large radius for this 2D test and resulted in
a large number of candiate entities after this first test (200-500).
Also rename PickEntitiesAtPoint to PickEntityAtPoint and make it return
only one (the closest) match.

I've tested performance with the tracelogger by starting a map and then
moving the mouse in circles for one minute. The results were relatively
stable. I've compared the total time percentage of input.js:836, which
spends nearly all of the time in PickEntityAtPoint.
Ardennes Forest - Normal size:       Original: 41.46%    Patched: 31.6%
Ardennes Forest - Giant size:        Original: 40.59%    Patched: 51.55%

As we see, it's faster on normal map sizes but slower on giant maps with
a lot of entities.
This approach can be further improved with some kind of spatial
subdivision for the culling (like an octree), which would help the unit
renderer too. This way it should be possible to make it faster (and
still correct) on all map sizes and with a large total numbers of
entities.

This was SVN commit r16098.
2015-01-01 23:05:26 +00:00
..
atlas Improve PickEntitiesAtPoint 2015-01-01 23:05:26 +00:00
autobuild Collada: Integrated skeleton XML with game. Added some tests. Fixed memory leak when loading ill-formed XML. 2007-03-16 23:32:10 +00:00
autobuild2 Add autobuilder support for glooxwrapper 2013-11-07 21:45:59 +00:00
autolog/SVNLog Changes various urls to point to the new website and fixes some broken forum urls. 2012-12-11 23:04:03 +00:00
cmpgraph Add script for generating mostly-useless component interaction graphs. 2011-01-07 20:31:48 +00:00
dds Texture converter, DevIL: ABGR DDS support. 2006-03-14 21:29:19 +00:00
dist Fix a typo in the packaging scripts. 2014-10-12 20:53:13 +00:00
entconvert Convert all remaining entity template data to new file format. 2010-05-15 21:07:52 +00:00
entdocs Changes various urls to point to the new website and fixes some broken forum urls. 2012-12-11 23:04:03 +00:00
entgraph # Fixed some graphical and scenario editor issues. 2007-02-09 17:04:55 +00:00
entity Updates checkrefs.pl to support skirmish maps 2014-05-05 01:09:53 +00:00
fontbuilder2 Fix path in fontbuilder. 2014-10-12 19:27:55 +00:00
i18n Replace spaces in source file paths with non-breaking spaces. Refs #2539. 2014-11-19 23:10:51 +00:00
jsdebugger Add hotkeys for JSDebugger commands. Patch by sathyam. Fixes #2208. 2013-10-18 14:41:08 +00:00
openlogsfolder Fixes log folder script on WinXP/2000. Moves script inside source/tools. Adds start menu shortcut to the installer. Updates README. Fixes #1438 2012-07-04 03:50:01 +00:00
profiler2 Reverted some of bad commit (10853) because I hit the wrong button 2012-01-02 22:15:21 +00:00
replayprofile Fix profile parser 2011-03-03 00:14:23 +00:00
selectiontexgen Pretty unit selection overlay rings. Fixes #824. 2012-04-22 04:04:02 +00:00
springimport Add primitive .3do (TA/Spring) model conversion tool. 2010-08-19 21:59:08 +00:00
templatesanalyzer Per scythetwirler's suggestion, add some tables on my template analyzer script to compare units to their parent template. 2014-07-14 16:25:39 +00:00
templatessorter Templates sorting utility. Closes #801. 2011-07-30 20:20:34 +00:00
webservices Changes various urls to point to the new website and fixes some broken forum urls. 2012-12-11 23:04:03 +00:00
xmlvalidator Adds Relax NG Compact syntax grammars for most of the XML formats in the engine. 2014-06-17 03:31:40 +00:00
XpartaMuPP Adds compatibility for XMPP differences between platforms that can cause case inconsistencies. 2014-10-18 14:28:46 +00:00
LICENSE.txt Specify that my templatesanalyzer tool is distributed under the MIT license. Thanks to leper for noticing that it was currently unspecified. 2014-11-30 16:28:04 +00:00