summaryrefslogtreecommitdiff
path: root/modules/csg/csg_shape.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/csg/csg_shape.h')
-rw-r--r--modules/csg/csg_shape.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h
index 6da9893368..0eaf5c3727 100644
--- a/modules/csg/csg_shape.h
+++ b/modules/csg/csg_shape.h
@@ -52,13 +52,14 @@ public:
private:
Operation operation = OPERATION_UNION;
- CSGShape3D *parent = nullptr;
+ CSGShape3D *parent_shape = nullptr;
CSGBrush *brush = nullptr;
AABB node_aabb;
bool dirty = false;
+ bool last_visible = false;
float snap = 0.001;
bool use_collision = false;
@@ -104,11 +105,12 @@ private:
const tbool bIsOrientationPreserving, const int iFace, const int iVert);
void _update_shape();
+ void _update_collision_faces();
protected:
void _notification(int p_what);
virtual CSGBrush *_build_brush() = 0;
- void _make_dirty();
+ void _make_dirty(bool p_parent_removing = false);
static void _bind_methods();
@@ -126,7 +128,6 @@ public:
virtual Vector<Vector3> get_brush_faces();
virtual AABB get_aabb() const override;
- virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const override;
void set_use_collision(bool p_enable);
bool is_using_collision() const;
@@ -170,13 +171,13 @@ class CSGPrimitive3D : public CSGShape3D {
GDCLASS(CSGPrimitive3D, CSGShape3D);
protected:
- bool invert_faces;
+ bool flip_faces;
CSGBrush *_create_brush_from_arrays(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uv, const Vector<bool> &p_smooth, const Vector<Ref<Material>> &p_materials);
static void _bind_methods();
public:
- void set_invert_faces(bool p_invert);
- bool is_inverting_faces();
+ void set_flip_faces(bool p_invert);
+ bool get_flip_faces();
CSGPrimitive3D();
};
@@ -367,7 +368,7 @@ private:
PathRotation path_rotation;
bool path_local;
- Path3D *path;
+ Path3D *path = nullptr;
bool smooth_faces;
bool path_continuous_u;