Browse Source

Remove unused PhysicsShapeQueryResult3D & PhysicsShapeQueryResult2D

PouleyKetchoupp 4 years ago
parent
commit
ccac36a6e2

+ 1 - 1
doc/classes/PhysicsShapeQueryParameters2D.xml

@@ -4,7 +4,7 @@
 		Parameters to be sent to a 2D shape physics query.
 	</brief_description>
 	<description>
-		This class contains the shape and other parameters for 2D intersection/collision queries. See also [PhysicsShapeQueryResult2D].
+		This class contains the shape and other parameters for 2D intersection/collision queries.
 	</description>
 	<tutorials>
 	</tutorials>

+ 1 - 1
doc/classes/PhysicsShapeQueryParameters3D.xml

@@ -4,7 +4,7 @@
 		Parameters to be sent to a 3D shape physics query.
 	</brief_description>
 	<description>
-		This class contains the shape and other parameters for 3D intersection/collision queries. See also [PhysicsShapeQueryResult3D].
+		This class contains the shape and other parameters for 3D intersection/collision queries.
 	</description>
 	<tutorials>
 	</tutorials>

+ 0 - 58
doc/classes/PhysicsShapeQueryResult2D.xml

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryResult2D" inherits="RefCounted" version="4.0">
-	<brief_description>
-		Result of a 2D shape query in [PhysicsServer2D].
-	</brief_description>
-	<description>
-		The result of a 2D shape query in [PhysicsServer2D]. See also [PhysicsShapeQueryParameters2D].
-	</description>
-	<tutorials>
-	</tutorials>
-	<methods>
-		<method name="get_result_count" qualifiers="const">
-			<return type="int">
-			</return>
-			<description>
-				Returns the number of objects that intersected with the shape.
-			</description>
-		</method>
-		<method name="get_result_object" qualifiers="const">
-			<return type="Object">
-			</return>
-			<argument index="0" name="idx" type="int">
-			</argument>
-			<description>
-				Returns the [Object] that intersected with the shape at index [code]idx[/code].
-			</description>
-		</method>
-		<method name="get_result_object_id" qualifiers="const">
-			<return type="int">
-			</return>
-			<argument index="0" name="idx" type="int">
-			</argument>
-			<description>
-				Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code].
-			</description>
-		</method>
-		<method name="get_result_object_shape" qualifiers="const">
-			<return type="int">
-			</return>
-			<argument index="0" name="idx" type="int">
-			</argument>
-			<description>
-				Returns the child index of the object's [Shape2D] that intersected with the shape at index [code]idx[/code].
-			</description>
-		</method>
-		<method name="get_result_rid" qualifiers="const">
-			<return type="RID">
-			</return>
-			<argument index="0" name="idx" type="int">
-			</argument>
-			<description>
-				Returns the [RID] of the object that intersected with the shape at index [code]idx[/code].
-			</description>
-		</method>
-	</methods>
-	<constants>
-	</constants>
-</class>

+ 0 - 58
doc/classes/PhysicsShapeQueryResult3D.xml

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryResult3D" inherits="RefCounted" version="4.0">
-	<brief_description>
-		Result of a 3D shape query in [PhysicsServer3D].
-	</brief_description>
-	<description>
-		The result of a 3D shape query in [PhysicsServer3D]. See also [PhysicsShapeQueryParameters3D].
-	</description>
-	<tutorials>
-	</tutorials>
-	<methods>
-		<method name="get_result_count" qualifiers="const">
-			<return type="int">
-			</return>
-			<description>
-				Returns the number of objects that intersected with the shape.
-			</description>
-		</method>
-		<method name="get_result_object" qualifiers="const">
-			<return type="Object">
-			</return>
-			<argument index="0" name="idx" type="int">
-			</argument>
-			<description>
-				Returns the [Object] that intersected with the shape at index [code]idx[/code].
-			</description>
-		</method>
-		<method name="get_result_object_id" qualifiers="const">
-			<return type="int">
-			</return>
-			<argument index="0" name="idx" type="int">
-			</argument>
-			<description>
-				Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code].
-			</description>
-		</method>
-		<method name="get_result_object_shape" qualifiers="const">
-			<return type="int">
-			</return>
-			<argument index="0" name="idx" type="int">
-			</argument>
-			<description>
-				Returns the child index of the object's [Shape3D] that intersected with the shape at index [code]idx[/code].
-			</description>
-		</method>
-		<method name="get_result_rid" qualifiers="const">
-			<return type="RID">
-			</return>
-			<argument index="0" name="idx" type="int">
-			</argument>
-			<description>
-				Returns the [RID] of the object that intersected with the shape at index [code]idx[/code].
-			</description>
-		</method>
-	</methods>
-	<constants>
-	</constants>
-</class>

