summaryrefslogtreecommitdiff
path: root/servers/physics_2d/shape_2d_sw.h
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2021-08-19 11:21:56 -0700
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2021-08-24 17:34:55 -0700
commit3d5dc80348b9b377f6d8a33c7101d54b337396a5 (patch)
tree70705bf5e02804bc2eaffe9315205a128d4a1c9e /servers/physics_2d/shape_2d_sw.h
parentaa4791735d2fe92d747a39529aebb410f96cf38f (diff)
Rename RayShape to SeparationRayShape
Makes it clearer that it's used for special cases when picking a collision shape.
Diffstat (limited to 'servers/physics_2d/shape_2d_sw.h')
-rw-r--r--servers/physics_2d/shape_2d_sw.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/servers/physics_2d/shape_2d_sw.h b/servers/physics_2d/shape_2d_sw.h
index 541d35dae9..bc321adb42 100644
--- a/servers/physics_2d/shape_2d_sw.h
+++ b/servers/physics_2d/shape_2d_sw.h
@@ -179,7 +179,7 @@ public:
}
};
-class RayShape2DSW : public Shape2DSW {
+class SeparationRayShape2DSW : public Shape2DSW {
real_t length;
bool slide_on_slope;
@@ -187,19 +187,19 @@ public:
_FORCE_INLINE_ real_t get_length() const { return length; }
_FORCE_INLINE_ bool get_slide_on_slope() const { return slide_on_slope; }
- virtual PhysicsServer2D::ShapeType get_type() const { return PhysicsServer2D::SHAPE_RAY; }
+ virtual PhysicsServer2D::ShapeType get_type() const override { return PhysicsServer2D::SHAPE_SEPARATION_RAY; }
virtual bool allows_one_way_collision() const override { return false; }
- virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { project_range(p_normal, p_transform, r_min, r_max); }
- virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const;
+ virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override { project_range(p_normal, p_transform, r_min, r_max); }
+ virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const override;
- virtual bool contains_point(const Vector2 &p_point) const;
- virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const;
- virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const;
+ virtual bool contains_point(const Vector2 &p_point) const override;
+ virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const override;
+ virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
_FORCE_INLINE_ void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
//real large
@@ -212,8 +212,8 @@ public:
DEFAULT_PROJECT_RANGE_CAST
- _FORCE_INLINE_ RayShape2DSW() {}
- _FORCE_INLINE_ RayShape2DSW(real_t p_length) { length = p_length; }
+ _FORCE_INLINE_ SeparationRayShape2DSW() {}
+ _FORCE_INLINE_ SeparationRayShape2DSW(real_t p_length) { length = p_length; }
};
class SegmentShape2DSW : public Shape2DSW {