Files
XCEngine/docs/api/math/plane/frompoints.md
ssdfasd b414bc5326 refactor(docs): Fix broken links across multiple modules
Fixed broken references:
- texture-import-settings: Fix 16 files referencing wrong overview filename
- math/rectint: Fix 9 method links (rectint-* → get*, contains, intersects)
- rhi/opengl/device: Fix 8 cross-references (opengl-* → */**)
- resources/mesh: Fix meshsection and vertexattribute links
- rhi/d3d12/sampler: Fix RHISampler reference path
- math/vector3: Fix projectonplane → project-on-plane
- rhi/opengl/command-list: Remove broken ClearFlag enum ref
- rhi/opengl/device: Create 2 new method docs (MakeContextCurrent, GetNativeContext)
- rhi/device: Fix device-info types reference

All 0 broken references remaining.
2026-03-26 02:41:00 +08:00

882 B

Plane::FromPoints

static Plane FromPoints(const Vector3& a, const Vector3& b, const Vector3& c)

从三个不共线点创建平面。平面法线通过叉积计算并归一化,距离为原点到平面的有符号距离。

参数:

  • a - 第一个点
  • b - 第二个点
  • c - 第三个点

返回: Plane - 由三点定义的平面

异常: 如果三点共线,叉积结果为零向量,行为未定义。

线程安全:

复杂度: O(1)

示例:

#include <XCEngine/Core/Math/Plane.h>
#include <XCEngine/Core/Math/Vector3.h>

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);
}

相关文档