|
Blender V4.3
|
Classes | |
| struct | ClothBrushCollision |
| struct | FalloffPlane |
| struct | FilterLocalData |
| struct | LengthConstraint |
| struct | LocalData |
| struct | SimulationData |
Enumerations | |
| enum class | ClothFilterType { Gravity , Inflate , Expand , Pinch , Scale } |
| enum | eClothFilterForceAxis { CLOTH_FILTER_FORCE_X = 1 << 0 , CLOTH_FILTER_FORCE_Y = 1 << 1 , CLOTH_FILTER_FORCE_Z = 1 << 2 } |
| enum | NodeSimState { SCULPT_CLOTH_NODE_UNINITIALIZED , SCULPT_CLOTH_NODE_INACTIVE , SCULPT_CLOTH_NODE_ACTIVE } |
| enum | ConstraintType { SCULPT_CLOTH_CONSTRAINT_STRUCTURAL = 0 , SCULPT_CLOTH_CONSTRAINT_DEFORMATION = 1 , SCULPT_CLOTH_CONSTRAINT_SOFTBODY = 2 , SCULPT_CLOTH_CONSTRAINT_PIN = 3 } |
Functions | |
| void | do_cloth_brush (const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const IndexMask &node_mask) |
| static MutableSpan< int > | calc_vert_indices_grids (const CCGKey &key, const Span< int > grids, Vector< int > &indices) |
| static MutableSpan< int > | calc_vert_indices_bmesh (const Set< BMVert *, 0 > &verts, Vector< int > &indices) |
| static MutableSpan< int > | calc_visible_vert_indices_grids (const CCGKey &key, const BitGroupVector<> &grid_hidden, const Span< int > grids, Vector< int > &indices) |
| static MutableSpan< int > | calc_visible_vert_indices_bmesh (const Set< BMVert *, 0 > &verts, Vector< int > &indices) |
| static void | calc_vert_neighbor_indices_grids (const SubdivCCG &subdiv_ccg, const Span< int > verts, const MutableSpan< Vector< int > > neighbor_indices) |
| static void | calc_vert_neighbor_indices_bmesh (const BMesh &bm, const Span< int > verts, const MutableSpan< Vector< int > > neighbor_indices) |
| static float3 | cloth_brush_simulation_location_get (const SculptSession &ss, const Brush *brush) |
| IndexMask | brush_affected_nodes_gather (const Object &object, const Brush &brush, IndexMaskMemory &memory) |
| bool | is_cloth_deform_brush (const Brush &brush) |
| static float | cloth_brush_simulation_falloff_get (const Brush &brush, const float radius, const float3 &location, const float3 &co) |
| static BLI_NOINLINE void | calc_brush_simulation_falloff (const Brush &brush, const float radius, const float3 &location, const Span< float3 > positions, const MutableSpan< float > factors) |
| static void | cloth_brush_add_length_constraint (SimulationData &cloth_sim, const int node_index, const int v1, const int v2, const Span< float3 > init_positions) |
| static void | cloth_brush_add_softbody_constraint (SimulationData &cloth_sim, const int node_index, const int v, const float strength) |
| static void | cloth_brush_add_pin_constraint (SimulationData &cloth_sim, const int node_index, const int v, const float strength) |
| static void | cloth_brush_add_deformation_constraint (SimulationData &cloth_sim, const int node_index, const int v, const float strength) |
| static void | add_constraints_for_verts (const Object &object, const Brush *brush, const float3 &cloth_sim_initial_location, const float cloth_sim_radius, const Span< float3 > init_positions, const int node_index, const Span< int > verts, const Span< Vector< int > > vert_neighbors, SimulationData &cloth_sim, Set< OrderedEdge > &created_length_constraints) |
| void | ensure_nodes_constraints (const Sculpt &sd, Object &object, const IndexMask &node_mask, SimulationData &cloth_sim, const float3 &initial_location, const float radius) |
| static BLI_NOINLINE void | apply_forces (SimulationData &cloth_sim, const Span< float3 > forces, const Span< int > verts) |
| static BLI_NOINLINE void | expand_length_constraints (SimulationData &cloth_sim, const Span< int > verts, const Span< float > factors) |
| static BLI_NOINLINE void | calc_distances_to_plane (const Span< float3 > positions, const float4 &plane, const MutableSpan< float > distances) |
| static BLI_NOINLINE void | clamp_factors (const MutableSpan< float > factors, const float min, const float max) |
| static BLI_NOINLINE void | apply_grab_brush (SimulationData &cloth_sim, const Span< int > verts, const MutableSpan< float > factors, const bool use_falloff_plane, const float3 &grab_delta_symmetry) |
| static BLI_NOINLINE void | apply_snake_hook_brush (SimulationData &cloth_sim, const Span< int > verts, const MutableSpan< float > factors, const float3 &grab_delta_symmetry) |
| static BLI_NOINLINE void | calc_pinch_forces (const Span< float3 > positions, const float3 &location, const MutableSpan< float3 > forces) |
| static BLI_NOINLINE void | calc_plane_pinch_forces (const Span< float3 > positions, const float4 &plane, const float3 &plane_normal, const MutableSpan< float3 > forces) |
| static BLI_NOINLINE void | calc_perpendicular_pinch_forces (const Span< float3 > positions, const float4x4 &imat, const float3 &location, const MutableSpan< float3 > forces) |
| static void | calc_forces_mesh (const Depsgraph &depsgraph, Object &ob, const Brush &brush, const float3 &offset, const float4x4 &imat, const float3 &sim_location, const float3 &gravity, const std::optional< FalloffPlane > &falloff_plane, const MeshAttributeData &attribute_data, const Span< float3 > positions_eval, const Span< float3 > vert_normals, const bke::pbvh::MeshNode &node, LocalData &tls) |
| static void | calc_forces_grids (const Depsgraph &depsgraph, Object &ob, const Brush &brush, const float3 &offset, const float4x4 &imat, const float3 &sim_location, const float3 &gravity, const std::optional< FalloffPlane > &falloff_plane, const bke::pbvh::GridsNode &node, LocalData &tls) |
| static void | calc_forces_bmesh (const Depsgraph &depsgraph, Object &ob, const Brush &brush, const float3 &offset, const float4x4 &imat, const float3 &sim_location, const float3 &gravity, const std::optional< FalloffPlane > &falloff_plane, bke::pbvh::BMeshNode &node, LocalData &tls) |
| static Vector< ColliderCache > | cloth_brush_collider_cache_create (Object &object, const Depsgraph &depsgraph) |
| static void | cloth_brush_collision_cb (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
| static void | cloth_brush_solve_collision (const Object &object, SimulationData &cloth_sim, const int i) |
| static BLI_NOINLINE void | solve_verts_simulation (const Object &object, const Brush *brush, const float3 &sim_location, const Span< int > verts, const MutableSpan< float > factors, LocalData &tls, SimulationData &cloth_sim) |
| static void | calc_constraint_factors (const Depsgraph &depsgraph, const Object &object, const Brush *brush, const float3 &sim_location, const Span< float3 > init_positions, const MutableSpan< float > cloth_factors) |
| static void | cloth_brush_satisfy_constraints (const Depsgraph &depsgraph, const Object &object, const Brush *brush, SimulationData &cloth_sim) |
| void | do_simulation_step (const Depsgraph &depsgraph, const Sculpt &sd, Object &object, SimulationData &cloth_sim, const IndexMask &node_mask) |
| static void | cloth_brush_apply_brush_foces (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const IndexMask &node_mask) |
| static void | cloth_sim_initialize_default_node_state (Object &object, SimulationData &cloth_sim) |
| static void | copy_positions_to_array (const Depsgraph &depsgraph, const Object &object, MutableSpan< float3 > positions) |
| static void | copy_normals_to_array (const Depsgraph &depsgraph, const Object &object, MutableSpan< float3 > normals) |
| std::unique_ptr< SimulationData > | brush_simulation_create (const Depsgraph &depsgraph, Object &ob, const float cloth_mass, const float cloth_damping, const float cloth_softbody_strength, const bool use_collisions, const bool needs_deform_coords) |
| void | brush_store_simulation_state (const Depsgraph &depsgraph, const Object &object, SimulationData &cloth_sim) |
| void | sim_activate_nodes (Object &object, SimulationData &cloth_sim, const IndexMask &node_mask) |
| static void | sculpt_cloth_ensure_constraints_in_simulation_area (const Sculpt &sd, Object &ob, const IndexMask &node_mask) |
| void | simulation_limits_draw (const uint gpuattr, const Brush &brush, const float location[3], const float normal[3], const float rds, const float line_width, const float outline_col[3], const float alpha) |
| void | plane_falloff_preview_draw (const uint gpuattr, SculptSession &ss, const float outline_col[3], float outline_alpha) |
| static bool | cloth_filter_is_deformation_filter (ClothFilterType filter_type) |
| static BLI_NOINLINE void | calc_gravity_forces (const Span< float > factors, const filter::Cache &filter_cache, const MutableSpan< float3 > forces) |
| static BLI_NOINLINE void | apply_scale_filter (filter::Cache &filter_cache, const Span< int > verts, const Span< float > factors, FilterLocalData &tls) |
| static void | apply_filter_forces_mesh (const Depsgraph &depsgraph, const ClothFilterType filter_type, const float filter_strength, const float3 &gravity, const Span< float3 > positions_eval, const Span< float3 > vert_normals, const GroupedSpan< int > vert_to_face_map, const MeshAttributeData &attribute_data, const bke::pbvh::MeshNode &node, Object &object, FilterLocalData &tls) |
| static void | apply_filter_forces_grids (const Depsgraph &depsgraph, const Span< int > face_sets, const ClothFilterType filter_type, const float filter_strength, const float3 &gravity, const bke::pbvh::GridsNode &node, Object &object, FilterLocalData &tls) |
| static void | apply_filter_forces_bmesh (const Depsgraph &depsgraph, const ClothFilterType filter_type, const float filter_strength, const float3 &gravity, bke::pbvh::BMeshNode &node, Object &object, FilterLocalData &tls) |
| static int | sculpt_cloth_filter_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static int | sculpt_cloth_filter_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | SCULPT_OT_cloth_filter (wmOperatorType *ot) |
Variables | |
| static EnumPropertyItem | prop_cloth_filter_type [] |
| static EnumPropertyItem | prop_cloth_filter_orientation_items [] |
| static EnumPropertyItem | prop_cloth_filter_force_axis_items [] |
|
strong |
| Enumerator | |
|---|---|
| Gravity | |
| Inflate | |
| Expand | |
| Pinch | |
| Scale | |
Definition at line 1932 of file sculpt_cloth.cc.
| Enumerator | |
|---|---|
| SCULPT_CLOTH_CONSTRAINT_STRUCTURAL | |
| SCULPT_CLOTH_CONSTRAINT_DEFORMATION | |
| SCULPT_CLOTH_CONSTRAINT_SOFTBODY | |
| SCULPT_CLOTH_CONSTRAINT_PIN | |
Definition at line 40 of file sculpt_cloth.hh.
| Enumerator | |
|---|---|
| CLOTH_FILTER_FORCE_X | |
| CLOTH_FILTER_FORCE_Y | |
| CLOTH_FILTER_FORCE_Z | |
Definition at line 1976 of file sculpt_cloth.cc.
| Enumerator | |
|---|---|
| SCULPT_CLOTH_NODE_UNINITIALIZED | |
| SCULPT_CLOTH_NODE_INACTIVE | |
| SCULPT_CLOTH_NODE_ACTIVE | |
Definition at line 29 of file sculpt_cloth.hh.
|
static |
Definition at line 365 of file sculpt_cloth.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), b, BKE_brush_curve_strength(), BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_CLOTH_FORCE_FALLOFF_PLANE, BRUSH_CLOTH_PIN_SIMULATION_BOUNDARY, BRUSH_CLOTH_SIMULATION_AREA_DYNAMIC, BRUSH_CLOTH_SIMULATION_AREA_LOCAL, SculptSession::cache, cloth_brush_add_deformation_constraint(), cloth_brush_add_length_constraint(), cloth_brush_add_pin_constraint(), cloth_brush_add_softbody_constraint(), cloth_brush_simulation_falloff_get(), Brush::cloth_deform_type, CLOTH_DEFORMATION_GRAB_STRENGTH, CLOTH_DEFORMATION_SNAKEHOOK_STRENGTH, CLOTH_DEFORMATION_TARGET_STRENGTH, Brush::cloth_force_falloff_type, Brush::cloth_simulation_area_type, blender::ed::sculpt_paint::cloth::SimulationData::deformation_pos, blender::math::distance_squared(), fade(), Brush::flag2, FLT_MAX, blender::ed::sculpt_paint::StrokeCache::initial_radius, is_cloth_deform_brush(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), len_squared(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::StrokeCache::radius, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLOTH, blender::ed::sculpt_paint::cloth::SimulationData::softbody_strength, and verts.
Referenced by ensure_nodes_constraints().
|
static |
Definition at line 2179 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::auto_mask::active_cache_get(), blender::ed::sculpt_paint::filter::Cache::active_face_set, apply_forces(), apply_scale_filter(), BKE_pbvh_bmesh_node_unique_verts(), bm, SculptSession::bm, calc_gravity_forces(), calc_pinch_forces(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), calc_vert_indices_bmesh(), CD_PROP_INT32, blender::ed::sculpt_paint::filter::Cache::cloth_sim, blender::ed::sculpt_paint::filter::Cache::cloth_sim_pinch_point, CustomData_get_offset_named(), depsgraph, Expand, expand_length_constraints(), blender::ed::sculpt_paint::cloth::FilterLocalData::factors, blender::MutableSpan< T >::fill(), SculptSession::filter_cache, blender::ed::sculpt_paint::cloth::FilterLocalData::forces, blender::ed::sculpt_paint::gather_bmesh_normals(), blender::ed::sculpt_paint::gather_bmesh_positions(), Gravity, Inflate, blender::math::is_zero(), BMesh::pdata, Pinch, blender::ed::sculpt_paint::cloth::FilterLocalData::positions, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), Scale, blender::ed::sculpt_paint::scale_factors(), blender::ed::sculpt_paint::scale_translations(), SCULPT_FACE_SET_NONE, blender::ed::sculpt_paint::face_set::vert_has_face_set(), blender::ed::sculpt_paint::cloth::FilterLocalData::vert_indices, and verts.
Referenced by sculpt_cloth_filter_modal().
|
static |
Definition at line 2107 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::auto_mask::active_cache_get(), blender::ed::sculpt_paint::filter::Cache::active_face_set, apply_forces(), apply_scale_filter(), BKE_subdiv_ccg_key_top_level(), calc_gravity_forces(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), calc_pinch_forces(), calc_vert_indices_grids(), blender::ed::sculpt_paint::filter::Cache::cloth_sim, blender::ed::sculpt_paint::filter::Cache::cloth_sim_pinch_point, depsgraph, Expand, expand_length_constraints(), blender::ed::sculpt_paint::cloth::FilterLocalData::factors, blender::MutableSpan< T >::fill(), SculptSession::filter_cache, blender::ed::sculpt_paint::cloth::FilterLocalData::forces, blender::ed::sculpt_paint::gather_grids_normals(), blender::ed::sculpt_paint::gather_grids_positions(), Gravity, CCGKey::grid_area, blender::Span< T >::index_range(), Inflate, blender::math::is_zero(), Pinch, blender::ed::sculpt_paint::cloth::FilterLocalData::positions, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), Scale, blender::ed::sculpt_paint::scale_factors(), blender::ed::sculpt_paint::scale_translations(), SCULPT_FACE_SET_NONE, blender::Span< T >::size(), blender::MutableSpan< T >::slice(), SculptSession::subdiv_ccg, blender::ed::sculpt_paint::face_set::vert_has_face_set(), blender::ed::sculpt_paint::cloth::FilterLocalData::vert_indices, and verts.
Referenced by sculpt_cloth_filter_modal().
|
static |
Definition at line 2036 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::auto_mask::active_cache_get(), blender::ed::sculpt_paint::filter::Cache::active_face_set, apply_forces(), apply_scale_filter(), calc_gravity_forces(), calc_pinch_forces(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), blender::ed::sculpt_paint::filter::Cache::cloth_sim, blender::ed::sculpt_paint::filter::Cache::cloth_sim_pinch_point, depsgraph, Expand, expand_length_constraints(), blender::ed::sculpt_paint::MeshAttributeData::face_sets, blender::ed::sculpt_paint::cloth::FilterLocalData::factors, blender::MutableSpan< T >::fill(), SculptSession::filter_cache, blender::ed::sculpt_paint::cloth::FilterLocalData::forces, blender::ed::sculpt_paint::gather_data_mesh(), Gravity, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, Inflate, blender::math::is_zero(), blender::ed::sculpt_paint::MeshAttributeData::mask, Pinch, blender::ed::sculpt_paint::cloth::FilterLocalData::positions, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), Scale, blender::ed::sculpt_paint::scale_factors(), blender::ed::sculpt_paint::scale_translations(), SCULPT_FACE_SET_NONE, blender::ed::sculpt_paint::face_set::vert_has_face_set(), and verts.
Referenced by sculpt_cloth_filter_modal().
|
static |
Definition at line 606 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::cloth::SimulationData::acceleration, blender::ed::sculpt_paint::cloth::SimulationData::mass, blender::math::rcp(), and verts.
Referenced by apply_filter_forces_bmesh(), apply_filter_forces_grids(), apply_filter_forces_mesh(), calc_forces_bmesh(), calc_forces_grids(), and calc_forces_mesh().
|
static |
Definition at line 644 of file sculpt_cloth.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::MutableSpan< T >::as_span(), clamp_factors(), blender::ed::sculpt_paint::cloth::SimulationData::deformation_pos, blender::ed::sculpt_paint::cloth::SimulationData::deformation_strength, blender::MutableSpan< T >::fill_indices(), blender::ed::sculpt_paint::cloth::SimulationData::init_pos, blender::ed::sculpt_paint::scatter_data_mesh(), and verts.
Referenced by calc_forces_bmesh(), calc_forces_grids(), and calc_forces_mesh().
|
static |
Definition at line 2021 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::filter::Cache::cloth_sim, blender::ed::sculpt_paint::cloth::FilterLocalData::forces, blender::ed::sculpt_paint::gather_data_mesh(), blender::ed::sculpt_paint::scale_translations(), verts, and blender::ed::sculpt_paint::filter::zero_disabled_axis_components().
Referenced by apply_filter_forces_bmesh(), apply_filter_forces_grids(), and apply_filter_forces_mesh().
|
static |
Definition at line 663 of file sculpt_cloth.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::MutableSpan< T >::as_span(), blender::ed::sculpt_paint::cloth::SimulationData::deformation_pos, blender::ed::sculpt_paint::cloth::SimulationData::deformation_strength, blender::ed::sculpt_paint::cloth::SimulationData::pos, blender::ed::sculpt_paint::scatter_data_mesh(), and verts.
Referenced by calc_forces_bmesh(), calc_forces_grids(), and calc_forces_mesh().
| IndexMask blender::ed::sculpt_paint::cloth::brush_affected_nodes_gather | ( | const Object & | object, |
| const Brush & | brush, | ||
| IndexMaskMemory & | memory ) |
Definition at line 176 of file sculpt_cloth.cc.
References blender::bke::pbvh::all_leaf_nodes(), BLI_assert, BLI_assert_unreachable, BRUSH_CLOTH_SIMULATION_AREA_DYNAMIC, BRUSH_CLOTH_SIMULATION_AREA_GLOBAL, BRUSH_CLOTH_SIMULATION_AREA_LOCAL, SculptSession::cache, Brush::cloth_sim_limit, Brush::cloth_simulation_area_type, blender::ed::sculpt_paint::StrokeCache::initial_location_symm, blender::ed::sculpt_paint::StrokeCache::initial_radius, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::node_in_sphere(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::StrokeCache::radius, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLOTH, blender::bke::pbvh::search_nodes(), and blender::math::square().
Referenced by blender::ed::sculpt_paint::do_brush_action().
| std::unique_ptr< SimulationData > blender::ed::sculpt_paint::cloth::brush_simulation_create | ( | const Depsgraph & | depsgraph, |
| Object & | ob, | ||
| const float | cloth_mass, | ||
| const float | cloth_damping, | ||
| const float | cloth_softbody_strength, | ||
| const bool | use_collisions, | ||
| const bool | needs_deform_coords ) |
Definition at line 1706 of file sculpt_cloth.cc.
References cloth_brush_collider_cache_create(), CLOTH_LENGTH_CONSTRAINTS_BLOCK, cloth_sim_initialize_default_node_state(), copy_normals_to_array(), copy_positions_to_array(), depsgraph, and SCULPT_vertex_count_get().
Referenced by blender::ed::sculpt_paint::do_brush_action(), do_cloth_brush(), and sculpt_cloth_filter_invoke().
| void blender::ed::sculpt_paint::cloth::brush_store_simulation_state | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| SimulationData & | cloth_sim ) |
Definition at line 1754 of file sculpt_cloth.cc.
References copy_positions_to_array(), depsgraph, and blender::ed::sculpt_paint::cloth::SimulationData::pos.
Referenced by blender::ed::sculpt_paint::do_brush_action(), do_cloth_brush(), and sculpt_cloth_filter_modal().
|
static |
Definition at line 249 of file sculpt_cloth.cc.
References BLI_assert, cloth_brush_simulation_falloff_get(), and blender::MutableSpan< T >::size().
Referenced by calc_constraint_factors(), calc_forces_bmesh(), calc_forces_grids(), calc_forces_mesh(), and solve_verts_simulation().
|
static |
Definition at line 1222 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::auto_mask::active_cache_get(), blender::bke::pbvh::all_leaf_nodes(), blender::MutableSpan< T >::as_span(), BKE_pbvh_bmesh_node_unique_verts(), BKE_subdiv_ccg_key_top_level(), bm, SculptSession::bm, blender::bke::pbvh::BMesh, SculptSession::cache, calc_brush_simulation_falloff(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), depsgraph, blender::ed::sculpt_paint::cloth::LocalData::factors, blender::index_mask::IndexMask::foreach_index(), blender::ed::sculpt_paint::gather_data_bmesh(), blender::ed::sculpt_paint::gather_data_grids(), blender::ed::sculpt_paint::gather_data_mesh(), CCGKey::grid_area, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::threading::EnumerableThreadSpecific< T >::local(), blender::ed::sculpt_paint::MeshAttributeData::mask, blender::bke::pbvh::Mesh, blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::cloth::LocalData::positions, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scatter_data_bmesh(), blender::ed::sculpt_paint::scatter_data_grids(), blender::ed::sculpt_paint::scatter_data_mesh(), blender::Span< T >::size(), SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), and verts.
Referenced by cloth_brush_satisfy_constraints().
|
static |
Definition at line 626 of file sculpt_cloth.cc.
References dist_to_plane_v3().
Referenced by calc_forces_bmesh(), calc_forces_grids(), and calc_forces_mesh().
|
static |
Definition at line 945 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::auto_mask::active_cache_get(), apply_forces(), apply_grab_brush(), blender::ed::sculpt_paint::apply_hardness_to_distances(), apply_snake_hook_brush(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), BKE_pbvh_bmesh_node_unique_verts(), SculptSession::bm, BRUSH_CLOTH_DEFORM_DRAG, BRUSH_CLOTH_DEFORM_EXPAND, BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_INFLATE, BRUSH_CLOTH_DEFORM_PINCH_PERPENDICULAR, BRUSH_CLOTH_DEFORM_PINCH_POINT, BRUSH_CLOTH_DEFORM_PUSH, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_FRONTFACE, blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, blender::ed::sculpt_paint::calc_brush_distances(), calc_brush_simulation_falloff(), blender::ed::sculpt_paint::calc_brush_strength_factors(), blender::ed::sculpt_paint::calc_brush_texture_factors(), calc_distances_to_plane(), blender::ed::sculpt_paint::calc_front_face(), calc_perpendicular_pinch_forces(), calc_pinch_forces(), calc_plane_pinch_forces(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), calc_vert_indices_bmesh(), Brush::cloth_deform_type, blender::ed::sculpt_paint::StrokeCache::cloth_sim, depsgraph, blender::ed::sculpt_paint::cloth::LocalData::distances, expand_length_constraints(), blender::ed::sculpt_paint::cloth::LocalData::factors, Brush::falloff_shape, blender::ed::sculpt_paint::filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::gather_bmesh_normals(), blender::ed::sculpt_paint::gather_bmesh_positions(), blender::ed::sculpt_paint::gather_data_mesh(), blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::ed::sculpt_paint::cloth::SimulationData::init_pos, blender::ed::sculpt_paint::cloth::LocalData::init_positions, blender::math::is_zero(), blender::ed::sculpt_paint::StrokeCache::last_location_symm, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::math::normalize(), blender::ed::sculpt_paint::cloth::LocalData::positions, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), blender::ed::sculpt_paint::scale_translations(), Object::sculpt, blender::ed::sculpt_paint::cloth::LocalData::translations, blender::ed::sculpt_paint::translations_from_offset_and_factors(), blender::ed::sculpt_paint::cloth::LocalData::vert_indices, verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by cloth_brush_apply_brush_foces().
|
static |
Definition at line 835 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::auto_mask::active_cache_get(), apply_forces(), apply_grab_brush(), blender::ed::sculpt_paint::apply_hardness_to_distances(), apply_snake_hook_brush(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), BKE_subdiv_ccg_key_top_level(), BRUSH_CLOTH_DEFORM_DRAG, BRUSH_CLOTH_DEFORM_EXPAND, BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_INFLATE, BRUSH_CLOTH_DEFORM_PINCH_PERPENDICULAR, BRUSH_CLOTH_DEFORM_PINCH_POINT, BRUSH_CLOTH_DEFORM_PUSH, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_FRONTFACE, blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, blender::ed::sculpt_paint::calc_brush_distances(), calc_brush_simulation_falloff(), blender::ed::sculpt_paint::calc_brush_strength_factors(), blender::ed::sculpt_paint::calc_brush_texture_factors(), calc_distances_to_plane(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), calc_perpendicular_pinch_forces(), calc_pinch_forces(), calc_plane_pinch_forces(), calc_vert_indices_grids(), Brush::cloth_deform_type, blender::ed::sculpt_paint::StrokeCache::cloth_sim, depsgraph, blender::ed::sculpt_paint::cloth::LocalData::distances, expand_length_constraints(), blender::ed::sculpt_paint::cloth::LocalData::factors, Brush::falloff_shape, blender::ed::sculpt_paint::filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::gather_data_grids(), blender::ed::sculpt_paint::gather_grids_normals(), blender::ed::sculpt_paint::gather_grids_positions(), blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::ed::sculpt_paint::cloth::SimulationData::init_pos, blender::ed::sculpt_paint::cloth::LocalData::init_positions, blender::math::is_zero(), blender::ed::sculpt_paint::StrokeCache::last_location_symm, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::math::normalize(), blender::ed::sculpt_paint::cloth::LocalData::positions, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), blender::ed::sculpt_paint::scale_translations(), Object::sculpt, SculptSession::subdiv_ccg, blender::ed::sculpt_paint::cloth::LocalData::translations, blender::ed::sculpt_paint::translations_from_offset_and_factors(), blender::ed::sculpt_paint::cloth::LocalData::vert_indices, verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by cloth_brush_apply_brush_foces().
|
static |
Definition at line 726 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::auto_mask::active_cache_get(), apply_forces(), apply_grab_brush(), blender::ed::sculpt_paint::apply_hardness_to_distances(), apply_snake_hook_brush(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), BRUSH_CLOTH_DEFORM_DRAG, BRUSH_CLOTH_DEFORM_EXPAND, BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_INFLATE, BRUSH_CLOTH_DEFORM_PINCH_PERPENDICULAR, BRUSH_CLOTH_DEFORM_PINCH_POINT, BRUSH_CLOTH_DEFORM_PUSH, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_FRONTFACE, blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, blender::ed::sculpt_paint::calc_brush_distances(), calc_brush_simulation_falloff(), blender::ed::sculpt_paint::calc_brush_strength_factors(), blender::ed::sculpt_paint::calc_brush_texture_factors(), calc_distances_to_plane(), blender::ed::sculpt_paint::calc_front_face(), calc_perpendicular_pinch_forces(), calc_pinch_forces(), calc_plane_pinch_forces(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), Brush::cloth_deform_type, blender::ed::sculpt_paint::StrokeCache::cloth_sim, depsgraph, blender::ed::sculpt_paint::cloth::LocalData::distances, expand_length_constraints(), blender::ed::sculpt_paint::cloth::LocalData::factors, Brush::falloff_shape, blender::ed::sculpt_paint::filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::gather_data_mesh(), blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::cloth::SimulationData::init_pos, blender::ed::sculpt_paint::cloth::LocalData::init_positions, blender::math::is_zero(), blender::ed::sculpt_paint::StrokeCache::last_location_symm, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::MeshAttributeData::mask, blender::math::normalize(), blender::ed::sculpt_paint::cloth::LocalData::positions, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), blender::ed::sculpt_paint::scale_translations(), Object::sculpt, blender::ed::sculpt_paint::cloth::LocalData::translations, blender::ed::sculpt_paint::translations_from_offset_and_factors(), verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by cloth_brush_apply_brush_foces().
|
static |
Definition at line 1994 of file sculpt_cloth.cc.
References blender::MutableSpan< T >::index_range(), blender::ed::sculpt_paint::filter::Cache::orientation, blender::ed::sculpt_paint::filter::to_object_space(), and blender::ed::sculpt_paint::filter::View.
Referenced by apply_filter_forces_bmesh(), apply_filter_forces_grids(), and apply_filter_forces_mesh().
|
static |
Definition at line 695 of file sculpt_cloth.cc.
References blender::math::dot(), blender::math::normalize(), blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis().
Referenced by calc_forces_bmesh(), calc_forces_grids(), and calc_forces_mesh().
|
static |
Definition at line 675 of file sculpt_cloth.cc.
References blender::MutableSpan< T >::index_range(), and blender::math::normalize().
Referenced by apply_filter_forces_bmesh(), apply_filter_forces_grids(), apply_filter_forces_mesh(), calc_forces_bmesh(), calc_forces_grids(), and calc_forces_mesh().
|
static |
Definition at line 684 of file sculpt_cloth.cc.
References dist_signed_to_plane_v3(), and blender::math::normalize().
Referenced by calc_forces_bmesh(), calc_forces_grids(), and calc_forces_mesh().
|
static |
Definition at line 88 of file sculpt_cloth.cc.
References BM_elem_index_get, indices, and verts.
Referenced by apply_filter_forces_bmesh(), calc_forces_bmesh(), and do_simulation_step().
|
static |
Definition at line 74 of file sculpt_cloth.cc.
References blender::array_utils::fill_index_range(), CCGKey::grid_area, blender::Span< T >::index_range(), indices, and blender::Span< T >::size().
Referenced by apply_filter_forces_grids(), calc_forces_grids(), calc_visible_vert_indices_grids(), and do_simulation_step().
|
static |
Definition at line 149 of file sculpt_cloth.cc.
References BLI_assert, bm, BM_elem_index_get, BM_vert_at_index(), blender::ed::sculpt_paint::vert_neighbors_get_bmesh(), and verts.
Referenced by ensure_nodes_constraints().
|
static |
Definition at line 130 of file sculpt_cloth.cc.
References BKE_subdiv_ccg_key_top_level(), BKE_subdiv_ccg_neighbor_coords_get(), BLI_assert, SubdivCCGNeighbors::coords, SubdivCCGCoord::from_index(), and verts.
Referenced by ensure_nodes_constraints().
|
static |
Definition at line 118 of file sculpt_cloth.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_index_get, indices, and verts.
Referenced by ensure_nodes_constraints().
|
static |
Definition at line 100 of file sculpt_cloth.cc.
References calc_vert_indices_grids(), blender::bits::foreach_0_index(), CCGKey::grid_area, blender::Span< T >::index_range(), indices, blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), and blender::Span< T >::size().
Referenced by ensure_nodes_constraints().
|
static |
|
static |
Definition at line 342 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::cloth::SimulationData::deformation_pos, blender::ed::sculpt_paint::cloth::LengthConstraint::elem_index_a, blender::ed::sculpt_paint::cloth::SimulationData::length_constraints, blender::ed::sculpt_paint::cloth::SimulationData::pos, SCULPT_CLOTH_CONSTRAINT_DEFORMATION, and v.
Referenced by add_constraints_for_verts().
|
static |
Definition at line 272 of file sculpt_cloth.cc.
References blender::math::distance(), blender::ed::sculpt_paint::cloth::LengthConstraint::elem_index_a, blender::ed::sculpt_paint::cloth::SimulationData::length_constraints, blender::ed::sculpt_paint::cloth::SimulationData::pos, SCULPT_CLOTH_CONSTRAINT_STRUCTURAL, and v2.
Referenced by add_constraints_for_verts().
|
static |
Definition at line 319 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::cloth::LengthConstraint::elem_index_a, blender::ed::sculpt_paint::cloth::SimulationData::init_pos, blender::ed::sculpt_paint::cloth::SimulationData::length_constraints, blender::ed::sculpt_paint::cloth::SimulationData::pos, SCULPT_CLOTH_CONSTRAINT_PIN, and v.
Referenced by add_constraints_for_verts().
|
static |
Definition at line 296 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::cloth::LengthConstraint::elem_index_a, blender::ed::sculpt_paint::cloth::SimulationData::length_constraints, blender::ed::sculpt_paint::cloth::SimulationData::pos, SCULPT_CLOTH_CONSTRAINT_SOFTBODY, blender::ed::sculpt_paint::cloth::SimulationData::softbody_pos, and v.
Referenced by add_constraints_for_verts().
|
static |
Definition at line 1507 of file sculpt_cloth.cc.
References BKE_paint_brush_for_read(), blender::bke::pbvh::BMesh, BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_PINCH_PERPENDICULAR, BRUSH_CLOTH_DEFORM_PUSH, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_CLOTH_FORCE_FALLOFF_PLANE, SculptSession::cache, blender::ed::sculpt_paint::calc_brush_plane(), calc_forces_bmesh(), calc_forces_grids(), calc_forces_mesh(), cloth_brush_simulation_location_get(), Brush::cloth_deform_type, Brush::cloth_force_falloff_type, blender::ed::sculpt_paint::StrokeCache::cloth_sim, blender::math::cross(), Object::data, depsgraph, ELEM, blender::index_mask::IndexMask::foreach_index(), blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::ed::sculpt_paint::StrokeCache::gravity_direction_symm, Sculpt::gravity_factor, blender::bke::pbvh::Grids, blender::MatBase< float, 4, 4 >::identity(), blender::math::is_zero(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::MatBase< T, NumCol, NumRow, Alignment >::location(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::bke::pbvh::Tree::nodes(), blender::math::normalize(), normalize_m4(), Sculpt::paint, blender::bke::object::pbvh_get(), plane_from_point_normal_v3(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::scale, Object::sculpt, blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, blender::ed::sculpt_paint::StrokeCache::stroke_local_mat, blender::ed::sculpt_paint::StrokeCache::supports_gravity, blender::bke::pbvh::Tree::type(), blender::bke::pbvh::vert_normals_eval(), blender::bke::pbvh::vert_positions_eval(), blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis().
Referenced by do_cloth_brush().
|
static |
Definition at line 1053 of file sculpt_cloth.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_modifiers_findby_type(), CollisionModifierData::bvhtree, col, collision_move_object(), DEG_ITER_OBJECT_FLAG_DUPLI, DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, DEG_ITER_OBJECT_FLAG_VISIBLE, DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, DEGObjectIterSettings::depsgraph, depsgraph, eModifierType_Collision, DEGObjectIterSettings::flags, ColliderCache::ob, and STREQ.
Referenced by brush_simulation_create().
|
static |
Definition at line 1091 of file sculpt_cloth.cc.
References col, copy_v3_v3(), float, isect_ray_tri_watertight_v3(), madd_v3_v3v3fl(), normal_tri_v3(), UNPACK3, CollisionModifierData::vert_tris, and CollisionModifierData::x.
Referenced by cloth_brush_solve_collision().
|
static |
Definition at line 1308 of file sculpt_cloth.cc.
References calc_constraint_factors(), cloth_brush_simulation_location_get(), Brush::cloth_constraint_softbody_strength, CLOTH_SIMULATION_ITERATIONS, CLOTH_SOLVER_DISPLACEMENT_FACTOR, blender::ed::sculpt_paint::cloth::SimulationData::deformation_strength, depsgraph, blender::ed::sculpt_paint::cloth::SimulationData::init_pos, blender::math::length(), blender::ed::sculpt_paint::cloth::SimulationData::length_constraint_tweak, blender::ed::sculpt_paint::cloth::SimulationData::length_constraints, blender::ed::sculpt_paint::cloth::SimulationData::node_state, blender::ed::sculpt_paint::cloth::SimulationData::pos, SCULPT_CLOTH_CONSTRAINT_DEFORMATION, SCULPT_CLOTH_CONSTRAINT_SOFTBODY, SCULPT_CLOTH_NODE_ACTIVE, SCULPT_vertex_count_get(), blender::ed::sculpt_paint::cloth::SimulationData::softbody_pos, and v2.
Referenced by do_simulation_step().
|
static |
Definition at line 217 of file sculpt_cloth.cc.
References BRUSH_CLOTH_SIMULATION_AREA_GLOBAL, Brush::cloth_sim_falloff, Brush::cloth_sim_limit, Brush::cloth_simulation_area_type, blender::math::distance(), Brush::sculpt_brush_type, and SCULPT_BRUSH_TYPE_CLOTH.
Referenced by add_constraints_for_verts(), and calc_brush_simulation_falloff().
|
static |
Definition at line 165 of file sculpt_cloth.cc.
References BRUSH_CLOTH_SIMULATION_AREA_LOCAL, SculptSession::cache, Brush::cloth_simulation_area_type, blender::ed::sculpt_paint::StrokeCache::initial_location_symm, and blender::ed::sculpt_paint::StrokeCache::location_symm.
Referenced by cloth_brush_apply_brush_foces(), cloth_brush_satisfy_constraints(), do_simulation_step(), and sculpt_cloth_ensure_constraints_in_simulation_area().
|
static |
Definition at line 1121 of file sculpt_cloth.cc.
References BLI_bvhtree_ray_cast_ex(), BVH_RAYCAST_DEFAULT, BVH_RAYCAST_WATERTIGHT, CollisionModifierData::bvhtree, closest_to_plane_v3(), cloth_brush_collision_cb(), col, blender::ed::sculpt_paint::cloth::SimulationData::collider_list, BVHTreeRayHit::index, isect_ray_tri_watertight_v3_precalc(), blender::ed::sculpt_paint::cloth::SimulationData::last_iteration_pos, blender::math::normalize_and_get_length(), plane_from_point_normal_v3(), blender::ed::sculpt_paint::cloth::SimulationData::pos, and blender::math::transform_point().
Referenced by solve_verts_simulation().
|
static |
Definition at line 1989 of file sculpt_cloth.cc.
Referenced by sculpt_cloth_filter_invoke().
|
static |
Definition at line 1638 of file sculpt_cloth.cc.
References blender::bke::pbvh::all_leaf_nodes(), blender::bke::pbvh::BMesh, blender::index_mask::IndexMask::foreach_index(), blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::cloth::SimulationData::node_state, blender::ed::sculpt_paint::cloth::SimulationData::node_state_index, blender::bke::pbvh::Tree::nodes(), blender::bke::pbvh::Tree::nodes_num(), blender::bke::object::pbvh_get(), SCULPT_CLOTH_NODE_UNINITIALIZED, and blender::bke::pbvh::Tree::type().
Referenced by brush_simulation_create().
|
static |
Definition at line 1685 of file sculpt_cloth.cc.
References SculptSession::bm, BM_mesh_vert_normals_get(), blender::bke::pbvh::BMesh, depsgraph, blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, SubdivCCG::normals, blender::bke::object::pbvh_get(), SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), and blender::bke::pbvh::vert_normals_eval().
Referenced by brush_simulation_create().
|
static |
Definition at line 1664 of file sculpt_cloth.cc.
References SculptSession::bm, BM_mesh_vert_coords_get(), blender::bke::pbvh::BMesh, depsgraph, blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), SubdivCCG::positions, SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), and blender::bke::pbvh::vert_positions_eval().
Referenced by brush_simulation_create(), and brush_store_simulation_state().
| void blender::ed::sculpt_paint::cloth::do_cloth_brush | ( | const Depsgraph & | depsgraph, |
| const Sculpt & | sd, | ||
| Object & | object, | ||
| const IndexMask & | node_mask ) |
Definition at line 1806 of file sculpt_cloth.cc.
References BKE_paint_brush_for_read(), BRUSH_CLOTH_SIMULATION_AREA_LOCAL, BRUSH_CLOTH_USE_COLLISION, brush_simulation_create(), brush_store_simulation_state(), SculptSession::cache, cloth_brush_apply_brush_foces(), Brush::cloth_constraint_softbody_strength, Brush::cloth_damping, Brush::cloth_mass, blender::ed::sculpt_paint::StrokeCache::cloth_sim, Brush::cloth_simulation_area_type, depsgraph, do_simulation_step(), Brush::flag2, is_cloth_deform_brush(), Sculpt::paint, Object::sculpt, sculpt_cloth_ensure_constraints_in_simulation_area(), SCULPT_stroke_is_first_brush_step(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), and sim_activate_nodes().
Referenced by blender::ed::sculpt_paint::do_brush_action().
| void blender::ed::sculpt_paint::cloth::do_simulation_step | ( | const Depsgraph & | depsgraph, |
| const Sculpt & | sd, | ||
| Object & | object, | ||
| SimulationData & | cloth_sim, | ||
| const IndexMask & | node_mask ) |
Definition at line 1379 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::auto_mask::active_cache_get(), BKE_paint_brush_for_read(), BKE_pbvh_bmesh_node_unique_verts(), BKE_subdiv_ccg_key_top_level(), bm, SculptSession::bm, BM_elem_index_get, blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), calc_vert_indices_bmesh(), calc_vert_indices_grids(), blender::ed::sculpt_paint::clip_and_lock_translations(), cloth_brush_satisfy_constraints(), cloth_brush_simulation_location_get(), copy_v3_v3(), blender::ed::sculpt_paint::PositionDeformData::deform(), depsgraph, blender::ed::sculpt_paint::PositionDeformData::eval, blender::ed::sculpt_paint::cloth::LocalData::factors, blender::bke::pbvh::flush_bounds_to_parents(), blender::index_mask::IndexMask::from_predicate(), CCGKey::grid_area, blender::bke::ccg::grid_range(), blender::bke::pbvh::Grids, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::threading::EnumerableThreadSpecific< T >::local(), blender::ed::sculpt_paint::MeshAttributeData::mask, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::cloth::SimulationData::node_state, blender::ed::sculpt_paint::cloth::SimulationData::node_state_index, blender::bke::pbvh::Tree::nodes(), Sculpt::paint, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::cloth::SimulationData::pos, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), SCULPT_CLOTH_NODE_ACTIVE, SCULPT_CLOTH_NODE_INACTIVE, blender::Span< T >::size(), blender::Span< T >::slice(), solve_verts_simulation(), SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::tag_positions_changed(), blender::ed::sculpt_paint::cloth::LocalData::translations, blender::bke::pbvh::Tree::type(), blender::bke::pbvh::update_node_bounds_bmesh(), blender::bke::pbvh::update_node_bounds_grids(), blender::bke::pbvh::update_node_bounds_mesh(), blender::ed::sculpt_paint::cloth::LocalData::vert_indices, and verts.
Referenced by blender::ed::sculpt_paint::do_brush_action(), do_cloth_brush(), and sculpt_cloth_filter_modal().
| void blender::ed::sculpt_paint::cloth::ensure_nodes_constraints | ( | const Sculpt & | sd, |
| Object & | object, | ||
| const IndexMask & | node_mask, | ||
| SimulationData & | cloth_sim, | ||
| const float3 & | initial_location, | ||
| const float | radius ) |
Definition at line 479 of file sculpt_cloth.cc.
References add_constraints_for_verts(), BKE_paint_brush_for_read(), BKE_pbvh_bmesh_node_unique_verts(), BKE_subdiv_ccg_key_top_level(), bm, SculptSession::bm, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, blender::bke::pbvh::BMesh, BRUSH_PERSISTENT, calc_vert_neighbor_indices_bmesh(), calc_vert_neighbor_indices_grids(), blender::ed::sculpt_paint::calc_vert_neighbors(), calc_visible_vert_indices_bmesh(), calc_visible_vert_indices_grids(), blender::bke::Face, Brush::flag, blender::index_mask::IndexMask::from_predicate(), blender::bke::pbvh::Grids, blender::ed::sculpt_paint::cloth::SimulationData::init_pos, blender::Span< T >::is_empty(), blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::cloth::SimulationData::node_state, blender::ed::sculpt_paint::cloth::SimulationData::node_state_index, blender::ed::sculpt_paint::hide::node_visible_verts(), blender::bke::pbvh::Tree::nodes(), Sculpt::paint, blender::bke::object::pbvh_get(), blender::bke::Point, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), SCULPT_CLOTH_NODE_UNINITIALIZED, SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), and verts.
Referenced by blender::ed::sculpt_paint::do_brush_action(), sculpt_cloth_ensure_constraints_in_simulation_area(), and sculpt_cloth_filter_invoke().
|
static |
Definition at line 616 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::cloth::SimulationData::length_constraint_tweak, and verts.
Referenced by apply_filter_forces_bmesh(), apply_filter_forces_grids(), apply_filter_forces_mesh(), calc_forces_bmesh(), calc_forces_grids(), and calc_forces_mesh().
| bool blender::ed::sculpt_paint::cloth::is_cloth_deform_brush | ( | const Brush & | brush | ) |
Definition at line 207 of file sculpt_cloth.cc.
References BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_DEFORM_TARGET_CLOTH_SIM, Brush::cloth_deform_type, Brush::deform_target, ELEM, Brush::sculpt_brush_type, and SCULPT_BRUSH_TYPE_CLOTH.
Referenced by add_constraints_for_verts(), do_cloth_brush(), blender::ed::sculpt_paint::image_paint_brush_type_require_location(), blender::ed::sculpt_paint::paint_space_stroke_enabled(), and blender::ed::sculpt_paint::paint_space_stroke_spacing().
| void blender::ed::sculpt_paint::cloth::plane_falloff_preview_draw | ( | const uint | gpuattr, |
| SculptSession & | ss, | ||
| const float | outline_col[3], | ||
| float | outline_alpha ) |
Definition at line 1894 of file sculpt_cloth.cc.
References add_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::brush, BRUSH_CLOTH_DEFORM_GRAB, SculptSession::cache, Brush::cloth_deform_type, GPU_line_width(), GPU_matrix_mul, GPU_PRIM_LINES, GPU_PRIM_TRIS, blender::ed::sculpt_paint::StrokeCache::grab_delta, immBegin(), immEnd(), immUniformColor3fvAlpha(), immVertex3f(), blender::ed::sculpt_paint::StrokeCache::location, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radius, and blender::ed::sculpt_paint::StrokeCache::stroke_local_mat.
Referenced by blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active().
|
static |
Definition at line 1794 of file sculpt_cloth.cc.
References BKE_paint_brush_for_read(), SculptSession::cache, cloth_brush_simulation_location_get(), blender::ed::sculpt_paint::StrokeCache::cloth_sim, Brush::cloth_sim_limit, ensure_nodes_constraints(), blender::ed::sculpt_paint::StrokeCache::initial_radius, Sculpt::paint, and Object::sculpt.
Referenced by do_cloth_brush().
|
static |
Definition at line 2359 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::filter::Cache::active_face_set, blender::ed::sculpt_paint::face_set::active_face_set_get(), SculptSession::active_vert_position(), blender::ed::sculpt_paint::filter::Cache::automasking, BKE_base_is_visible(), BKE_sculpt_update_object_for_edit(), brush_simulation_create(), blender::ed::sculpt_paint::auto_mask::cache_init(), blender::ed::sculpt_paint::filter::cache_init(), CLOTH_FILTER_FORCE_X, CLOTH_FILTER_FORCE_Y, CLOTH_FILTER_FORCE_Z, cloth_filter_is_deformation_filter(), blender::ed::sculpt_paint::filter::Cache::cloth_sim, blender::ed::sculpt_paint::filter::Cache::cloth_sim_pinch_point, CTX_data_active_base(), CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_view3d(), depsgraph, blender::ed::sculpt_paint::filter::Cache::enabled_axis, ensure_nodes_constraints(), SculptSession::filter_cache, float, FLT_MAX, wmEvent::mval, blender::ed::sculpt_paint::filter::Cache::node_mask, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, blender::ed::sculpt_paint::filter::Cache::orientation, blender::ed::sculpt_paint::undo::Position, wmOperator::ptr, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::report_if_shape_key_is_locked(), wmOperator::reports, RNA_boolean_get(), RNA_enum_get(), RNA_float_get(), Object::sculpt, ToolSettings::sculpt, SCULPT_cursor_geometry_info_update(), SCULPT_FACE_SET_NONE, and WM_event_add_modal_handler().
Referenced by SCULPT_OT_cloth_filter().
|
static |
Definition at line 2250 of file sculpt_cloth.cc.
References apply_filter_forces_bmesh(), apply_filter_forces_grids(), apply_filter_forces_mesh(), Geometry::attributes, BKE_sculpt_update_object_for_edit(), blender::bke::pbvh::BMesh, brush_store_simulation_state(), blender::ed::sculpt_paint::filter::Cache::cloth_sim, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_tool_settings(), depsgraph, do_simulation_step(), blender::bke::Face, SculptSession::filter_cache, blender::bke::pbvh::flush_bounds_to_parents(), blender::ed::sculpt_paint::flush_update_done(), blender::ed::sculpt_paint::flush_update_step(), blender::index_mask::IndexMask::foreach_index(), Sculpt::gravity_factor, Sculpt::gravity_object, blender::bke::pbvh::Grids, KM_RELEASE, LEFTMOUSE, len, blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, MOUSEMOVE, blender::ed::sculpt_paint::filter::Cache::node_mask, blender::bke::pbvh::Tree::nodes(), OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::Position, wmOperator::ptr, blender::ed::sculpt_paint::undo::push_end(), RNA_enum_get(), RNA_float_get(), ToolSettings::sculpt, SCULPT_vertex_random_access_ensure(), sim_activate_nodes(), blender::bke::pbvh::Tree::tag_positions_changed(), blender::bke::pbvh::Tree::type(), wmEvent::type, UI_SCALE_FAC, blender::bke::pbvh::update_node_bounds_bmesh(), blender::bke::pbvh::update_node_bounds_grids(), blender::bke::pbvh::update_node_bounds_mesh(), wmEvent::val, blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by SCULPT_OT_cloth_filter().
| void blender::ed::sculpt_paint::cloth::SCULPT_OT_cloth_filter | ( | wmOperatorType * | ot | ) |
Definition at line 2435 of file sculpt_cloth.cc.
References BLT_I18NCONTEXT_OPERATOR_DEFAULT, CLOTH_FILTER_FORCE_X, CLOTH_FILTER_FORCE_Y, CLOTH_FILTER_FORCE_Z, wmOperatorType::description, wmOperatorType::flag, Gravity, wmOperatorType::idname, wmOperatorType::invoke, blender::ed::sculpt_paint::filter::Local, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, prop_cloth_filter_force_axis_items, prop_cloth_filter_orientation_items, prop_cloth_filter_type, blender::ed::sculpt_paint::filter::register_operator_props(), RNA_def_boolean(), RNA_def_enum(), RNA_def_enum_flag(), RNA_def_float(), RNA_def_property_translation_context(), sculpt_cloth_filter_invoke(), sculpt_cloth_filter_modal(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt().
| void blender::ed::sculpt_paint::cloth::sim_activate_nodes | ( | Object & | object, |
| SimulationData & | cloth_sim, | ||
| const IndexMask & | node_mask ) |
Definition at line 1761 of file sculpt_cloth.cc.
References blender::bke::pbvh::BMesh, blender::index_mask::IndexMask::foreach_index(), blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::cloth::SimulationData::node_state, blender::ed::sculpt_paint::cloth::SimulationData::node_state_index, blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), SCULPT_CLOTH_NODE_ACTIVE, and blender::bke::pbvh::Tree::type().
Referenced by blender::ed::sculpt_paint::do_brush_action(), do_cloth_brush(), and sculpt_cloth_filter_modal().
| void blender::ed::sculpt_paint::cloth::simulation_limits_draw | ( | uint | gpuattr, |
| const Brush & | brush, | ||
| const float | location[3], | ||
| const float | normal[3], | ||
| float | rds, | ||
| float | line_width, | ||
| const float | outline_col[3], | ||
| float | alpha ) |
Cursor drawing function.
Definition at line 1865 of file sculpt_cloth.cc.
References Brush::cloth_sim_falloff, Brush::cloth_sim_limit, GPU_line_width(), GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_push(), imm_draw_circle_dashed_3d(), imm_draw_circle_wire_3d(), immUniformColor3fvAlpha(), quat_to_mat4(), rotation_between_vecs_to_quat(), translate_m4(), and unit_m4().
Referenced by blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active(), and blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1173 of file sculpt_cloth.cc.
References blender::ed::sculpt_paint::cloth::SimulationData::acceleration, blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), SculptSession::cache, calc_brush_simulation_falloff(), cloth_brush_solve_collision(), CLOTH_SIMULATION_TIME_STEP, blender::ed::sculpt_paint::cloth::SimulationData::damping, blender::ed::sculpt_paint::cloth::LocalData::diffs, blender::MutableSpan< T >::fill_indices(), blender::ed::sculpt_paint::gather_data_mesh(), blender::ed::sculpt_paint::cloth::SimulationData::init_pos, blender::ed::sculpt_paint::cloth::SimulationData::last_iteration_pos, blender::ed::sculpt_paint::cloth::SimulationData::pos, blender::ed::sculpt_paint::cloth::LocalData::positions, blender::ed::sculpt_paint::cloth::SimulationData::prev_pos, blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::scale_factors(), blender::ed::sculpt_paint::scale_translations(), and verts.
Referenced by do_simulation_step().
|
static |
Definition at line 1982 of file sculpt_cloth.cc.
Referenced by SCULPT_OT_cloth_filter().
|
static |
Definition at line 1957 of file sculpt_cloth.cc.
Referenced by SCULPT_OT_cloth_filter().
|
static |
Definition at line 1940 of file sculpt_cloth.cc.
Referenced by SCULPT_OT_cloth_filter().