Blender V5.0
MOD_screw.cc File Reference
#include <algorithm>
#include <climits>
#include "BLI_utildefines.h"
#include "BLI_bitmap.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLI_span.hh"
#include "BLT_translation.hh"
#include "DNA_defaults.h"
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "BKE_attribute.hh"
#include "BKE_customdata.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_mesh.hh"
#include "UI_interface_layout.hh"
#include "UI_resources.hh"
#include "RNA_access.hh"
#include "RNA_prototypes.hh"
#include "DEG_depsgraph_build.hh"
#include "MEM_guardedalloc.h"
#include "MOD_modifiertypes.hh"
#include "MOD_ui_common.hh"
#include "GEO_mesh_merge_by_distance.hh"
#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)

Functions

static void init_data (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, blender::MutableSpan< blender::float3 > vert_positions_new, const uint totvert, const uint step_tot, const float axis_vec[3], const float axis_offset[3], const float merge_threshold)
static Meshmodify_mesh (ModifierData *md, const ModifierEvalContext *ctx, Mesh *meshData)
static void update_depsgraph (ModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
static void foreach_ID_link (ModifierData *md, Object *ob, IDWalkFunc walk, void *user_data)
static void panel_draw (const bContext *, Panel *panel)
static void normals_panel_draw (const bContext *, Panel *panel)
static void panel_register (ARegionType *region_type)

Variables

ModifierTypeInfo modifierType_Screw

Macro Definition Documentation

◆ SV_INVALID

#define SV_INVALID   ((UINT_MAX) - 1)

Definition at line 84 of file MOD_screw.cc.

Referenced by modify_mesh().

◆ SV_IS_VALID

#define SV_IS_VALID ( v)
Value:
#define SV_INVALID
Definition MOD_screw.cc:84
ATTR_WARN_UNUSED_RESULT const BMVert * v

Definition at line 85 of file MOD_screw.cc.

Referenced by modify_mesh(), screwvert_iter_init(), and screwvert_iter_step().

◆ SV_UNUSED

#define SV_UNUSED   (UINT_MAX)

Definition at line 83 of file MOD_screw.cc.

Referenced by modify_mesh().

Function Documentation

◆ foreach_ID_link()

void foreach_ID_link ( ModifierData * md,
Object * ob,
IDWalkFunc walk,
void * user_data )
static

Definition at line 1052 of file MOD_screw.cc.

References IDWALK_CB_NOP, and ScrewModifierData::ob_axis.

◆ init_data()

void init_data ( ModifierData * md)
static

◆ mesh_remove_doubles_on_axis()

Mesh * mesh_remove_doubles_on_axis ( Mesh * result,
blender::MutableSpan< blender::float3 > vert_positions_new,
const uint totvert,
const uint step_tot,
const float axis_vec[3],
const float axis_offset[3],
const float merge_threshold )
static

◆ modify_mesh()

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

Definition at line 196 of file MOD_screw.cc.

References add_v3_v3(), angle(), ScrewModifierData::angle, angle_v3v3(), Geometry::attributes, ScrewModifierData::axis, axis_angle_normalized_to_mat3(), axis_angle_to_mat3_single(), BKE_mesh_new_nomain_from_template(), CD_ORIGINDEX, CD_PROP_FLOAT2, CD_SET_DEFAULT, closest_to_line_v3(), ScrewVertConnect::co, copy_m3_m4(), copy_m4_m3(), copy_m4_m4(), copy_v2_fl2(), copy_v3_v3(), Mesh::corner_data, cross_v3_v3v3(), CustomData_add_layer(), CustomData_copy_data(), CustomData_free_layers(), CustomData_get_layer_for_write(), CustomData_get_layer_n_for_write(), CustomData_has_layer(), CustomData_number_of_layers(), blender::MutableSpan< T >::data(), blender::Span< T >::data(), dist_signed_squared_to_plane_v3(), dist_signed_to_plane_v3(), ScrewVertConnect::dist_sq, e, ScrewVertConnect::e, ScrewVertIter::e, Mesh::edges_num, fabsf, blender::bke::Face, Mesh::face_data, Mesh::faces_num, blender::bke::SpanAttributeWriter< T >::finish(), ModifierEvalContext::flag, ScrewModifierData::flag, ScrewVertConnect::flag, float, FLT_MAX, i, blender::offset_indices::OffsetIndices< T >::index_range(), invert_m4_m4(), blender::Span< T >::is_empty(), ScrewModifierData::iter, len_v3(), len_v3v3(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), M_PI, madd_v3_v3fl(), max_ff(), MEM_freeN(), MEM_malloc_arrayN(), ScrewModifierData::merge_dist, mesh_remove_doubles_on_axis(), min_ff(), 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, mul_m4_m4m4(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_m3v3(), normalize_v3(), ScrewModifierData::ob_axis, ModifierEvalContext::object, ORIGINDEX_NONE, plane_from_point_normal_v3(), printf, ScrewModifierData::render_steps, result, ScrewModifierData::screw_ofs, screwvert_iter_init(), screwvert_iter_step(), blender::bke::SpanAttributeWriter< T >::span, sqrtf_signed(), step, ScrewModifierData::steps, sub_v3_v3(), sub_v3_v3v3(), SV_INVALID, SV_IS_VALID, SV_UNUSED, UINT_MAX, ScrewVertConnect::v, ScrewVertIter::v, v, ScrewVertIter::v_poin, Mesh::vert_data, Mesh::verts_num, and zero_v3().

◆ normals_panel_draw()

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

◆ panel_draw()

◆ panel_register()

◆ screwvert_iter_init()

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

◆ screwvert_iter_step()

◆ update_depsgraph()

Variable Documentation

◆ modifierType_Screw

ModifierTypeInfo modifierType_Screw

Definition at line 1133 of file MOD_screw.cc.