Files
XCEngine/docs/api/math/frustum/frustum.md

46 lines
1.1 KiB
Markdown
Raw Normal View History

# Frustum
视锥体,用于视锥剔除。
**头文件:** `#include <XCEngine/Math/Frustum.h>`
**命名空间:** `XCEngine::Math`
## 类定义
```cpp
class Frustum {
public:
Plane planes[6];
enum class PlaneIndex {
Left = 0,
Right = 1,
Bottom = 2,
Top = 3,
Near = 4,
Far = 5
};
bool Contains(const Vector3& point) const;
bool Contains(const Sphere& sphere) const;
bool Contains(const Bounds& bounds) const;
bool Intersects(const Bounds& bounds) const;
bool Intersects(const Sphere& sphere) const;
};
```
## 实例方法
| 方法 | 返回值 | 描述 |
|------|--------|------|
| [Contains(point)](contains-point.md) | `bool` | 点是否在视锥内 |
| [Contains(sphere)](contains-sphere.md) | `bool` | 球体是否完全在视锥内 |
| [Contains(bounds)](contains-bounds.md) | `bool` | Bounds 是否完全在视锥内 |
| [Intersects(bounds)](intersects-bounds.md) | `bool` | Bounds 是否与视锥相交 |
| [Intersects(sphere)](intersects-sphere.md) | `bool` | 球体是否与视锥相交 |
## 相关文档
- [Math 模块总览](../math.md) - 返回 Math 模块总览