godot/scene/resources/curve.cpp

/**************************************************************************/
/*  curve.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 "curve.h"

#include "core/math/math_funcs.h"

const char *Curve::SIGNAL_RANGE_CHANGED =;

Curve::Curve() {}

void Curve::set_point_count(int p_count) {}

int Curve::_add_point(Vector2 p_position, real_t p_left_tangent, real_t p_right_tangent, TangentMode p_left_mode, TangentMode p_right_mode) {}

int Curve::add_point(Vector2 p_position, real_t p_left_tangent, real_t p_right_tangent, TangentMode p_left_mode, TangentMode p_right_mode) {}

// TODO: Needed to make the curve editor function properly until https://github.com/godotengine/godot/issues/76985 is fixed.
int Curve::add_point_no_update(Vector2 p_position, real_t p_left_tangent, real_t p_right_tangent, TangentMode p_left_mode, TangentMode p_right_mode) {}

int Curve::get_index(real_t p_offset) const {}

void Curve::clean_dupes() {}

void Curve::set_point_left_tangent(int p_index, real_t p_tangent) {}

void Curve::set_point_right_tangent(int p_index, real_t p_tangent) {}

void Curve::set_point_left_mode(int p_index, TangentMode p_mode) {}

void Curve::set_point_right_mode(int p_index, TangentMode p_mode) {}

real_t Curve::get_point_left_tangent(int p_index) const {}

real_t Curve::get_point_right_tangent(int p_index) const {}

Curve::TangentMode Curve::get_point_left_mode(int p_index) const {}

Curve::TangentMode Curve::get_point_right_mode(int p_index) const {}

void Curve::_remove_point(int p_index) {}

void Curve::remove_point(int p_index) {}

void Curve::clear_points() {}

void Curve::set_point_value(int p_index, real_t p_position) {}

int Curve::set_point_offset(int p_index, real_t p_offset) {}

Vector2 Curve::get_point_position(int p_index) const {}

Curve::Point Curve::get_point(int p_index) const {}

void Curve::update_auto_tangents(int p_index) {}

#define MIN_Y_RANGE

void Curve::set_min_value(real_t p_min) {}

void Curve::set_max_value(real_t p_max) {}

real_t Curve::sample(real_t p_offset) const {}

real_t Curve::sample_local_nocheck(int p_index, real_t p_local_offset) const {}

void Curve::mark_dirty() {}

Array Curve::get_data() const {}

void Curve::set_data(const Array p_input) {}

void Curve::bake() {}

void Curve::set_bake_resolution(int p_resolution) {}

real_t Curve::sample_baked(real_t p_offset) const {}

void Curve::ensure_default_setup(real_t p_min, real_t p_max) {}

bool Curve::_set(const StringName &p_name, const Variant &p_value) {}

bool Curve::_get(const StringName &p_name, Variant &r_ret) const {}

void Curve::_get_property_list(List<PropertyInfo> *p_list) const {}

void Curve::_bind_methods() {}

int Curve2D::get_point_count() const {}

void Curve2D::set_point_count(int p_count) {}

void Curve2D::_add_point(const Vector2 &p_position, const Vector2 &p_in, const Vector2 &p_out, int p_atpos) {}

void Curve2D::add_point(const Vector2 &p_position, const Vector2 &p_in, const Vector2 &p_out, int p_atpos) {}

void Curve2D::set_point_position(int p_index, const Vector2 &p_position) {}

Vector2 Curve2D::get_point_position(int p_index) const {}

void Curve2D::set_point_in(int p_index, const Vector2 &p_in) {}

Vector2 Curve2D::get_point_in(int p_index) const {}

void Curve2D::set_point_out(int p_index, const Vector2 &p_out) {}

Vector2 Curve2D::get_point_out(int p_index) const {}

void Curve2D::_remove_point(int p_index) {}

void Curve2D::remove_point(int p_index) {}

void Curve2D::clear_points() {}

Vector2 Curve2D::sample(int p_index, const real_t p_offset) const {}

Vector2 Curve2D::samplef(real_t p_findex) const {}

void Curve2D::mark_dirty() {}

void Curve2D::_bake_segment2d(RBMap<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const {}

void Curve2D::_bake_segment2d_even_length(RBMap<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_length) const {}

Vector2 Curve2D::_calculate_tangent(const Vector2 &p_begin, const Vector2 &p_control_1, const Vector2 &p_control_2, const Vector2 &p_end, const real_t p_t) {}

void Curve2D::_bake() const {}

real_t Curve2D::get_baked_length() const {}

Curve2D::Interval Curve2D::_find_interval(real_t p_offset) const {}

Vector2 Curve2D::_sample_baked(Interval p_interval, bool p_cubic) const {}

Transform2D Curve2D::_sample_posture(Interval p_interval) const {}

Vector2 Curve2D::sample_baked(real_t p_offset, bool p_cubic) const {}

Transform2D Curve2D::sample_baked_with_rotation(real_t p_offset, bool p_cubic) const {}

PackedVector2Array Curve2D::get_baked_points() const {}

void Curve2D::set_bake_interval(real_t p_tolerance) {}

real_t Curve2D::get_bake_interval() const {}

PackedVector2Array Curve2D::get_points() const {}

Vector2 Curve2D::get_closest_point(const Vector2 &p_to_point) const {}

real_t Curve2D::get_closest_offset(const Vector2 &p_to_point) const {}

Dictionary Curve2D::_get_data() const {}

void Curve2D::_set_data(const Dictionary &p_data) {}

PackedVector2Array Curve2D::tessellate(int p_max_stages, real_t p_tolerance) const {}

Vector<RBMap<real_t, Vector2>> Curve2D::_tessellate_even_length(int p_max_stages, real_t p_length) const {}

PackedVector2Array Curve2D::tessellate_even_length(int p_max_stages, real_t p_length) const {}

bool Curve2D::_set(const StringName &p_name, const Variant &p_value) {}

bool Curve2D::_get(const StringName &p_name, Variant &r_ret) const {}

void Curve2D::_get_property_list(List<PropertyInfo> *p_list) const {}

void Curve2D::_bind_methods() {}

Curve2D::Curve2D() {}

/***********************************************************************************/
/***********************************************************************************/
/***********************************************************************************/
/***********************************************************************************/
/***********************************************************************************/
/***********************************************************************************/

