Re: [Algorithms] sort and sweep / sweep and prune and just touching objects
Brought to you by:
vexxed72
|
From: <Pau...@sc...> - 2009-06-19 08:57:52
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 > In this case, the tie breaker could be that end points are sorted before > start points. That goes into the sorting function, not the index testing > function. > Although if you support resting/touching contact, you probably want the > tie breaker to be end points go after beginning points... Someone mailed me off-line and said a way to get around this problem is to artificially bias end points so that min points have their lowest bit cleared from the value and max bits have their lowest bit set, that way a max can never have the same value as a min. Of course this could lead to false positives, but since its a broadphase algorithm this isn't the end of the world. Additionally, if we've entered the realm of false positives you might as well quantise the values to unsigned ints/shorts and then you can compare integers instead of floats... Not sure if that was the same as what you are suggesting (the first part)? Cheers, Paul. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify pos...@sc... This footnote also confirms that this email message has been checked for all known viruses. Sony Computer Entertainment Europe Limited Registered Office: 10 Great Marlborough Street, London W1F 7LP, United Kingdom Registered in England: 3277793 ********************************************************************** P Please consider the environment before printing this e-mail -----BEGIN PGP SIGNATURE----- Version: PGP Universal 2.9.1 (Build 287) Charset: US-ASCII wsBVAwUBSjtMznajGqjtoMHxAQgnOQf/aEsMSMDcFOlDCp9BjJV4W8INk45Mlnuw nGqcK4dMxkfZ/B88pv7S1KmXCuQmpwcnyovKKvsF/kvOsePmyTSKqCrnNAkAkGAx op6SdI7KbBksiqVg6at7ZggQomk3NtNasWpFT/ZDcggbQdYiy6IOt5b2Fg/0p2L9 E8+D5KRX2C9JHX8lxUn3tAxeWgCnEwkbQzS7iE1KF3ePDTeadvq5qO5rRn2Yua41 Zeu+WWxfBN/sK35vxbyyXenbgupiGqjr6YhKaMXSysZO4QX9IGGVBM27C2biOzlJ 8jaggnplGoPXs98SJUbMAXLkgQWJznm8Q/bRmTXdqRl+O3EOZ+VXJw== =8PdK -----END PGP SIGNATURE----- |