summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/editor_preview_plugins.cpp4
-rw-r--r--editor/plugins/particles_editor_plugin.cpp4
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp6
-rw-r--r--editor/property_editor.cpp6
-rw-r--r--editor/spatial_editor_gizmos.cpp36
5 files changed, 28 insertions, 28 deletions
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 0b08fcfce8..7f8b98e1d3 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -795,8 +795,8 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES &p_from) {
Rect3 aabb = mesh->get_aabb();
print_line("mesh aabb: " + aabb);
- Vector3 ofs = aabb.pos + aabb.size * 0.5;
- aabb.pos -= ofs;
+ Vector3 ofs = aabb.position + aabb.size * 0.5;
+ aabb.position -= ofs;
Transform xform;
xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.125);
xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.125) * xform.basis;
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index dc2da80b06..d918a3e24e 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -254,7 +254,7 @@ void ParticlesEditor::_generate_emission_points() {
for (int j = 0; j < 3; j++) {
if (i == 0 && j == 0)
- aabb.pos = r[i].vertex[j];
+ aabb.position = r[i].vertex[j];
else
aabb.expand_to(r[i].vertex[j]);
}
@@ -272,7 +272,7 @@ void ParticlesEditor::_generate_emission_points() {
dir[Math::rand() % 3] = 1.0;
Vector3 ofs = Vector3(1, 1, 1) - dir;
ofs = (Vector3(1, 1, 1) - dir) * Vector3(Math::randf(), Math::randf(), Math::randf()) * aabb.size;
- ofs += aabb.pos;
+ ofs += aabb.position;
Vector3 ofsv = ofs + aabb.size * dir;
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 61f6880433..7b8a4a89d4 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -1676,7 +1676,7 @@ void SpatialEditorViewport::_notification(int p_what) {
}
Transform t = sp->get_global_transform();
- t.translate(se->aabb.pos);
+ t.translate(se->aabb.position);
t.basis.scale(se->aabb.size);
exist = true;
@@ -2379,7 +2379,7 @@ void SpatialEditor::update_transform_gizmo() {
Transform xf = se->sp->get_global_transform();
if (first) {
- center.pos = xf.origin;
+ center.position = xf.origin;
first = false;
if (local_gizmo_coords) {
gizmo_basis = xf.basis;
@@ -2392,7 +2392,7 @@ void SpatialEditor::update_transform_gizmo() {
//count++;
}
- Vector3 pcenter = center.pos + center.size * 0.5;
+ Vector3 pcenter = center.position + center.size * 0.5;
gizmo.visible = !first;
gizmo.transform.origin = pcenter;
gizmo.transform.basis = gizmo_basis;
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index d1b79ea7aa..3d3fecc8f9 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -733,9 +733,9 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
config_value_editors(6, 3, 16, field_names);
Rect3 aabb = v;
- value_editor[0]->set_text(String::num(aabb.pos.x));
- value_editor[1]->set_text(String::num(aabb.pos.y));
- value_editor[2]->set_text(String::num(aabb.pos.z));
+ value_editor[0]->set_text(String::num(aabb.position.x));
+ value_editor[1]->set_text(String::num(aabb.position.y));
+ value_editor[2]->set_text(String::num(aabb.position.z));
value_editor[3]->set_text(String::num(aabb.size.x));
value_editor[4]->set_text(String::num(aabb.size.y));
value_editor[5]->set_text(String::num(aabb.size.z));
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 149b06e50a..1b7afd3c43 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -1722,8 +1722,8 @@ void CollisionShapeSpatialGizmo::redraw() {
Ref<BoxShape> bs = s;
Vector<Vector3> lines;
Rect3 aabb;
- aabb.pos = -bs->get_extents();
- aabb.size = aabb.pos * -2;
+ aabb.position = -bs->get_extents();
+ aabb.size = aabb.position * -2;
for (int i = 0; i < 12; i++) {
Vector3 a, b;
@@ -1953,7 +1953,7 @@ void VisibilityNotifierGizmo::set_handle(int p_idx, Camera *p_camera, const Poin
Vector3 ray_dir = p_camera->project_ray_normal(p_point);
Vector3 sg[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
- Vector3 ofs = aabb.pos + aabb.size * 0.5;
+ Vector3 ofs = aabb.position + aabb.size * 0.5;
Vector3 axis;
axis[p_idx] = 1.0;
@@ -1964,7 +1964,7 @@ void VisibilityNotifierGizmo::set_handle(int p_idx, Camera *p_camera, const Poin
if (d < 0.001)
d = 0.001;
- aabb.pos[p_idx] = (aabb.pos[p_idx] + aabb.size[p_idx] * 0.5) - d;
+ aabb.position[p_idx] = (aabb.position[p_idx] + aabb.size[p_idx] * 0.5) - d;
aabb.size[p_idx] = d * 2;
notifier->set_aabb(aabb);
}
@@ -2002,7 +2002,7 @@ void VisibilityNotifierGizmo::redraw() {
for (int i = 0; i < 3; i++) {
Vector3 ax;
- ax[i] = aabb.pos[i] + aabb.size[i];
+ ax[i] = aabb.position[i] + aabb.size[i];
handles.push_back(ax);
}
@@ -2053,7 +2053,7 @@ void ParticlesGizmo::set_handle(int p_idx, Camera *p_camera, const Point2 &p_poi
Vector3 sg[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
- Vector3 ofs = aabb.pos + aabb.size * 0.5;
+ Vector3 ofs = aabb.position + aabb.size * 0.5;
Vector3 axis;
axis[p_idx] = 1.0;
@@ -2065,7 +2065,7 @@ void ParticlesGizmo::set_handle(int p_idx, Camera *p_camera, const Point2 &p_poi
float d = ra[p_idx];
- aabb.pos[p_idx] = d - 1.0 - aabb.size[p_idx] * 0.5;
+ aabb.position[p_idx] = d - 1.0 - aabb.size[p_idx] * 0.5;
particles->set_visibility_aabb(aabb);
} else {
@@ -2076,7 +2076,7 @@ void ParticlesGizmo::set_handle(int p_idx, Camera *p_camera, const Point2 &p_poi
if (d < 0.001)
d = 0.001;
//resize
- aabb.pos[p_idx] = (aabb.pos[p_idx] + aabb.size[p_idx] * 0.5) - d;
+ aabb.position[p_idx] = (aabb.position[p_idx] + aabb.size[p_idx] * 0.5) - d;
aabb.size[p_idx] = d * 2;
particles->set_visibility_aabb(aabb);
}
@@ -2115,13 +2115,13 @@ void ParticlesGizmo::redraw() {
for (int i = 0; i < 3; i++) {
Vector3 ax;
- ax[i] = aabb.pos[i] + aabb.size[i];
- ax[(i + 1) % 3] = aabb.pos[(i + 1) % 3] + aabb.size[(i + 1) % 3] * 0.5;
- ax[(i + 2) % 3] = aabb.pos[(i + 2) % 3] + aabb.size[(i + 2) % 3] * 0.5;
+ ax[i] = aabb.position[i] + aabb.size[i];
+ ax[(i + 1) % 3] = aabb.position[(i + 1) % 3] + aabb.size[(i + 1) % 3] * 0.5;
+ ax[(i + 2) % 3] = aabb.position[(i + 2) % 3] + aabb.size[(i + 2) % 3] * 0.5;
handles.push_back(ax);
}
- Vector3 center = aabb.pos + aabb.size * 0.5;
+ Vector3 center = aabb.position + aabb.size * 0.5;
for (int i = 0; i < 3; i++) {
Vector3 ax;
@@ -2218,7 +2218,7 @@ void ReflectionProbeGizmo::commit_handle(int p_idx, const Variant &p_restore, bo
Rect3 restore = p_restore;
if (p_cancel) {
- probe->set_extents(restore.pos);
+ probe->set_extents(restore.position);
probe->set_origin_offset(restore.size);
return;
}
@@ -2227,7 +2227,7 @@ void ReflectionProbeGizmo::commit_handle(int p_idx, const Variant &p_restore, bo
ur->create_action(TTR("Change Probe Extents"));
ur->add_do_method(probe, "set_extents", probe->get_extents());
ur->add_do_method(probe, "set_origin_offset", probe->get_origin_offset());
- ur->add_undo_method(probe, "set_extents", restore.pos);
+ ur->add_undo_method(probe, "set_extents", restore.position);
ur->add_undo_method(probe, "set_origin_offset", restore.size);
ur->commit_action();
}
@@ -2241,7 +2241,7 @@ void ReflectionProbeGizmo::redraw() {
Vector3 extents = probe->get_extents();
Rect3 aabb;
- aabb.pos = -extents;
+ aabb.position = -extents;
aabb.size = extents * 2;
for (int i = 0; i < 12; i++) {
@@ -2262,7 +2262,7 @@ void ReflectionProbeGizmo::redraw() {
for (int i = 0; i < 3; i++) {
Vector3 ax;
- ax[i] = aabb.pos[i] + aabb.size[i];
+ ax[i] = aabb.position[i] + aabb.size[i];
handles.push_back(ax);
}
@@ -2392,7 +2392,7 @@ void GIProbeGizmo::redraw() {
for (int k = 0; k < 4; k++) {
- Vector3 from = aabb.pos, to = aabb.pos;
+ Vector3 from = aabb.position, to = aabb.position;
from[j] += cell_size * i;
to[j] += cell_size * i;
@@ -2421,7 +2421,7 @@ void GIProbeGizmo::redraw() {
for (int i = 0; i < 3; i++) {
Vector3 ax;
- ax[i] = aabb.pos[i] + aabb.size[i];
+ ax[i] = aabb.position[i] + aabb.size[i];
handles.push_back(ax);
}