Blender V2.61 - r43446
|
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_lattice.h"
#include "BKE_modifier.h"
#include "BKE_deform.h"
#include "BKE_shrinkwrap.h"
#include "depsgraph_private.h"
#include "MOD_util.h"
Go to the source code of this file.
Functions | |
static void | axis_limit (int axis, const float limits[2], float co[3], float dcut[3]) |
static void | simpleDeform_taper (const float factor, const float dcut[3], float *co) |
static void | simpleDeform_stretch (const float factor, const float dcut[3], float *co) |
static void | simpleDeform_twist (const float factor, const float *dcut, float *co) |
static void | simpleDeform_bend (const float factor, const float dcut[3], float *co) |
static void | SimpleDeformModifier_do (SimpleDeformModifierData *smd, struct Object *ob, struct DerivedMesh *dm, float(*vertexCos)[3], int numVerts) |
static void | initData (ModifierData *md) |
static void | copyData (ModifierData *md, ModifierData *target) |
static CustomDataMask | requiredDataMask (Object *UNUSED(ob), ModifierData *md) |
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 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_SimpleDeform |
Definition in file MOD_simpledeform.c.
static void axis_limit | ( | int | axis, |
const float | limits[2], | ||
float | co[3], | ||
float | dcut[3] | ||
) | [static] |
Definition at line 58 of file MOD_simpledeform.c.
References simple_enum_gen::val.
Referenced by SimpleDeformModifier_do().
static void copyData | ( | ModifierData * | md, |
ModifierData * | target | ||
) | [static] |
Definition at line 274 of file MOD_simpledeform.c.
References SimpleDeformModifierData::axis, BLI_strncpy(), SimpleDeformModifierData::factor, SimpleDeformModifierData::limit, SimpleDeformModifierData::mode, SimpleDeformModifierData::origin, SimpleDeformModifierData::originOpts, and SimpleDeformModifierData::vgroup_name.
static void deformVerts | ( | ModifierData * | md, |
Object * | ob, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts, | ||
int | UNUSEDuseRenderParams, | ||
int | UNUSEDisFinalCalc | ||
) | [static] |
Definition at line 317 of file MOD_simpledeform.c.
References get_dm(), NULL, DerivedMesh::release, requiredDataMask(), and SimpleDeformModifier_do().
static void deformVertsEM | ( | ModifierData * | md, |
Object * | ob, | ||
struct EditMesh * | editData, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 338 of file MOD_simpledeform.c.
References get_dm(), NULL, DerivedMesh::release, requiredDataMask(), and SimpleDeformModifier_do().
static void foreachObjectLink | ( | ModifierData * | md, |
Object * | ob, | ||
void(*)(void *userData, Object *ob, Object **obpoin) | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 300 of file MOD_simpledeform.c.
References SimpleDeformModifierData::origin.
static void initData | ( | ModifierData * | md | ) | [static] |
Definition at line 261 of file MOD_simpledeform.c.
References SimpleDeformModifierData::axis, SimpleDeformModifierData::factor, SimpleDeformModifierData::limit, MOD_SIMPLEDEFORM_MODE_TWIST, SimpleDeformModifierData::mode, NULL, and SimpleDeformModifierData::origin.
static CustomDataMask requiredDataMask | ( | Object * | UNUSEDob, |
ModifierData * | md | ||
) | [static] |
Definition at line 288 of file MOD_simpledeform.c.
References CD_MASK_MDEFORMVERT, and SimpleDeformModifierData::vgroup_name.
Referenced by deformVerts(), and deformVertsEM().
static void simpleDeform_bend | ( | const float | factor, |
const float | dcut[3], | ||
float * | co | ||
) | [static] |
Definition at line 126 of file MOD_simpledeform.c.
References cos(), credits_svn_gen::e, fabsf, and sin().
Referenced by SimpleDeformModifier_do().
static void simpleDeform_stretch | ( | const float | factor, |
const float | dcut[3], | ||
float * | co | ||
) | [static] |
Definition at line 85 of file MOD_simpledeform.c.
Referenced by SimpleDeformModifier_do().
static void simpleDeform_taper | ( | const float | factor, |
const float | dcut[3], | ||
float * | co | ||
) | [static] |
Definition at line 68 of file MOD_simpledeform.c.
Referenced by SimpleDeformModifier_do().
static void simpleDeform_twist | ( | const float | factor, |
const float * | dcut, | ||
float * | co | ||
) | [static] |
Definition at line 105 of file MOD_simpledeform.c.
Referenced by SimpleDeformModifier_do().
static void SimpleDeformModifier_do | ( | SimpleDeformModifierData * | smd, |
struct Object * | ob, | ||
struct DerivedMesh * | dm, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 154 of file MOD_simpledeform.c.
References SimpleDeformModifierData::axis, axis_limit(), co, copy_m4_m4(), copy_v3_v3(), defvert_array_find_weight_safe(), SimpleDeformModifierData::factor, FLT_MAX, i, interp_v3_v3v3(), invert_m4_m4(), SimpleDeformModifierData::limit, SpaceTransform::local2target, MAX2, MIN2, MOD_SIMPLEDEFORM_LOCK_AXIS_X, MOD_SIMPLEDEFORM_LOCK_AXIS_Y, MOD_SIMPLEDEFORM_MODE_BEND, MOD_SIMPLEDEFORM_MODE_STRETCH, MOD_SIMPLEDEFORM_MODE_TAPER, MOD_SIMPLEDEFORM_MODE_TWIST, MOD_SIMPLEDEFORM_ORIGIN_LOCAL, SimpleDeformModifierData::mode, modifier_get_vgroup(), NULL, Object::obmat, SimpleDeformModifierData::origin, SimpleDeformModifierData::originOpts, simpleDeform_bend(), simpleDeform_stretch(), simpleDeform_taper(), simpleDeform_twist(), space_transform_apply(), space_transform_from_matrixs(), space_transform_invert(), SpaceTransform::target2local, and SimpleDeformModifierData::vgroup_name.
Referenced by deformVerts(), and deformVertsEM().
static void updateDepgraph | ( | ModifierData * | md, |
DagForest * | forest, | ||
struct Scene * | UNUSEDscene, | ||
Object * | UNUSEDob, | ||
DagNode * | obNode | ||
) | [static] |
Definition at line 306 of file MOD_simpledeform.c.
References dag_add_relation(), dag_get_node(), DAG_RL_OB_DATA, and SimpleDeformModifierData::origin.
{ "SimpleDeform", "SimpleDeformModifierData", sizeof(SimpleDeformModifierData), eModifierTypeType_OnlyDeform, eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, copyData, deformVerts, NULL, deformVertsEM, NULL, NULL, NULL, initData, requiredDataMask, NULL, NULL, updateDepgraph, NULL, NULL, foreachObjectLink, NULL, NULL, }
Definition at line 359 of file MOD_simpledeform.c.