|
Blender V5.0
|
#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.
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 ¶ms, 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"} |
Deform coordinates by a armature object (used by modifier).
Definition in file armature_deform.cc.
| 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 ) |
Definition at line 618 of file armature_deform.cc.
References blender::bke::armature_deform_coords(), BLI_assert, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::bke::verify_armature_deform_valid().
Referenced by blender::bke::tests::ArmatureDeformTestBase::curves_test(), blender::bke::tests::ArmatureDeformTestBase::grease_pencil_test(), and blender::modify_curves().
| 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 ) |
Definition at line 712 of file armature_deform.cc.
References blender::bke::armature_deform_editmesh(), BKE_id_defgroup_list_get(), BMEditMesh::bm, CD_MDEFORMVERT, CustomData_get_offset(), Object::data, BMesh::vdata, and blender::bke::verify_armature_deform_valid().
Referenced by deform_matrices_EM(), deform_verts_EM(), and blender::bke::tests::ArmatureDeformTestBase::edit_mesh_test().
| 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 ) |
Definition at line 651 of file armature_deform.cc.
References blender::bke::armature_deform_coords(), BKE_id_defgroup_list_get(), BKE_id_supports_vertex_groups(), Object::data, Lattice::dvert, Mesh::id, OB_LATTICE, OB_MESH, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, blender::MutableSpan< T >::size(), blender::Span< T >::size(), Object::type, and blender::bke::verify_armature_deform_valid().
Referenced by deform_matrices(), deform_verts(), and blender::bke::tests::ArmatureDeformTestBase::mesh_test().
|
static |
Definition at line 51 of file armature_deform.cc.
References sqrtf, and blender::math::square().
Referenced by distfactor_to_bone().
| float distfactor_to_bone | ( | const blender::float3 & | position, |
| const blender::float3 & | head, | ||
| const blender::float3 & | tail, | ||
| float | radius_head, | ||
| float | radius_tail, | ||
| float | falloff_distance ) |
Bone influence factor from envelope distance.
Definition at line 73 of file armature_deform.cc.
References bone_envelope_falloff(), blender::math::distance_squared(), blender::math::dot(), blender::math::interpolate(), and blender::math::normalize_and_get_length().
Referenced by blender::ed::greasepencil::add_armature_envelope_weights(), blender::bke::armature_vert_task_with_mixer(), armdef_accumulate_bone(), blender::bke::dist_bone_deform(), and envelope_bone_weighting().
|
static |
Definition at line 45 of file armature_deform.cc.