diff options
author | Yuri Rubinsky <chaosus89@gmail.com> | 2022-10-16 10:13:40 +0300 |
---|---|---|
committer | Yuri Rubinsky <chaosus89@gmail.com> | 2022-10-16 14:10:58 +0300 |
commit | 04f720700942f8a5539280a532b1292c58e2a556 (patch) | |
tree | a5d1f3ad194b8e80a3e8c5a7fc2d16fdb3f5bd57 | |
parent | 767f8fb483851a210f170956e238e8b0cefa3834 (diff) |
Add a `Plane(Vector3, Vector3)` constructor for C#
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs | 12 |
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> |