summaryrefslogtreecommitdiff
path: root/modules/csg
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2020-10-17 01:08:21 -0400
committerAaron Franke <arnfranke@yahoo.com>2021-06-03 07:30:01 -0400
commitde3f6699a5192153e9882a62b58b9ca6cd82ee2d (patch)
tree7cee99845cc6bf2db8a48f7776efb046c7990a67 /modules/csg
parentb80494e6331bdfbfd3c754aa225fa2a5105fb917 (diff)
Rename Transform to Transform3D in core
Diffstat (limited to 'modules/csg')
-rw-r--r--modules/csg/csg.cpp2
-rw-r--r--modules/csg/csg.h6
-rw-r--r--modules/csg/csg_gizmos.cpp4
-rw-r--r--modules/csg/csg_shape.cpp8
4 files changed, 10 insertions, 10 deletions
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index 7387842259..5a37486568 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -265,7 +265,7 @@ void CSGBrush::build_from_faces(const Vector<Vector3> &p_vertices, const Vector<
_regen_face_aabbs();
}
-void CSGBrush::copy_from(const CSGBrush &p_brush, const Transform &p_xform) {
+void CSGBrush::copy_from(const CSGBrush &p_brush, const Transform3D &p_xform) {
faces = p_brush.faces;
materials = p_brush.materials;
diff --git a/modules/csg/csg.h b/modules/csg/csg.h
index 3fbed66e5c..37a11eea90 100644
--- a/modules/csg/csg.h
+++ b/modules/csg/csg.h
@@ -60,7 +60,7 @@ struct CSGBrush {
// Create a brush from faces.
void build_from_faces(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<bool> &p_smooth, const Vector<Ref<Material>> &p_materials, const Vector<bool> &p_invert_faces);
- void copy_from(const CSGBrush &p_brush, const Transform &p_xform);
+ void copy_from(const CSGBrush &p_brush, const Transform3D &p_xform);
};
struct CSGBrushOperation {
@@ -165,8 +165,8 @@ struct CSGBrushOperation {
Vector<Vertex2D> vertices;
Vector<Face2D> faces;
Plane plane;
- Transform to_2D;
- Transform to_3D;
+ Transform3D to_2D;
+ Transform3D to_3D;
float vertex_snap2 = 0.0;
inline int _get_point_idx(const Vector2 &p_point);
diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp
index 8a46dcca65..37a7d96de5 100644
--- a/modules/csg/csg_gizmos.cpp
+++ b/modules/csg/csg_gizmos.cpp
@@ -99,9 +99,9 @@ Variant CSGShape3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int
void CSGShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
CSGShape3D *cs = Object::cast_to<CSGShape3D>(p_gizmo->get_spatial_node());
- Transform gt = cs->get_global_transform();
+ Transform3D gt = cs->get_global_transform();
//gt.orthonormalize();
- Transform gi = gt.affine_inverse();
+ Transform3D gi = gt.affine_inverse();
Vector3 ray_from = p_camera->project_ray_origin(p_point);
Vector3 ray_dir = p_camera->project_ray_normal(p_point);
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 67dfdfb5eb..d6690bb96c 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -578,7 +578,7 @@ Array CSGShape3D::get_meshes() const {
if (root_mesh.is_valid()) {
Array arr;
arr.resize(2);
- arr[0] = Transform();
+ arr[0] = Transform3D();
arr[1] = root_mesh;
return arr;
}
@@ -1978,13 +1978,13 @@ CSGBrush *CSGPolygon3D::_build_brush() {
float u1 = 0.0;
float u2 = path_continuous_u ? 0.0 : 1.0;
- Transform path_to_this;
+ Transform3D path_to_this;
if (!path_local) {
// center on paths origin
path_to_this = get_global_transform().affine_inverse() * path->get_global_transform();
}
- Transform prev_xf;
+ Transform3D prev_xf;
Vector3 lookat_dir;
@@ -2006,7 +2006,7 @@ CSGBrush *CSGPolygon3D::_build_brush() {
ofs = 0.0;
}
- Transform xf;
+ Transform3D xf;
xf.origin = curve->interpolate_baked(ofs);
Vector3 local_dir;