|
Blender V4.3
|
#include "BLI_math_vector_types.hh"#include "BLI_ordered_edge.hh"#include "BLI_set.hh"#include <float.h>Go to the source code of this file.
Classes | |
| struct | ClothHairData |
| struct | ClothSolverResult |
| struct | Cloth |
| struct | ClothVertex |
| struct | ClothSpring |
| struct | ColliderContacts |
Macros | |
| #define | DO_INLINE MALWAYS_INLINE |
| #define | SOFTGOALSNAP 0.999f |
| #define | ALMOST_ZERO FLT_EPSILON |
| #define | VECSUBADDSS(v1, v2, aS, v3, bS) |
| #define | VECADDSS(v1, v2, aS, v3, bS) |
| #define | VECADDS(v1, v2, v3, bS) |
| #define | VECSUBMUL(v1, v2, aS) |
| #define | VECSUBS(v1, v2, v3, bS) |
| #define | VECADDMUL(v1, v2, aS) |
Enumerations | |
| enum | eClothVertexFlag { CLOTH_VERT_FLAG_PINNED = (1 << 0) , CLOTH_VERT_FLAG_NOSELFCOLL = (1 << 1) , CLOTH_VERT_FLAG_NOOBJCOLL = (1 << 2) } |
| enum | CLOTH_SPRING_TYPES { CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1) , CLOTH_SPRING_TYPE_SHEAR = (1 << 2) , CLOTH_SPRING_TYPE_BENDING = (1 << 3) , CLOTH_SPRING_TYPE_GOAL = (1 << 4) , CLOTH_SPRING_TYPE_SEWING = (1 << 5) , CLOTH_SPRING_TYPE_BENDING_HAIR = (1 << 6) , CLOTH_SPRING_TYPE_INTERNAL = (1 << 7) } |
| enum | CLOTH_SPRINGS_FLAGS { CLOTH_SPRING_FLAG_DEACTIVATE = (1 << 1) , CLOTH_SPRING_FLAG_NEEDED = (1 << 2) } |
Functions | |
| int | cloth_bvh_collision (Depsgraph *depsgraph, Object *ob, ClothModifierData *clmd, float step, float dt) |
| void | cloth_free_modifier_extern (ClothModifierData *clmd) |
| void | cloth_free_modifier (ClothModifierData *clmd) |
| void | clothModifier_do (ClothModifierData *clmd, Depsgraph *depsgraph, Scene *scene, Object *ob, Mesh *mesh, float(*vertexCos)[3]) |
| int | cloth_uses_vgroup (ClothModifierData *clmd) |
| void | bvhtree_update_from_cloth (ClothModifierData *clmd, bool moving, bool self) |
| void | cloth_clear_cache (Object *ob, ClothModifierData *clmd, float framenr) |
| void | cloth_parallel_transport_hair_frame (float mat[3][3], const float dir_old[3], const float dir_new[3]) |
| #define ALMOST_ZERO FLT_EPSILON |
Definition at line 34 of file BKE_cloth.hh.
Referenced by cloth_collision(), cloth_collision_response_static(), cloth_selfcollision(), cloth_selfcollision_response_static(), cloth_update_springs(), collision_compute_barycentric(), hair_collision(), SIM_mass_spring_force_spring_goal(), spring_grad_dir(), and spring_length().
| #define DO_INLINE MALWAYS_INLINE |
Definition at line 27 of file BKE_cloth.hh.
| #define SOFTGOALSNAP 0.999f |
Definition at line 30 of file BKE_cloth.hh.
Referenced by cloth_apply_vgroup().
Definition at line 176 of file BKE_cloth.hh.
Referenced by cloth_collision_response_static(), cloth_selfcollision_response_static(), and collision_interpolateOnTriangle().
Definition at line 155 of file BKE_cloth.hh.
Referenced by add_lfvector_lfvectorS().
Definition at line 148 of file BKE_cloth.hh.
Referenced by add_lfvectorS_lfvectorS().
Definition at line 141 of file BKE_cloth.hh.
Referenced by subadd_fmatrixS_fmatrixS().
Definition at line 162 of file BKE_cloth.hh.
Referenced by submul_lfvectorS().
Definition at line 169 of file BKE_cloth.hh.
Referenced by sub_lfvector_lfvectorS().
| enum CLOTH_SPRING_TYPES |
| Enumerator | |
|---|---|
| CLOTH_SPRING_TYPE_STRUCTURAL | |
| CLOTH_SPRING_TYPE_SHEAR | |
| CLOTH_SPRING_TYPE_BENDING | |
| CLOTH_SPRING_TYPE_GOAL | |
| CLOTH_SPRING_TYPE_SEWING | |
| CLOTH_SPRING_TYPE_BENDING_HAIR | |
| CLOTH_SPRING_TYPE_INTERNAL | |
Definition at line 185 of file BKE_cloth.hh.
| enum CLOTH_SPRINGS_FLAGS |
| Enumerator | |
|---|---|
| CLOTH_SPRING_FLAG_DEACTIVATE | |
| CLOTH_SPRING_FLAG_NEEDED | |
Definition at line 196 of file BKE_cloth.hh.
| enum eClothVertexFlag |
| Enumerator | |
|---|---|
| CLOTH_VERT_FLAG_PINNED | |
| CLOTH_VERT_FLAG_NOSELFCOLL | |
| CLOTH_VERT_FLAG_NOOBJCOLL | |
Definition at line 37 of file BKE_cloth.hh.
| void bvhtree_update_from_cloth | ( | ClothModifierData * | clmd, |
| bool | moving, | ||
| bool | self ) |
Definition at line 121 of file cloth.cc.
References BLI_assert, BLI_bvhtree_update_node(), BLI_bvhtree_update_tree(), ClothModifierData::clothObject, copy_v3_v3(), ClothModifierData::hairdata, ret, self, and verts.
Referenced by cloth_bvh_collision().
| int cloth_bvh_collision | ( | Depsgraph * | depsgraph, |
| Object * | ob, | ||
| ClothModifierData * | clmd, | ||
| float | step, | ||
| float | dt ) |
Definition at line 1549 of file collision.cc.
References add_v3_v3v3(), BKE_collision_objects_create(), BKE_collision_objects_free(), BKE_modifiers_findby_type(), BLI_bvhtree_overlap(), BLI_bvhtree_overlap_self(), CollisionModifierData::bvhtree, bvhtree_update_from_cloth(), cloth_bvh_obj_overlap_cb(), cloth_bvh_objcollisions_nearcheck(), cloth_bvh_objcollisions_resolve(), cloth_bvh_self_overlap_cb(), cloth_bvh_selfcollisions_nearcheck(), cloth_bvh_selfcollisions_resolve(), CLOTH_COLLSETTINGS_FLAG_ENABLED, CLOTH_COLLSETTINGS_FLAG_SELF, CLOTH_SIMSETTINGS_FLAG_COLLOBJ, CLOTH_VERT_FLAG_PINNED, ClothModifierData::clothObject, ClothModifierData::coll_parms, collision_move_object(), depsgraph, eModifierType_Collision, PartDeflect::flag, ClothCollSettings::flags, ClothSimSettings::flags, ClothCollSettings::group, ClothModifierData::hairdata, ClothCollSettings::loop_count, MEM_freeN(), MEM_mallocN, MEM_SAFE_FREE, Object::pd, PFIELD_CLOTH_USE_CULLING, PFIELD_CLOTH_USE_NORMAL, ret, ClothModifierData::sim_parms, verts, and ClothSimSettings::vgroup_mass.
Referenced by cloth_solve_collisions().
| void cloth_clear_cache | ( | Object * | ob, |
| ClothModifierData * | clmd, | ||
| float | framenr ) |
Definition at line 200 of file cloth.cc.
References BKE_ptcache_id_clear(), BKE_ptcache_id_from_cloth(), PTCacheID::cache, PointCache::edit, Object::mode, OB_MODE_PARTICLE_EDIT, and PTCACHE_CLEAR_AFTER.
| void cloth_free_modifier | ( | ClothModifierData * | clmd | ) |
Frees all.
Definition at line 433 of file cloth.cc.
References BLI_bvhtree_free(), BLI_linklist_free(), ClothModifierData::clothObject, LinkNode::link, MEM_freeN(), MEM_SAFE_FREE, LinkNode::next, ClothSpring::pa, ClothSpring::pb, and SIM_cloth_solver_free().
Referenced by BKE_ptcache_id_reset(), cloth_from_mesh(), cloth_from_object(), free_hair(), and hair_step().
| void cloth_free_modifier_extern | ( | ClothModifierData * | clmd | ) |
Frees all.
Definition at line 494 of file cloth.cc.
References BLI_bvhtree_free(), BLI_linklist_free(), ClothModifierData::clothObject, G, G_DEBUG_SIMDATA, LinkNode::link, MEM_freeN(), MEM_SAFE_FREE, LinkNode::next, ClothSpring::pa, ClothSpring::pb, printf, and SIM_cloth_solver_free().
Referenced by free_data().
| void cloth_parallel_transport_hair_frame | ( | float | mat[3][3], |
| const float | dir_old[3], | ||
| const float | dir_new[3] ) |
Definition at line 1262 of file cloth.cc.
References mul_m3_m3m3(), rot, and rotation_between_vecs_to_mat3().
Referenced by cloth_hair_update_bending_rest_targets(), and cloth_hair_update_bending_targets().
| int cloth_uses_vgroup | ( | ClothModifierData * | clmd | ) |
Definition at line 587 of file cloth.cc.
References CLOTH_COLLSETTINGS_FLAG_ENABLED, CLOTH_COLLSETTINGS_FLAG_SELF, ClothModifierData::coll_parms, ClothCollSettings::flags, ClothModifierData::sim_parms, ClothSimSettings::vgroup_bend, ClothSimSettings::vgroup_intern, ClothSimSettings::vgroup_mass, ClothCollSettings::vgroup_objcol, ClothSimSettings::vgroup_pressure, ClothCollSettings::vgroup_selfcol, ClothSimSettings::vgroup_shear, ClothSimSettings::vgroup_shrink, and ClothSimSettings::vgroup_struct.
Referenced by cloth_apply_vgroup(), and required_data_mask().
| void clothModifier_do | ( | ClothModifierData * | clmd, |
| Depsgraph * | depsgraph, | ||
| Scene * | scene, | ||
| Object * | ob, | ||
| Mesh * | mesh, | ||
| float(*) | vertexCos[3] ) |
Definition at line 319 of file cloth.cc.
References BKE_ptcache_id_from_cloth(), BKE_ptcache_id_reset(), BKE_ptcache_id_time(), BKE_ptcache_invalidate(), BKE_ptcache_read(), BKE_ptcache_validate(), BKE_ptcache_write(), cloth_to_object(), ClothModifierData::clothObject, DEG_get_ctime(), depsgraph, do_init_cloth(), do_step_cloth(), Cloth::edges, PointCache::flag, PointCache::last_exact, Cloth::last_frame, Cloth::mvert_num, ClothModifierData::point_cache, PTCACHE_BAKED, PTCACHE_OUTDATED, PTCACHE_READ_EXACT, PTCACHE_READ_INTERPOLATED, PTCACHE_READ_OLD, PTCACHE_REDO_NEEDED, PTCACHE_RESET_OUTDATED, ClothSimSettings::reset, SIM_cloth_solver_set_positions(), ClothModifierData::sim_parms, PointCache::simframe, ClothSimSettings::time_scale, and ClothSimSettings::timescale.
Referenced by deform_verts(), and do_hair_dynamics().