summaryrefslogtreecommitdiff
path: root/modules/bullet/soft_body_bullet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bullet/soft_body_bullet.cpp')
-rw-r--r--modules/bullet/soft_body_bullet.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp
index 3fccd3d8a2..ee48b3c5f0 100644
--- a/modules/bullet/soft_body_bullet.cpp
+++ b/modules/bullet/soft_body_bullet.cpp
@@ -346,14 +346,14 @@ void SoftBodyBullet::set_trimesh_body_shape(Vector<int> p_indices, Vector<Vector
indices_table.push_back(Vector<int>());
}
- indices_table.write[vertex_id].push_back(vs_vertex_index);
+ indices_table[vertex_id].push_back(vs_vertex_index);
vs_indices_to_physics_table.push_back(vertex_id);
}
}
const int indices_map_size(indices_table.size());
- Vector<btScalar> bt_vertices;
+ LocalVector<btScalar> bt_vertices;
{ // Parse vertices to bullet
@@ -361,13 +361,13 @@ void SoftBodyBullet::set_trimesh_body_shape(Vector<int> p_indices, Vector<Vector
const Vector3 *p_vertices_read = p_vertices.ptr();
for (int i = 0; i < indices_map_size; ++i) {
- bt_vertices.write[3 * i + 0] = p_vertices_read[indices_table[i][0]].x;
- bt_vertices.write[3 * i + 1] = p_vertices_read[indices_table[i][0]].y;
- bt_vertices.write[3 * i + 2] = p_vertices_read[indices_table[i][0]].z;
+ bt_vertices[3 * i + 0] = p_vertices_read[indices_table[i][0]].x;
+ bt_vertices[3 * i + 1] = p_vertices_read[indices_table[i][0]].y;
+ bt_vertices[3 * i + 2] = p_vertices_read[indices_table[i][0]].z;
}
}
- Vector<int> bt_triangles;
+ LocalVector<int> bt_triangles;
const int triangles_size(p_indices.size() / 3);
{ // Parse indices
@@ -377,9 +377,9 @@ void SoftBodyBullet::set_trimesh_body_shape(Vector<int> p_indices, Vector<Vector
const int *p_indices_read = p_indices.ptr();
for (int i = 0; i < triangles_size; ++i) {
- bt_triangles.write[3 * i + 0] = vs_indices_to_physics_table[p_indices_read[3 * i + 2]];
- bt_triangles.write[3 * i + 1] = vs_indices_to_physics_table[p_indices_read[3 * i + 1]];
- bt_triangles.write[3 * i + 2] = vs_indices_to_physics_table[p_indices_read[3 * i + 0]];
+ bt_triangles[3 * i + 0] = vs_indices_to_physics_table[p_indices_read[3 * i + 2]];
+ bt_triangles[3 * i + 1] = vs_indices_to_physics_table[p_indices_read[3 * i + 1]];
+ bt_triangles[3 * i + 2] = vs_indices_to_physics_table[p_indices_read[3 * i + 0]];
}
}