Blender V2.61 - r43446
|
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BLI_edgehash.h"
#include "DNA_curve_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_displist.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "depsgraph_private.h"
#include "MOD_util.h"
Go to the source code of this file.
Classes | |
struct | IndexMapEntry |
Typedefs | |
typedef struct IndexMapEntry | IndexMapEntry |
Functions | |
static void | initData (ModifierData *md) |
static void | copyData (ModifierData *md, ModifierData *target) |
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 | vertarray_size (MVert *mvert, int numVerts, int axis) |
static int | test_index_face_maxvert (MFace *mface, CustomData *fdata, int mfindex, int nr, int maxvert) |
static int | calc_mapping (IndexMapEntry *indexMap, int oldIndex, int copyNum) |
static DerivedMesh * | arrayModifier_doArray (ArrayModifierData *amd, struct Scene *scene, Object *ob, DerivedMesh *dm, int initFlags) |
static DerivedMesh * | applyModifier (ModifierData *md, Object *ob, DerivedMesh *dm, int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) |
static DerivedMesh * | applyModifierEM (ModifierData *md, Object *ob, struct EditMesh *UNUSED(editData), DerivedMesh *dm) |
Variables | |
ModifierTypeInfo | modifierType_Array |
Definition in file MOD_array.c.
typedef struct IndexMapEntry IndexMapEntry |
static DerivedMesh* applyModifier | ( | ModifierData * | md, |
Object * | ob, | ||
DerivedMesh * | dm, | ||
int | UNUSEDuseRenderParams, | ||
int | UNUSEDisFinalCalc | ||
) | [static] |
Definition at line 776 of file MOD_array.c.
References arrayModifier_doArray(), CDDM_calc_normals(), and ModifierData::scene.
Referenced by applyModifierEM().
static DerivedMesh* applyModifierEM | ( | ModifierData * | md, |
Object * | ob, | ||
struct EditMesh * | UNUSEDeditData, | ||
DerivedMesh * | dm | ||
) | [static] |
Definition at line 792 of file MOD_array.c.
References applyModifier().
static DerivedMesh* arrayModifier_doArray | ( | ArrayModifierData * | amd, |
struct Scene * | scene, | ||
Object * | ob, | ||
DerivedMesh * | dm, | ||
int | initFlags | ||
) | [static] |
Definition at line 222 of file MOD_array.c.
References add_v3_v3(), BLI_edgehash_free(), BLI_edgehash_haskey(), BLI_edgehash_insert(), BLI_edgehash_new(), calc_mapping(), CD_ORIGINDEX, CDDM_from_template(), CDDM_get_edges(), CDDM_get_faces(), CDDM_get_verts(), CDDM_lower_num_edges(), CDDM_lower_num_faces(), CDDM_lower_num_verts(), MVert::co, co, compare_len_v3v3(), copy_m4_m4(), copy_v3_v3(), ArrayModifierData::count, CU_PATH, ArrayModifierData::curve_ob, Object::data, Object::derivedFinal, DM_copy_edge_data(), DM_copy_face_data(), DM_copy_vert_data(), DM_free_face_data(), DM_free_vert_data(), dot_v3v3(), credits_svn_gen::e, ArrayModifierData::end_cap, DerivedMesh::faceData, ArrayModifierData::fit_type, Curve::flag, MEdge::flag, ArrayModifierData::flags, DerivedMesh::getEdge, DerivedMesh::getEdgeArray, DerivedMesh::getEdgeDataArray, DerivedMesh::getFace, DerivedMesh::getFaceArray, DerivedMesh::getFaceDataArray, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, DerivedMesh::getVertDataArray, i, invert_m4_m4(), ArrayModifierData::length, length(), makeDispListCurveTypes(), mat3_to_scale(), ME_EDGEDRAW, ME_EDGERENDER, MEM_callocN(), MEM_freeN(), IndexMapEntry::merge, merge(), ArrayModifierData::merge_dist, IndexMapEntry::merge_final, MOD_ARR_FITCURVE, MOD_ARR_FITLENGTH, MOD_ARR_MERGE, MOD_ARR_MERGEFINAL, MOD_ARR_OFF_CONST, MOD_ARR_OFF_OBJ, MOD_ARR_OFF_RELATIVE, mul_m4_v3(), mul_serie_m4(), mul_v3_m4v3(), mult_m4_m4m4(), IndexMapEntry::new, NULL, object_to_mat3(), Object::obmat, ArrayModifierData::offset, ArrayModifierData::offset_ob, ArrayModifierData::offset_type, ORIGINDEX_NONE, Curve::path, DerivedMesh::release, ArrayModifierData::scale, sqrt(), ArrayModifierData::start_cap, test_index_face(), test_index_face_maxvert(), Path::totdist, unit_m4(), MEdge::v1, MFace::v1, MEdge::v2, MFace::v2, MFace::v3, MFace::v4, and vertarray_size().
Referenced by applyModifier().
static int calc_mapping | ( | IndexMapEntry * | indexMap, |
int | oldIndex, | ||
int | copyNum | ||
) | [static] |
Definition at line 201 of file MOD_array.c.
References merge(), and IndexMapEntry::new.
Referenced by arrayModifier_doArray().
static void copyData | ( | ModifierData * | md, |
ModifierData * | target | ||
) | [static] |
Definition at line 78 of file MOD_array.c.
References copy_v3_v3(), ArrayModifierData::count, ArrayModifierData::curve_ob, ArrayModifierData::end_cap, ArrayModifierData::fit_type, ArrayModifierData::flags, ArrayModifierData::length, ArrayModifierData::merge_dist, ArrayModifierData::offset, ArrayModifierData::offset_ob, ArrayModifierData::offset_type, ArrayModifierData::scale, and ArrayModifierData::start_cap.
static void foreachObjectLink | ( | ModifierData * | md, |
Object * | ob, | ||
void(*)(void *userData, Object *ob, Object **obpoin) | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 97 of file MOD_array.c.
References ArrayModifierData::curve_ob, ArrayModifierData::end_cap, ArrayModifierData::offset_ob, and ArrayModifierData::start_cap.
static void initData | ( | ModifierData * | md | ) | [static] |
Definition at line 59 of file MOD_array.c.
References ArrayModifierData::count, ArrayModifierData::curve_ob, ArrayModifierData::end_cap, ArrayModifierData::fit_type, ArrayModifierData::flags, ArrayModifierData::length, ArrayModifierData::merge_dist, MOD_ARR_FIXEDCOUNT, MOD_ARR_OFF_RELATIVE, NULL, ArrayModifierData::offset, ArrayModifierData::offset_ob, ArrayModifierData::offset_type, ArrayModifierData::scale, and ArrayModifierData::start_cap.
static int test_index_face_maxvert | ( | MFace * | mface, |
CustomData * | fdata, | ||
int | mfindex, | ||
int | nr, | ||
int | maxvert | ||
) | [static] |
Definition at line 162 of file MOD_array.c.
References test_index_face(), MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by arrayModifier_doArray().
static void updateDepgraph | ( | ModifierData * | md, |
DagForest * | forest, | ||
struct Scene * | UNUSEDscene, | ||
Object * | UNUSEDob, | ||
DagNode * | obNode | ||
) | [static] |
Definition at line 110 of file MOD_array.c.
References ArrayModifierData::curve_ob, dag_add_relation(), dag_get_node(), DAG_RL_DATA_DATA, DAG_RL_OB_DATA, ArrayModifierData::end_cap, ArrayModifierData::offset_ob, and ArrayModifierData::start_cap.
static float vertarray_size | ( | MVert * | mvert, |
int | numVerts, | ||
int | axis | ||
) | [static] |
Definition at line 141 of file MOD_array.c.
Referenced by arrayModifier_doArray().
{ "Array", "ArrayModifierData", sizeof(ArrayModifierData), eModifierTypeType_Constructive, eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode | eModifierTypeFlag_AcceptsCVs, copyData, NULL, NULL, NULL, NULL, applyModifier, applyModifierEM, initData, NULL, NULL, NULL, updateDepgraph, NULL, NULL, foreachObjectLink, NULL, NULL, }
Definition at line 800 of file MOD_array.c.