Renamed plane's d to distance
This commit is contained in:
parent
ff5dfcdf68
commit
ec7b481170
36 changed files with 126 additions and 126 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue