/**************************************************************************/ /* path_2d.cpp */ /**************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* https://godotengine.org */ /**************************************************************************/ /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, sublicense, and/or sell copies of the Software, and to */ /* permit persons to whom the Software is furnished to do so, subject to */ /* the following conditions: */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ #include "path_2d.h" #include "core/math/geometry_2d.h" #include "scene/main/timer.h" #ifdef TOOLS_ENABLED #include "editor/themes/editor_scale.h" #endif #ifdef TOOLS_ENABLED Rect2 Path2D::_edit_get_rect() const { … } bool Path2D::_edit_use_rect() const { … } bool Path2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const { … } #endif void Path2D::_notification(int p_what) { … } void Path2D::_curve_changed() { … } void Path2D::set_curve(const Ref<Curve2D> &p_curve) { … } Ref<Curve2D> Path2D::get_curve() const { … } void Path2D::_bind_methods() { … } ///////////////////////////////////////////////////////////////////////////////// void PathFollow2D::path_changed() { … } void PathFollow2D::_update_transform() { … } void PathFollow2D::_notification(int p_what) { … } void PathFollow2D::set_cubic_interpolation_enabled(bool p_enabled) { … } bool PathFollow2D::is_cubic_interpolation_enabled() const { … } void PathFollow2D::_validate_property(PropertyInfo &p_property) const { … } PackedStringArray PathFollow2D::get_configuration_warnings() const { … } void PathFollow2D::_bind_methods() { … } void PathFollow2D::set_progress(real_t p_progress) { … } void PathFollow2D::set_h_offset(real_t p_h_offset) { … } real_t PathFollow2D::get_h_offset() const { … } void PathFollow2D::set_v_offset(real_t p_v_offset) { … } real_t PathFollow2D::get_v_offset() const { … } real_t PathFollow2D::get_progress() const { … } void PathFollow2D::set_progress_ratio(real_t p_ratio) { … } real_t PathFollow2D::get_progress_ratio() const { … } void PathFollow2D::set_rotation_enabled(bool p_enabled) { … } bool PathFollow2D::is_rotation_enabled() const { … } void PathFollow2D::set_loop(bool p_loop) { … } bool PathFollow2D::has_loop() const { … }