Blender V4.3
anim_path.cc File Reference
#include "MEM_guardedalloc.h"
#include <cfloat>
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
#include "DNA_object_types.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BKE_anim_path.h"
#include "BKE_curve.hh"
#include "BKE_key.hh"
#include "BKE_object_types.hh"
#include "CLG_log.h"

Go to the source code of this file.

Functions

static int get_bevlist_seg_array_size (const BevList *bl)
 
int BKE_anim_path_get_array_size (const CurveCache *curve_cache)
 
float BKE_anim_path_get_length (const CurveCache *curve_cache)
 
void BKE_anim_path_calc_data (Object *ob)
 
static void get_curve_points_from_idx (const int idx, const BevList *bl, const bool is_cyclic, BevPoint const **r_p0, BevPoint const **r_p1, BevPoint const **r_p2, BevPoint const **r_p3)
 
static bool binary_search_anim_path (const float *accum_len_arr, const int seg_size, const float goal_len, int *r_idx, float *r_frac)
 
bool BKE_where_on_path (const Object *ob, float ctime, float r_vec[4], float r_dir[3], float r_quat[4], float *r_radius, float *r_weight)
 

Variables

static CLG_LogRef LOG = {"bke.anim"}
 

Function Documentation

◆ binary_search_anim_path()

static bool binary_search_anim_path ( const float * accum_len_arr,
const int seg_size,
const float goal_len,
int * r_idx,
float * r_frac )
static

Definition at line 177 of file anim_path.cc.

References BLI_assert_msg, CLOG_ERROR, LOG, and UNLIKELY.

Referenced by BKE_where_on_path().

◆ BKE_anim_path_calc_data()

void BKE_anim_path_calc_data ( struct Object * ob)

This function populates the 'ob->runtime->curve_cache->anim_path_accum_length' data. You should never have to call this manually as it should already have been called by 'BKE_displist_make_curveTypes'. Do not call this manually unless you know what you are doing.

Definition at line 59 of file anim_path.cc.

References BevList::bevpoints, CLOG_WARN, get_bevlist_seg_array_size(), len_v3v3(), LOG, MEM_mallocN, MEM_SAFE_FREE, BevList::nr, OB_CURVES_LEGACY, BevList::poly, Object::runtime, Object::type, and BevPoint::vec.

Referenced by evaluate_curve_type_object().

◆ BKE_anim_path_get_array_size()

int BKE_anim_path_get_array_size ( const CurveCache * curve_cache)

◆ BKE_anim_path_get_length()

float BKE_anim_path_get_length ( const CurveCache * curve_cache)

◆ BKE_where_on_path()

◆ get_bevlist_seg_array_size()

static int get_bevlist_seg_array_size ( const BevList * bl)
static

◆ get_curve_points_from_idx()

static void get_curve_points_from_idx ( const int idx,
const BevList * bl,
const bool is_cyclic,
BevPoint const ** r_p0,
BevPoint const ** r_p1,
BevPoint const ** r_p2,
BevPoint const ** r_p3 )
static

Definition at line 104 of file anim_path.cc.

References BevList::bevpoints, BLI_assert, is_cyclic(), and BevList::nr.

Referenced by BKE_where_on_path().

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"bke.anim"}
static