Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include <float.h>
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
#include "DNA_object_types.h"
#include "BLI_math_vector.h"
#include "BKE_anim_path.h"
#include "BKE_curve.h"
#include "BKE_key.h"
#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"} |
|
static |
Definition at line 173 of file anim_path.c.
References BLI_assert_msg, CLOG_ERROR, LOG, and UNLIKELY.
Referenced by BKE_where_on_path().
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 56 of file anim_path.c.
References CurveCache::anim_path_accum_length, CurveCache::bev, BevList::bevpoints, BLI_assert, CLOG_WARN, Object_Runtime::curve_cache, ListBase::first, get_bevlist_seg_array_size(), len_v3v3(), LOG, MEM_freeN, MEM_mallocN, BevList::nr, NULL, OB_CURVES_LEGACY, BevList::poly, Object::runtime, Object::type, and BevPoint::vec.
Referenced by evaluate_curve_type_object().
int BKE_anim_path_get_array_size | ( | const CurveCache * | curve_cache | ) |
Definition at line 39 of file anim_path.c.
References CurveCache::bev, BLI_assert, ListBase::first, get_bevlist_seg_array_size(), BevList::nr, and NULL.
Referenced by BKE_anim_path_get_length().
float BKE_anim_path_get_length | ( | const CurveCache * | curve_cache | ) |
Definition at line 50 of file anim_path.c.
References CurveCache::anim_path_accum_length, and BKE_anim_path_get_array_size().
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 | ||
) |
Definition at line 217 of file anim_path.c.
References CurveCache::anim_path_accum_length, CurveCache::bev, binary_search_anim_path(), BKE_curve_editNurbs_get(), clamp_f(), clamp_v4(), CLOG_WARN, copy_qt_qt(), CU_BEZIER, CU_NURBS, CU_POLY, Object_Runtime::curve_cache, Object::data, ELEM, ListBase::first, floorf, CCL_NAMESPACE_BEGIN::frac(), get_bevlist_seg_array_size(), get_curve_points_from_idx(), interp_qt_qtqt(), interp_v3_v3v3v3v3(), is_cyclic(), KEY_BSPLINE, KEY_CARDINAL, key_curve_position_weights(), key_curve_tangent_weights(), KEY_LINEAR, LOG, negate_v3(), BevList::nr, NULL, Curve::nurb, OB_CURVES_LEGACY, BevList::poly, q1, BevPoint::quat, BevPoint::radius, Object::runtime, BevPoint::tilt, Nurb::type, Object::type, UNLIKELY, BevPoint::vec, w(), and BevPoint::weight.
|
static |
Definition at line 29 of file anim_path.c.
References BevList::nr, and BevList::poly.
Referenced by BKE_anim_path_calc_data(), BKE_anim_path_get_array_size(), and BKE_where_on_path().
|
static |
Definition at line 100 of file anim_path.c.
References BevList::bevpoints, BLI_assert, is_cyclic(), and BevList::nr.
Referenced by BKE_where_on_path().
|
static |
Definition at line 24 of file anim_path.c.
Referenced by binary_search_anim_path(), BKE_anim_path_calc_data(), and BKE_where_on_path().