summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-10-16 16:03:38 +0300
committerGitHub <noreply@github.com>2022-10-16 16:03:38 +0300
commit3a59c833f1b7e34ddef57522800288a0dee8562d (patch)
treea5d1f3ad194b8e80a3e8c5a7fc2d16fdb3f5bd57
parent767f8fb483851a210f170956e238e8b0cefa3834 (diff)
parent04f720700942f8a5539280a532b1292c58e2a556 (diff)
Merge pull request #67477 from Chaosus/plane_constructor
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs
index 13070c8033..664b2e0f34 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs
@@ -292,6 +292,18 @@ namespace Godot
}
/// <summary>
+ /// Constructs a <see cref="Plane"/> from a <paramref name="normal"/> vector and
+ /// a <paramref name="point"/> on the plane.
+ /// </summary>
+ /// <param name="normal">The normal of the plane, must be normalized.</param>
+ /// <param name="point">The point on the plane.</param>
+ public Plane(Vector3 normal, Vector3 point)
+ {
+ _normal = normal;
+ D = _normal.Dot(point);
+ }
+
+ /// <summary>
/// Constructs a <see cref="Plane"/> from the three points, given in clockwise order.
/// </summary>
/// <param name="v1">The first point.</param>