Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

MOD_solidify.c File Reference

#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 DerivedMeshapplyModifier (ModifierData *md, Object *ob, DerivedMesh *dm, int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
static DerivedMeshapplyModifierEM (ModifierData *md, Object *ob, struct EditMesh *UNUSED(editData), DerivedMesh *derivedData)

Variables

ModifierTypeInfo modifierType_Solidify

Detailed Description

Definition in file MOD_solidify.c.


Define Documentation

#define ADD_EDGE_USER (   _v1,
  _v2,
  edge_ord 
)
Value:
{ \
            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 
)
Value:
; \
            { \
                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 Documentation

typedef struct EdgeFaceRef EdgeFaceRef

Function Documentation

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]
static void dm_calc_normal ( DerivedMesh dm,
float(*)  temp_nors[3] 
) [static]
static void initData ( ModifierData md) [static]
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.


Variable Documentation