Blender
V3.3
|
#include "DNA_curve_types.h"
#include "BLI_heap.h"
#include "BLI_math_vector.h"
#include "MEM_guardedalloc.h"
#include "BKE_curve.h"
#include "curve_fit_nd.h"
#include "BLI_strict_flags.h"
Go to the source code of this file.
Classes | |
struct | Knot |
struct | Removal |
Macros | |
#define | HANDLE_UPDATE(a, b) |
#define | SELECT 1 |
Functions | |
static float | knot_remove_error_value (const float tan_l[3], const float tan_r[3], const float(*points)[3], const uint points_len, float r_handle_factors[2]) |
static void | knot_remove_error_recalculate (Heap *heap, const float(*points)[3], const uint points_len, struct Knot *k, const float error_sq_max) |
static void | curve_decimate (const float(*points)[3], const uint points_len, struct Knot *knots, const uint knots_len, float error_sq_max, const uint error_target_len) |
uint | BKE_curve_decimate_bezt_array (BezTriple *bezt_array, const uint bezt_array_len, const uint resolu, const bool is_cyclic, const char flag_test, const char flag_set, const float error_sq_max, const uint error_target_len) |
void | BKE_curve_decimate_nurb (Nurb *nu, const uint resolu, const float error_sq_max, const uint error_target_len) |
#define HANDLE_UPDATE | ( | a, | |
b | |||
) |
#define SELECT 1 |
Definition at line 301 of file curve_decimate.c.
uint BKE_curve_decimate_bezt_array | ( | BezTriple * | bezt_array, |
const uint | bezt_array_len, | ||
const uint | resolu, | ||
const bool | is_cyclic, | ||
const char | flag_test, | ||
const char | flag_set, | ||
const float | error_sq_max, | ||
const uint | error_target_len | ||
) |
Definition at line 184 of file curve_decimate.c.
References BKE_curve_calc_coords_axis(), BKE_curve_calc_coords_axis_len(), BLI_assert, Knot::can_remove, Knot::co, curve_decimate(), equals_v3v3(), BezTriple::f2, float(), HANDLE_UPDATE, Knot::handles, handles, Knot::heap_node, is_cyclic(), Knot::is_removed, Knot::knot_index, madd_v3_v3v3fl(), MEM_freeN, MEM_mallocN, Knot::next, normalize_v3(), NULL, Knot::point_index, point_index, Knot::prev, sub_v3_v3v3(), KDL::tan(), and BezTriple::vec.
Referenced by BKE_curve_decimate_nurb(), and decimate_fcurve_segment().
void BKE_curve_decimate_nurb | ( | Nurb * | nu, |
const uint | resolu, | ||
const float | error_sq_max, | ||
const uint | error_target_len | ||
) |
Definition at line 303 of file curve_decimate.c.
References Nurb::bezt, BEZT_FLAG_TEMP_TAG, BKE_curve_decimate_bezt_array(), CU_NURB_CYCLIC, Nurb::flagu, MEM_freeN, MEM_mallocN, Nurb::pntsu, and SELECT.
Referenced by curve_decimate_exec().
|
static |
Definition at line 130 of file curve_decimate.c.
References BLI_heap_free(), BLI_heap_is_empty(), BLI_heap_new_ex(), BLI_heap_pop_min(), Knot::can_remove, Knot::handles, Knot::heap_node, Knot::is_removed, knot_remove_error_recalculate(), MEM_freeN, Knot::next, NULL, Knot::prev, and r.
Referenced by BKE_curve_decimate_bezt_array().
|
static |
Definition at line 74 of file curve_decimate.c.
References BLI_assert, BLI_heap_insert_or_update(), BLI_heap_node_ptr(), BLI_heap_remove(), Knot::can_remove, Knot::co, copy_v2_v2(), equals_v3v3(), float(), handles, Knot::heap_node, Knot::knot_index, knot_remove_error_value(), MEM_freeN, MEM_mallocN, Knot::next, NULL, Knot::point_index, Knot::prev, r, and Knot::tan.
Referenced by curve_decimate().
|
static |
Definition at line 41 of file curve_decimate.c.
References dot_v3v3(), NULL, and sub_v3_v3().
Referenced by knot_remove_error_recalculate().