Files
XCSDD/docs/api/math/box/intersects.md

21 lines
284 B
Markdown
Raw Normal View History

# Box::Intersects
```cpp
bool Intersects(const Sphere& sphere) const
```
检测盒是否与球体相交。
**参数:**
- `sphere` - 球体
**返回:** `bool` - true 表示相交
**复杂度:** O(1)
**示例:**
```cpp
if (box.Intersects(sphere)) { /* collision */ }
```