Moved 2d shapes under a new shapes_2d folder.

This commit is contained in:
Relintai 2023-12-10 13:55:20 +01:00
parent 11b8f50a82
commit e50ab7fa84
34 changed files with 60 additions and 54 deletions

View File

@ -44,14 +44,14 @@
#include "scene/2d/collision_shape_2d.h"
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
#include "scene/resources/capsule_shape_2d.h"
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/line_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/segment_shape_2d.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/capsule_shape_2d.h"
#include "scene/resources/shapes_2d/circle_shape_2d.h"
#include "scene/resources/shapes_2d/concave_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/convex_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/line_shape_2d.h"
#include "scene/resources/shapes_2d/rectangle_shape_2d.h"
#include "scene/resources/shapes_2d/segment_shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
#include "scene/resources/texture.h"
void CollisionShape2DEditor::_node_removed(Node *p_node) {

View File

@ -33,12 +33,12 @@
#include "core/math/convex_hull.h"
#include "scene/2d/mesh_instance_2d.h"
#include "scene/2d/physics_body_2d.h"
#include "scene/resources/capsule_shape_2d.h"
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/capsule_shape_2d.h"
#include "scene/resources/shapes_2d/circle_shape_2d.h"
#include "scene/resources/shapes_2d/concave_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/convex_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/rectangle_shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
#include "scene/resources/navigation_mesh_source_geometry_data_2d.h"
#include "scene/resources/navigation_polygon.h"

View File

@ -25,7 +25,7 @@ SOFTWARE.
#include "prop_2d_instance.h"
#include "scene/2d/node_2d.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
#include "core/math/vector3.h"

View File

@ -24,7 +24,7 @@ SOFTWARE.
#include "prop_2d_instance_job.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
#include "modules/modules_enabled.gen.h"

View File

@ -25,7 +25,7 @@ SOFTWARE.
#include "core/math/math_funcs.h"
#include "../../library/terrain_2d_material_cache.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/convex_polygon_shape_2d.h"
void Terrain2DMesherIsometric::_add_chunk(Ref<Terrain2DChunk> p_chunk) {
Ref<Terrain2DChunkDefault> chunk = p_chunk;

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "../world/default/terrain_2d_chunk_default.h"
#include "../world/terrain_2d_chunk.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/shapes_2d/rectangle_shape_2d.h"
#include "servers/physics_2d_server.h"
#include "modules/modules_enabled.gen.h"

View File

@ -44,7 +44,7 @@ SOFTWARE.
#include "../../mesh_data_resource/mesh_data_resource.h"
#endif
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
#include "../library/terrain_2d_library.h"

View File

@ -49,7 +49,7 @@ SOFTWARE.
#include "../../props_2d/props/prop_2d_data.h"
#endif
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
#include "../library/terrain_2d_library.h"
#include "../library/terrain_2d_surface.h"

View File

@ -36,9 +36,9 @@
#include "core/variant/array.h"
#include "scene/2d/light_occluder_2d.h"
#include "scene/2d/navigation_polygon_instance.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/convex_polygon_shape_2d.h"
#include "scene/resources/navigation_polygon.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
#include "scene/resources/texture.h"
class TileSet : public Resource {

View File

@ -32,8 +32,8 @@
#include "editor/editor_node.h"
#include "scene/2d/sprite.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/concave_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/convex_polygon_shape_2d.h"
#include "tile_set.h"
#define WORKSPACE_MARGIN Vector2(10, 10)

View File

@ -31,7 +31,7 @@
/*************************************************************************/
#include "scene/2d/node_2d.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
class CollisionObject2D : public Node2D {
GDCLASS(CollisionObject2D, Node2D);

View File

@ -33,9 +33,9 @@
#include "collision_object_2d.h"
#include "core/config/engine.h"
#include "scene/2d/area_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/concave_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/convex_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
#include "thirdparty/misc/triangulator.h"

View File

@ -33,14 +33,14 @@
#include "collision_object_2d.h"
#include "core/config/engine.h"
#include "scene/2d/area_2d.h"
#include "scene/resources/capsule_shape_2d.h"
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/line_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/segment_shape_2d.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/capsule_shape_2d.h"
#include "scene/resources/shapes_2d/circle_shape_2d.h"
#include "scene/resources/shapes_2d/concave_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/convex_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/line_shape_2d.h"
#include "scene/resources/shapes_2d/rectangle_shape_2d.h"
#include "scene/resources/shapes_2d/segment_shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
void CollisionShape2D::_shape_changed() {
update();

View File

@ -34,7 +34,7 @@
#include "core/config/engine.h"
#include "scene/2d/collision_object_2d.h"
#include "scene/2d/physics_body_2d.h"
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/shapes_2d/circle_shape_2d.h"
#include "servers/physics_2d_server.h"
void ShapeCast2D::set_target_position(const Vector2 &p_point) {

View File

@ -32,7 +32,7 @@
#define SHAPE_CAST_2D_H
#include "scene/2d/node_2d.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
#include "scene/resources/world_2d.h"
class CollisionObject2D;

View File

@ -34,7 +34,7 @@
#include "core/input/input.h"
#include "core/os/os.h"
#include "scene/resources/bit_map.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/shapes_2d/rectangle_shape_2d.h"
#include "scene/resources/texture.h"
#include "scene/scene_string_names.h"

View File

@ -142,19 +142,19 @@
#include "scene/resources/bit_map.h"
#include "scene/resources/box_shape.h"
#include "scene/resources/capsule_shape.h"
#include "scene/resources/capsule_shape_2d.h"
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/shapes_2d/capsule_shape_2d.h"
#include "scene/resources/shapes_2d/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/shapes_2d/convex_polygon_shape_2d.h"
#include "scene/resources/cylinder_shape.h"
#include "scene/resources/default_theme/default_theme.h"
#include "scene/resources/dynamic_font.h"
#include "scene/resources/gradient.h"
#include "scene/resources/height_map_shape.h"
#include "scene/resources/immediate_mesh.h"
#include "scene/resources/line_shape_2d.h"
#include "scene/resources/shapes_2d/line_shape_2d.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
#include "scene/resources/mesh_data_tool.h"
@ -170,9 +170,9 @@
#include "scene/resources/polygon_path_finder.h"
#include "scene/resources/primitive_meshes.h"
#include "scene/resources/ray_shape.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/shapes_2d/rectangle_shape_2d.h"
#include "scene/resources/resource_format_text.h"
#include "scene/resources/segment_shape_2d.h"
#include "scene/resources/shapes_2d/segment_shape_2d.h"
#include "scene/resources/sky.h"
#include "scene/resources/sphere_shape.h"

View File

@ -16,8 +16,14 @@ env.scene_sources += thirdparty_obj
# Pandemonium source files
scene_obj = []
env.add_source_files(scene_obj, "*.cpp")
shapes_2d_obj = []
env.add_source_files(shapes_2d_obj, "shapes_2d/*.cpp")
for o in shapes_2d_obj:
scene_obj.append(o)
env.scene_sources += scene_obj
# Needed to force rebuilding the scene files when the thirdparty code is updated.

View File

@ -30,7 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
class CapsuleShape2D : public Shape2D {
GDCLASS(CapsuleShape2D, Shape2D);

View File

@ -30,7 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
class CircleShape2D : public Shape2D {
GDCLASS(CircleShape2D, Shape2D);

View File

@ -30,7 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
class ConcavePolygonShape2D : public Shape2D {
GDCLASS(ConcavePolygonShape2D, Shape2D);

View File

@ -30,7 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
class ConvexPolygonShape2D : public Shape2D {
GDCLASS(ConvexPolygonShape2D, Shape2D);

View File

@ -30,7 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
class LineShape2D : public Shape2D {
GDCLASS(LineShape2D, Shape2D);

View File

@ -30,7 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
class RectangleShape2D : public Shape2D {
GDCLASS(RectangleShape2D, Shape2D);

View File

@ -30,7 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "scene/resources/shape_2d.h"
#include "scene/resources/shapes_2d/shape_2d.h"
class SegmentShape2D : public Shape2D {
GDCLASS(SegmentShape2D, Shape2D);