From 2adb67c3c5e2038dc9841f2166e33313c71f4502 Mon Sep 17 00:00:00 2001 From: PrecisionRender Date: Sat, 30 Jul 2022 17:32:03 -0500 Subject: [PATCH] Add `operator*` to `Plane` --- core/variant/variant_op.cpp | 2 ++ doc/classes/Plane.xml | 7 +++++++ doc/classes/Transform3D.xml | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/core/variant/variant_op.cpp b/core/variant/variant_op.cpp index 669e18b5f79..6cca7955ae7 100644 --- a/core/variant/variant_op.cpp +++ b/core/variant/variant_op.cpp @@ -341,6 +341,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_MULTIPLY, Variant::VECTOR3, Variant::TRANSFORM3D); register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM3D, Variant::AABB); register_op>(Variant::OP_MULTIPLY, Variant::AABB, Variant::TRANSFORM3D); + register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM3D, Variant::PLANE); + register_op>(Variant::OP_MULTIPLY, Variant::PLANE, Variant::TRANSFORM3D); register_op, Transform3D, Vector>>(Variant::OP_MULTIPLY, Variant::TRANSFORM3D, Variant::PACKED_VECTOR3_ARRAY); register_op, Vector, Transform3D>>(Variant::OP_MULTIPLY, Variant::PACKED_VECTOR3_ARRAY, Variant::TRANSFORM3D); diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index 32eb71f1c7e..df9d25902bd 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -179,6 +179,13 @@ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. + + + + + Inversely transforms (multiplies) the [Plane] by the given [Transform3D] transformation matrix. + + diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index de1db718c24..e259c29426f 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -174,6 +174,13 @@ Transforms (multiplies) each element of the [Vector3] array by the given [Transform3D] matrix. + + + + + Transforms (multiplies) the [Plane] by the given [Transform3D] transformation matrix. + +