summaryrefslogtreecommitdiff
path: root/servers/physics_3d/shape_3d_sw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_3d/shape_3d_sw.cpp')
-rw-r--r--servers/physics_3d/shape_3d_sw.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/servers/physics_3d/shape_3d_sw.cpp b/servers/physics_3d/shape_3d_sw.cpp
index b41ed07537..1533d6e592 100644
--- a/servers/physics_3d/shape_3d_sw.cpp
+++ b/servers/physics_3d/shape_3d_sw.cpp
@@ -105,21 +105,21 @@ Shape3DSW::~Shape3DSW() {
ERR_FAIL_COND(owners.size());
}
-Plane PlaneShape3DSW::get_plane() const {
+Plane WorldBoundaryShape3DSW::get_plane() const {
return plane;
}
-void PlaneShape3DSW::project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const {
+void WorldBoundaryShape3DSW::project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const {
// gibberish, a plane is infinity
r_min = -1e7;
r_max = 1e7;
}
-Vector3 PlaneShape3DSW::get_support(const Vector3 &p_normal) const {
+Vector3 WorldBoundaryShape3DSW::get_support(const Vector3 &p_normal) const {
return p_normal * 1e15;
}
-bool PlaneShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const {
+bool WorldBoundaryShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const {
bool inters = plane.intersects_segment(p_begin, p_end, &r_result);
if (inters) {
r_normal = plane.normal;
@@ -127,11 +127,11 @@ bool PlaneShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_
return inters;
}
-bool PlaneShape3DSW::intersect_point(const Vector3 &p_point) const {
+bool WorldBoundaryShape3DSW::intersect_point(const Vector3 &p_point) const {
return plane.distance_to(p_point) < 0;
}
-Vector3 PlaneShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
+Vector3 WorldBoundaryShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
if (plane.is_point_over(p_point)) {
return plane.project(p_point);
} else {
@@ -139,24 +139,24 @@ Vector3 PlaneShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
}
}
-Vector3 PlaneShape3DSW::get_moment_of_inertia(real_t p_mass) const {
- return Vector3(); //wtf
+Vector3 WorldBoundaryShape3DSW::get_moment_of_inertia(real_t p_mass) const {
+ return Vector3(); // not applicable.
}
-void PlaneShape3DSW::_setup(const Plane &p_plane) {
+void WorldBoundaryShape3DSW::_setup(const Plane &p_plane) {
plane = p_plane;
configure(AABB(Vector3(-1e4, -1e4, -1e4), Vector3(1e4 * 2, 1e4 * 2, 1e4 * 2)));
}
-void PlaneShape3DSW::set_data(const Variant &p_data) {
+void WorldBoundaryShape3DSW::set_data(const Variant &p_data) {
_setup(p_data);
}
-Variant PlaneShape3DSW::get_data() const {
+Variant WorldBoundaryShape3DSW::get_data() const {
return plane;
}
-PlaneShape3DSW::PlaneShape3DSW() {
+WorldBoundaryShape3DSW::WorldBoundaryShape3DSW() {
}
//