summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authoralexholly <alexander.holland@live.de>2017-06-06 20:33:51 +0200
committerRémi Verschelde <rverschelde@gmail.com>2017-06-09 15:54:02 +0200
commit935f730170d75955f708b5014da3e11c95fcdac4 (patch)
tree693c281eb4ed706ba4be9867e7f1276450e63e99 /scene
parent63fd693c1ebd2d3d2c23f3969ca8f6f3e18ff3e4 (diff)
renamed all Rect3.pos to Rect3.position
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/collision_polygon.cpp2
-rw-r--r--scene/3d/gi_probe.cpp22
-rw-r--r--scene/3d/immediate_geometry.cpp2
-rw-r--r--scene/3d/reflection_probe.cpp2
-rw-r--r--scene/3d/sprite_3d.cpp4
-rw-r--r--scene/animation/tween.cpp8
-rw-r--r--scene/resources/animation.cpp2
-rw-r--r--scene/resources/box_shape.cpp4
-rw-r--r--scene/resources/mesh.cpp4
9 files changed, 25 insertions, 25 deletions
diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp
index a9a693f370..d9321f7134 100644
--- a/scene/3d/collision_polygon.cpp
+++ b/scene/3d/collision_polygon.cpp
@@ -208,7 +208,7 @@ void CollisionPolygon::set_polygon(const Vector<Point2> &p_polygon) {
aabb = Rect3(Vector3(-1, -1, -1), Vector3(2, 2, 2));
} else {
- aabb.pos -= aabb.size * 0.3;
+ aabb.position -= aabb.size * 0.3;
aabb.size += aabb.size * 0.6;
}
_update_parent();
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index ec3e059249..adca1492c3 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -564,7 +564,7 @@ void GIProbe::_plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, cons
Vector3 ofs_j = float(j) * t2;
- Vector3 from = p_aabb.pos + ofs_i + ofs_j;
+ Vector3 from = p_aabb.position + ofs_i + ofs_j;
Vector3 to = from + t1 + t2 + axis * p_aabb.size[closest_axis];
Vector3 half = (to - from) * 0.5;
@@ -619,7 +619,7 @@ void GIProbe::_plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, cons
//could not in any way get texture information.. so use closest point to center
Face3 f(p_vtx[0], p_vtx[1], p_vtx[2]);
- Vector3 inters = f.get_closest_point_to(p_aabb.pos + p_aabb.size * 0.5);
+ Vector3 inters = f.get_closest_point_to(p_aabb.position + p_aabb.size * 0.5);
Vector2 uv = get_uv(inters, p_vtx, p_uv);
@@ -700,15 +700,15 @@ void GIProbe::_plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, cons
int nz = p_z;
if (i & 1) {
- aabb.pos.x += aabb.size.x;
+ aabb.position.x += aabb.size.x;
nx += half;
}
if (i & 2) {
- aabb.pos.y += aabb.size.y;
+ aabb.position.y += aabb.size.y;
ny += half;
}
if (i & 4) {
- aabb.pos.z += aabb.size.z;
+ aabb.position.z += aabb.size.z;
nz += half;
}
//make sure to not plot beyond limits
@@ -720,7 +720,7 @@ void GIProbe::_plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, cons
//test_aabb.grow_by(test_aabb.get_longest_axis_size()*0.05); //grow a bit to avoid numerical error in real-time
Vector3 qsize = test_aabb.size * 0.5; //quarter size, for fast aabb test
- if (!fast_tri_box_overlap(test_aabb.pos + qsize, qsize, p_vtx)) {
+ if (!fast_tri_box_overlap(test_aabb.position + qsize, qsize, p_vtx)) {
//if (!Face3(p_vtx[0],p_vtx[1],p_vtx[2]).intersects_aabb2(aabb)) {
//does not fit in child, go on
continue;
@@ -1155,7 +1155,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
Transform to_bounds;
to_bounds.basis.scale(Vector3(baker.po2_bounds.size[longest_axis], baker.po2_bounds.size[longest_axis], baker.po2_bounds.size[longest_axis]));
- to_bounds.origin = baker.po2_bounds.pos;
+ to_bounds.origin = baker.po2_bounds.position;
Transform to_grid;
to_grid.basis.scale(Vector3(baker.axis_cell_size[longest_axis], baker.axis_cell_size[longest_axis], baker.axis_cell_size[longest_axis]));
@@ -1274,7 +1274,7 @@ void GIProbe::_debug_mesh(int p_idx, int p_level, const Rect3 &p_aabb, Ref<Multi
if (p_level == p_baker->cell_subdiv - 1) {
- Vector3 center = p_aabb.pos + p_aabb.size * 0.5;
+ Vector3 center = p_aabb.position + p_aabb.size * 0.5;
Transform xform;
xform.origin = center;
xform.basis.scale(p_aabb.size * 0.5);
@@ -1296,11 +1296,11 @@ void GIProbe::_debug_mesh(int p_idx, int p_level, const Rect3 &p_aabb, Ref<Multi
aabb.size *= 0.5;
if (i & 1)
- aabb.pos.x += aabb.size.x;
+ aabb.position.x += aabb.size.x;
if (i & 2)
- aabb.pos.y += aabb.size.y;
+ aabb.position.y += aabb.size.y;
if (i & 4)
- aabb.pos.z += aabb.size.z;
+ aabb.position.z += aabb.size.z;
_debug_mesh(p_baker->bake_cells[p_idx].childs[i], p_level + 1, aabb, p_multimesh, idx, p_baker);
}
diff --git a/scene/3d/immediate_geometry.cpp b/scene/3d/immediate_geometry.cpp
index 8c1ad1d052..128c8b44c3 100644
--- a/scene/3d/immediate_geometry.cpp
+++ b/scene/3d/immediate_geometry.cpp
@@ -65,7 +65,7 @@ void ImmediateGeometry::add_vertex(const Vector3 &p_vertex) {
VS::get_singleton()->immediate_vertex(im, p_vertex);
if (empty) {
- aabb.pos = p_vertex;
+ aabb.position = p_vertex;
aabb.size = Vector3();
empty = false;
} else {
diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp
index 845245b090..86a62bec97 100644
--- a/scene/3d/reflection_probe.cpp
+++ b/scene/3d/reflection_probe.cpp
@@ -181,7 +181,7 @@ ReflectionProbe::UpdateMode ReflectionProbe::get_update_mode() const {
Rect3 ReflectionProbe::get_aabb() const {
Rect3 aabb;
- aabb.pos = -origin_offset;
+ aabb.position = -origin_offset;
aabb.size = origin_offset + extents;
return aabb;
}
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index 43487505c2..a95bb4a67f 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -421,7 +421,7 @@ void Sprite3D::_draw() {
vtx[y_axis] = vertices[i][1];
VS::get_singleton()->immediate_vertex(immediate, vtx);
if (i == 0) {
- aabb.pos = vtx;
+ aabb.position = vtx;
aabb.size = Vector3();
} else {
aabb.expand_to(vtx);
@@ -922,7 +922,7 @@ void AnimatedSprite3D::_draw() {
vtx[y_axis] = vertices[i][1];
VS::get_singleton()->immediate_vertex(immediate, vtx);
if (i == 0) {
- aabb.pos = vtx;
+ aabb.position = vtx;
aabb.size = Vector3();
} else {
aabb.expand_to(vtx);
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 2a6ffb5628..67920d177e 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -421,9 +421,9 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
Rect3 d = delta_val;
Rect3 r;
- APPLY_EQUATION(pos.x);
- APPLY_EQUATION(pos.y);
- APPLY_EQUATION(pos.z);
+ APPLY_EQUATION(position.x);
+ APPLY_EQUATION(position.y);
+ APPLY_EQUATION(position.z);
APPLY_EQUATION(size.x);
APPLY_EQUATION(size.y);
APPLY_EQUATION(size.z);
@@ -963,7 +963,7 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
case Variant::RECT3: {
Rect3 i = initial_val;
Rect3 f = final_val;
- delta_val = Rect3(f.pos - i.pos, f.size - i.size);
+ delta_val = Rect3(f.position - i.position, f.size - i.size);
} break;
case Variant::TRANSFORM: {
Transform i = initial_val;
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index fe5e6e775a..459d3ffe41 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1165,7 +1165,7 @@ Variant Animation::_cubic_interpolate(const Variant &p_pre_a, const Variant &p_a
Rect3 pb = p_post_b;
return Rect3(
- a.pos.cubic_interpolate(b.pos, pa.pos, pb.pos, p_c),
+ a.position.cubic_interpolate(b.position, pa.position, pb.position, p_c),
a.size.cubic_interpolate(b.size, pa.size, pb.size, p_c));
} break;
default: {
diff --git a/scene/resources/box_shape.cpp b/scene/resources/box_shape.cpp
index fedfc71313..d5c25b718e 100644
--- a/scene/resources/box_shape.cpp
+++ b/scene/resources/box_shape.cpp
@@ -34,8 +34,8 @@ Vector<Vector3> BoxShape::_gen_debug_mesh_lines() {
Vector<Vector3> lines;
Rect3 aabb;
- aabb.pos = -get_extents();
- aabb.size = aabb.pos * -2;
+ aabb.position = -get_extents();
+ aabb.size = aabb.position * -2;
for (int i = 0; i < 12; i++) {
Vector3 a, b;
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 7f3b4d2759..9f55f0c364 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -720,7 +720,7 @@ void ArrayMesh::add_surface_from_arrays(PrimitiveType p_primitive, const Array &
for (int i = 0; i < len; i++) {
if (i == 0)
- aabb.pos = vtx[i];
+ aabb.position = vtx[i];
else
aabb.expand_to(vtx[i]);
}
@@ -883,7 +883,7 @@ void ArrayMesh::add_surface_from_mesh_data(const Geometry::MeshData &p_mesh_data
for (int i = 0; i < p_mesh_data.vertices.size(); i++) {
if (i == 0)
- aabb.pos = p_mesh_data.vertices[i];
+ aabb.position = p_mesh_data.vertices[i];
else
aabb.expand_to(p_mesh_data.vertices[i]);
}