22 lines
349 B
Markdown
22 lines
349 B
Markdown
|
|
# Bounds::Encapsulate
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
void Encapsulate(const Vector3& point)
|
||
|
|
void Encapsulate(const Bounds& bounds)
|
||
|
|
```
|
||
|
|
|
||
|
|
扩展包围盒以包含点或另一个 Bounds。
|
||
|
|
|
||
|
|
**参数:**
|
||
|
|
- `point` - 要包含的点
|
||
|
|
- `bounds` - 要包含的 Bounds
|
||
|
|
|
||
|
|
**复杂度:** O(1)
|
||
|
|
|
||
|
|
**示例:**
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
bounds.Encapsulate(point);
|
||
|
|
bounds.Encapsulate(otherBounds);
|
||
|
|
```
|