Blender
V3.3
|
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_curve_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BKE_anim_path.h"
#include "BKE_curve.h"
#include "BKE_editmesh.h"
#include "BKE_lattice.h"
#include "BKE_modifier.h"
#include "BKE_deform.h"
Go to the source code of this file.
Classes | |
struct | CurveDeform |
Macros | |
#define | DEFORM_OP(dvert) |
#define | DEFORM_OP_MINMAX(dvert) |
#define | DEFORM_OP_CLAMPED(dvert) |
Functions | |
Curve Deform Internal Utilities | |
static void | init_curve_deform (const Object *ob_curve, const Object *ob_target, CurveDeform *cd) |
static bool | calc_curve_deform (const Object *ob_curve, float co[3], const short axis, const CurveDeform *cd, float r_quat[4]) |
Curve Deform #BKE_curve_deform_coords API | |
#BKE_curve_deform and related functions. | |
static void | curve_deform_coords_impl (const Object *ob_curve, const Object *ob_target, float(*vert_coords)[3], const int vert_coords_len, const MDeformVert *dvert, const int defgrp_index, const short flag, const short defaxis, BMEditMesh *em_target) |
void | BKE_curve_deform_coords (const Object *ob_curve, const Object *ob_target, float(*vert_coords)[3], const int vert_coords_len, const MDeformVert *dvert, const int defgrp_index, const short flag, const short defaxis) |
void | BKE_curve_deform_coords_with_editmesh (const Object *ob_curve, const Object *ob_target, float(*vert_coords)[3], const int vert_coords_len, const int defgrp_index, const short flag, const short defaxis, BMEditMesh *em_target) |
void | BKE_curve_deform_co (const Object *ob_curve, const Object *ob_target, const float orco[3], float vec[3], const int no_rot_axis, float r_mat[3][3]) |
Deform coordinates by a curve object (used by modifier).
Definition in file curve_deform.c.
#define DEFORM_OP | ( | dvert | ) |
#define DEFORM_OP_CLAMPED | ( | dvert | ) |
#define DEFORM_OP_MINMAX | ( | dvert | ) |
void BKE_curve_deform_co | ( | const Object * | ob_curve, |
const Object * | ob_target, | ||
const float | orco[3], | ||
float | vec[3], | ||
const int | no_rot_axis, | ||
float | r_mat[3][3] | ||
) |
Definition at line 397 of file curve_deform.c.
References calc_curve_deform(), copy_v3_v3(), CurveDeform::curvespace, CurveDeform::dmax, CurveDeform::dmin, init_curve_deform(), mul_m3_m3m3(), mul_m4_v3(), CurveDeform::no_rot_axis, OB_CURVES_LEGACY, CurveDeform::objectspace, CurveDeform::objectspace3, quat_to_mat3(), Object::trackflag, Object::type, and unit_m3().
void BKE_curve_deform_coords | ( | const Object * | ob_curve, |
const Object * | ob_target, | ||
float(*) | vert_coords[3], | ||
const int | vert_coords_len, | ||
const MDeformVert * | dvert, | ||
const int | defgrp_index, | ||
const short | flag, | ||
const short | defaxis | ||
) |
Definition at line 364 of file curve_deform.c.
References curve_deform_coords_impl(), and NULL.
void BKE_curve_deform_coords_with_editmesh | ( | const Object * | ob_curve, |
const Object * | ob_target, | ||
float(*) | vert_coords[3], | ||
const int | vert_coords_len, | ||
const int | defgrp_index, | ||
const short | flag, | ||
const short | defaxis, | ||
BMEditMesh * | em_target | ||
) |
Definition at line 377 of file curve_deform.c.
References curve_deform_coords_impl(), and NULL.
|
static |
For each point, rotate & translate to curve.
co | local coord, result local too. |
r_quat | returns quaternion for rotation, using CurveDeform.no_rot_axis axis is using another define. |
Definition at line 61 of file curve_deform.c.
References add_v3_v3v3(), CurveCache::anim_path_accum_length, BKE_anim_path_get_length(), BKE_where_on_path(), copy_qt_qt(), copy_v3_v3(), CU_PATH_RADIUS, CU_STRETCH, Object_Runtime::curve_cache, Object::data, CurveDeform::dmax, CurveDeform::dmin, ELEM, Curve::flag, LIKELY, mul_qt_qtqt(), mul_qt_v3(), mul_v3_fl(), CurveDeform::no_rot_axis, normalize_qt(), normalize_v3(), NULL, quat_apply_track(), rotation_between_vecs_to_quat(), Object::runtime, and vec_apply_track().
Referenced by BKE_curve_deform_co(), and curve_deform_coords_impl().
|
static |
Definition at line 196 of file curve_deform.c.
References Freestyle::a, BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_ITER_MESH_INDEX, BM_VERTS_OF_MESH, calc_curve_deform(), CD_MDEFORMVERT, CU_DEFORM_BOUNDS_OFF, CurveDeform::curvespace, CustomData_get_offset(), Object::data, DEFORM_OP, DEFORM_OP_CLAMPED, DEFORM_OP_MINMAX, CurveDeform::dmax, CurveDeform::dmin, Curve::flag, init_curve_deform(), INIT_MINMAX, minmax_v3v3_v3(), MOD_CURVE_INVERT_VGROUP, mul_m4_v3(), NULL, OB_CURVES_LEGACY, CurveDeform::objectspace, Object::type, v, and BMesh::vdata.
Referenced by BKE_curve_deform_coords(), and BKE_curve_deform_coords_with_editmesh().
|
static |
Definition at line 44 of file curve_deform.c.
References copy_m3_m4(), CurveDeform::curvespace, invert_m4_m4(), mul_m4_m4m4(), CurveDeform::no_rot_axis, CurveDeform::objectspace, CurveDeform::objectspace3, and Object::obmat.
Referenced by BKE_curve_deform_co(), and curve_deform_coords_impl().