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.h49
1 files changed, 31 insertions, 18 deletions
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h
index dfaefc5fbf..f830c95b58 100644
--- a/servers/physics_server_3d.h
+++ b/servers/physics_server_3d.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -65,13 +65,24 @@ public:
virtual Vector3 get_velocity_at_local_position(const Vector3 &p_position) const = 0;
- virtual void add_central_force(const Vector3 &p_force) = 0;
- virtual void add_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()) = 0;
- virtual void add_torque(const Vector3 &p_torque) = 0;
virtual void apply_central_impulse(const Vector3 &p_impulse) = 0;
virtual void apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position = Vector3()) = 0;
virtual void apply_torque_impulse(const Vector3 &p_impulse) = 0;
+ virtual void apply_central_force(const Vector3 &p_force) = 0;
+ virtual void apply_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()) = 0;
+ virtual void apply_torque(const Vector3 &p_torque) = 0;
+
+ virtual void add_constant_central_force(const Vector3 &p_force) = 0;
+ virtual void add_constant_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()) = 0;
+ virtual void add_constant_torque(const Vector3 &p_torque) = 0;
+
+ virtual void set_constant_force(const Vector3 &p_force) = 0;
+ virtual Vector3 get_constant_force() const = 0;
+
+ virtual void set_constant_torque(const Vector3 &p_torque) = 0;
+ virtual Vector3 get_constant_torque() const = 0;
+
virtual void set_sleep_state(bool p_sleep) = 0;
virtual bool is_sleeping() const = 0;
@@ -268,8 +279,6 @@ public:
SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD,
SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD,
SPACE_PARAM_BODY_TIME_TO_SLEEP,
- SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO,
- SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS,
SPACE_PARAM_SOLVER_ITERATIONS,
};
@@ -436,20 +445,24 @@ public:
virtual void body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) = 0;
virtual Variant body_get_state(RID p_body, BodyState p_state) const = 0;
- //do something about it
- virtual void body_set_applied_force(RID p_body, const Vector3 &p_force) = 0;
- virtual Vector3 body_get_applied_force(RID p_body) const = 0;
-
- virtual void body_set_applied_torque(RID p_body, const Vector3 &p_torque) = 0;
- virtual Vector3 body_get_applied_torque(RID p_body) const = 0;
-
- virtual void body_add_central_force(RID p_body, const Vector3 &p_force) = 0;
- virtual void body_add_force(RID p_body, const Vector3 &p_force, const Vector3 &p_position = Vector3()) = 0;
- virtual void body_add_torque(RID p_body, const Vector3 &p_torque) = 0;
-
virtual void body_apply_central_impulse(RID p_body, const Vector3 &p_impulse) = 0;
virtual void body_apply_impulse(RID p_body, const Vector3 &p_impulse, const Vector3 &p_position = Vector3()) = 0;
virtual void body_apply_torque_impulse(RID p_body, const Vector3 &p_impulse) = 0;
+
+ virtual void body_apply_central_force(RID p_body, const Vector3 &p_force) = 0;
+ virtual void body_apply_force(RID p_body, const Vector3 &p_force, const Vector3 &p_position = Vector3()) = 0;
+ virtual void body_apply_torque(RID p_body, const Vector3 &p_torque) = 0;
+
+ virtual void body_add_constant_central_force(RID p_body, const Vector3 &p_force) = 0;
+ virtual void body_add_constant_force(RID p_body, const Vector3 &p_force, const Vector3 &p_position = Vector3()) = 0;
+ virtual void body_add_constant_torque(RID p_body, const Vector3 &p_torque) = 0;
+
+ virtual void body_set_constant_force(RID p_body, const Vector3 &p_force) = 0;
+ virtual Vector3 body_get_constant_force(RID p_body) const = 0;
+
+ virtual void body_set_constant_torque(RID p_body, const Vector3 &p_torque) = 0;
+ virtual Vector3 body_get_constant_torque(RID p_body) const = 0;
+
virtual void body_set_axis_velocity(RID p_body, const Vector3 &p_axis_velocity) = 0;
enum BodyAxis {