/**************************************************************************/ /* skeleton_modification_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 "skeleton_modification_2d.h" #include "scene/2d/skeleton_2d.h" #include "scene/2d/physics/collision_object_2d.h" #include "scene/2d/physics/collision_shape_2d.h" #include "scene/2d/physics/physical_bone_2d.h" #ifdef TOOLS_ENABLED #include "editor/editor_settings.h" #endif // TOOLS_ENABLED /////////////////////////////////////// // Modification2D /////////////////////////////////////// void SkeletonModification2D::_execute(float p_delta) { … } void SkeletonModification2D::_setup_modification(SkeletonModificationStack2D *p_stack) { … } void SkeletonModification2D::_draw_editor_gizmo() { … } void SkeletonModification2D::set_enabled(bool p_enabled) { … } bool SkeletonModification2D::get_enabled() { … } float SkeletonModification2D::clamp_angle(float p_angle, float p_min_bound, float p_max_bound, bool p_invert) { … } void SkeletonModification2D::editor_draw_angle_constraints(Bone2D *p_operation_bone, float p_min_bound, float p_max_bound, bool p_constraint_enabled, bool p_constraint_in_localspace, bool p_constraint_inverted) { … } Ref<SkeletonModificationStack2D> SkeletonModification2D::get_modification_stack() { … } void SkeletonModification2D::set_is_setup(bool p_setup) { … } bool SkeletonModification2D::get_is_setup() const { … } void SkeletonModification2D::set_execution_mode(int p_mode) { … } int SkeletonModification2D::get_execution_mode() const { … } void SkeletonModification2D::set_editor_draw_gizmo(bool p_draw_gizmo) { … } bool SkeletonModification2D::get_editor_draw_gizmo() const { … } void SkeletonModification2D::_bind_methods() { … } void SkeletonModification2D::reset_state() { … } SkeletonModification2D::SkeletonModification2D() { … }