85 if (!
cloth->primitive_num) {
94 for (
int i = 0; i <
cloth->primitive_num; i++) {
97 copy_v3_v3(co[0], verts[vert_tris[i][0]].xold);
98 copy_v3_v3(co[1], verts[vert_tris[i][1]].xold);
99 copy_v3_v3(co[2], verts[vert_tris[i][2]].xold);
107 for (
int i = 0; i <
cloth->primitive_num; i++) {
133 bvhtree =
cloth->bvhselftree;
136 bvhtree =
cloth->bvhtree;
143 const int3 *vert_tris =
cloth->vert_tris;
147 if (verts && vert_tris) {
148 for (i = 0; i <
cloth->primitive_num; i++) {
149 float co[3][3], co_moving[3][3];
154 copy_v3_v3(co[0], verts[vert_tris[i][0]].txold);
155 copy_v3_v3(co[1], verts[vert_tris[i][1]].txold);
156 copy_v3_v3(co[2], verts[vert_tris[i][2]].txold);
159 copy_v3_v3(co_moving[0], verts[vert_tris[i][0]].tx);
160 copy_v3_v3(co_moving[1], verts[vert_tris[i][1]].tx);
161 copy_v3_v3(co_moving[2], verts[vert_tris[i][2]].tx);
184 const int2 *edges =
reinterpret_cast<const int2 *
>(
cloth->edges);
186 for (i = 0; i <
cloth->primitive_num; i++) {
264 ListBaseT<EffectorCache> *effectors =
nullptr;
267 bool vert_mass_changed =
false;
270 verts =
cloth->verts;
284 if (vert_mass_changed) {
328 Depsgraph *depsgraph,
332 float (*vertexCos)[3])
337 int framenr, startframe, endframe;
359 if (framenr < startframe) {
363 framenr = std::min(framenr, endframe);
370 if (framenr == startframe) {
459 MEM_SAFE_DELETE(
cloth->verts);
460 cloth->mvert_num = 0;
463 if (
cloth->springs !=
nullptr) {
468 MEM_SAFE_DELETE(spring->
pa);
469 MEM_SAFE_DELETE(spring->
pb);
472 search = search->
next;
476 cloth->springs =
nullptr;
479 cloth->springs =
nullptr;
480 cloth->numsprings = 0;
483 if (
cloth->bvhtree) {
492 if (
cloth->vert_tris) {
493 MEM_delete(
cloth->vert_tris);
510 printf(
"cloth_free_modifier_extern\n");
521 printf(
"cloth_free_modifier_extern in\n");
527 MEM_SAFE_DELETE(
cloth->verts);
528 cloth->mvert_num = 0;
531 if (
cloth->springs !=
nullptr) {
536 MEM_SAFE_DELETE(spring->
pa);
537 MEM_SAFE_DELETE(spring->
pb);
540 search = search->
next;
544 cloth->springs =
nullptr;
547 cloth->springs =
nullptr;
548 cloth->numsprings = 0;
551 if (
cloth->bvhtree) {
560 if (
cloth->vert_tris) {
561 MEM_delete(
cloth->vert_tris);
592 for (i = 0; i <
cloth->mvert_num; i++) {
594 mul_m4_v3(ob->world_to_object().ptr(), vertexCos[i]);
616 if (!clmd || !
mesh) {
620 int mvert_num =
mesh->verts_num;
627 for (
int i = 0; i < mvert_num; i++, verts++) {
646 for (
int j = 0; j < dvert->
totweight; j++) {
713 float k1 = base + shrink_factor_delta * verts[i1].
shrink_factor;
714 float k2 = base + shrink_factor_delta * verts[i2].
shrink_factor;
718 return sqrtf(k1 * k2);
726 const float (*shapekey_rest)[3] =
nullptr;
727 const float tnull[3] = {0, 0, 0};
733 printf(
"cloth_free_modifier cloth_from_object\n");
761 shapekey_rest =
static_cast<const float (*)[3]
>(
770 for (i = 0; i <
mesh->verts_num; i++, verts++) {
774 mul_m4_v3(ob->object_to_world().ptr(), verts->
x);
843 const uint mvert_num =
mesh->verts_num;
904 for (
uint i = 0; i < mvert_num; i++) {
908 MEM_delete(edgelist);
916 if (
cloth->springs !=
nullptr) {
921 MEM_SAFE_DELETE(spring->
pa);
922 MEM_SAFE_DELETE(spring->
pb);
925 search = search->
next;
929 cloth->springs =
nullptr;
934 MEM_SAFE_DELETE(spring_ref);
936 cloth->edgeset.clear();
940 ClothVertex *verts,
int i,
int j,
const int *inds,
int len,
float r_dir[3])
943 float fact = 1.0f /
len;
945 for (
int x = 0;
x <
len;
x++) {
953 ClothVertex *verts,
int i,
int j,
int *i_a,
int *i_b,
int len_a,
int len_b)
955 float dir_a[3], dir_b[3];
956 float tmp[3], vec_e[3];
964 sub_v3_v3v3(vec_e, verts[i].xrest, verts[j].xrest);
980 float hair_frame[3][3], dir_old[3], dir_new[3];
996 for (search =
cloth->springs; search; search = search->
next) {
999 bool is_root = spring->
kl != prev_mn;
1030 prev_mn = spring->
mn;
1038 float hair_frame[3][3], dir_old[3], dir_new[3];
1054 for (search =
cloth->springs; search; search = search->
next) {
1057 bool is_root = spring->
kl != prev_mn;
1085 prev_mn = spring->
mn;
1095 search =
cloth->springs;
1104 cloth->verts[spring->
ij].bend_stiff) /
1111 cloth->verts[spring->
ij].struct_stiff) /
1116 cloth->verts[spring->
ij].shear_stiff) /
1121 cloth->verts[spring->
ij].bend_stiff) /
1126 cloth->verts[spring->
ij].internal_stiff) /
1154 search = search->
next;
1168 for (i = 0; i <
mesh->verts_num; i++, verts++) {
1183 positions[i] = verts[i].
xrest;
1185 new_mesh->tag_positions_changed();
1195 uint struct_springs = 0;
1198 float shrink_factor;
1202 for (i = 0; i < mvert_num; i++) {
1203 cloth->verts[i].avg_spring_len = 0.0f;
1216 shrink_factor = 1.0f;
1224 cloth->verts, spring->
ij, spring->
kl, spring->
pa, spring->
pb, spring->
la, spring->
lb);
1235 search = search->
next;
1238 if (struct_springs > 0) {
1242 for (i = 0; i < mvert_num; i++) {
1243 if (
cloth->verts[i].spring_count > 0) {
1244 cloth->verts[i].avg_spring_len =
cloth->verts[i].avg_spring_len * 0.49f /
1263 r[0][0] += m[0][0] * f;
1264 r[0][1] += m[0][1] * f;
1265 r[0][2] += m[0][2] * f;
1266 r[1][0] += m[1][0] * f;
1267 r[1][1] += m[1][1] * f;
1268 r[1][2] += m[1][2] * f;
1269 r[2][0] += m[2][0] * f;
1270 r[2][1] += m[2][1] * f;
1271 r[2][2] += m[2][2] * f;
1275 const float dir_old[3],
1276 const float dir_new[3])
1298 const int *tmp_corner;
1299 float shrink_factor;
1316 cloth->verts[spring->
ij].shear_stiff) /
1328 spring->
la = k - j + 1;
1329 spring->
lb = faces[i].
size() - k + j + 1;
1341 tmp_corner = &corner_verts[faces[i].start()];
1343 for (
x = 0;
x < spring->
la;
x++) {
1344 spring->
pa[
x] = tmp_corner[j +
x];
1347 for (
x = 0;
x <= j;
x++) {
1348 spring->
pb[
x] = tmp_corner[
x];
1351 for (
y = k;
y < faces[i].size();
x++,
y++) {
1352 spring->
pb[
x] = tmp_corner[
y];
1358 cloth->verts, spring->
ij, spring->
kl, spring->
pa, spring->
pb, spring->
la, spring->
lb);
1361 cloth->verts[spring->
kl].bend_stiff) /
1378 for (
int i = 0; i <
len; i++) {
1379 p[i] = corner_verts[i];
1395 float max_diversion,
1399 float co[3], no[3], new_co[3];
1404 float vec_len =
sin(max_diversion);
1421 if (max_length == 0.0f) {
1426 const std::optional<bke::bvh::RayHit> rayhit = treedata.
ray_intersect(ray);
1433 if (rayhit->distance <= max_length) {
1440 const int3 &tri = corner_tris[rayhit->index];
1442 for (
int i = 0; i < 3; i++) {
1443 int tmp_vert_idx = corner_verts[tri[i]];
1444 if (tmp_vert_idx == v_idx) {
1450 if (
len < min_len) {
1452 vert_idx = tmp_vert_idx;
1456 *r_tar_v_idx = vert_idx;
1467 ClothSpring *spring =
nullptr, *tspring =
nullptr, *tspring2 =
nullptr;
1468 uint struct_springs = 0, shear_springs = 0, bend_springs = 0, struct_springs_real = 0;
1472 float shrink_factor;
1479 LinkNode *search =
nullptr, *search2 =
nullptr;
1483 if (numedges == 0) {
1492 cloth->springs =
nullptr;
1511 if (use_internal_springs && numface > 0) {
1513 Mesh *tmp_mesh =
nullptr;
1523 const Mesh &mesh_to_use = tmp_mesh ? *tmp_mesh : *
mesh;
1529 const Span<float3> vert_positions = mesh_to_use.vert_positions();
1530 const Span<int> corner_verts = mesh_to_use.corner_verts();
1531 const Span<int3> corner_tris = mesh_to_use.corner_tris();
1532 const Span<float3> vert_normals = mesh_to_use.vert_normals();
1533 for (
int i = 0; i < mvert_num; i++) {
1547 if (existing_vert_pairs.
contains({i, tar_v_idx})) {
1552 existing_vert_pairs.
add({i, tar_v_idx});
1561 cloth->verts[spring->
ij].xrest) *
1564 cloth->verts[spring->
ij].internal_stiff) /
1573 spring_ref[i].
spring = spring;
1586 existing_vert_pairs.
clear();
1594 for (
int i = 0; i < mvert_num; i++) {
1595 cloth->verts[i].avg_spring_len = 0.0f;
1605 mesh->loose_edges().to_bits(loose_edges);
1606 for (
int i = 0; i < numedges; i++) {
1617 cloth->sew_edge_graph.add({edges[i][0], edges[i][1]});
1622 cloth->verts[spring->
ij].xrest) *
1625 cloth->verts[spring->
ij].struct_stiff) /
1632 cloth->verts[spring->
ij].spring_count++;
1633 cloth->verts[spring->
kl].spring_count++;
1634 struct_springs_real++;
1643 spring_ref[i].
spring = spring;
1652 if (struct_springs_real > 0) {
1656 for (
int i = 0; i < mvert_num; i++) {
1657 if (
cloth->verts[i].spring_count > 0) {
1658 cloth->verts[i].avg_spring_len =
cloth->verts[i].avg_spring_len * 0.49f /
1663 cloth->edgeset.reserve(numedges);
1666 for (
int i = 0; i < numface; i++) {
1669 if (faces[i].size() > 3) {
1670 for (
int j = 1; j < faces[i].
size() - 1; j++) {
1685 for (
int k = j + 2; k < faces[i].
size(); k++) {
1703 for (
int j = 0; j < faces[i].
size(); j++) {
1704 const int edge_i = corner_edges[faces[i][j]];
1709 if (curr_ref->
face == 1) {
1710 curr_ref->
index = i;
1713 else if (curr_ref->
face == 2) {
1714 spring = curr_ref->
spring;
1718 spring->
la = faces[curr_ref->
index].size();
1719 spring->
lb = faces[i].size();
1722 &spring->
pa, spring->
la, &corner_verts[faces[curr_ref->
index].start()]) ||
1724 &spring->
pb, spring->
lb, &corner_verts[faces[i].start()]))
1730 spring->
mn = edge_i;
1741 cloth->verts[spring->
kl].bend_stiff) /
1747 else if (curr_ref->
face == 3) {
1748 spring = curr_ref->
spring;
1751 MEM_delete(spring->
pa);
1752 MEM_delete(spring->
pb);
1753 spring->
pa =
nullptr;
1754 spring->
pb =
nullptr;
1764 search2 =
cloth->springs;
1766 for (
int i = struct_springs; i < struct_springs + shear_springs; i++) {
1771 tspring2 =
static_cast<ClothSpring *
>(search2->link);
1772 search = edgelist[tspring2->kl].
list;
1776 index2 = ((tspring->ij == tspring2->kl) ? (tspring->kl) : (tspring->ij));
1780 if ((index2 != tspring2->ij) && !
cloth->edgeset.contains({tspring2->ij, index2})) {
1791 cloth->verts[spring->
ij].xrest) *
1795 cloth->verts[spring->
ij].bend_stiff) /
1797 cloth->edgeset.add({spring->
ij, spring->
kl});
1803 search = search->
next;
1806 search2 = search2->
next;
1810 else if (struct_springs > 2) {
1811 if (
G.debug_value != 1112) {
1812 search =
cloth->springs;
1813 search2 = search->
next;
1814 while (search && search2) {
1816 tspring2 =
static_cast<ClothSpring *
>(search2->link);
1818 if (tspring->ij == tspring2->kl) {
1826 spring->
ij = tspring2->ij;
1827 spring->
kl = tspring->ij;
1828 spring->
mn = tspring->kl;
1830 cloth->verts[spring->
ij].xrest);
1833 cloth->verts[spring->
ij].bend_stiff) /
1840 search = search->
next;
1841 search2 = search2->
next;
1852 search =
cloth->springs;
1853 search2 = search->
next;
1854 while (search && search2) {
1856 tspring2 =
static_cast<ClothSpring *
>(search2->link);
1858 if (tspring->ij == tspring2->kl) {
1866 spring->
ij = tspring2->ij;
1867 spring->
kl = tspring->kl;
1869 cloth->verts[spring->
ij].xrest);
1872 cloth->verts[spring->
ij].bend_stiff) /
1879 search = search->
next;
1880 search2 = search2->
next;
1891 for (
int i = 0; i < numedges; i++) {
1892 cloth->edgeset.add({edges[i][0], edges[i][1]});
1895 for (
int i = 0; i < numface; i++) {
1896 if (faces[i].size() == 4) {
1897 cloth->edgeset.add({corner_verts[faces[i].start() + 0], corner_verts[faces[i].start() + 2]});
1898 cloth->edgeset.add({corner_verts[faces[i].start() + 1], corner_verts[faces[i].start() + 3]});
1902 MEM_SAFE_DELETE(spring_ref);
1904 cloth->numsprings = struct_springs + shear_springs + bend_springs;
1909 if (
G.debug_value > 0) {
CustomData interface, see also DNA_customdata_types.h.
#define PTCACHE_CLEAR_AFTER
#define PTCACHE_READ_INTERPOLATED
#define PTCACHE_RESET_OUTDATED
#define PTCACHE_READ_EXACT
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
constexpr IndexRange index_range() const
bool contains(const Key &key) const
constexpr int64_t size() const
constexpr bool is_empty() const
std::optional< RayHit > ray_intersect(const Ray &ray) const
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
void vert_tris_from_corner_tris(Span< int > corner_verts, Span< int3 > corner_tris, MutableSpan< int3 > vert_tris)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
int BKE_ptcache_read(PTCacheID *pid, float cfra, bool no_extrapolate_old)
MINLINE void negate_v3_v3(float r[3], const float a[3])
int cloth_uses_vgroup(ClothModifierData *clmd)
static void cloth_apply_vgroup(ClothModifierData *clmd, const Mesh *mesh)
void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
void BKE_modifier_set_error(const Object *ob, ModifierData *md, const char *format,...) ATTR_PRINTF_FORMAT(3
int SIM_cloth_solve(Depsgraph *depsgraph, Object *ob, float frame, ClothModifierData *clmd, ListBaseT< EffectorCache > *effectors)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
BLI_INLINE void cross_identity_v3(float r[3][3], const float v[3])
void SIM_mass_spring_set_implicit_vertex_mass(Implicit_Data *data, int index, float mass)
void copy_m3_m3(float m1[3][3], const float m2[3][3])
Mesh * BKE_mesh_copy_for_eval(const Mesh &source)
struct RNG * BLI_rng_new_srandom(unsigned int seed)
void BLI_bvhtree_free(BVHTree *tree)
int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *pid, int mode)
static bool cloth_from_object(Object *ob, ClothModifierData *clmd, const Mesh *mesh, float framenr, int first)
void cloth_free_modifier(ClothModifierData *clmd)
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
void BLI_bvhtree_balance(BVHTree *tree)
static bool find_internal_spring_target_vertex(const bke::bvh::Tree &treedata, const Span< float3 > vert_positions, const Span< int > corner_verts, const Span< int3 > corner_tris, const Span< float3 > vert_normals, uint v_idx, RNG *rng, float max_length, float max_diversion, bool check_normal, int *r_tar_v_idx)
ATTR_WARN_UNUSED_RESULT const BMVert * v
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
void BKE_ptcache_id_from_cloth(PTCacheID *pid, struct Object *ob, struct ClothModifierData *clmd)
bool BLI_bvhtree_update_node(BVHTree *tree, int index, const float co[3], const float co_moving[3], int numpoints)
MINLINE float pow4f(float x)
MINLINE void mul_v3_fl(float r[3], float f)
void void BLI_linklist_prepend(LinkNode **listp, void *ptr) ATTR_NONNULL(1)
@ CLOTH_SPRING_TYPE_BENDING
@ CLOTH_SPRING_TYPE_STRUCTURAL
@ CLOTH_SPRING_TYPE_SHEAR
@ CLOTH_SPRING_TYPE_SEWING
@ CLOTH_SPRING_TYPE_INTERNAL
@ CLOTH_SPRING_TYPE_BENDING_HAIR
static int do_step_cloth(Depsgraph *depsgraph, Object *ob, ClothModifierData *clmd, const Mesh *result, int framenr)
void SIM_cloth_solver_set_volume(ClothModifierData *clmd)
void clothModifier_do(ClothModifierData *clmd, Depsgraph *depsgraph, Scene *scene, Object *ob, const Mesh *mesh, float(*vertexCos)[3])
void mul_transposed_m3_v3(const float M[3][3], float r[3])
static Mesh * cloth_make_rest_mesh(ClothModifierData *clmd, const Mesh *mesh)
void mul_m4_v3(const float M[4][4], float r[3])
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
void BLI_bvhtree_update_tree(BVHTree *tree)
BLI_INLINE void spring_verts_ordered_set(ClothSpring *spring, int v0, int v1)
VecBase< int32_t, 2 > int2
VecBase< int32_t, 3 > int3
static void cloth_update_verts(Object *ob, ClothModifierData *clmd, const Mesh *mesh)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
static void cloth_free_errorsprings(Cloth *cloth, LinkNodePair *edgelist, BendSpringRef *spring_ref)
int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra)
void cloth_parallel_transport_hair_frame(float mat[3][3], const float dir_old[3], const float dir_new[3])
static float cloth_spring_angle(ClothVertex *verts, int i, int j, int *i_a, int *i_b, int len_a, int len_b)
static void cloth_update_springs(ClothModifierData *clmd)
static BVHTree * bvhtree_build_from_cloth(ClothModifierData *clmd, float epsilon)
BVHTree * BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
void SIM_cloth_solver_free(ClothModifierData *clmd)
void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale)
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
const void * CustomData_get_layer(const CustomData *data, eCustomDataType type)
void BKE_id_free(Main *bmain, void *idv)
void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr)
static void cloth_update_spring_lengths(ClothModifierData *clmd, const Mesh *mesh)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void bvhtree_update_from_cloth(ClothModifierData *clmd, bool moving, bool self)
void BKE_ptcache_validate(struct PointCache *cache, int framenr)
MINLINE float normalize_v3(float n[3])
static bool do_init_cloth(Object *ob, ClothModifierData *clmd, const Mesh *result, int framenr)
MINLINE void add_v3_v3(float r[3], const float a[3])
@ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS_NORMAL
@ CLOTH_SIMSETTINGS_FLAG_DYNAMIC_BASEMESH
@ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS
@ CLOTH_SIMSETTINGS_FLAG_PRESSURE_VOL
@ CLOTH_SIMSETTINGS_FLAG_SEW
@ CLOTH_SIMSETTINGS_FLAG_PRESSURE
void cloth_free_modifier_extern(ClothModifierData *clmd)
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
void void void void BLI_linklist_append(LinkNodePair *list_pair, void *ptr) ATTR_NONNULL(1)
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ListBaseT< EffectorCache > * BKE_effectors_create(struct Depsgraph *depsgraph, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights, bool use_rotation)
@ CLOTH_VERT_FLAG_NOSELFCOLL
@ CLOTH_VERT_FLAG_NOOBJCOLL
void SIM_cloth_solver_set_positions(ClothModifierData *clmd)
void BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints)
@ CLOTH_SPRING_FLAG_DEACTIVATE
static bool cloth_build_springs(ClothModifierData *clmd, const Mesh *mesh)
int SIM_cloth_solver_init(Object *, ClothModifierData *clmd)
void zero_m3(float m[3][3])
static void cloth_from_mesh(ClothModifierData *clmd, const Object *ob, const Mesh *mesh)
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
BLI_INLINE void madd_m3_m3fl(float r[3][3], const float m[3][3], float f)
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
@ CLOTH_COLLSETTINGS_FLAG_ENABLED
@ CLOTH_COLLSETTINGS_FLAG_SELF
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
float DEG_get_ctime(const Depsgraph *graph)
void BKE_ptcache_invalidate(struct PointCache *cache)
BLI_INLINE void cloth_bend_poly_dir(ClothVertex *verts, int i, int j, const int *inds, int len, float r_dir[3])
static void cloth_free_edgelist(LinkNodePair *edgelist, uint mvert_num)
static void cloth_hair_update_bending_targets(ClothModifierData *clmd)
BLI_INLINE bool cloth_bend_set_poly_vert_array(int **poly, int len, const int *corner_verts)
void rotation_between_vecs_to_mat3(float m[3][3], const float v1[3], const float v2[3])
MINLINE int compare_ff(float a, float b, float max_diff)
void BKE_effectors_free(ListBaseT< EffectorCache > *lb)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
static void cloth_to_object(Object *ob, ClothModifierData *clmd, float(*vertexCos)[3])
static void cloth_hair_update_bending_rest_targets(ClothModifierData *clmd)
static bool cloth_add_shear_bend_spring(ClothModifierData *clmd, LinkNodePair *edgelist, const Span< int > corner_verts, const OffsetIndices< int > faces, int i, int j, int k)
static float cloth_shrink_factor(ClothModifierData *clmd, ClothVertex *verts, int i1, int i2)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
CLOTH_COLLISIONSETTINGS_FLAGS flags
struct Cloth * clothObject
struct ClothHairData * hairdata
struct ClothSimSettings * sim_parms
struct PointCache * point_cache
struct ClothCollSettings * coll_parms
struct EffectorWeights * effector_weights
CLOTH_SIMSETTINGS_FLAGS flags
CLOTH_BENDING_MODEL bending_model
float internal_spring_max_diversion
float internal_spring_max_length
unsigned int impulse_count
unsigned char old_solver_type
unsigned int primitive_num
const c_style_mat & ptr() const
bke::ObjectRuntime * runtime
struct PointCache * cache
struct PTCacheEdit * edit