diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_properties.cpp | 4 | ||||
-rw-r--r-- | editor/import/editor_import_collada.cpp | 6 | ||||
-rw-r--r-- | editor/node_3d_editor_gizmos.cpp | 12 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/property_editor.cpp | 4 |
5 files changed, 15 insertions, 15 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 5213d7ec15..5d16a8cf77 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1611,7 +1611,7 @@ void EditorPropertyPlane::_value_changed(double val, const String &p_name) { p.normal.x = spin[0]->get_value(); p.normal.y = spin[1]->get_value(); p.normal.z = spin[2]->get_value(); - p.d = spin[3]->get_value(); + p.distance = spin[3]->get_value(); emit_changed(get_edited_property(), p, p_name); } @@ -1621,7 +1621,7 @@ void EditorPropertyPlane::update_property() { spin[0]->set_value(val.normal.x); spin[1]->set_value(val.normal.y); spin[2]->set_value(val.normal.z); - spin[3]->set_value(val.d); + spin[3]->set_value(val.distance); setting = false; } void EditorPropertyPlane::_notification(int p_what) { diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 697ddfba96..7e7a982501 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -766,7 +766,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me Vector3 tangent = Vector3(tangent_src->array[tangent_pos + 0], tangent_src->array[tangent_pos + 1], tangent_src->array[tangent_pos + 2]); vertex.tangent.normal = tangent; - vertex.tangent.d = vertex.normal.cross(tangent).dot(binormal) > 0 ? 1 : -1; + vertex.tangent.distance = vertex.normal.cross(tangent).dot(binormal) > 0 ? 1 : -1; } } @@ -794,7 +794,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me #ifndef NO_UP_AXIS_SWAP if (collada.state.up_axis == Vector3::AXIS_Z) { - Vector3 bn = vertex.normal.cross(vertex.tangent.normal) * vertex.tangent.d; + Vector3 bn = vertex.normal.cross(vertex.tangent.normal) * vertex.tangent.distance; SWAP(vertex.vertex.z, vertex.vertex.y); vertex.vertex.z = -vertex.vertex.z; @@ -805,7 +805,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me SWAP(bn.z, bn.y); bn.z = -bn.z; - vertex.tangent.d = vertex.normal.cross(vertex.tangent.normal).dot(bn) > 0 ? 1 : -1; + vertex.tangent.distance = vertex.normal.cross(vertex.tangent.normal).dot(bn) > 0 ? 1 : -1; } #endif diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp index c321e85546..f83204fcdd 100644 --- a/editor/node_3d_editor_gizmos.cpp +++ b/editor/node_3d_editor_gizmos.cpp @@ -3724,10 +3724,10 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { Vector3 n2 = p.normal.cross(n1).normalized(); Vector3 pface[4] = { - p.normal * p.d + n1 * 10.0 + n2 * 10.0, - p.normal * p.d + n1 * 10.0 + n2 * -10.0, - p.normal * p.d + n1 * -10.0 + n2 * -10.0, - p.normal * p.d + n1 * -10.0 + n2 * 10.0, + p.normal * p.distance + n1 * 10.0 + n2 * 10.0, + p.normal * p.distance + n1 * 10.0 + n2 * -10.0, + p.normal * p.distance + n1 * -10.0 + n2 * -10.0, + p.normal * p.distance + n1 * -10.0 + n2 * 10.0, }; points.push_back(pface[0]); @@ -3738,8 +3738,8 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { points.push_back(pface[3]); points.push_back(pface[3]); points.push_back(pface[0]); - points.push_back(p.normal * p.d); - points.push_back(p.normal * p.d + p.normal * 3); + points.push_back(p.normal * p.distance); + points.push_back(p.normal * p.distance + p.normal * 3); p_gizmo->add_lines(points, material); p_gizmo->add_collision_segments(points); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 457a0aaa36..7e65dd1c78 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -682,11 +682,11 @@ void Node3DEditorViewport::_select_region() { } Plane near(cam_pos, -_get_camera_normal()); - near.d -= get_znear(); + near.distance -= get_znear(); frustum.push_back(near); Plane far = -near; - far.d += get_zfar(); + far.distance += get_zfar(); frustum.push_back(far); Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_convex(frustum, get_tree()->get_root()->get_world_3d()->get_scenario()); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 60329fb7bc..15fbf19fdb 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -752,7 +752,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: value_editor[0]->set_text(String::num(plane.normal.x)); value_editor[1]->set_text(String::num(plane.normal.y)); value_editor[2]->set_text(String::num(plane.normal.z)); - value_editor[3]->set_text(String::num(plane.d)); + value_editor[3]->set_text(String::num(plane.distance)); } break; case Variant::QUAT: { @@ -1598,7 +1598,7 @@ void CustomPropertyEditor::_modified(String p_string) { pl.normal.x = _parse_real_expression(value_editor[0]->get_text()); pl.normal.y = _parse_real_expression(value_editor[1]->get_text()); pl.normal.z = _parse_real_expression(value_editor[2]->get_text()); - pl.d = _parse_real_expression(value_editor[3]->get_text()); + pl.distance = _parse_real_expression(value_editor[3]->get_text()); v = pl; _emit_changed_whole_or_field(); |