diff options
Diffstat (limited to 'servers/physics_2d/shape_2d_sw.cpp')
-rw-r--r-- | servers/physics_2d/shape_2d_sw.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp index 6cc086b9b7..ee0923effd 100644 --- a/servers/physics_2d/shape_2d_sw.cpp +++ b/servers/physics_2d/shape_2d_sw.cpp @@ -143,46 +143,6 @@ Variant LineShape2DSW::get_data() const { /*********************************************************/ /*********************************************************/ -void RayShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const { - r_amount = 1; - - if (p_normal.y > 0) { - *r_supports = Vector2(0, length); - } else { - *r_supports = Vector2(); - } -} - -bool RayShape2DSW::contains_point(const Vector2 &p_point) const { - return false; -} - -bool RayShape2DSW::intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const { - return false; //rays can't be intersected -} - -real_t RayShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const { - return 0; //rays are mass-less -} - -void RayShape2DSW::set_data(const Variant &p_data) { - Dictionary d = p_data; - length = d["length"]; - slips_on_slope = d["slips_on_slope"]; - configure(Rect2(0, 0, 0.001, length)); -} - -Variant RayShape2DSW::get_data() const { - Dictionary d; - d["length"] = length; - d["slips_on_slope"] = slips_on_slope; - return d; -} - -/*********************************************************/ -/*********************************************************/ -/*********************************************************/ - void SegmentShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const { if (Math::abs(p_normal.dot(n)) > _SEGMENT_IS_VALID_SUPPORT_THRESHOLD) { r_supports[0] = a; |