diff options
Diffstat (limited to 'scene/resources/mesh.h')
-rw-r--r-- | scene/resources/mesh.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index 2f25ecd60b..8883fb9c2b 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -176,23 +176,24 @@ class ArrayMesh : public Mesh { Array _get_surfaces() const; void _set_surfaces(const Array &p_data); + Ref<ArrayMesh> shadow_mesh; private: struct Surface { - uint32_t format; - int array_length; - int index_array_length; - PrimitiveType primitive; + uint32_t format = 0; + int array_length = 0; + int index_array_length = 0; + PrimitiveType primitive = PrimitiveType::PRIMITIVE_MAX; String name; AABB aabb; Ref<Material> material; - bool is_2d; + bool is_2d = false; }; Vector<Surface> surfaces; mutable RID mesh; AABB aabb; - BlendShapeMode blend_shape_mode; + BlendShapeMode blend_shape_mode = BLEND_SHAPE_MODE_RELATIVE; Vector<StringName> blend_shapes; AABB custom_aabb; @@ -259,6 +260,9 @@ public: virtual void reload_from_file() override; + void set_shadow_mesh(const Ref<ArrayMesh> &p_mesh); + Ref<ArrayMesh> get_shadow_mesh() const; + ArrayMesh(); ~ArrayMesh(); |