|
Blender V4.3
|
#include <cmath>#include <cstdio>#include <cstdlib>#include <cstring>#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.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.hh"#include "BKE_editmesh.hh"#include "BKE_modifier.hh"#include "BKE_object_types.hh"#include "BKE_deform.hh"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, const 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, const 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.cc.
| #define DEFORM_OP | ( | dvert | ) |
Referenced by curve_deform_coords_impl().
| #define DEFORM_OP_CLAMPED | ( | dvert | ) |
Referenced by curve_deform_coords_impl().
| #define DEFORM_OP_MINMAX | ( | dvert | ) |
Referenced by curve_deform_coords_impl().
| void BKE_curve_deform_co | ( | const Object * | ob_curve, |
| const Object * | ob_target, | ||
| const float | orco[3], | ||
| float | vec[3], | ||
| int | no_rot_axis, | ||
| float | r_mat[3][3] ) |
| orco | Input vec and orco = local coord in curve space orco is original not-animated or deformed reference point. |
The result written to vec and r_mat.
Definition at line 408 of file curve_deform.cc.
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 368 of file curve_deform.cc.
References curve_deform_coords_impl(), and flag.
Referenced by deform_verts(), and deform_verts_EM().
| 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, | ||
| const BMEditMesh * | em_target ) |
Definition at line 388 of file curve_deform.cc.
References curve_deform_coords_impl(), and flag.
Referenced by deform_verts_EM().
|
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 64 of file curve_deform.cc.
References add_v3_v3v3(), BKE_anim_path_get_length(), BKE_where_on_path(), copy_qt_qt(), copy_v3_v3(), CU_PATH_RADIUS, CU_STRETCH, 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(), 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 199 of file curve_deform.cc.
References BLI_assert, 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, flag, init_curve_deform(), INIT_MINMAX, minmax_v3v3_v3(), MOD_CURVE_INVERT_VGROUP, mul_m4_v3(), 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 47 of file curve_deform.cc.
References copy_m3_m4(), CurveDeform::curvespace, invert_m4_m4(), mul_m4_m4m4(), CurveDeform::no_rot_axis, CurveDeform::objectspace, and CurveDeform::objectspace3.
Referenced by BKE_curve_deform_co(), and curve_deform_coords_impl().