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.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp
index b3680d58db..1686a6e87e 100644
--- a/modules/bullet/soft_body_bullet.cpp
+++ b/modules/bullet/soft_body_bullet.cpp
@@ -90,7 +90,7 @@ void SoftBodyBullet::update_visual_server(SoftBodyVisualServerHandler *p_visual_
const btSoftBody::tNodeArray &nodes(bt_soft_body->m_nodes);
const int nodes_count = nodes.size();
- Vector<int> *vs_indices;
+ const Vector<int> *vs_indices;
const void *vertex_position;
const void *vertex_normal;
@@ -359,7 +359,7 @@ void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVecto
indices_table.push_back(Vector<int>());
}
- indices_table[vertex_id].push_back(vs_vertex_index);
+ indices_table.write[vertex_id].push_back(vs_vertex_index);
vs_indices_to_physics_table.push_back(vertex_id);
}
}
@@ -374,9 +374,9 @@ void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVecto
PoolVector<Vector3>::Read p_vertices_read = p_vertices.read();
for (int i = 0; i < indices_map_size; ++i) {
- 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;
+ 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;
}
}
@@ -390,9 +390,9 @@ void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVecto
PoolVector<int>::Read p_indices_read = p_indices.read();
for (int i = 0; i < triangles_size; ++i) {
- 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]];
+ 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]];
}
}