Blender  V3.3
Classes | Macros | Functions
curve_decimate.c File Reference
#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)
 

Macro Definition Documentation

◆ HANDLE_UPDATE

#define HANDLE_UPDATE (   a,
 
)
Value:
{ \
if (a == HD_VECT) { \
a = HD_FREE; \
} \
else if (ELEM(a, HD_AUTO, HD_AUTO_ANIM)) { \
a = HD_ALIGN; \
} \
/* opposite handle */ \
if (ELEM(b, HD_AUTO, HD_AUTO_ANIM)) { \
b = HD_ALIGN; \
} \
} \
((void)0)
#define ELEM(...)
@ HD_AUTO_ANIM
@ HD_VECT
@ HD_FREE
@ HD_AUTO
@ HD_ALIGN
SyclQueue void void size_t num_bytes void
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken b("b", pxr::TfToken::Immortal)

◆ SELECT

#define SELECT   1

Definition at line 301 of file curve_decimate.c.

Function Documentation

◆ BKE_curve_decimate_bezt_array()

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 
)

◆ BKE_curve_decimate_nurb()

void BKE_curve_decimate_nurb ( Nurb nu,
const uint  resolu,
const float  error_sq_max,
const uint  error_target_len 
)

◆ curve_decimate()

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 
)
static

◆ knot_remove_error_recalculate()

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

◆ knot_remove_error_value()

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

Definition at line 41 of file curve_decimate.c.

References dot_v3v3(), NULL, and sub_v3_v3().

Referenced by knot_remove_error_recalculate().