diff options
author | TwistedTwigleg <beard.noah@gmail.com> | 2017-06-30 14:47:17 -0400 |
---|---|---|
committer | TwistedTwigleg <beard.noah@gmail.com> | 2017-07-03 16:29:03 -0400 |
commit | 44ecfb028d21975944b47b6496712a29f17f3848 (patch) | |
tree | 5d9e8259992ef8ef1690235c540a306e073a36f4 /editor/import | |
parent | cb59236ce938fdf3ffe20b1f77c4f7058ddaadf1 (diff) |
Fixed syntax inconsistency in Vector3.snap and Vector3.snapped
Diffstat (limited to 'editor/import')
-rw-r--r-- | editor/import/editor_import_collada.cpp | 6 | ||||
-rw-r--r-- | editor/import/resource_importer_obj.cpp | 2 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index e0a2ea624e..fbe70ecc74 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -554,10 +554,10 @@ static void _generate_tangents_and_binormals(const PoolVector<int> &p_indices, c tangent = Vector3(); } else { tangent = Vector3((t2 * x1 - t1 * x2) * r, (t2 * y1 - t1 * y2) * r, - (t2 * z1 - t1 * z2) * r) + (t2 * z1 - t1 * z2) * r) .normalized(); binormal = Vector3((s1 * x2 - s2 * x1) * r, (s1 * y2 - s2 * y1) * r, - (s1 * z2 - s2 * z1) * r) + (s1 * z2 - s2 * z1) * r) .normalized(); } @@ -867,7 +867,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me int normal_pos = (normal_src->stride ? normal_src->stride : 3) * p.indices[src + normal_ofs]; ERR_FAIL_INDEX_V(normal_pos, normal_src->array.size(), ERR_INVALID_DATA); vertex.normal = Vector3(normal_src->array[normal_pos + 0], normal_src->array[normal_pos + 1], normal_src->array[normal_pos + 2]); - vertex.normal = vertex.normal.snapped(0.001); + vertex.normal.snap(Vector3(0.001, 0.001, 0.001)); if (tangent_src && binormal_src) { diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 1c5aa95ff1..4a2f37e319 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -188,7 +188,7 @@ Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_s Vector3 vertex = vertices[vtx]; if (weld_vertices) - vertex = vertex.snapped(weld_tolerance); + vertex.snap(Vector3(weld_tolerance, weld_tolerance, weld_tolerance)); surf_tool->add_vertex(vertex); } diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 2409f6707d..2ccbd36e18 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -594,7 +594,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array for (int i = 0; i < 3; i++) { - Vector3 v = f.vertex[i].snapped(0.01); + Vector3 v = f.vertex[i].snapped(Vector3(0.01, 0.01, 0.01)); if (!points.has(v)) { points.insert(v); center += v; |