diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-21 13:07:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-21 13:07:29 +0200 |
commit | 7d0275785b7582e34f488f7d28554f064168a428 (patch) | |
tree | 5c03a2a4fd0a61b4bff4aab52773a4e3bafc2686 /modules/csg/csg_shape.h | |
parent | 71bbe6eb01d1664340ea624aca36aa47c693981d (diff) | |
parent | 28b902211ff3c3a1391a2ec85e58803b0df40929 (diff) |
Merge pull request #27940 from LeonardMeagher2/fix_csgshape_geometryinstance
CSGMesh gets material + CSGShape inherits from GeometryInstance
Diffstat (limited to 'modules/csg/csg_shape.h')
-rw-r--r-- | modules/csg/csg_shape.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h index 1622fb3a15..a5b2238e6b 100644 --- a/modules/csg/csg_shape.h +++ b/modules/csg/csg_shape.h @@ -38,8 +38,8 @@ #include "scene/resources/concave_polygon_shape.h" #include "thirdparty/misc/mikktspace.h" -class CSGShape : public VisualInstance { - GDCLASS(CSGShape, VisualInstance); +class CSGShape : public GeometryInstance { + GDCLASS(CSGShape, GeometryInstance); public: enum Operation { @@ -187,6 +187,7 @@ class CSGMesh : public CSGPrimitive { virtual CSGBrush *_build_brush(); Ref<Mesh> mesh; + Ref<Material> material; void _mesh_changed(); @@ -196,6 +197,9 @@ protected: public: void set_mesh(const Ref<Mesh> &p_mesh); Ref<Mesh> get_mesh(); + + void set_material(const Ref<Material> &p_material); + Ref<Material> get_material() const; }; class CSGSphere : public CSGPrimitive { |