summaryrefslogtreecommitdiff
path: root/scene/resources/primitive_meshes.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-24 08:21:01 +0200
committerGitHub <noreply@github.com>2022-05-24 08:21:01 +0200
commit56dbfcdcbadf2c958d9656e4e3b7443b9bb11be1 (patch)
tree84b5445f8771b48f04178286c2e9ab23db3b8847 /scene/resources/primitive_meshes.h
parent1314e6cbcc7ccf19aeeafc01a12de1de6ce3642d (diff)
parentd23071cae3fac600f38e70583f286c306c0ec3a7 (diff)
Merge pull request #61203 from Calinou/cylindermesh-add-cap-properties
Add properties to disable top/bottom cap generation in CylinderMesh
Diffstat (limited to 'scene/resources/primitive_meshes.h')
-rw-r--r--scene/resources/primitive_meshes.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h
index 3849c92a7b..38cc7db5fe 100644
--- a/scene/resources/primitive_meshes.h
+++ b/scene/resources/primitive_meshes.h
@@ -183,13 +183,15 @@ private:
float height = 2.0;
int radial_segments = 64;
int rings = 4;
+ bool cap_top = true;
+ bool cap_bottom = true;
protected:
static void _bind_methods();
virtual void _create_mesh_array(Array &p_arr) const override;
public:
- static void create_mesh_array(Array &p_arr, float top_radius, float bottom_radius, float height, int radial_segments = 64, int rings = 4);
+ static void create_mesh_array(Array &p_arr, float top_radius, float bottom_radius, float height, int radial_segments = 64, int rings = 4, bool cap_top = true, bool cap_bottom = true);
void set_top_radius(const float p_radius);
float get_top_radius() const;
@@ -206,6 +208,12 @@ public:
void set_rings(const int p_rings);
int get_rings() const;
+ void set_cap_top(bool p_cap_top);
+ bool is_cap_top() const;
+
+ void set_cap_bottom(bool p_cap_bottom);
+ bool is_cap_bottom() const;
+
CylinderMesh();
};