Re: [Algorithms] line-swept-sphere / AABB test
Brought to you by:
vexxed72
From: Pierre T. <p.t...@wa...> - 2003-07-22 07:09:04
|
Take the Minkowski sum of the AABB and a sphere with radius equal to the = radius of the line-swept sphere. Then intersect this sum with the = central line segment of the line-swept sphere. This is equivalent to = intersecting the central line segment with an AABB-swept sphere with = radius equal to the radius of the line-swept sphere. This is done by = calculating the squared distance from the line segment to the AABB and = comparing it to the squared radius. The distance calculation can become = complicated; even calculating the distance between two line segments = turns out to be difficult. Thus this approach is probably one of the = least desirable. =20 It is enough to say the LSS / AABB intersection test is similar to a = segment / AABB distance query. Why introducing the (maybe confusing) = Minkowski sum here ? There's some code in MagicSoftware to do this. I'm using it in Opcode. = Works well, and it's not that slow. However a SAT approach might be better indeed. I think Charles Bloom has = some code in Galaxy3 doing this (might need testing). Pierre |