From 04f720700942f8a5539280a532b1292c58e2a556 Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Sun, 16 Oct 2022 10:13:40 +0300 Subject: Add a `Plane(Vector3, Vector3)` constructor for C# --- modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modules/mono/glue') 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 @@ -291,6 +291,18 @@ namespace Godot D = d; } + /// + /// Constructs a from a vector and + /// a on the plane. + /// + /// The normal of the plane, must be normalized. + /// The point on the plane. + public Plane(Vector3 normal, Vector3 point) + { + _normal = normal; + D = _normal.Dot(point); + } + /// /// Constructs a from the three points, given in clockwise order. /// -- cgit v1.2.3