diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-09-14 10:52:35 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-09-14 11:16:31 -0700 |
commit | bb75aec8bcd52b37ec206e16c6b6b0237c7ba3fe (patch) | |
tree | 4e84395c2f0c6fa79126ef78a47b626537e7ac07 /servers/physics_2d/shape_2d_sw.cpp | |
parent | fd17ce1890dc9f24b71674b93e72fb1d978cf95b (diff) |
Rename WorldMarginShape to WorldBoundaryShape
Diffstat (limited to 'servers/physics_2d/shape_2d_sw.cpp')
-rw-r--r-- | servers/physics_2d/shape_2d_sw.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp index 064c4afe52..3fe84a0f14 100644 --- a/servers/physics_2d/shape_2d_sw.cpp +++ b/servers/physics_2d/shape_2d_sw.cpp @@ -88,15 +88,15 @@ Shape2DSW::~Shape2DSW() { /*********************************************************/ /*********************************************************/ -void WorldMarginShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const { +void WorldBoundaryShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const { r_amount = 0; } -bool WorldMarginShape2DSW::contains_point(const Vector2 &p_point) const { +bool WorldBoundaryShape2DSW::contains_point(const Vector2 &p_point) const { return normal.dot(p_point) < d; } -bool WorldMarginShape2DSW::intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const { +bool WorldBoundaryShape2DSW::intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const { Vector2 segment = p_begin - p_end; real_t den = normal.dot(segment); @@ -118,11 +118,11 @@ bool WorldMarginShape2DSW::intersect_segment(const Vector2 &p_begin, const Vecto return true; } -real_t WorldMarginShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const { +real_t WorldBoundaryShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const { return 0; } -void WorldMarginShape2DSW::set_data(const Variant &p_data) { +void WorldBoundaryShape2DSW::set_data(const Variant &p_data) { ERR_FAIL_COND(p_data.get_type() != Variant::ARRAY); Array arr = p_data; ERR_FAIL_COND(arr.size() != 2); @@ -131,7 +131,7 @@ void WorldMarginShape2DSW::set_data(const Variant &p_data) { configure(Rect2(Vector2(-1e4, -1e4), Vector2(1e4 * 2, 1e4 * 2))); } -Variant WorldMarginShape2DSW::get_data() const { +Variant WorldBoundaryShape2DSW::get_data() const { Array arr; arr.resize(2); arr[0] = normal; |