summaryrefslogtreecommitdiff
path: root/servers/physics_server_3d.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-22 21:48:40 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-22 21:48:40 +0100
commit7f8ecffa56834dce3ccbd736738b613d51133dea (patch)
tree67214d3d7098e6726140c58b251d9e0f6d5be73c /servers/physics_server_3d.cpp
parentdfcb2d4fb807ccb2dcaf894d5b2ed66d3a26aa88 (diff)
parent82dac646598fb4799165952460cf8e4479f9fbef (diff)
Merge pull request #69017 from raulsntos/physics3d-array
Change exclude property in `PhysicsRayQueryParameters3D` to TypedArray
Diffstat (limited to 'servers/physics_server_3d.cpp')
-rw-r--r--servers/physics_server_3d.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp
index db21e1db06..35833341f2 100644
--- a/servers/physics_server_3d.cpp
+++ b/servers/physics_server_3d.cpp
@@ -169,19 +169,19 @@ PhysicsDirectBodyState3D::PhysicsDirectBodyState3D() {}
///////////////////////////////////////////////////////
-void PhysicsRayQueryParameters3D::set_exclude(const Vector<RID> &p_exclude) {
+void PhysicsRayQueryParameters3D::set_exclude(const TypedArray<RID> &p_exclude) {
parameters.exclude.clear();
for (int i = 0; i < p_exclude.size(); i++) {
parameters.exclude.insert(p_exclude[i]);
}
}
-Vector<RID> PhysicsRayQueryParameters3D::get_exclude() const {
- Vector<RID> ret;
+TypedArray<RID> PhysicsRayQueryParameters3D::get_exclude() const {
+ TypedArray<RID> ret;
ret.resize(parameters.exclude.size());
int idx = 0;
for (const RID &E : parameters.exclude) {
- ret.write[idx++] = E;
+ ret[idx++] = E;
}
return ret;
}
@@ -225,7 +225,7 @@ void PhysicsRayQueryParameters3D::_bind_methods() {
///////////////////////////////////////////////////////
-Ref<PhysicsRayQueryParameters3D> PhysicsRayQueryParameters3D::create(Vector3 p_from, Vector3 p_to, uint32_t p_mask, const Vector<RID> &p_exclude) {
+Ref<PhysicsRayQueryParameters3D> PhysicsRayQueryParameters3D::create(Vector3 p_from, Vector3 p_to, uint32_t p_mask, const TypedArray<RID> &p_exclude) {
Ref<PhysicsRayQueryParameters3D> params;
params.instantiate();
params->set_from(p_from);