/**************************************************************************/ /* vector3.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 "vector3.h" #include "core/math/basis.h" #include "core/math/vector2.h" #include "core/math/vector3i.h" #include "core/string/ustring.h" void Vector3::rotate(const Vector3 &p_axis, real_t p_angle) { … } Vector3 Vector3::rotated(const Vector3 &p_axis, real_t p_angle) const { … } Vector3 Vector3::clamp(const Vector3 &p_min, const Vector3 &p_max) const { … } Vector3 Vector3::clampf(real_t p_min, real_t p_max) const { … } void Vector3::snap(const Vector3 &p_step) { … } Vector3 Vector3::snapped(const Vector3 &p_step) const { … } void Vector3::snapf(real_t p_step) { … } Vector3 Vector3::snappedf(real_t p_step) const { … } Vector3 Vector3::limit_length(real_t p_len) const { … } Vector3 Vector3::move_toward(const Vector3 &p_to, real_t p_delta) const { … } Vector2 Vector3::octahedron_encode() const { … } Vector3 Vector3::octahedron_decode(const Vector2 &p_oct) { … } Vector2 Vector3::octahedron_tangent_encode(float p_sign) const { … } Vector3 Vector3::octahedron_tangent_decode(const Vector2 &p_oct, float *r_sign) { … } Basis Vector3::outer(const Vector3 &p_with) const { … } bool Vector3::is_equal_approx(const Vector3 &p_v) const { … } bool Vector3::is_zero_approx() const { … } bool Vector3::is_finite() const { … } operator String() operator Vector3i()