diff options
Diffstat (limited to 'scene/resources/shape_3d.h')
-rw-r--r-- | scene/resources/shape_3d.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/scene/resources/shape_3d.h b/scene/resources/shape_3d.h index e7a516412d..b8e529cd3c 100644 --- a/scene/resources/shape_3d.h +++ b/scene/resources/shape_3d.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -31,17 +31,16 @@ #ifndef SHAPE_3D_H #define SHAPE_3D_H -#include "core/resource.h" +#include "core/io/resource.h" class ArrayMesh; class Shape3D : public Resource { - GDCLASS(Shape3D, Resource); OBJ_SAVE_TYPE(Shape3D); RES_BASE_EXTENSION("shape"); RID shape; - real_t margin; + real_t margin = 0.04; Ref<ArrayMesh> debug_mesh_cache; @@ -54,14 +53,14 @@ protected: virtual void _update_shape(); public: - virtual RID get_rid() const { return shape; } + virtual RID get_rid() const override { return shape; } Ref<ArrayMesh> get_debug_mesh(); - virtual Vector<Vector3> get_debug_mesh_lines() = 0; // { return Vector<Vector3>(); } + virtual Vector<Vector3> get_debug_mesh_lines() const = 0; // { return Vector<Vector3>(); } /// Returns the radius of a sphere that fully enclose this shape virtual real_t get_enclosing_radius() const = 0; - void add_vertices_to_array(Vector<Vector3> &array, const Transform &p_xform); + void add_vertices_to_array(Vector<Vector3> &array, const Transform3D &p_xform); real_t get_margin() const; void set_margin(real_t p_margin); |