Blender  V3.3
Classes | Macros | Typedefs | Functions | Variables
MOD_screw.c File Reference
#include <limits.h>
#include "BLI_utildefines.h"
#include "BLI_alloca.h"
#include "BLI_bitmap.h"
#include "BLI_math.h"
#include "BLT_translation.h"
#include "DNA_defaults.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "BKE_context.h"
#include "BKE_lib_query.h"
#include "BKE_mesh.h"
#include "BKE_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
#include "MEM_guardedalloc.h"
#include "MOD_modifiertypes.h"
#include "MOD_ui_common.h"
#include "BLI_strict_flags.h"

Go to the source code of this file.

Classes

struct  ScrewVertConnect
 
struct  ScrewVertIter
 

Macros

#define SV_UNUSED   (UINT_MAX)
 
#define SV_INVALID   ((UINT_MAX)-1)
 
#define SV_IS_VALID(v)   ((v) < SV_INVALID)
 

Typedefs

typedef struct ScrewVertConnect ScrewVertConnect
 
typedef struct ScrewVertIter ScrewVertIter
 

Functions

static void initData (ModifierData *md)
 
static void screwvert_iter_init (ScrewVertIter *iter, ScrewVertConnect *array, uint v_init, uint dir)
 
static void screwvert_iter_step (ScrewVertIter *iter)
 
static Meshmesh_remove_doubles_on_axis (Mesh *result, MVert *mvert_new, const uint totvert, const uint step_tot, const float axis_vec[3], const float axis_offset[3], const float merge_threshold)
 
static MeshmodifyMesh (ModifierData *md, const ModifierEvalContext *ctx, Mesh *meshData)
 
static void updateDepsgraph (ModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
 
static void foreachIDLink (ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
 
static void panel_draw (const bContext *UNUSED(C), Panel *panel)
 
static void normals_panel_draw (const bContext *UNUSED(C), Panel *panel)
 
static void panelRegister (ARegionType *region_type)
 

Variables

ModifierTypeInfo modifierType_Screw
 

Macro Definition Documentation

◆ SV_INVALID

#define SV_INVALID   ((UINT_MAX)-1)

Definition at line 72 of file MOD_screw.c.

◆ SV_IS_VALID

#define SV_IS_VALID (   v)    ((v) < SV_INVALID)

Definition at line 73 of file MOD_screw.c.

◆ SV_UNUSED

#define SV_UNUSED   (UINT_MAX)

Definition at line 71 of file MOD_screw.c.

Typedef Documentation

◆ ScrewVertConnect

◆ ScrewVertIter

typedef struct ScrewVertIter ScrewVertIter

Function Documentation

◆ foreachIDLink()

static void foreachIDLink ( ModifierData md,
Object ob,
IDWalkFunc  walk,
void userData 
)
static

Definition at line 1058 of file MOD_screw.c.

References IDWALK_CB_NOP, and ScrewModifierData::ob_axis.

◆ initData()

static void initData ( ModifierData md)
static

◆ mesh_remove_doubles_on_axis()

static Mesh* mesh_remove_doubles_on_axis ( Mesh result,
MVert mvert_new,
const uint  totvert,
const uint  step_tot,
const float  axis_vec[3],
const float  axis_offset[3],
const float  merge_threshold 
)
static

◆ modifyMesh()

static Mesh* modifyMesh ( ModifierData md,
const ModifierEvalContext ctx,
Mesh meshData 
)
static

Definition at line 177 of file MOD_screw.c.

References add_v3_v3(), angle(), ScrewModifierData::angle, angle_v3v3(), ScrewModifierData::axis, axis_angle_normalized_to_mat3(), axis_angle_to_mat3_single(), BKE_mesh_new_nomain_from_template(), BLI_array_alloca, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, CD_CALLOC, CD_MLOOPUV, CD_ORIGINDEX, closest_to_line_v3(), MVert::co, ScrewVertConnect::co, copy_m3_m4(), copy_m4_m3(), copy_m4_m4(), copy_v2_fl2(), copy_v3_v3(), MEdge::crease, cross_v3_v3v3(), CustomData_add_layer(), CustomData_copy_data(), CustomData_get_layer(), CustomData_get_layer_n(), CustomData_has_layer(), CustomData_number_of_layers(), ScrewVertConnect::dist, dist_signed_squared_to_plane_v3(), dist_signed_to_plane_v3(), e, MLoop::e, ScrewVertConnect::e, ScrewVertIter::e, fabsf, ModifierEvalContext::flag, MEdge::flag, MPoly::flag, ScrewModifierData::flag, ScrewVertConnect::flag, float(), i1, invert_m4_m4(), ScrewModifierData::iter, Mesh::ldata, len_v3(), len_v3v3(), MPoly::loopstart, M_PI, madd_v3_v3fl(), MPoly::mat_nr, max_ff(), ME_EDGEDRAW, ME_EDGERENDER, ME_LOOSEEDGE, ME_SMOOTH, Mesh::medge, MEM_freeN, MEM_malloc_arrayN, ScrewModifierData::merge_dist, mesh, mesh_remove_doubles_on_axis(), min_ff(), Mesh::mloop, MOD_APPLY_RENDER, MOD_SCREW_MERGE, MOD_SCREW_NORMAL_CALC, MOD_SCREW_NORMAL_FLIP, MOD_SCREW_OBJECT_OFFSET, MOD_SCREW_SMOOTH_SHADING, MOD_SCREW_UV_STRETCH_U, MOD_SCREW_UV_STRETCH_V, Mesh::mpoly, mul_m4_m4m4(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_m3v3(), Mesh::mvert, normalize_v3(), NULL, ScrewModifierData::ob_axis, ModifierEvalContext::object, Object::obmat, ORIGINDEX_NONE, Mesh::pdata, plane_from_point_normal_v3(), ScrewModifierData::render_steps, result, ScrewModifierData::screw_ofs, screwvert_iter_init(), screwvert_iter_step(), sqrtf_signed(), ScrewModifierData::steps, sub_v3_v3(), sub_v3_v3v3(), SV_INVALID, SV_IS_VALID, SV_UNUSED, SWAP, Mesh::totedge, MPoly::totloop, Mesh::totpoly, Mesh::totvert, UINT_MAX, MLoopUV::uv, v, MLoop::v, ScrewVertConnect::v, ScrewVertIter::v, v1, MEdge::v1, v2, MEdge::v2, ScrewVertIter::v_poin, Mesh::vdata, and zero_v3().

◆ normals_panel_draw()

static void normals_panel_draw ( const bContext UNUSEDC,
Panel panel 
)
static

◆ panel_draw()

static void panel_draw ( const bContext UNUSEDC,
Panel panel 
)
static

◆ panelRegister()

static void panelRegister ( ARegionType region_type)
static

◆ screwvert_iter_init()

static void screwvert_iter_init ( ScrewVertIter iter,
ScrewVertConnect array,
uint  v_init,
uint  dir 
)
static

◆ screwvert_iter_step()

static void screwvert_iter_step ( ScrewVertIter iter)
static

◆ updateDepsgraph()

static void updateDepsgraph ( ModifierData md,
const ModifierUpdateDepsgraphContext ctx 
)
static

Variable Documentation

◆ modifierType_Screw

ModifierTypeInfo modifierType_Screw

Definition at line 1140 of file MOD_screw.c.