You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Optimize Convex Collision
Implements the Gauss Mapping optimization to SAT convex collision test. * Described [here](https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdc2013/slides/822403Gregorius_Dirk_TheSeparatingAxisTest.pdf) by Dirk Gregorius. * Requires adding of face information to edges in MeshData * Took the chance to convert MeshData to LocalVector for performance.
This commit is contained in:
@@ -2791,10 +2791,10 @@ void RenderingServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry
|
||||
Vector<Vector3> vertices;
|
||||
Vector<Vector3> normals;
|
||||
|
||||
for (int i = 0; i < p_mesh_data.faces.size(); i++) {
|
||||
for (uint32_t i = 0; i < p_mesh_data.faces.size(); i++) {
|
||||
const Geometry3D::MeshData::Face &f = p_mesh_data.faces[i];
|
||||
|
||||
for (int j = 2; j < f.indices.size(); j++) {
|
||||
for (uint32_t j = 2; j < f.indices.size(); j++) {
|
||||
vertices.push_back(p_mesh_data.vertices[f.indices[0]]);
|
||||
normals.push_back(f.plane.normal);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user