summaryrefslogtreecommitdiff
path: root/modules/csg
diff options
context:
space:
mode:
Diffstat (limited to 'modules/csg')
-rw-r--r--modules/csg/csg.cpp14
-rw-r--r--modules/csg/csg_gizmos.cpp44
-rw-r--r--modules/csg/csg_gizmos.h22
-rw-r--r--modules/csg/csg_shape.cpp122
4 files changed, 104 insertions, 98 deletions
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index 5a37486568..cb82b65307 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -42,7 +42,7 @@ inline static bool is_snapable(const Vector3 &p_point1, const Vector3 &p_point2,
inline static Vector2 interpolate_segment_uv(const Vector2 p_segement_points[2], const Vector2 p_uvs[2], const Vector2 &p_interpolation_point) {
float segment_length = (p_segement_points[1] - p_segement_points[0]).length();
- if (segment_length < CMP_EPSILON) {
+ if (p_segement_points[0].is_equal_approx(p_segement_points[1])) {
return p_uvs[0];
}
@@ -53,13 +53,13 @@ inline static Vector2 interpolate_segment_uv(const Vector2 p_segement_points[2],
}
inline static Vector2 interpolate_triangle_uv(const Vector2 p_vertices[3], const Vector2 p_uvs[3], const Vector2 &p_interpolation_point) {
- if (p_interpolation_point.distance_squared_to(p_vertices[0]) < CMP_EPSILON2) {
+ if (p_interpolation_point.is_equal_approx(p_vertices[0])) {
return p_uvs[0];
}
- if (p_interpolation_point.distance_squared_to(p_vertices[1]) < CMP_EPSILON2) {
+ if (p_interpolation_point.is_equal_approx(p_vertices[1])) {
return p_uvs[1];
}
- if (p_interpolation_point.distance_squared_to(p_vertices[2]) < CMP_EPSILON2) {
+ if (p_interpolation_point.is_equal_approx(p_vertices[2])) {
return p_uvs[2];
}
@@ -530,8 +530,8 @@ void CSGBrushOperation::MeshMerge::_add_distance(List<real_t> &r_intersectionsA,
List<real_t> &intersections = p_from_B ? r_intersectionsB : r_intersectionsA;
// Check if distance exists.
- for (const List<real_t>::Element *E = intersections.front(); E; E = E->next()) {
- if (Math::is_equal_approx(**E, p_distance)) {
+ for (const real_t E : intersections) {
+ if (Math::is_equal_approx(E, p_distance)) {
return;
}
}
@@ -589,7 +589,7 @@ bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_de
Vector3 intersection_point;
// Check if faces are co-planar.
- if ((current_normal - face_normal).length_squared() < CMP_EPSILON2 &&
+ if (current_normal.is_equal_approx(face_normal) &&
is_point_in_triangle(face_center, current_points)) {
// Only add an intersection if not a B face.
if (!face.from_b) {
diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp
index 37a7d96de5..fc84c029ec 100644
--- a/modules/csg/csg_gizmos.cpp
+++ b/modules/csg/csg_gizmos.cpp
@@ -29,6 +29,8 @@
/*************************************************************************/
#include "csg_gizmos.h"
+#include "editor/plugins/node_3d_editor_plugin.h"
+#include "scene/3d/camera_3d.h"
///////////
@@ -48,7 +50,7 @@ CSGShape3DGizmoPlugin::CSGShape3DGizmoPlugin() {
create_handle_material("handles");
}
-String CSGShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
+String CSGShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const {
CSGShape3D *cs = Object::cast_to<CSGShape3D>(p_gizmo->get_spatial_node());
if (Object::cast_to<CSGSphere3D>(cs)) {
@@ -60,17 +62,17 @@ String CSGShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo,
}
if (Object::cast_to<CSGCylinder3D>(cs)) {
- return p_idx == 0 ? "Radius" : "Height";
+ return p_id == 0 ? "Radius" : "Height";
}
if (Object::cast_to<CSGTorus3D>(cs)) {
- return p_idx == 0 ? "InnerRadius" : "OuterRadius";
+ return p_id == 0 ? "InnerRadius" : "OuterRadius";
}
return "";
}
-Variant CSGShape3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant CSGShape3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const {
CSGShape3D *cs = Object::cast_to<CSGShape3D>(p_gizmo->get_spatial_node());
if (Object::cast_to<CSGSphere3D>(cs)) {
@@ -85,18 +87,18 @@ Variant CSGShape3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int
if (Object::cast_to<CSGCylinder3D>(cs)) {
CSGCylinder3D *s = Object::cast_to<CSGCylinder3D>(cs);
- return p_idx == 0 ? s->get_radius() : s->get_height();
+ return p_id == 0 ? s->get_radius() : s->get_height();
}
if (Object::cast_to<CSGTorus3D>(cs)) {
CSGTorus3D *s = Object::cast_to<CSGTorus3D>(cs);
- return p_idx == 0 ? s->get_inner_radius() : s->get_outer_radius();
+ return p_id == 0 ? s->get_inner_radius() : s->get_outer_radius();
}
return Variant();
}
-void CSGShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void CSGShape3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, Camera3D *p_camera, const Point2 &p_point) const {
CSGShape3D *cs = Object::cast_to<CSGShape3D>(p_gizmo->get_spatial_node());
Transform3D gt = cs->get_global_transform();
@@ -129,10 +131,10 @@ void CSGShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Ca
CSGBox3D *s = Object::cast_to<CSGBox3D>(cs);
Vector3 axis;
- axis[p_idx] = 1.0;
+ axis[p_id] = 1.0;
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
- float d = ra[p_idx];
+ float d = ra[p_id];
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap());
}
@@ -142,7 +144,7 @@ void CSGShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Ca
}
Vector3 h = s->get_size();
- h[p_idx] = d * 2;
+ h[p_id] = d * 2;
s->set_size(h);
}
@@ -150,7 +152,7 @@ void CSGShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Ca
CSGCylinder3D *s = Object::cast_to<CSGCylinder3D>(cs);
Vector3 axis;
- axis[p_idx == 0 ? 0 : 1] = 1.0;
+ axis[p_id == 0 ? 0 : 1] = 1.0;
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
float d = axis.dot(ra);
@@ -162,9 +164,9 @@ void CSGShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Ca
d = 0.001;
}
- if (p_idx == 0) {
+ if (p_id == 0) {
s->set_radius(d);
- } else if (p_idx == 1) {
+ } else if (p_id == 1) {
s->set_height(d * 2.0);
}
}
@@ -185,15 +187,15 @@ void CSGShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Ca
d = 0.001;
}
- if (p_idx == 0) {
+ if (p_id == 0) {
s->set_inner_radius(d);
- } else if (p_idx == 1) {
+ } else if (p_id == 1) {
s->set_outer_radius(d);
}
}
}
-void CSGShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
+void CSGShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel) const {
CSGShape3D *cs = Object::cast_to<CSGShape3D>(p_gizmo->get_spatial_node());
if (Object::cast_to<CSGSphere3D>(cs)) {
@@ -227,7 +229,7 @@ void CSGShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx,
if (Object::cast_to<CSGCylinder3D>(cs)) {
CSGCylinder3D *s = Object::cast_to<CSGCylinder3D>(cs);
if (p_cancel) {
- if (p_idx == 0) {
+ if (p_id == 0) {
s->set_radius(p_restore);
} else {
s->set_height(p_restore);
@@ -236,7 +238,7 @@ void CSGShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx,
}
UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo();
- if (p_idx == 0) {
+ if (p_id == 0) {
ur->create_action(TTR("Change Cylinder Radius"));
ur->add_do_method(s, "set_radius", s->get_radius());
ur->add_undo_method(s, "set_radius", p_restore);
@@ -252,7 +254,7 @@ void CSGShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx,
if (Object::cast_to<CSGTorus3D>(cs)) {
CSGTorus3D *s = Object::cast_to<CSGTorus3D>(cs);
if (p_cancel) {
- if (p_idx == 0) {
+ if (p_id == 0) {
s->set_inner_radius(p_restore);
} else {
s->set_outer_radius(p_restore);
@@ -261,7 +263,7 @@ void CSGShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx,
}
UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo();
- if (p_idx == 0) {
+ if (p_id == 0) {
ur->create_action(TTR("Change Torus Inner Radius"));
ur->add_do_method(s, "set_inner_radius", s->get_inner_radius());
ur->add_undo_method(s, "set_inner_radius", p_restore);
@@ -356,7 +358,7 @@ void CSGShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
break;
}
- p_gizmo->add_mesh(mesh, false, Ref<SkinReference>(), solid_material);
+ p_gizmo->add_mesh(mesh, solid_material);
}
if (Object::cast_to<CSGSphere3D>(cs)) {
diff --git a/modules/csg/csg_gizmos.h b/modules/csg/csg_gizmos.h
index 8f7da35de3..847313c0b4 100644
--- a/modules/csg/csg_gizmos.h
+++ b/modules/csg/csg_gizmos.h
@@ -33,22 +33,22 @@
#include "csg_shape.h"
#include "editor/editor_plugin.h"
-#include "editor/node_3d_editor_gizmos.h"
+#include "editor/plugins/node_3d_editor_gizmos.h"
class CSGShape3DGizmoPlugin : public EditorNode3DGizmoPlugin {
GDCLASS(CSGShape3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
- bool has_gizmo(Node3D *p_spatial) override;
- String get_gizmo_name() const override;
- int get_priority() const override;
- bool is_selectable_when_hidden() const override;
- void redraw(EditorNode3DGizmo *p_gizmo) override;
-
- String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const override;
- Variant get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const override;
- void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override;
- void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) override;
+ virtual bool has_gizmo(Node3D *p_spatial) override;
+ virtual String get_gizmo_name() const override;
+ virtual int get_priority() const override;
+ virtual bool is_selectable_when_hidden() const override;
+ virtual void redraw(EditorNode3DGizmo *p_gizmo) override;
+
+ virtual String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const override;
+ virtual Variant get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const override;
+ virtual void set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, Camera3D *p_camera, const Point2 &p_point) const override;
+ virtual void commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel) const override;
CSGShape3DGizmoPlugin();
};
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 53424f2cfd..b47fa35f1a 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -548,7 +548,7 @@ void CSGShape3D::_notification(int p_what) {
void CSGShape3D::set_operation(Operation p_operation) {
operation = p_operation;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
CSGShape3D::Operation CSGShape3D::get_operation() const {
@@ -778,7 +778,7 @@ CSGBrush *CSGMesh3D::_build_brush() {
}
}
- bool flat = normal[0].distance_to(normal[1]) < CMP_EPSILON && normal[0].distance_to(normal[2]) < CMP_EPSILON;
+ bool flat = normal[0].is_equal_approx(normal[1]) && normal[0].is_equal_approx(normal[2]);
vw[as + j + 0] = vertex[0];
vw[as + j + 1] = vertex[1];
@@ -820,7 +820,7 @@ CSGBrush *CSGMesh3D::_build_brush() {
}
}
- bool flat = normal[0].distance_to(normal[1]) < CMP_EPSILON && normal[0].distance_to(normal[2]) < CMP_EPSILON;
+ bool flat = normal[0].is_equal_approx(normal[1]) && normal[0].is_equal_approx(normal[2]);
vw[as + j + 0] = vertex[0];
vw[as + j + 1] = vertex[1];
@@ -845,7 +845,7 @@ CSGBrush *CSGMesh3D::_build_brush() {
void CSGMesh3D::_mesh_changed() {
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
void CSGMesh3D::set_material(const Ref<Material> &p_material) {
@@ -923,36 +923,40 @@ CSGBrush *CSGSphere3D::_build_brush() {
Ref<Material> *materialsw = materials.ptrw();
bool *invertw = invert.ptrw();
- const double lat_step = 1.0 / rings;
- const double lon_step = 1.0 / radial_segments;
+ // We want to follow an order that's convenient for UVs.
+ // For latitude step we start at the top and move down like in an image.
+ const double latitude_step = -Math_PI / rings;
+ const double longitude_step = Math_TAU / radial_segments;
int face = 0;
- for (int i = 1; i <= rings; i++) {
- double lat0 = Math_PI * (0.5 - (i - 1) * lat_step);
- double c0 = Math::cos(lat0);
- double s0 = Math::sin(lat0);
- double v0 = double(i - 1) / rings;
-
- double lat1 = Math_PI * (0.5 - i * lat_step);
- double c1 = Math::cos(lat1);
- double s1 = Math::sin(lat1);
- double v1 = double(i) / rings;
-
- for (int j = 1; j <= radial_segments; j++) {
- double lng0 = Math_TAU * (0.5 - (j - 1) * lon_step);
- double x0 = Math::cos(lng0);
- double y0 = Math::sin(lng0);
- double u0 = double(j - 1) / radial_segments;
-
- double lng1 = Math_TAU * (0.5 - j * lon_step);
- double x1 = Math::cos(lng1);
- double y1 = Math::sin(lng1);
- double u1 = double(j) / radial_segments;
+ for (int i = 0; i < rings; i++) {
+ double latitude0 = latitude_step * i + Math_TAU / 4;
+ double cos0 = Math::cos(latitude0);
+ double sin0 = Math::sin(latitude0);
+ double v0 = double(i) / rings;
+
+ double latitude1 = latitude_step * (i + 1) + Math_TAU / 4;
+ double cos1 = Math::cos(latitude1);
+ double sin1 = Math::sin(latitude1);
+ double v1 = double(i + 1) / rings;
+
+ for (int j = 0; j < radial_segments; j++) {
+ double longitude0 = longitude_step * j;
+ // We give sin to X and cos to Z on purpose.
+ // This allows UVs to be CCW on +X so it maps to images well.
+ double x0 = Math::sin(longitude0);
+ double z0 = Math::cos(longitude0);
+ double u0 = double(j) / radial_segments;
+
+ double longitude1 = longitude_step * (j + 1);
+ double x1 = Math::sin(longitude1);
+ double z1 = Math::cos(longitude1);
+ double u1 = double(j + 1) / radial_segments;
Vector3 v[4] = {
- Vector3(x0 * c0, s0, y0 * c0) * radius,
- Vector3(x1 * c0, s0, y1 * c0) * radius,
- Vector3(x1 * c1, s1, y1 * c1) * radius,
- Vector3(x0 * c1, s1, y0 * c1) * radius,
+ Vector3(x0 * cos0, sin0, z0 * cos0) * radius,
+ Vector3(x1 * cos0, sin0, z1 * cos0) * radius,
+ Vector3(x1 * cos1, sin1, z1 * cos1) * radius,
+ Vector3(x0 * cos1, sin1, z0 * cos1) * radius,
};
Vector2 u[4] = {
@@ -962,8 +966,8 @@ CSGBrush *CSGSphere3D::_build_brush() {
Vector2(u0, v1),
};
- if (i < rings) {
- //face 1
+ // Draw the first face, but skip this at the north pole (i == 0).
+ if (i > 0) {
facesw[face * 3 + 0] = v[0];
facesw[face * 3 + 1] = v[1];
facesw[face * 3 + 2] = v[2];
@@ -979,8 +983,8 @@ CSGBrush *CSGSphere3D::_build_brush() {
face++;
}
- if (i > 1) {
- //face 2
+ // Draw the second face, but skip this at the south pole (i == rings - 1).
+ if (i < rings - 1) {
facesw[face * 3 + 0] = v[2];
facesw[face * 3 + 1] = v[3];
facesw[face * 3 + 2] = v[0];
@@ -1034,7 +1038,7 @@ void CSGSphere3D::set_radius(const float p_radius) {
ERR_FAIL_COND(p_radius <= 0);
radius = p_radius;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
float CSGSphere3D::get_radius() const {
@@ -1044,7 +1048,7 @@ float CSGSphere3D::get_radius() const {
void CSGSphere3D::set_radial_segments(const int p_radial_segments) {
radial_segments = p_radial_segments > 4 ? p_radial_segments : 4;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
int CSGSphere3D::get_radial_segments() const {
@@ -1054,7 +1058,7 @@ int CSGSphere3D::get_radial_segments() const {
void CSGSphere3D::set_rings(const int p_rings) {
rings = p_rings > 1 ? p_rings : 1;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
int CSGSphere3D::get_rings() const {
@@ -1203,7 +1207,7 @@ void CSGBox3D::_bind_methods() {
void CSGBox3D::set_size(const Vector3 &p_size) {
size = p_size;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
Vector3 CSGBox3D::get_size() const {
@@ -1213,7 +1217,7 @@ Vector3 CSGBox3D::get_size() const {
void CSGBox3D::set_material(const Ref<Material> &p_material) {
material = p_material;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
Ref<Material> CSGBox3D::get_material() const {
@@ -1384,7 +1388,7 @@ void CSGCylinder3D::_bind_methods() {
void CSGCylinder3D::set_radius(const float p_radius) {
radius = p_radius;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
float CSGCylinder3D::get_radius() const {
@@ -1394,7 +1398,7 @@ float CSGCylinder3D::get_radius() const {
void CSGCylinder3D::set_height(const float p_height) {
height = p_height;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
float CSGCylinder3D::get_height() const {
@@ -1405,7 +1409,7 @@ void CSGCylinder3D::set_sides(const int p_sides) {
ERR_FAIL_COND(p_sides < 3);
sides = p_sides;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
int CSGCylinder3D::get_sides() const {
@@ -1415,7 +1419,7 @@ int CSGCylinder3D::get_sides() const {
void CSGCylinder3D::set_cone(const bool p_cone) {
cone = p_cone;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
bool CSGCylinder3D::is_cone() const {
@@ -1603,7 +1607,7 @@ void CSGTorus3D::_bind_methods() {
void CSGTorus3D::set_inner_radius(const float p_inner_radius) {
inner_radius = p_inner_radius;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
float CSGTorus3D::get_inner_radius() const {
@@ -1613,7 +1617,7 @@ float CSGTorus3D::get_inner_radius() const {
void CSGTorus3D::set_outer_radius(const float p_outer_radius) {
outer_radius = p_outer_radius;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
float CSGTorus3D::get_outer_radius() const {
@@ -1624,7 +1628,7 @@ void CSGTorus3D::set_sides(const int p_sides) {
ERR_FAIL_COND(p_sides < 3);
sides = p_sides;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
int CSGTorus3D::get_sides() const {
@@ -1635,7 +1639,7 @@ void CSGTorus3D::set_ring_sides(const int p_ring_sides) {
ERR_FAIL_COND(p_ring_sides < 3);
ring_sides = p_ring_sides;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
int CSGTorus3D::get_ring_sides() const {
@@ -2172,7 +2176,7 @@ void CSGPolygon3D::_validate_property(PropertyInfo &property) const {
void CSGPolygon3D::_path_changed() {
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
void CSGPolygon3D::_path_exited() {
@@ -2248,7 +2252,7 @@ void CSGPolygon3D::_bind_methods() {
void CSGPolygon3D::set_polygon(const Vector<Vector2> &p_polygon) {
polygon = p_polygon;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
Vector<Vector2> CSGPolygon3D::get_polygon() const {
@@ -2258,7 +2262,7 @@ Vector<Vector2> CSGPolygon3D::get_polygon() const {
void CSGPolygon3D::set_mode(Mode p_mode) {
mode = p_mode;
_make_dirty();
- update_gizmo();
+ update_gizmos();
notify_property_list_changed();
}
@@ -2270,7 +2274,7 @@ void CSGPolygon3D::set_depth(const float p_depth) {
ERR_FAIL_COND(p_depth < 0.001);
depth = p_depth;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
float CSGPolygon3D::get_depth() const {
@@ -2290,7 +2294,7 @@ void CSGPolygon3D::set_spin_degrees(const float p_spin_degrees) {
ERR_FAIL_COND(p_spin_degrees < 0.01 || p_spin_degrees > 360);
spin_degrees = p_spin_degrees;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
float CSGPolygon3D::get_spin_degrees() const {
@@ -2301,7 +2305,7 @@ void CSGPolygon3D::set_spin_sides(const int p_spin_sides) {
ERR_FAIL_COND(p_spin_sides < 3);
spin_sides = p_spin_sides;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
int CSGPolygon3D::get_spin_sides() const {
@@ -2311,7 +2315,7 @@ int CSGPolygon3D::get_spin_sides() const {
void CSGPolygon3D::set_path_node(const NodePath &p_path) {
path_node = p_path;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
NodePath CSGPolygon3D::get_path_node() const {
@@ -2322,7 +2326,7 @@ void CSGPolygon3D::set_path_interval(float p_interval) {
ERR_FAIL_COND_MSG(p_interval < 0.001, "Path interval cannot be smaller than 0.001.");
path_interval = p_interval;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
float CSGPolygon3D::get_path_interval() const {
@@ -2332,7 +2336,7 @@ float CSGPolygon3D::get_path_interval() const {
void CSGPolygon3D::set_path_rotation(PathRotation p_rotation) {
path_rotation = p_rotation;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
CSGPolygon3D::PathRotation CSGPolygon3D::get_path_rotation() const {
@@ -2342,7 +2346,7 @@ CSGPolygon3D::PathRotation CSGPolygon3D::get_path_rotation() const {
void CSGPolygon3D::set_path_local(bool p_enable) {
path_local = p_enable;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
bool CSGPolygon3D::is_path_local() const {
@@ -2352,7 +2356,7 @@ bool CSGPolygon3D::is_path_local() const {
void CSGPolygon3D::set_path_joined(bool p_enable) {
path_joined = p_enable;
_make_dirty();
- update_gizmo();
+ update_gizmos();
}
bool CSGPolygon3D::is_path_joined() const {