|
Blender
V2.93
|
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) |
Typedefs | |
| typedef enum eClothVertexFlag | eClothVertexFlag |
| typedef struct ClothHairData | ClothHairData |
| typedef struct ClothSolverResult | ClothSolverResult |
| typedef struct Cloth | Cloth |
| typedef struct ClothVertex | ClothVertex |
| typedef struct ClothSpring | ClothSpring |
| typedef struct ColliderContacts | ColliderContacts |
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 (struct Depsgraph *depsgraph, struct Object *ob, struct ClothModifierData *clmd, float step, float dt) |
| void | cloth_free_modifier_extern (struct ClothModifierData *clmd) |
| void | cloth_free_modifier (struct ClothModifierData *clmd) |
| void | clothModifier_do (struct ClothModifierData *clmd, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Mesh *me, float(*vertexCos)[3]) |
| int | cloth_uses_vgroup (struct ClothModifierData *clmd) |
| void | bvhtree_update_from_cloth (struct ClothModifierData *clmd, bool moving, bool self) |
| void | cloth_clear_cache (struct Object *ob, struct 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 47 of file BKE_cloth.h.
| #define DO_INLINE MALWAYS_INLINE |
Definition at line 40 of file BKE_cloth.h.
| #define SOFTGOALSNAP 0.999f |
Definition at line 43 of file BKE_cloth.h.
Definition at line 189 of file BKE_cloth.h.
This structure describes a cloth object against which the simulation can run.
The m and n members of this structure represent the assumed rectangular ordered grid for which the original paper is written. At some point they need to disappear and we need to determine out own connectivity of the mesh based on the actual edges in the mesh.
| typedef struct ClothHairData ClothHairData |
| typedef struct ClothSolverResult ClothSolverResult |
| typedef struct ClothSpring ClothSpring |
The definition of a spring.
| typedef struct ClothVertex ClothVertex |
The definition of a cloth vertex.
| typedef struct ColliderContacts ColliderContacts |
| typedef enum eClothVertexFlag eClothVertexFlag |
| 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 198 of file BKE_cloth.h.
| enum CLOTH_SPRINGS_FLAGS |
| Enumerator | |
|---|---|
| CLOTH_SPRING_FLAG_DEACTIVATE | |
| CLOTH_SPRING_FLAG_NEEDED | |
Definition at line 209 of file BKE_cloth.h.
| enum eClothVertexFlag |
| Enumerator | |
|---|---|
| CLOTH_VERT_FLAG_PINNED | |
| CLOTH_VERT_FLAG_NOSELFCOLL | |
| CLOTH_VERT_FLAG_NOOBJCOLL | |
Definition at line 50 of file BKE_cloth.h.
| void bvhtree_update_from_cloth | ( | struct ClothModifierData * | clmd, |
| bool | moving, | ||
| bool | self | ||
| ) |
Definition at line 134 of file cloth.c.
References BLI_assert, BLI_bvhtree_update_node(), BLI_bvhtree_update_tree(), Cloth::bvhselftree, Cloth::bvhtree, ClothModifierData::clothObject, copy_v3_v3(), Cloth::edges, ClothModifierData::hairdata, NULL, Cloth::primitive_num, ret, Cloth::tri, MVertTri::tri, v1, v2, Cloth::verts, and verts.
Referenced by cloth_bvh_collision().
| int cloth_bvh_collision | ( | struct Depsgraph * | depsgraph, |
| struct Object * | ob, | ||
| struct ClothModifierData * | clmd, | ||
| float | step, | ||
| float | dt | ||
| ) |
Definition at line 1565 of file collision.c.
References add_v3_v3v3(), BKE_collision_objects_create(), BKE_collision_objects_free(), BKE_modifiers_findby_type(), BLI_bvhtree_overlap(), Cloth::bvhselftree, Cloth::bvhtree, 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, ClothSimSettings::flags, ClothCollSettings::flags, ClothCollSettings::group, ClothModifierData::hairdata, ClothCollSettings::loop_count, MEM_callocN, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, MIN2, Cloth::mvert_num, NULL, Object::pd, PFIELD_CLOTH_USE_CULLING, PFIELD_CLOTH_USE_NORMAL, ret, ClothModifierData::sim_parms, Cloth::verts, verts, and ClothSimSettings::vgroup_mass.
Referenced by cloth_solve_collisions().
| void cloth_clear_cache | ( | struct Object * | ob, |
| struct ClothModifierData * | clmd, | ||
| float | framenr | ||
| ) |
Definition at line 214 of file cloth.c.
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 | ( | struct ClothModifierData * | clmd | ) |
Definition at line 430 of file cloth.c.
References BLI_bvhtree_free(), BLI_edgeset_free(), BLI_linklist_free(), Cloth::bvhselftree, Cloth::bvhtree, ClothModifierData::clothObject, Cloth::edgeset, LinkNode::link, MEM_freeN, MEM_SAFE_FREE, Cloth::mvert_num, LinkNode::next, NULL, Cloth::numsprings, ClothSpring::pa, ClothSpring::pb, Cloth::sew_edge_graph, SIM_cloth_solver_free(), Cloth::springs, Cloth::tri, and Cloth::verts.
Referenced by BKE_ptcache_id_reset(), cloth_from_mesh(), cloth_from_object(), free_hair(), and hair_step().
| void cloth_free_modifier_extern | ( | struct ClothModifierData * | clmd | ) |
Definition at line 505 of file cloth.c.
References BLI_bvhtree_free(), BLI_edgeset_free(), BLI_linklist_free(), Cloth::bvhselftree, Cloth::bvhtree, ClothModifierData::clothObject, Cloth::edgeset, G, G_DEBUG_SIMDATA, LinkNode::link, MEM_freeN, MEM_SAFE_FREE, Cloth::mvert_num, LinkNode::next, NULL, Cloth::numsprings, ClothSpring::pa, ClothSpring::pb, Cloth::sew_edge_graph, SIM_cloth_solver_free(), Cloth::springs, Cloth::tri, and Cloth::verts.
Referenced by freeData().
| void cloth_parallel_transport_hair_frame | ( | float | mat[3][3], |
| const float | dir_old[3], | ||
| const float | dir_new[3] | ||
| ) |
Definition at line 1279 of file cloth.c.
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 | ( | struct ClothModifierData * | clmd | ) |
Definition at line 611 of file cloth.c.
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_shrink, and ClothSimSettings::vgroup_struct.
Referenced by cloth_apply_vgroup(), and requiredDataMask().
| void clothModifier_do | ( | struct ClothModifierData * | clmd, |
| struct Depsgraph * | depsgraph, | ||
| struct Scene * | scene, | ||
| struct Object * | ob, | ||
| struct Mesh * | me, | ||
| float(*) | vertexCos[3] | ||
| ) |
Definition at line 322 of file cloth.c.
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(), PointCache::flag, PointCache::last_exact, Cloth::last_frame, mesh, 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, Scene::r, ClothSimSettings::reset, scene, SIM_cloth_solver_set_positions(), ClothModifierData::sim_parms, PointCache::simframe, RenderData::subframe, ClothSimSettings::time_scale, ClothSimSettings::timescale, and Mesh::totvert.
Referenced by deformVerts(), and do_hair_dynamics().