Blender V5.3
curve_deform.cc File Reference
#include <cstdlib>
#include <cstring>
#include "BLI_math_matrix_c.hh"
#include "BLI_math_rotation_c.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_utildefines.hh"
#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  blender::CurveDeform

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define DEFORM_OP(dvert)
#define DEFORM_OP_MINMAX(dvert)
#define DEFORM_OP_CLAMPED(dvert)

Functions

Curve Deform Internal Utilities
static void blender::init_curve_deform (const Object *ob_curve, const Object *ob_target, CurveDeform *cd)
static bool blender::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 blender::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 BMesh *bm_target)
Deform 3D Coordinates by Curve (<tt>curve_deform.cc</tt>)
void blender::BKE_curve_deform_coords (const Object *ob_curve, const Object *ob_target, float(*vert_coords)[3], int vert_coords_len, const MDeformVert *dvert, int defgrp_index, short flag, short defaxis)
void blender::BKE_curve_deform_coords_with_editmesh (const Object *ob_curve, const Object *ob_target, float(*vert_coords)[3], int vert_coords_len, int defgrp_index, short flag, short defaxis, const BMesh &bm_target)
void blender::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])

Detailed Description

Deform coordinates by a curve object (used by modifier).

Definition in file curve_deform.cc.

Macro Definition Documentation

◆ DEFORM_OP

#define DEFORM_OP ( dvert)
Value:
{ \
const float weight = invert_vgroup ? 1.0f - BKE_defvert_find_weight(dvert, defgrp_index) : \
BKE_defvert_find_weight(dvert, defgrp_index); \
if (weight > 0.0f) { \
float vec[3]; \
mul_m4_v3(cd.curvespace, vert_coords[a]); \
copy_v3_v3(vec, vert_coords[a]); \
calc_curve_deform(ob_curve, vec, defaxis, &cd, nullptr); \
interp_v3_v3v3(vert_coords[a], vert_coords[a], vec, weight); \
mul_m4_v3(cd.objectspace, vert_coords[a]); \
} \
} \
((void)0)

Referenced by blender::curve_deform_coords_impl().

◆ DEFORM_OP_CLAMPED

#define DEFORM_OP_CLAMPED ( dvert)
Value:
{ \
const float weight = invert_vgroup ? 1.0f - BKE_defvert_find_weight(dvert, defgrp_index) : \
BKE_defvert_find_weight(dvert, defgrp_index); \
if (weight > 0.0f) { \
float vec[3]; \
copy_v3_v3(vec, vert_coords[a]); \
calc_curve_deform(ob_curve, vec, defaxis, &cd, nullptr); \
interp_v3_v3v3(vert_coords[a], vert_coords[a], vec, weight); \
mul_m4_v3(cd.objectspace, vert_coords[a]); \
} \
} \
((void)0)

Referenced by blender::curve_deform_coords_impl().

◆ DEFORM_OP_MINMAX

#define DEFORM_OP_MINMAX ( dvert)
Value:
{ \
const float weight = invert_vgroup ? 1.0f - BKE_defvert_find_weight(dvert, defgrp_index) : \
BKE_defvert_find_weight(dvert, defgrp_index); \
if (weight > 0.0f) { \
mul_m4_v3(cd.curvespace, vert_coords[a]); \
minmax_v3v3_v3(cd.dmin, cd.dmax, vert_coords[a]); \
} \
} \
((void)0)

Referenced by blender::curve_deform_coords_impl().