int Curve3D::get_point_count() const {}

void Curve3D::set_point_count(int p_count) {}

void Curve3D::_add_point(const Vector3 &p_position, const Vector3 &p_in, const Vector3 &p_out, int p_atpos) {}

void Curve3D::add_point(const Vector3 &p_position, const Vector3 &p_in, const Vector3 &p_out, int p_atpos) {}

void Curve3D::set_point_position(int p_index, const Vector3 &p_position) {}

Vector3 Curve3D::get_point_position(int p_index) const {}

void Curve3D::set_point_tilt(int p_index, real_t p_tilt) {}

real_t Curve3D::get_point_tilt(int p_index) const {}

void Curve3D::set_point_in(int p_index, const Vector3 &p_in) {}

Vector3 Curve3D::get_point_in(int p_index) const {}

void Curve3D::set_point_out(int p_index, const Vector3 &p_out) {}

Vector3 Curve3D::get_point_out(int p_index) const {}

void Curve3D::_remove_point(int p_index) {}

void Curve3D::remove_point(int p_index) {}

void Curve3D::clear_points() {}

Vector3 Curve3D::sample(int p_index, real_t p_offset) const {}

Vector3 Curve3D::samplef(real_t p_findex) const {}

void Curve3D::mark_dirty() {}

void Curve3D::_bake_segment3d(RBMap<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_tol) const {}

void Curve3D::_bake_segment3d_even_length(RBMap<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_length) const {}

Vector3 Curve3D::_calculate_tangent(const Vector3 &p_begin, const Vector3 &p_control_1, const Vector3 &p_control_2, const Vector3 &p_end, const real_t p_t) {}

void Curve3D::_bake() const {}

real_t Curve3D::get_baked_length() const {}

Curve3D::Interval Curve3D::_find_interval(real_t p_offset) const {}

Vector3 Curve3D::_sample_baked(Interval p_interval, bool p_cubic) const {}

real_t Curve3D::_sample_baked_tilt(Interval p_interval) const {}

// Internal method for getting posture at a baked point. Assuming caller
// make all safety checks.
Basis Curve3D::_compose_posture(int p_index) const {}

Basis Curve3D::_sample_posture(Interval p_interval, bool p_apply_tilt) const {}

#ifdef TOOLS_ENABLED
// Get posture at a control point. Needed for Gizmo implementation.
Basis Curve3D::get_point_baked_posture(int p_index, bool p_apply_tilt) const {}
#endif

Vector3 Curve3D::sample_baked(real_t p_offset, bool p_cubic) const {}

Transform3D Curve3D::sample_baked_with_rotation(real_t p_offset, bool p_cubic, bool p_apply_tilt) const {}

real_t Curve3D::sample_baked_tilt(real_t p_offset) const {}

Vector3 Curve3D::sample_baked_up_vector(real_t p_offset, bool p_apply_tilt) const {}

PackedVector3Array Curve3D::get_baked_points() const {}

Vector<real_t> Curve3D::get_baked_tilts() const {}

PackedVector3Array Curve3D::get_baked_up_vectors() const {}

Vector3 Curve3D::get_closest_point(const Vector3 &p_to_point) const {}

PackedVector3Array Curve3D::get_points() const {}

real_t Curve3D::get_closest_offset(const Vector3 &p_to_point) const {}

void Curve3D::set_bake_interval(real_t p_tolerance) {}

real_t Curve3D::get_bake_interval() const {}

void Curve3D::set_up_vector_enabled(bool p_enable) {}

bool Curve3D::is_up_vector_enabled() const {}

Dictionary Curve3D::_get_data() const {}

void Curve3D::_set_data(const Dictionary &p_data) {}

PackedVector3Array Curve3D::tessellate(int p_max_stages, real_t p_tolerance) const {}

Vector<RBMap<real_t, Vector3>> Curve3D::_tessellate_even_length(int p_max_stages, real_t p_length) const {}

PackedVector3Array Curve3D::tessellate_even_length(int p_max_stages, real_t p_length) const {}

bool Curve3D::_set(const StringName &p_name, const Variant &p_value) {}

bool Curve3D::_get(const StringName &p_name, Variant &r_ret) const {}

void Curve3D::_get_property_list(List<PropertyInfo> *p_list) const {}

void Curve3D::_bind_methods() {}

Curve3D::Curve3D() {}