summaryrefslogtreecommitdiff
path: root/servers/physics_server_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_server_2d.h')
-rw-r--r--servers/physics_server_2d.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h
index fc37be3bd2..e631046524 100644
--- a/servers/physics_server_2d.h
+++ b/servers/physics_server_2d.h
@@ -98,6 +98,8 @@ class PhysicsShapeQueryResult2D;
class PhysicsShapeQueryParameters2D : public Reference {
GDCLASS(PhysicsShapeQueryParameters2D, Reference);
friend class PhysicsDirectSpaceState2D;
+
+ RES shape_ref;
RID shape;
Transform2D transform;
Vector2 motion;
@@ -112,7 +114,8 @@ protected:
static void _bind_methods();
public:
- void set_shape(const RES &p_shape);
+ void set_shape(const RES &p_shape_ref);
+ RES get_shape() const;
void set_shape_rid(const RID &p_shape);
RID get_shape_rid() const;
@@ -552,13 +555,13 @@ public:
virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) = 0;
virtual real_t pin_joint_get_param(RID p_joint, PinJointParam p_param) const = 0;
- enum DampedStringParam {
- DAMPED_STRING_REST_LENGTH,
- DAMPED_STRING_STIFFNESS,
- DAMPED_STRING_DAMPING
+ enum DampedSpringParam {
+ DAMPED_SPRING_REST_LENGTH,
+ DAMPED_SPRING_STIFFNESS,
+ DAMPED_SPRING_DAMPING
};
- virtual void damped_string_joint_set_param(RID p_joint, DampedStringParam p_param, real_t p_value) = 0;
- virtual real_t damped_string_joint_get_param(RID p_joint, DampedStringParam p_param) const = 0;
+ virtual void damped_spring_joint_set_param(RID p_joint, DampedSpringParam p_param, real_t p_value) = 0;
+ virtual real_t damped_spring_joint_get_param(RID p_joint, DampedSpringParam p_param) const = 0;
virtual JointType joint_get_type(RID p_joint) const = 0;
@@ -678,7 +681,7 @@ VARIANT_ENUM_CAST(PhysicsServer2D::BodyState);
VARIANT_ENUM_CAST(PhysicsServer2D::CCDMode);
VARIANT_ENUM_CAST(PhysicsServer2D::JointParam);
VARIANT_ENUM_CAST(PhysicsServer2D::JointType);
-VARIANT_ENUM_CAST(PhysicsServer2D::DampedStringParam);
+VARIANT_ENUM_CAST(PhysicsServer2D::DampedSpringParam);
//VARIANT_ENUM_CAST( PhysicsServer2D::ObjectType );
VARIANT_ENUM_CAST(PhysicsServer2D::AreaBodyStatus);
VARIANT_ENUM_CAST(PhysicsServer2D::ProcessInfo);