Blender V2.61 - r43446
|
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "BKE_action.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_modifier.h"
#include "BKE_deform.h"
#include "depsgraph_private.h"
#include "MEM_guardedalloc.h"
#include "MOD_util.h"
Go to the source code of this file.
Functions | |
static void | initData (ModifierData *md) |
static void | copyData (ModifierData *md, ModifierData *target) |
static CustomDataMask | requiredDataMask (Object *UNUSED(ob), ModifierData *md) |
static void | freeData (ModifierData *md) |
static int | isDisabled (ModifierData *md, int UNUSED(useRenderParams)) |
static void | foreachObjectLink (ModifierData *md, Object *ob, void(*walk)(void *userData, Object *ob, Object **obpoin), void *userData) |
static void | updateDepgraph (ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode) |
static float | hook_falloff (float *co_1, float *co_2, const float falloff_squared, float fac) |
static void | deformVerts_do (HookModifierData *hmd, Object *ob, DerivedMesh *dm, float(*vertexCos)[3], int numVerts) |
static void | deformVerts (ModifierData *md, Object *ob, DerivedMesh *derivedData, float(*vertexCos)[3], int numVerts, int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) |
static void | deformVertsEM (ModifierData *md, Object *ob, struct EditMesh *editData, DerivedMesh *derivedData, float(*vertexCos)[3], int numVerts) |
Variables | |
ModifierTypeInfo | modifierType_Hook |
Definition in file MOD_hook.c.
static void copyData | ( | ModifierData * | md, |
ModifierData * | target | ||
) | [static] |
Definition at line 62 of file MOD_hook.c.
References BLI_strncpy(), HookModifierData::cent, copy_v3_v3(), HookModifierData::falloff, HookModifierData::force, HookModifierData::indexar, MEM_dupallocN(), HookModifierData::name, HookModifierData::object, HookModifierData::parentinv, HookModifierData::subtarget, and HookModifierData::totindex.
static void deformVerts | ( | ModifierData * | md, |
Object * | ob, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts, | ||
int | UNUSEDuseRenderParams, | ||
int | UNUSEDisFinalCalc | ||
) | [static] |
Definition at line 247 of file MOD_hook.c.
References deformVerts_do(), get_dm(), HookModifierData::name, NULL, OB_MESH, DerivedMesh::release, and Object::type.
static void deformVerts_do | ( | HookModifierData * | hmd, |
Object * | ob, | ||
DerivedMesh * | dm, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 146 of file MOD_hook.c.
References CD_ORIGINDEX, HookModifierData::cent, co, copy_m4_m4(), defvert_find_weight(), HookModifierData::falloff, HookModifierData::force, get_pose_channel(), DerivedMesh::getVertDataArray, hook_falloff(), i, Object::imat, HookModifierData::indexar, interp_v3_v3v3(), invert_m4_m4(), modifier_get_vgroup(), mul_serie_m4(), mul_v3_m4v3(), mult_m4_m4m4(), HookModifierData::name, NULL, HookModifierData::object, Object::obmat, HookModifierData::parentinv, Object::pose, bPoseChannel::pose_mat, HookModifierData::subtarget, and totindex.
Referenced by deformVerts(), and deformVertsEM().
static void deformVertsEM | ( | ModifierData * | md, |
Object * | ob, | ||
struct EditMesh * | editData, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 263 of file MOD_hook.c.
References deformVerts_do(), get_dm(), HookModifierData::name, NULL, OB_MESH, DerivedMesh::release, and Object::type.
static void foreachObjectLink | ( | ModifierData * | md, |
Object * | ob, | ||
void(*)(void *userData, Object *ob, Object **obpoin) | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 104 of file MOD_hook.c.
References HookModifierData::object.
static void freeData | ( | ModifierData * | md | ) | [static] |
Definition at line 90 of file MOD_hook.c.
References HookModifierData::indexar, and MEM_freeN().
static float hook_falloff | ( | float * | co_1, |
float * | co_2, | ||
const float | falloff_squared, | ||
float | fac | ||
) | [static] |
Definition at line 131 of file MOD_hook.c.
References len_squared_v3v3().
Referenced by deformVerts_do().
static void initData | ( | ModifierData * | md | ) | [static] |
Definition at line 55 of file MOD_hook.c.
References HookModifierData::force.
static int isDisabled | ( | ModifierData * | md, |
int | UNUSEDuseRenderParams | ||
) | [static] |
Definition at line 97 of file MOD_hook.c.
References HookModifierData::object.
static CustomDataMask requiredDataMask | ( | Object * | UNUSEDob, |
ModifierData * | md | ||
) | [static] |
Definition at line 78 of file MOD_hook.c.
References CD_MASK_MDEFORMVERT, CD_MASK_ORIGINDEX, HookModifierData::indexar, and HookModifierData::name.
static void updateDepgraph | ( | ModifierData * | md, |
DagForest * | forest, | ||
struct Scene * | UNUSEDscene, | ||
Object * | UNUSEDob, | ||
DagNode * | obNode | ||
) | [static] |
Definition at line 114 of file MOD_hook.c.
References dag_add_relation(), dag_get_node(), DAG_RL_DATA_DATA, DAG_RL_OB_DATA, HookModifierData::object, and HookModifierData::subtarget.
{ "Hook", "HookModifierData", sizeof(HookModifierData), eModifierTypeType_OnlyDeform, eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsEditmode, copyData, deformVerts, NULL, deformVertsEM, NULL, NULL, NULL, initData, requiredDataMask, freeData, isDisabled, updateDepgraph, NULL, NULL, foreachObjectLink, NULL, NULL, }
Definition at line 279 of file MOD_hook.c.