summaryrefslogtreecommitdiff
path: root/servers/physics_server_3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_server_3d.h')
-rw-r--r--servers/physics_server_3d.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h
index ddef8a9b20..2465b40d3e 100644
--- a/servers/physics_server_3d.h
+++ b/servers/physics_server_3d.h
@@ -37,7 +37,6 @@
class PhysicsDirectSpaceState3D;
class PhysicsDirectBodyState3D : public Object {
-
GDCLASS(PhysicsDirectBodyState3D, Object);
protected:
@@ -70,7 +69,7 @@ public:
virtual void apply_impulse(const Vector3 &p_pos, const Vector3 &p_j) = 0;
virtual void apply_torque_impulse(const Vector3 &p_j) = 0;
- virtual void set_sleep_state(bool p_enable) = 0;
+ virtual void set_sleep_state(bool p_sleep) = 0;
virtual bool is_sleeping() const = 0;
virtual int get_contact_count() const = 0;
@@ -98,7 +97,6 @@ public:
class PhysicsShapeQueryResult3D;
class PhysicsShapeQueryParameters3D : public Reference {
-
GDCLASS(PhysicsShapeQueryParameters3D, Reference);
friend class PhysicsDirectSpaceState3D;
@@ -141,7 +139,6 @@ public:
};
class PhysicsDirectSpaceState3D : public Object {
-
GDCLASS(PhysicsDirectSpaceState3D, Object);
private:
@@ -156,7 +153,6 @@ protected:
public:
struct ShapeResult {
-
RID rid;
ObjectID collider_id;
Object *collider;
@@ -166,7 +162,6 @@ public:
virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
struct RayResult {
-
Vector3 position;
Vector3 normal;
RID rid;
@@ -180,7 +175,6 @@ public:
virtual int intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
struct ShapeRestInfo {
-
Vector3 point;
Vector3 normal;
RID rid;
@@ -189,7 +183,7 @@ public:
Vector3 linear_velocity; //velocity at contact point
};
- virtual bool cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, float p_margin, float &p_closest_safe, float &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = NULL) = 0;
+ virtual bool cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, float p_margin, float &p_closest_safe, float &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) = 0;
virtual bool collide_shape(RID p_shape, const Transform &p_shape_xform, float p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
@@ -201,7 +195,6 @@ public:
};
class PhysicsShapeQueryResult3D : public Reference {
-
GDCLASS(PhysicsShapeQueryResult3D, Reference);
Vector<PhysicsDirectSpaceState3D::ShapeResult> result;
@@ -222,7 +215,6 @@ public:
};
class PhysicsServer3D : public Object {
-
GDCLASS(PhysicsServer3D, Object);
static PhysicsServer3D *singleton;
@@ -481,7 +473,6 @@ public:
virtual PhysicsDirectBodyState3D *body_get_direct_state(RID p_body) = 0;
struct MotionResult {
-
Vector3 motion;
Vector3 remainder;
@@ -500,10 +491,9 @@ public:
}
};
- virtual bool body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result = NULL, bool p_exclude_raycast_shapes = true) = 0;
+ virtual bool body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) = 0;
struct SeparationResult {
-
float collision_depth;
Vector3 collision_point;
Vector3 collision_normal;
@@ -781,11 +771,9 @@ typedef PhysicsServer3D *(*CreatePhysicsServer3DCallback)();
class PhysicsServer3DManager {
struct ClassInfo {
String name;
- CreatePhysicsServer3DCallback create_callback;
+ CreatePhysicsServer3DCallback create_callback = nullptr;
- ClassInfo() :
- name(""),
- create_callback(NULL) {}
+ ClassInfo() {}
ClassInfo(String p_name, CreatePhysicsServer3DCallback p_create_callback) :
name(p_name),