Blender V5.0
armature_deform.cc File Reference
#include <cctype>
#include <cfloat>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_listbase_wrapper.hh"
#include "BLI_math_matrix.h"
#include "BLI_math_quaternion.hh"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLI_task.h"
#include "BLI_task.hh"
#include "DNA_armature_types.h"
#include "DNA_lattice_types.h"
#include "DNA_listBase.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BKE_action.hh"
#include "BKE_armature.hh"
#include "BKE_customdata.hh"
#include "BKE_deform.hh"
#include "BKE_editmesh.hh"
#include "BKE_lattice.hh"
#include "BKE_mesh.hh"
#include "CLG_log.h"

Go to the source code of this file.

Classes

struct  blender::bke::BoneDeformLinearMixer< full_deform >
struct  blender::bke::BoneDeformDualQuaternionMixer< full_deform >
struct  blender::bke::ArmatureDeformParams
struct  blender::bke::ArmatureEditMeshUserdata

Namespaces

namespace  blender
namespace  blender::bke

Functions

template<typename MixerT>
static void blender::bke::b_bone_deform (const bPoseChannel &pchan, const float3 &co, const float weight, MixerT &mixer)
template<typename MixerT>
static float blender::bke::dist_bone_deform (const bPoseChannel &pchan, const float3 &co, MixerT &mixer)
template<typename MixerT>
static float blender::bke::pchan_bone_deform (const bPoseChannel &pchan, const float weight, const float3 &co, MixerT &mixer)
static ArmatureDeformParams blender::bke::get_armature_deform_params (const Object &ob_arm, const Object &ob_target, const ListBase *defbase, MutableSpan< float3 > vert_coords, std::optional< Span< float3 > > vert_coords_prev, std::optional< MutableSpan< float3x3 > > vert_deform_mats, const int deformflag, blender::StringRefNull defgrp_name, const bool try_use_dverts)
template<typename MixerT>
static void blender::bke::armature_vert_task_with_mixer (const ArmatureDeformParams &params, const int i, const MDeformVert *dvert, MixerT &mixer)
static void blender::bke::armature_vert_task_with_dvert (const ArmatureDeformParams &deform_params, const int i, const MDeformVert *dvert, const bool use_quaternion)
static void blender::bke::armature_deform_coords (const Object &ob_arm, const Object &ob_target, const ListBase *defbase, const MutableSpan< float3 > vert_coords, const std::optional< MutableSpan< float3x3 > > vert_deform_mats, const int deformflag, const std::optional< Span< float3 > > vert_coords_prev, blender::StringRefNull defgrp_name, const std::optional< Span< MDeformVert > > dverts, const Mesh *me_target)
template<bool use_dvert>
static void blender::bke::armature_vert_task_editmesh (void *__restrict userdata, MempoolIterData *iter, const TaskParallelTLS *__restrict)
static void blender::bke::armature_deform_editmesh (const Object &ob_arm, const Object &ob_target, const ListBase *defbase, const MutableSpan< float3 > vert_coords, const std::optional< MutableSpan< float3x3 > > vert_deform_mats, const int deformflag, const std::optional< Span< float3 > > vert_coords_prev, blender::StringRefNull defgrp_name, const BMEditMesh &em_target, const int cd_dvert_offset)
static bool blender::bke::verify_armature_deform_valid (const Object &ob_arm)
Armature Deform Internal Utilities
static float bone_envelope_falloff (const float distance_squared, const float closest_radius, const float falloff_distance)
float distfactor_to_bone (const blender::float3 &position, const blender::float3 &head, const blender::float3 &tail, const float radius_head, const float radius_tail, const float falloff_distance)
Armature Deform #BKE_armature_deform_coords API

#BKE_armature_deform_coords and related functions.

void BKE_armature_deform_coords_with_curves (const Object &ob_arm, const Object &ob_target, const ListBase *defbase, blender::MutableSpan< blender::float3 > vert_coords, std::optional< blender::Span< blender::float3 > > vert_coords_prev, std::optional< blender::MutableSpan< blender::float3x3 > > vert_deform_mats, blender::Span< MDeformVert > dverts, int deformflag, blender::StringRefNull defgrp_name)
void BKE_armature_deform_coords_with_mesh (const Object &ob_arm, const Object &ob_target, blender::MutableSpan< blender::float3 > vert_coords, std::optional< blender::Span< blender::float3 > > vert_coords_prev, std::optional< blender::MutableSpan< blender::float3x3 > > vert_deform_mats, int deformflag, blender::StringRefNull defgrp_name, const Mesh *me_target)
void BKE_armature_deform_coords_with_editmesh (const Object &ob_arm, const Object &ob_target, blender::MutableSpan< blender::float3 > vert_coords, std::optional< blender::Span< blender::float3 > > vert_coords_prev, std::optional< blender::MutableSpan< blender::float3x3 > > vert_deform_mats, int deformflag, blender::StringRefNull defgrp_name, const BMEditMesh &em_target)

Variables

static CLG_LogRef LOG = {"geom.armature_deform"}

Detailed Description

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

Definition in file armature_deform.cc.

Function Documentation

◆ BKE_armature_deform_coords_with_curves()

void BKE_armature_deform_coords_with_curves ( const Object & ob_arm,
const Object & ob_target,
const ListBase * defbase,
blender::MutableSpan< blender::float3 > vert_coords,
std::optional< blender::Span< blender::float3 > > vert_coords_prev,
std::optional< blender::MutableSpan< blender::float3x3 > > vert_deform_mats,
blender::Span< MDeformVert > dverts,
int deformflag,
blender::StringRefNull defgrp_name )

◆ BKE_armature_deform_coords_with_editmesh()

void BKE_armature_deform_coords_with_editmesh ( const Object & ob_arm,
const Object & ob_target,
blender::MutableSpan< blender::float3 > vert_coords,
std::optional< blender::Span< blender::float3 > > vert_coords_prev,
std::optional< blender::MutableSpan< blender::float3x3 > > vert_deform_mats,
int deformflag,
blender::StringRefNull defgrp_name,
const BMEditMesh & em_target )

◆ BKE_armature_deform_coords_with_mesh()

◆ bone_envelope_falloff()

float bone_envelope_falloff ( const float distance_squared,
const float closest_radius,
const float falloff_distance )
static

Definition at line 51 of file armature_deform.cc.

References sqrtf, and blender::math::square().

Referenced by distfactor_to_bone().

◆ distfactor_to_bone()

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"geom.armature_deform"}
static

Definition at line 45 of file armature_deform.cc.