A pretty specific question if anyone knows the answer: What exactly does “contains” mean, in the context of BoundingSphere1.Contains(BoundingSphere2)?
If i have a smaller sphere inside a larger sphere, does the smaller sphere “contain” the larger sphere as in the entirety of its volume is also the volume of the larger sphere? Would that return a ContainmentType.Contains?
Thanks!
From the MSDN page for the BoundingSphere.Contains method that takes a BoundingSphere parameter:
It returns a ContainmentType enumeration which
Specifically:
If BoundingSphere1 is smaller than BoundingSphere2 then I suppose
BoundingSphere1.Contains(BoundingSphere2)would return a ContainmentType.Intersects result instead of a ContainmentType.Contains result since it doesn’t “completely” contain the other. On the other hand,BoundingSphere2.Contains(BoundingSphere1)should return ContainmentType.Contains since it “completely contains the other.”EDIT: I’ve updated my answer after reviewing the documentation again. Initially something sounded vague but now I think the emphasis in the enumeration details of “completely” and “partially” for Contains and Intersects, respectively, strengthen my expectations. I can’t test this but this sounds reasonable.