summaryrefslogtreecommitdiff
path: root/scene/resources/shape_2d.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-03-27 22:14:50 +0100
committerGitHub <noreply@github.com>2020-03-27 22:14:50 +0100
commitfcfffd729789cd80aa77056ca089697b52297d04 (patch)
treefc1bb58e900436c48c03c52106eb57250442ae35 /scene/resources/shape_2d.cpp
parent307b1b3a5835ecdb477859785c673a07e248f904 (diff)
parenta6f3bc7c696af03e3875f78e098d2476e409d15e (diff)
Merge pull request #37361 from reduz/server-renames
Renaming of servers for coherency.
Diffstat (limited to 'scene/resources/shape_2d.cpp')
-rw-r--r--scene/resources/shape_2d.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp
index 64930c3117..7984dadbc5 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/shape_2d.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "shape_2d.h"
-#include "servers/physics_2d_server.h"
+#include "servers/physics_server_2d.h"
RID Shape2D::get_rid() const {
return shape;
@@ -38,7 +38,7 @@ RID Shape2D::get_rid() const {
void Shape2D::set_custom_solver_bias(real_t p_bias) {
custom_bias = p_bias;
- Physics2DServer::get_singleton()->shape_set_custom_solver_bias(shape, custom_bias);
+ PhysicsServer2D::get_singleton()->shape_set_custom_solver_bias(shape, custom_bias);
}
real_t Shape2D::get_custom_solver_bias() const {
@@ -50,13 +50,13 @@ bool Shape2D::collide_with_motion(const Transform2D &p_local_xform, const Vector
ERR_FAIL_COND_V(p_shape.is_null(), false);
int r;
- return Physics2DServer::get_singleton()->shape_collide(get_rid(), p_local_xform, p_local_motion, p_shape->get_rid(), p_shape_xform, p_shape_motion, NULL, 0, r);
+ return PhysicsServer2D::get_singleton()->shape_collide(get_rid(), p_local_xform, p_local_motion, p_shape->get_rid(), p_shape_xform, p_shape_motion, NULL, 0, r);
}
bool Shape2D::collide(const Transform2D &p_local_xform, const Ref<Shape2D> &p_shape, const Transform2D &p_shape_xform) {
ERR_FAIL_COND_V(p_shape.is_null(), false);
int r;
- return Physics2DServer::get_singleton()->shape_collide(get_rid(), p_local_xform, Vector2(), p_shape->get_rid(), p_shape_xform, Vector2(), NULL, 0, r);
+ return PhysicsServer2D::get_singleton()->shape_collide(get_rid(), p_local_xform, Vector2(), p_shape->get_rid(), p_shape_xform, Vector2(), NULL, 0, r);
}
Array Shape2D::collide_with_motion_and_get_contacts(const Transform2D &p_local_xform, const Vector2 &p_local_motion, const Ref<Shape2D> &p_shape, const Transform2D &p_shape_xform, const Vector2 &p_shape_motion) {
@@ -66,7 +66,7 @@ Array Shape2D::collide_with_motion_and_get_contacts(const Transform2D &p_local_x
Vector2 result[max_contacts * 2];
int contacts = 0;
- if (!Physics2DServer::get_singleton()->shape_collide(get_rid(), p_local_xform, p_local_motion, p_shape->get_rid(), p_shape_xform, p_shape_motion, result, max_contacts, contacts))
+ if (!PhysicsServer2D::get_singleton()->shape_collide(get_rid(), p_local_xform, p_local_motion, p_shape->get_rid(), p_shape_xform, p_shape_motion, result, max_contacts, contacts))
return Array();
Array results;
@@ -84,7 +84,7 @@ Array Shape2D::collide_and_get_contacts(const Transform2D &p_local_xform, const
Vector2 result[max_contacts * 2];
int contacts = 0;
- if (!Physics2DServer::get_singleton()->shape_collide(get_rid(), p_local_xform, Vector2(), p_shape->get_rid(), p_shape_xform, Vector2(), result, max_contacts, contacts))
+ if (!PhysicsServer2D::get_singleton()->shape_collide(get_rid(), p_local_xform, Vector2(), p_shape->get_rid(), p_shape_xform, Vector2(), result, max_contacts, contacts))
return Array();
Array results;
@@ -115,5 +115,5 @@ Shape2D::Shape2D(const RID &p_rid) {
Shape2D::~Shape2D() {
- Physics2DServer::get_singleton()->free(shape);
+ PhysicsServer2D::get_singleton()->free(shape);
}