summaryrefslogtreecommitdiffstats
path: root/modules/csg/csg_shape.h
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2020-12-28 16:06:50 +0100
committerGitHub <noreply@github.com>2020-12-28 16:06:50 +0100
commit4ca98c7a359b313b5a997323b3e4c86cee6b566e (patch)
tree588dc5c8d4a287a53f5f6a1a8b62f367acfb3725 /modules/csg/csg_shape.h
parent058f3fe069402978780f87ed383e3a72d4b3009e (diff)
parent4da4feed18f56a2bc5c88ffe5a4f73134e353c25 (diff)
downloadredot-engine-4ca98c7a359b313b5a997323b3e4c86cee6b566e.tar.gz
Merge pull request #44183 from madmiraal/box_shape-size
Use a size Vector for adjusting the size of Rectangles and Boxes
Diffstat (limited to 'modules/csg/csg_shape.h')
-rw-r--r--modules/csg/csg_shape.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h
index d93693f145..be76cee543 100644
--- a/modules/csg/csg_shape.h
+++ b/modules/csg/csg_shape.h
@@ -240,27 +240,19 @@ class CSGBox3D : public CSGPrimitive3D {
virtual CSGBrush *_build_brush() override;
Ref<Material> material;
- float width;
- float height;
- float depth;
+ Vector3 size = Vector3(2, 2, 2);
protected:
static void _bind_methods();
public:
- void set_width(const float p_width);
- float get_width() const;
-
- void set_height(const float p_height);
- float get_height() const;
-
- void set_depth(const float p_depth);
- float get_depth() const;
+ void set_size(const Vector3 &p_size);
+ Vector3 get_size() const;
void set_material(const Ref<Material> &p_material);
Ref<Material> get_material() const;
- CSGBox3D();
+ CSGBox3D() {}
};
class CSGCylinder3D : public CSGPrimitive3D {