|
![](/i/fill.gif) |
Am 26.01.2013 15:43, schrieb Trevor G Quayle:
> clipka <ano### [at] anonymous org> wrote:
>> (0) [optional, just for speed] If the cubes' bounding boxes don't
>> intersect, the cubes don't intersect.
>>
>> (1) If any corner of the smaller cube is inside the larger cube, they
>> intersect. (No need to test the other way round.)
>>
>> (2) If any edge of the smaller cube intersects any surface of the larger
>> cube, they intersect. (Again no need to test the other way round.)
>>
>> (3) In any other case, they don't intersect.
>>
>>
>> Note that this only works for cubes, not for generic boxes.
>
> #2 is the key. if #1 is true then #2 is true as well.
Not necessarily: The smaller cube could be entirely contained in the
larger one.
Post a reply to this message
|
![](/i/fill.gif) |