summaryrefslogtreecommitdiff
path: root/servers/physics_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_server.cpp')
-rw-r--r--servers/physics_server.cpp277
1 files changed, 139 insertions, 138 deletions
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index fbf104c6ac..5097e0a5d2 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -270,11 +270,11 @@ Dictionary PhysicsDirectSpaceState::_intersect_ray(const Vector3 &p_from, const
return d;
}
-Array PhysicsDirectSpaceState::_intersect_shape(const Ref<PhysicsShapeQueryParameters> &psq, int p_max_results) {
+Array PhysicsDirectSpaceState::_intersect_shape(const Ref<PhysicsShapeQueryParameters> &p_shape_query, int p_max_results) {
Vector<ShapeResult> sr;
sr.resize(p_max_results);
- int rc = intersect_shape(psq->shape, psq->transform, psq->margin, sr.ptr(), sr.size(), psq->exclude, psq->collision_layer, psq->object_type_mask);
+ int rc = intersect_shape(p_shape_query->shape, p_shape_query->transform, p_shape_query->margin, sr.ptr(), sr.size(), p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
Array ret;
ret.resize(rc);
for (int i = 0; i < rc; i++) {
@@ -290,10 +290,10 @@ Array PhysicsDirectSpaceState::_intersect_shape(const Ref<PhysicsShapeQueryParam
return ret;
}
-Array PhysicsDirectSpaceState::_cast_motion(const Ref<PhysicsShapeQueryParameters> &psq, const Vector3 &p_motion) {
+Array PhysicsDirectSpaceState::_cast_motion(const Ref<PhysicsShapeQueryParameters> &p_shape_query, const Vector3 &p_motion) {
float closest_safe, closest_unsafe;
- bool res = cast_motion(psq->shape, psq->transform, p_motion, psq->margin, closest_safe, closest_unsafe, psq->exclude, psq->collision_layer, psq->object_type_mask);
+ bool res = cast_motion(p_shape_query->shape, p_shape_query->transform, p_motion, p_shape_query->margin, closest_safe, closest_unsafe, p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
if (!res)
return Array();
Array ret;
@@ -302,12 +302,12 @@ Array PhysicsDirectSpaceState::_cast_motion(const Ref<PhysicsShapeQueryParameter
ret[1] = closest_unsafe;
return ret;
}
-Array PhysicsDirectSpaceState::_collide_shape(const Ref<PhysicsShapeQueryParameters> &psq, int p_max_results) {
+Array PhysicsDirectSpaceState::_collide_shape(const Ref<PhysicsShapeQueryParameters> &p_shape_query, int p_max_results) {
Vector<Vector3> ret;
ret.resize(p_max_results * 2);
int rc = 0;
- bool res = collide_shape(psq->shape, psq->transform, psq->margin, ret.ptr(), p_max_results, rc, psq->exclude, psq->collision_layer, psq->object_type_mask);
+ bool res = collide_shape(p_shape_query->shape, p_shape_query->transform, p_shape_query->margin, ret.ptr(), p_max_results, rc, p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
if (!res)
return Array();
Array r;
@@ -316,11 +316,11 @@ Array PhysicsDirectSpaceState::_collide_shape(const Ref<PhysicsShapeQueryParamet
r[i] = ret[i];
return r;
}
-Dictionary PhysicsDirectSpaceState::_get_rest_info(const Ref<PhysicsShapeQueryParameters> &psq) {
+Dictionary PhysicsDirectSpaceState::_get_rest_info(const Ref<PhysicsShapeQueryParameters> &p_shape_query) {
ShapeRestInfo sri;
- bool res = rest_info(psq->shape, psq->transform, psq->margin, &sri, psq->exclude, psq->collision_layer, psq->object_type_mask);
+ bool res = rest_info(p_shape_query->shape, p_shape_query->transform, p_shape_query->margin, &sri, p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
Dictionary r;
if (!res)
return r;
@@ -349,12 +349,12 @@ void PhysicsDirectSpaceState::_bind_methods() {
ClassDB::bind_method(D_METHOD("collide_shape", "shape", "max_results"), &PhysicsDirectSpaceState::_collide_shape, DEFVAL(32));
ClassDB::bind_method(D_METHOD("get_rest_info", "shape"), &PhysicsDirectSpaceState::_get_rest_info);
- BIND_CONSTANT(TYPE_MASK_STATIC_BODY);
- BIND_CONSTANT(TYPE_MASK_KINEMATIC_BODY);
- BIND_CONSTANT(TYPE_MASK_RIGID_BODY);
- BIND_CONSTANT(TYPE_MASK_CHARACTER_BODY);
- BIND_CONSTANT(TYPE_MASK_AREA);
- BIND_CONSTANT(TYPE_MASK_COLLISION);
+ BIND_ENUM_CONSTANT(TYPE_MASK_STATIC_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_KINEMATIC_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_RIGID_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_CHARACTER_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_AREA);
+ BIND_ENUM_CONSTANT(TYPE_MASK_COLLISION);
}
int PhysicsShapeQueryResult::get_result_count() const {
@@ -506,11 +506,11 @@ void PhysicsServer::_bind_methods() {
/* JOINT API */
- BIND_CONSTANT(JOINT_PIN);
- BIND_CONSTANT(JOINT_HINGE);
- BIND_CONSTANT(JOINT_SLIDER);
- BIND_CONSTANT(JOINT_CONE_TWIST);
- BIND_CONSTANT(JOINT_6DOF);
+ BIND_ENUM_CONSTANT(JOINT_PIN);
+ BIND_ENUM_CONSTANT(JOINT_HINGE);
+ BIND_ENUM_CONSTANT(JOINT_SLIDER);
+ BIND_ENUM_CONSTANT(JOINT_CONE_TWIST);
+ BIND_ENUM_CONSTANT(JOINT_6DOF);
ClassDB::bind_method(D_METHOD("joint_create_pin", "body_A", "local_A", "body_B", "local_B"), &PhysicsServer::joint_create_pin);
ClassDB::bind_method(D_METHOD("pin_joint_set_param", "joint", "param", "value"), &PhysicsServer::pin_joint_set_param);
@@ -522,20 +522,21 @@ void PhysicsServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("pin_joint_set_local_b", "joint", "local_B"), &PhysicsServer::pin_joint_set_local_b);
ClassDB::bind_method(D_METHOD("pin_joint_get_local_b", "joint"), &PhysicsServer::pin_joint_get_local_b);
- BIND_CONSTANT(PIN_JOINT_BIAS);
- BIND_CONSTANT(PIN_JOINT_DAMPING);
- BIND_CONSTANT(PIN_JOINT_IMPULSE_CLAMP);
-
- BIND_CONSTANT(HINGE_JOINT_BIAS);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_UPPER);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_LOWER);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_BIAS);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_SOFTNESS);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_RELAXATION);
- BIND_CONSTANT(HINGE_JOINT_MOTOR_TARGET_VELOCITY);
- BIND_CONSTANT(HINGE_JOINT_MOTOR_MAX_IMPULSE);
- BIND_CONSTANT(HINGE_JOINT_FLAG_USE_LIMIT);
- BIND_CONSTANT(HINGE_JOINT_FLAG_ENABLE_MOTOR);
+ BIND_ENUM_CONSTANT(PIN_JOINT_BIAS);
+ BIND_ENUM_CONSTANT(PIN_JOINT_DAMPING);
+ BIND_ENUM_CONSTANT(PIN_JOINT_IMPULSE_CLAMP);
+
+ BIND_ENUM_CONSTANT(HINGE_JOINT_BIAS);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_BIAS);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_RELAXATION);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_MOTOR_TARGET_VELOCITY);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_MOTOR_MAX_IMPULSE);
+
+ BIND_ENUM_CONSTANT(HINGE_JOINT_FLAG_USE_LIMIT);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_FLAG_ENABLE_MOTOR);
ClassDB::bind_method(D_METHOD("joint_create_hinge", "body_A", "hinge_A", "body_B", "hinge_B"), &PhysicsServer::joint_create_hinge);
@@ -550,60 +551,60 @@ void PhysicsServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("slider_joint_set_param", "joint", "param", "value"), &PhysicsServer::slider_joint_set_param);
ClassDB::bind_method(D_METHOD("slider_joint_get_param", "joint", "param"), &PhysicsServer::slider_joint_get_param);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_UPPER);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_LOWER);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING);
-
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_UPPER);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_LOWER);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_MAX);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING);
+
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_MAX);
ClassDB::bind_method(D_METHOD("joint_create_cone_twist", "body_A", "local_ref_A", "body_B", "local_ref_B"), &PhysicsServer::joint_create_cone_twist);
ClassDB::bind_method(D_METHOD("cone_twist_joint_set_param", "joint", "param", "value"), &PhysicsServer::cone_twist_joint_set_param);
ClassDB::bind_method(D_METHOD("cone_twist_joint_get_param", "joint", "param"), &PhysicsServer::cone_twist_joint_get_param);
- BIND_CONSTANT(CONE_TWIST_JOINT_SWING_SPAN);
- BIND_CONSTANT(CONE_TWIST_JOINT_TWIST_SPAN);
- BIND_CONSTANT(CONE_TWIST_JOINT_BIAS);
- BIND_CONSTANT(CONE_TWIST_JOINT_SOFTNESS);
- BIND_CONSTANT(CONE_TWIST_JOINT_RELAXATION);
-
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_LOWER_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_UPPER_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_RESTITUTION);
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_DAMPING);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_LOWER_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_UPPER_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_DAMPING);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_RESTITUTION);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_FORCE_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_ERP);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT);
-
- BIND_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_MOTOR);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_SWING_SPAN);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_TWIST_SPAN);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_BIAS);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_SOFTNESS);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_RELAXATION);
+
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_LOWER_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_UPPER_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_RESTITUTION);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_DAMPING);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_LOWER_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_UPPER_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_DAMPING);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_RESTITUTION);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_FORCE_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_ERP);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT);
+
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_MOTOR);
ClassDB::bind_method(D_METHOD("joint_get_type", "joint"), &PhysicsServer::joint_get_type);
@@ -642,67 +643,67 @@ void PhysicsServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_process_info", "process_info"), &PhysicsServer::get_process_info);
- BIND_CONSTANT(SHAPE_PLANE);
- BIND_CONSTANT(SHAPE_RAY);
- BIND_CONSTANT(SHAPE_SPHERE);
- BIND_CONSTANT(SHAPE_BOX);
- BIND_CONSTANT(SHAPE_CAPSULE);
- BIND_CONSTANT(SHAPE_CONVEX_POLYGON);
- BIND_CONSTANT(SHAPE_CONCAVE_POLYGON);
- BIND_CONSTANT(SHAPE_HEIGHTMAP);
- BIND_CONSTANT(SHAPE_CUSTOM);
-
- BIND_CONSTANT(AREA_PARAM_GRAVITY);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_VECTOR);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_IS_POINT);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_DISTANCE_SCALE);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_POINT_ATTENUATION);
- BIND_CONSTANT(AREA_PARAM_LINEAR_DAMP);
- BIND_CONSTANT(AREA_PARAM_ANGULAR_DAMP);
- BIND_CONSTANT(AREA_PARAM_PRIORITY);
-
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_DISABLED);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE_REPLACE);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE_COMBINE);
-
- BIND_CONSTANT(BODY_MODE_STATIC);
- BIND_CONSTANT(BODY_MODE_KINEMATIC);
- BIND_CONSTANT(BODY_MODE_RIGID);
- BIND_CONSTANT(BODY_MODE_CHARACTER);
-
- BIND_CONSTANT(BODY_PARAM_BOUNCE);
- BIND_CONSTANT(BODY_PARAM_FRICTION);
- BIND_CONSTANT(BODY_PARAM_MASS);
- BIND_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
- BIND_CONSTANT(BODY_PARAM_ANGULAR_DAMP);
- BIND_CONSTANT(BODY_PARAM_LINEAR_DAMP);
- BIND_CONSTANT(BODY_PARAM_MAX);
-
- BIND_CONSTANT(BODY_STATE_TRANSFORM);
- BIND_CONSTANT(BODY_STATE_LINEAR_VELOCITY);
- BIND_CONSTANT(BODY_STATE_ANGULAR_VELOCITY);
- BIND_CONSTANT(BODY_STATE_SLEEPING);
- BIND_CONSTANT(BODY_STATE_CAN_SLEEP);
+ BIND_ENUM_CONSTANT(SHAPE_PLANE);
+ BIND_ENUM_CONSTANT(SHAPE_RAY);
+ BIND_ENUM_CONSTANT(SHAPE_SPHERE);
+ BIND_ENUM_CONSTANT(SHAPE_BOX);
+ BIND_ENUM_CONSTANT(SHAPE_CAPSULE);
+ BIND_ENUM_CONSTANT(SHAPE_CONVEX_POLYGON);
+ BIND_ENUM_CONSTANT(SHAPE_CONCAVE_POLYGON);
+ BIND_ENUM_CONSTANT(SHAPE_HEIGHTMAP);
+ BIND_ENUM_CONSTANT(SHAPE_CUSTOM);
+
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_VECTOR);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_IS_POINT);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_DISTANCE_SCALE);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_POINT_ATTENUATION);
+ BIND_ENUM_CONSTANT(AREA_PARAM_LINEAR_DAMP);
+ BIND_ENUM_CONSTANT(AREA_PARAM_ANGULAR_DAMP);
+ BIND_ENUM_CONSTANT(AREA_PARAM_PRIORITY);
+
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_DISABLED);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE_REPLACE);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE_COMBINE);
+
+ BIND_ENUM_CONSTANT(BODY_MODE_STATIC);
+ BIND_ENUM_CONSTANT(BODY_MODE_KINEMATIC);
+ BIND_ENUM_CONSTANT(BODY_MODE_RIGID);
+ BIND_ENUM_CONSTANT(BODY_MODE_CHARACTER);
+
+ BIND_ENUM_CONSTANT(BODY_PARAM_BOUNCE);
+ BIND_ENUM_CONSTANT(BODY_PARAM_FRICTION);
+ BIND_ENUM_CONSTANT(BODY_PARAM_MASS);
+ BIND_ENUM_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
+ BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_DAMP);
+ BIND_ENUM_CONSTANT(BODY_PARAM_LINEAR_DAMP);
+ BIND_ENUM_CONSTANT(BODY_PARAM_MAX);
+
+ BIND_ENUM_CONSTANT(BODY_STATE_TRANSFORM);
+ BIND_ENUM_CONSTANT(BODY_STATE_LINEAR_VELOCITY);
+ BIND_ENUM_CONSTANT(BODY_STATE_ANGULAR_VELOCITY);
+ BIND_ENUM_CONSTANT(BODY_STATE_SLEEPING);
+ BIND_ENUM_CONSTANT(BODY_STATE_CAN_SLEEP);
/*
- BIND_CONSTANT( JOINT_PIN );
- BIND_CONSTANT( JOINT_GROOVE );
- BIND_CONSTANT( JOINT_DAMPED_SPRING );
+ BIND_ENUM_CONSTANT( JOINT_PIN );
+ BIND_ENUM_CONSTANT( JOINT_GROOVE );
+ BIND_ENUM_CONSTANT( JOINT_DAMPED_SPRING );
- BIND_CONSTANT( DAMPED_STRING_REST_LENGTH );
- BIND_CONSTANT( DAMPED_STRING_STIFFNESS );
- BIND_CONSTANT( DAMPED_STRING_DAMPING );
+ BIND_ENUM_CONSTANT( DAMPED_STRING_REST_LENGTH );
+ BIND_ENUM_CONSTANT( DAMPED_STRING_STIFFNESS );
+ BIND_ENUM_CONSTANT( DAMPED_STRING_DAMPING );
*/
- //BIND_CONSTANT( TYPE_BODY );
- //BIND_CONSTANT( TYPE_AREA );
+ //BIND_ENUM_CONSTANT( TYPE_BODY );
+ //BIND_ENUM_CONSTANT( TYPE_AREA );
- BIND_CONSTANT(AREA_BODY_ADDED);
- BIND_CONSTANT(AREA_BODY_REMOVED);
+ BIND_ENUM_CONSTANT(AREA_BODY_ADDED);
+ BIND_ENUM_CONSTANT(AREA_BODY_REMOVED);
- BIND_CONSTANT(INFO_ACTIVE_OBJECTS);
- BIND_CONSTANT(INFO_COLLISION_PAIRS);
- BIND_CONSTANT(INFO_ISLAND_COUNT);
+ BIND_ENUM_CONSTANT(INFO_ACTIVE_OBJECTS);
+ BIND_ENUM_CONSTANT(INFO_COLLISION_PAIRS);
+ BIND_ENUM_CONSTANT(INFO_ISLAND_COUNT);
}
PhysicsServer::PhysicsServer() {