diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-10-14 15:41:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-14 15:41:22 +0200 |
commit | 60531111e7318c531abee973a72d797a16c49c9b (patch) | |
tree | 7ffaba5d7fecfb9d16e0c47a18ffdd98117a2eea /core/math/plane.h | |
parent | bc91e088e4503bbf1c5800282f2974011a4cc8e8 (diff) | |
parent | b8c64184c628dba6b54b4beb5a38e292a182bd6f (diff) |
Merge pull request #42780 from reduz/refactor-core-type-bindings
Refactored binding system for core types
Diffstat (limited to 'core/math/plane.h')
-rw-r--r-- | core/math/plane.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/math/plane.h b/core/math/plane.h index 70a6111edd..1386b0a2cb 100644 --- a/core/math/plane.h +++ b/core/math/plane.h @@ -33,6 +33,8 @@ #include "core/math/vector3.h" +class Variant; + class Plane { public: Vector3 normal; @@ -59,6 +61,11 @@ public: bool intersects_ray(const Vector3 &p_from, const Vector3 &p_dir, Vector3 *p_intersection) const; bool intersects_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 *p_intersection) const; + // For Variant bindings. + Variant intersect_3_bind(const Plane &p_plane1, const Plane &p_plane2) const; + Variant intersects_ray_bind(const Vector3 &p_from, const Vector3 &p_dir) const; + Variant intersects_segment_bind(const Vector3 &p_begin, const Vector3 &p_end) const; + _FORCE_INLINE_ Vector3 project(const Vector3 &p_point) const { return p_point - normal * distance_to(p_point); } |