+ 0 - 2
scene/register_scene_types.cpp

@@ -937,14 +937,12 @@ void register_scene_types() {
 	ClassDB::add_compatibility_class("Physics2DServerSW", "PhysicsServer2DSW");
 	ClassDB::add_compatibility_class("Physics2DServer", "PhysicsServer2D");
 	ClassDB::add_compatibility_class("Physics2DShapeQueryParameters", "PhysicsShapeQueryParameters2D");
-	ClassDB::add_compatibility_class("Physics2DShapeQueryResult", "PhysicsShapeQueryResult2D");
 	ClassDB::add_compatibility_class("Physics2DTestMotionResult", "PhysicsTestMotionResult2D");
 	ClassDB::add_compatibility_class("PhysicsBody", "PhysicsBody3D");
 	ClassDB::add_compatibility_class("PhysicsDirectBodyState", "PhysicsDirectBodyState3D");
 	ClassDB::add_compatibility_class("PhysicsDirectSpaceState", "PhysicsDirectSpaceState3D");
 	ClassDB::add_compatibility_class("PhysicsServer", "PhysicsServer3D");
 	ClassDB::add_compatibility_class("PhysicsShapeQueryParameters", "PhysicsShapeQueryParameters3D");
-	ClassDB::add_compatibility_class("PhysicsShapeQueryResult", "PhysicsShapeQueryResult3D");
 	ClassDB::add_compatibility_class("PinJoint", "PinJoint3D");
 	ClassDB::add_compatibility_class("PlaneShape", "WorldMarginShape3D");
 	ClassDB::add_compatibility_class("ProceduralSky", "Sky");

+ 0 - 31
servers/physics_server_2d.cpp

@@ -418,37 +418,6 @@ void PhysicsDirectSpaceState2D::_bind_methods() {
 	ClassDB::bind_method(D_METHOD("get_rest_info", "shape"), &PhysicsDirectSpaceState2D::_get_rest_info);
 }
 
-int PhysicsShapeQueryResult2D::get_result_count() const {
-	return result.size();
-}
-
-RID PhysicsShapeQueryResult2D::get_result_rid(int p_idx) const {
-	return result[p_idx].rid;
-}
-
-ObjectID PhysicsShapeQueryResult2D::get_result_object_id(int p_idx) const {
-	return result[p_idx].collider_id;
-}
-
-Object *PhysicsShapeQueryResult2D::get_result_object(int p_idx) const {
-	return result[p_idx].collider;
-}
-
-int PhysicsShapeQueryResult2D::get_result_object_shape(int p_idx) const {
-	return result[p_idx].shape;
-}
-
-PhysicsShapeQueryResult2D::PhysicsShapeQueryResult2D() {
-}
-
-void PhysicsShapeQueryResult2D::_bind_methods() {
-	ClassDB::bind_method(D_METHOD("get_result_count"), &PhysicsShapeQueryResult2D::get_result_count);
-	ClassDB::bind_method(D_METHOD("get_result_rid", "idx"), &PhysicsShapeQueryResult2D::get_result_rid);
-	ClassDB::bind_method(D_METHOD("get_result_object_id", "idx"), &PhysicsShapeQueryResult2D::get_result_object_id);
-	ClassDB::bind_method(D_METHOD("get_result_object", "idx"), &PhysicsShapeQueryResult2D::get_result_object);
-	ClassDB::bind_method(D_METHOD("get_result_object_shape", "idx"), &PhysicsShapeQueryResult2D::get_result_object_shape);
-}
-
 ///////////////////////////////
 
 Vector2 PhysicsTestMotionResult2D::get_motion() const {

+ 0 - 22
servers/physics_server_2d.h

@@ -92,8 +92,6 @@ public:
 	PhysicsDirectBodyState2D();
 };
 
-class PhysicsShapeQueryResult2D;
-
 //used for script
 class PhysicsShapeQueryParameters2D : public RefCounted {
 	GDCLASS(PhysicsShapeQueryParameters2D, RefCounted);
@@ -203,26 +201,6 @@ public:
 	PhysicsDirectSpaceState2D();
 };
 
-class PhysicsShapeQueryResult2D : public RefCounted {
-	GDCLASS(PhysicsShapeQueryResult2D, RefCounted);
-
-	Vector<PhysicsDirectSpaceState2D::ShapeResult> result;
-
-	friend class PhysicsDirectSpaceState2D;
-
-protected:
-	static void _bind_methods();
-
-public:
-	int get_result_count() const;
-	RID get_result_rid(int p_idx) const;
-	ObjectID get_result_object_id(int p_idx) const;
-	Object *get_result_object(int p_idx) const;
-	int get_result_object_shape(int p_idx) const;
-
-	PhysicsShapeQueryResult2D();
-};
-
 class PhysicsTestMotionResult2D;
 
 class PhysicsServer2D : public Object {

+ 0 - 31
servers/physics_server_3d.cpp

@@ -365,37 +365,6 @@ void PhysicsDirectSpaceState3D::_bind_methods() {
 	ClassDB::bind_method(D_METHOD("get_rest_info", "shape"), &PhysicsDirectSpaceState3D::_get_rest_info);
 }
 
-int PhysicsShapeQueryResult3D::get_result_count() const {
-	return result.size();
-}
-
-RID PhysicsShapeQueryResult3D::get_result_rid(int p_idx) const {
-	return result[p_idx].rid;
-}
-
-ObjectID PhysicsShapeQueryResult3D::get_result_object_id(int p_idx) const {
-	return result[p_idx].collider_id;
-}
-
-Object *PhysicsShapeQueryResult3D::get_result_object(int p_idx) const {
-	return result[p_idx].collider;
-}
-
-int PhysicsShapeQueryResult3D::get_result_object_shape(int p_idx) const {
-	return result[p_idx].shape;
-}
-
-PhysicsShapeQueryResult3D::PhysicsShapeQueryResult3D() {
-}
-
-void PhysicsShapeQueryResult3D::_bind_methods() {
-	ClassDB::bind_method(D_METHOD("get_result_count"), &PhysicsShapeQueryResult3D::get_result_count);
-	ClassDB::bind_method(D_METHOD("get_result_rid", "idx"), &PhysicsShapeQueryResult3D::get_result_rid);
-	ClassDB::bind_method(D_METHOD("get_result_object_id", "idx"), &PhysicsShapeQueryResult3D::get_result_object_id);
-	ClassDB::bind_method(D_METHOD("get_result_object", "idx"), &PhysicsShapeQueryResult3D::get_result_object);
-	ClassDB::bind_method(D_METHOD("get_result_object_shape", "idx"), &PhysicsShapeQueryResult3D::get_result_object_shape);
-}
-
 ///////////////////////////////
 
 Vector3 PhysicsTestMotionResult3D::get_motion() const {

+ 0 - 22
servers/physics_server_3d.h

@@ -94,8 +94,6 @@ public:
 	PhysicsDirectBodyState3D();
 };
 
-class PhysicsShapeQueryResult3D;
-
 class PhysicsShapeQueryParameters3D : public RefCounted {
 	GDCLASS(PhysicsShapeQueryParameters3D, RefCounted);
 	friend class PhysicsDirectSpaceState3D;
@@ -196,26 +194,6 @@ public:
 	PhysicsDirectSpaceState3D();
 };
 
-class PhysicsShapeQueryResult3D : public RefCounted {
-	GDCLASS(PhysicsShapeQueryResult3D, RefCounted);
-
-	Vector<PhysicsDirectSpaceState3D::ShapeResult> result;
-
-	friend class PhysicsDirectSpaceState3D;
-
-protected:
-	static void _bind_methods();
-
-public:
-	int get_result_count() const;
-	RID get_result_rid(int p_idx) const;
-	ObjectID get_result_object_id(int p_idx) const;
-	Object *get_result_object(int p_idx) const;
-	int get_result_object_shape(int p_idx) const;
-
-	PhysicsShapeQueryResult3D();
-};
-
 class RenderingServerHandler {
 public:
 	virtual void set_vertex(int p_vertex_id, const void *p_vector3) = 0;

+ 0 - 2
servers/register_server_types.cpp

@@ -212,14 +212,12 @@ void register_server_types() {
 
 	ClassDB::register_virtual_class<PhysicsDirectBodyState2D>();
 	ClassDB::register_virtual_class<PhysicsDirectSpaceState2D>();
-	ClassDB::register_virtual_class<PhysicsShapeQueryResult2D>();
 	ClassDB::register_class<PhysicsTestMotionResult2D>();
 	ClassDB::register_class<PhysicsShapeQueryParameters2D>();
 
 	ClassDB::register_class<PhysicsShapeQueryParameters3D>();
 	ClassDB::register_virtual_class<PhysicsDirectBodyState3D>();
 	ClassDB::register_virtual_class<PhysicsDirectSpaceState3D>();
-	ClassDB::register_virtual_class<PhysicsShapeQueryResult3D>();
 	ClassDB::register_class<PhysicsTestMotionResult3D>();
 
 	// Physics 2D