Blender V2.61 - r43446
|
#include "DNA_meshdata_types.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "MEM_guardedalloc.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_mesh.h"
#include "BKE_particle.h"
#include "BKE_deform.h"
#include "MOD_modifiertypes.h"
#include "MOD_util.h"
Go to the source code of this file.
Classes | |
struct | EdgeFaceRef |
Defines | |
#define | NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(EDV1, EDV2) |
#define | INVALID_UNUSED -1 |
#define | INVALID_PAIR -2 |
#define | ADD_EDGE_USER(_v1, _v2, edge_ord) |
#define | SOLIDIFY_SIDE_NORMALS |
Typedefs | |
typedef struct EdgeFaceRef | EdgeFaceRef |
Functions | |
static void | dm_calc_normal (DerivedMesh *dm, float(*temp_nors)[3]) |
static void | initData (ModifierData *md) |
static void | copyData (ModifierData *md, ModifierData *target) |
static CustomDataMask | requiredDataMask (Object *UNUSED(ob), ModifierData *md) |
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 *derivedData) |
Variables | |
ModifierTypeInfo | modifierType_Solidify |
Definition in file MOD_solidify.c.
#define ADD_EDGE_USER | ( | _v1, | |
_v2, | |||
edge_ord | |||
) |
{ \ const unsigned int ml_v1 = _v1; \ const unsigned int ml_v2 = _v2; \ eidx= GET_INT_FROM_POINTER(BLI_edgehash_lookup(edgehash, ml_v1, ml_v2)); \ if(edge_users[eidx] == INVALID_UNUSED) { \ ed= orig_medge + eidx; \ edge_users[eidx] = (ml_v1 < ml_v2) == (ed->v1 < ed->v2) ? i : (i + numFaces); \ edge_order[eidx] = edge_ord; \ } \ else { \ edge_users[eidx] = INVALID_PAIR; \ } \ }
Referenced by applyModifier().
#define INVALID_PAIR -2 |
#define INVALID_UNUSED -1 |
Referenced by applyModifier().
#define NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE | ( | EDV1, | |
EDV2 | |||
) |
; \ { \ const unsigned int ml_v1 = EDV1; \ const unsigned int ml_v2 = EDV2; \ edge_ref = (EdgeFaceRef *)BLI_edgehash_lookup(edge_hash, ml_v1, ml_v2); \ if (!edge_ref) { \ edge_ref = &edge_ref_array[edge_ref_count]; edge_ref_count++; \ edge_ref->f1 = i; \ edge_ref->f2 =- 1; \ BLI_edgehash_insert(edge_hash, ml_v1, ml_v2, edge_ref); \ } \ else { \ edge_ref->f2 = i; \ } \ }
#define SOLIDIFY_SIDE_NORMALS |
typedef struct EdgeFaceRef EdgeFaceRef |
static DerivedMesh* applyModifier | ( | ModifierData * | md, |
Object * | ob, | ||
DerivedMesh * | dm, | ||
int | UNUSEDuseRenderParams, | ||
int | UNUSEDisFinalCalc | ||
) | [static] |
Definition at line 206 of file MOD_solidify.c.
References ADD_EDGE_USER, add_v3_v3(), angle_normalized_v3v3(), angle_quad_v3(), angle_tri_v3(), BLI_edgehash_free(), BLI_edgehash_insert(), BLI_edgehash_new(), BLI_edgehashIterator_free(), BLI_edgehashIterator_getKey(), BLI_edgehashIterator_getValue(), BLI_edgehashIterator_isDone(), BLI_edgehashIterator_new(), BLI_edgehashIterator_step(), CD_CALLOC, CD_NORMAL, CD_ORIGINDEX, CDDM_calc_normals(), CDDM_from_template(), CLAMP(), MVert::co, MEdge::crease, SolidifyModifierData::crease_inner, SolidifyModifierData::crease_outer, SolidifyModifierData::crease_rim, CustomData_add_layer(), CustomData_get_layer(), SolidifyModifierData::defgrp_name, defvert_find_weight(), dm_calc_normal(), DM_copy_edge_data(), DM_copy_face_data(), DM_copy_vert_data(), DM_swap_face_data(), DerivedMesh::faceData, MEdge::flag, SolidifyModifierData::flag, MVert::flag, GET_INT_FROM_POINTER, DerivedMesh::getEdgeArray, DerivedMesh::getEdgeDataArray, DerivedMesh::getFaceArray, DerivedMesh::getFaceDataArray, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, i, INVALID_UNUSED, madd_v3_v3fl(), MFace::mat_nr, SolidifyModifierData::mat_ofs, SolidifyModifierData::mat_ofs_rim, ME_EDGEDRAW, ME_VERT_TMP_TAG, MEM_callocN(), MEM_freeN(), MEM_mallocN(), MOD_SOLIDIFY_EVEN, MOD_SOLIDIFY_NORMAL_CALC, MOD_SOLIDIFY_RIM, MOD_SOLIDIFY_VGROUP_INV, modifier_get_vgroup(), MVert::no, normal_float_to_short_v3(), normal_quad_v3(), normal_short_to_float_v3(), normal_tri_v3(), normalize_v3(), normalize_v3_v3(), NULL, DerivedMesh::numFaceData, SolidifyModifierData::offset, SolidifyModifierData::offset_fac, SolidifyModifierData::offset_fac_vg, ORIGINDEX_NONE, SET_INT_IN_POINTER, shell_angle_to_dist(), SWAP, test_index_face(), Object::totcol, MEdge::v1, MFace::v1, MEdge::v2, MFace::v2, MFace::v3, MFace::v4, and VECADDFAC.
Referenced by applyModifierEM().
static DerivedMesh* applyModifierEM | ( | ModifierData * | md, |
Object * | ob, | ||
struct EditMesh * | UNUSEDeditData, | ||
DerivedMesh * | derivedData | ||
) | [static] |
Definition at line 690 of file MOD_solidify.c.
References applyModifier().
static void copyData | ( | ModifierData * | md, |
ModifierData * | target | ||
) | [static] |
Definition at line 181 of file MOD_solidify.c.
References BLI_strncpy(), SolidifyModifierData::crease_inner, SolidifyModifierData::crease_outer, SolidifyModifierData::crease_rim, SolidifyModifierData::defgrp_name, SolidifyModifierData::flag, SolidifyModifierData::offset, and SolidifyModifierData::offset_fac.
static void dm_calc_normal | ( | DerivedMesh * | dm, |
float(*) | temp_nors[3] | ||
) | [static] |
Definition at line 59 of file MOD_solidify.c.
References add_v3_v3(), add_v3_v3v3(), angle_normalized_v3v3(), BLI_edgehash_free(), BLI_edgehash_new(), BLI_edgehashIterator_free(), BLI_edgehashIterator_getKey(), BLI_edgehashIterator_getValue(), BLI_edgehashIterator_isDone(), BLI_edgehashIterator_new(), BLI_edgehashIterator_step(), CD_CALLOC, CD_NORMAL, MVert::co, CustomData_add_layer(), CustomData_get_layer(), EdgeFaceRef::f1, EdgeFaceRef::f2, DerivedMesh::faceData, DerivedMesh::getFaceArray, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, i, M_PI, MEM_callocN(), MEM_freeN(), mul_v3_fl(), mul_v3_v3fl(), MVert::no, NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE, normal_quad_v3(), normal_short_to_float_v3(), normal_tri_v3(), normalize_v3(), NULL, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by applyModifier().
static void initData | ( | ModifierData * | md | ) | [static] |
Definition at line 173 of file MOD_solidify.c.
References SolidifyModifierData::flag, MOD_SOLIDIFY_RIM, SolidifyModifierData::offset, and SolidifyModifierData::offset_fac.
static CustomDataMask requiredDataMask | ( | Object * | UNUSEDob, |
ModifierData * | md | ||
) | [static] |
Definition at line 194 of file MOD_solidify.c.
References CD_MASK_MDEFORMVERT, and SolidifyModifierData::defgrp_name.
{ "Solidify", "SolidifyModifierData", sizeof(SolidifyModifierData), eModifierTypeType_Constructive, eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, copyData, NULL, NULL, NULL, NULL, applyModifier, applyModifierEM, initData, requiredDataMask, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }
Definition at line 699 of file MOD_solidify.c.