# Plane::FromPoints ```cpp static Plane FromPoints(const Vector3& a, const Vector3& b, const Vector3& c) ``` 从三个不共线点创建平面。平面法线通过叉积计算并归一化,距离为原点到平面的有符号距离。 **参数:** - `a` - 第一个点 - `b` - 第二个点 - `c` - 第三个点 **返回:** `Plane` - 由三点定义的平面 **异常:** 如果三点共线,叉积结果为零向量,行为未定义。 **线程安全:** ✅ **复杂度:** O(1) **示例:** ```cpp #include #include using namespace XCEngine::Math; void FromPointsExample() { Vector3 p0(0.0f, 0.0f, 0.0f); Vector3 p1(1.0f, 0.0f, 0.0f); Vector3 p2(0.0f, 1.0f, 0.0f); Plane plane = Plane::FromPoints(p0, p1, p2); } ``` ## 相关文档 - [Plane 类总览](plane.md) - 返回类总览