summaryrefslogtreecommitdiff
path: root/servers/physics_2d_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d_server.cpp')
-rw-r--r--servers/physics_2d_server.cpp158
1 files changed, 79 insertions, 79 deletions
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 27732b9c29..898c49a1eb 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -354,12 +354,12 @@ void Physics2DDirectSpaceState::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rest_info", "shape"), &Physics2DDirectSpaceState::_get_rest_info);
//ClassDB::bind_method(D_METHOD("cast_motion","shape","xform","motion","exclude","umask"),&Physics2DDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0));
- 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 Physics2DShapeQueryResult::get_result_count() const {
@@ -604,79 +604,79 @@ void Physics2DServer::_bind_methods() {
//ClassDB::bind_method(D_METHOD("sync"),&Physics2DServer::sync);
//ClassDB::bind_method(D_METHOD("flush_queries"),&Physics2DServer::flush_queries);
- BIND_CONSTANT(SPACE_PARAM_CONTACT_RECYCLE_RADIUS);
- BIND_CONSTANT(SPACE_PARAM_CONTACT_MAX_SEPARATION);
- BIND_CONSTANT(SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION);
- BIND_CONSTANT(SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD);
- BIND_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD);
- BIND_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP);
- BIND_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS);
-
- BIND_CONSTANT(SHAPE_LINE);
- BIND_CONSTANT(SHAPE_SEGMENT);
- BIND_CONSTANT(SHAPE_CIRCLE);
- BIND_CONSTANT(SHAPE_RECTANGLE);
- BIND_CONSTANT(SHAPE_CAPSULE);
- BIND_CONSTANT(SHAPE_CONVEX_POLYGON);
- BIND_CONSTANT(SHAPE_CONCAVE_POLYGON);
- 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_INERTIA);
- BIND_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
- BIND_CONSTANT(BODY_PARAM_LINEAR_DAMP);
- BIND_CONSTANT(BODY_PARAM_ANGULAR_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_CONSTANT(JOINT_PIN);
- BIND_CONSTANT(JOINT_GROOVE);
- BIND_CONSTANT(JOINT_DAMPED_SPRING);
-
- BIND_CONSTANT(DAMPED_STRING_REST_LENGTH);
- BIND_CONSTANT(DAMPED_STRING_STIFFNESS);
- BIND_CONSTANT(DAMPED_STRING_DAMPING);
-
- BIND_CONSTANT(CCD_MODE_DISABLED);
- BIND_CONSTANT(CCD_MODE_CAST_RAY);
- BIND_CONSTANT(CCD_MODE_CAST_SHAPE);
-
- //BIND_CONSTANT( TYPE_BODY );
- //BIND_CONSTANT( TYPE_AREA );
-
- BIND_CONSTANT(AREA_BODY_ADDED);
- BIND_CONSTANT(AREA_BODY_REMOVED);
-
- BIND_CONSTANT(INFO_ACTIVE_OBJECTS);
- BIND_CONSTANT(INFO_COLLISION_PAIRS);
- BIND_CONSTANT(INFO_ISLAND_COUNT);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_CONTACT_RECYCLE_RADIUS);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_CONTACT_MAX_SEPARATION);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS);
+
+ BIND_ENUM_CONSTANT(SHAPE_LINE);
+ BIND_ENUM_CONSTANT(SHAPE_SEGMENT);
+ BIND_ENUM_CONSTANT(SHAPE_CIRCLE);
+ BIND_ENUM_CONSTANT(SHAPE_RECTANGLE);
+ BIND_ENUM_CONSTANT(SHAPE_CAPSULE);
+ BIND_ENUM_CONSTANT(SHAPE_CONVEX_POLYGON);
+ BIND_ENUM_CONSTANT(SHAPE_CONCAVE_POLYGON);
+ 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_INERTIA);
+ BIND_ENUM_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
+ BIND_ENUM_CONSTANT(BODY_PARAM_LINEAR_DAMP);
+ BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_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_ENUM_CONSTANT(JOINT_PIN);
+ BIND_ENUM_CONSTANT(JOINT_GROOVE);
+ BIND_ENUM_CONSTANT(JOINT_DAMPED_SPRING);
+
+ BIND_ENUM_CONSTANT(DAMPED_STRING_REST_LENGTH);
+ BIND_ENUM_CONSTANT(DAMPED_STRING_STIFFNESS);
+ BIND_ENUM_CONSTANT(DAMPED_STRING_DAMPING);
+
+ BIND_ENUM_CONSTANT(CCD_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(CCD_MODE_CAST_RAY);
+ BIND_ENUM_CONSTANT(CCD_MODE_CAST_SHAPE);
+
+ //BIND_ENUM_CONSTANT( TYPE_BODY );
+ //BIND_ENUM_CONSTANT( TYPE_AREA );
+
+ BIND_ENUM_CONSTANT(AREA_BODY_ADDED);
+ BIND_ENUM_CONSTANT(AREA_BODY_REMOVED);
+
+ BIND_ENUM_CONSTANT(INFO_ACTIVE_OBJECTS);
+ BIND_ENUM_CONSTANT(INFO_COLLISION_PAIRS);
+ BIND_ENUM_CONSTANT(INFO_ISLAND_COUNT);
}
Physics2DServer::Physics2DServer() {