145 float co[3][3], co_moving[3][3];
257 bool vert_mass_changed =
false;
274 if (vert_mass_changed) {
319 float (*vertexCos)[3])
324 int framenr, startframe, endframe;
345 if (framenr < startframe) {
349 if (framenr > endframe) {
358 if (framenr == startframe) {
400 if (cache->
simframe == startframe &&
448 search = search->
next;
495 printf(
"cloth_free_modifier_extern\n");
506 printf(
"cloth_free_modifier_extern in\n");
525 search = search->
next;
609 if (!clmd || !
mesh) {
618 for (
int i = 0; i < mvert_num; i++,
verts++) {
629 verts->shrink_factor = 0.0f;
637 for (
int j = 0; j < dvert->
totweight; j++) {
704 float k1 = base + shrink_factor_delta *
verts[
i1].shrink_factor;
705 float k2 = base + shrink_factor_delta *
verts[i2].shrink_factor;
709 return sqrtf(k1 * k2);
719 const float tnull[3] = {0, 0, 0};
725 printf(
"cloth_free_modifier cloth_from_object\n");
780 verts->impulse_count = 0;
789 verts->shrink_factor = 0.0f;
798 verts->impulse_count = 0;
839 ob, &(clmd->
modifier),
"Out of memory on allocating clmd->clothObject->verts");
840 printf(
"cloth_free_modifier clmd->clothObject->verts\n");
856 ob, &(clmd->
modifier),
"Out of memory on allocating clmd->clothObject->looptri");
857 printf(
"cloth_free_modifier clmd->clothObject->looptri\n");
891 for (
uint i = 0; i < mvert_num; i++) {
912 search = search->
next;
933 float fact = 1.0f /
len;
935 for (
int x = 0;
x <
len;
x++) {
945 float dir_a[3], dir_b[3];
946 float tmp[3], vec_e[3];
970 float hair_frame[3][3], dir_old[3], dir_new[3];
986 for (search = cloth->
springs; search; search = search->
next) {
989 bool is_root = spring->
kl != prev_mn;
1020 prev_mn = spring->
mn;
1028 float hair_frame[3][3], dir_old[3], dir_new[3];
1044 for (search = cloth->
springs; search; search = search->
next) {
1047 bool is_root = spring->
kl != prev_mn;
1075 prev_mn = spring->
mn;
1143 search = search->
next;
1184 unsigned int struct_springs = 0;
1186 unsigned int mvert_num = (
unsigned int)
mesh->
totvert;
1187 float shrink_factor;
1191 for (i = 0; i < mvert_num; i++) {
1204 shrink_factor = 1.0f;
1212 cloth->
verts, spring->
ij, spring->
kl, spring->
pa, spring->
pb, spring->
la, spring->
lb);
1223 search = search->
next;
1226 if (struct_springs > 0) {
1230 for (i = 0; i < mvert_num; i++) {
1251 r[0][0] += m[0][0] * f;
1252 r[0][1] += m[0][1] * f;
1253 r[0][2] += m[0][2] * f;
1254 r[1][0] += m[1][0] * f;
1255 r[1][1] += m[1][1] * f;
1256 r[1][2] += m[1][2] * f;
1257 r[2][0] += m[2][0] * f;
1258 r[2][1] += m[2][1] * f;
1259 r[2][2] += m[2][2] * f;
1263 const float dir_old[3],
1264 const float dir_new[3])
1286 const MLoop *tmp_loop;
1287 float shrink_factor;
1298 spring, mloop[mpoly[i].loopstart + j].
v, mloop[mpoly[i].loopstart + k].
v);
1317 spring->
la = k - j + 1;
1318 spring->
lb = mpoly[i].
totloop - k + j + 1;
1332 for (
x = 0;
x < spring->
la;
x++) {
1333 spring->
pa[
x] = tmp_loop[j +
x].
v;
1336 for (
x = 0;
x <= j;
x++) {
1337 spring->
pb[
x] = tmp_loop[
x].
v;
1341 spring->
pb[
x] = tmp_loop[
y].
v;
1347 cloth->
verts, spring->
ij, spring->
kl, spring->
pa, spring->
pb, spring->
la, spring->
lb);
1367 for (
int i = 0; i <
len; i++, mloop++) {
1380 float max_diversion,
1382 unsigned int *r_tar_v_idx)
1384 float co[3], no[3], new_co[3];
1390 float vec_len =
sin(max_diversion);
1408 if (max_length == 0.0f) {
1409 max_length = FLT_MAX;
1414 rayhit.
dist = max_length;
1419 unsigned int vert_idx = -1;
1423 if (rayhit.
index != -1 && rayhit.
dist <= max_length) {
1424 if (check_normal &&
dot_v3v3(rayhit.
no, no) < 0.0f) {
1429 float min_len = FLT_MAX;
1432 for (
int i = 0; i < 3; i++) {
1433 unsigned int tmp_vert_idx = mloop[lt->
tri[i]].
v;
1434 if (tmp_vert_idx == v_idx) {
1440 if (
len < min_len) {
1442 vert_idx = tmp_vert_idx;
1446 *r_tar_v_idx = vert_idx;
1457 unsigned int struct_springs = 0, shear_springs = 0, bend_springs = 0, struct_springs_real = 0;
1458 unsigned int mvert_num = (
unsigned int)
mesh->
totvert;
1459 unsigned int numedges = (
unsigned int)
mesh->
totedge;
1460 unsigned int numpolys = (
unsigned int)
mesh->
totpoly;
1461 float shrink_factor;
1472 if (numedges == 0) {
1485 spring_ref =
MEM_callocN(
sizeof(*spring_ref) * numedges,
"temp bend spring reference");
1501 if (use_internal_springs && numpolys > 0) {
1503 unsigned int tar_v_idx;
1517 for (
int i = 0; i < mvert_num; i++) {
1552 spring_ref[i].spring = spring;
1575 for (
int i = 0; i < mvert_num; i++) {
1586 for (
int i = 0; i < numedges; i++) {
1614 struct_springs_real++;
1623 spring_ref[i].spring = spring;
1632 if (struct_springs_real > 0) {
1636 for (
int i = 0; i < mvert_num; i++) {
1647 for (
int i = 0; i < numpolys; i++) {
1650 if (mpoly[i].totloop > 3) {
1651 for (
int j = 1; j < mpoly[i].totloop - 1; j++) {
1666 for (
int k = j + 2; k < mpoly[i].totloop; k++) {
1684 const MLoop *ml = mloop + mpoly[i].loopstart;
1686 for (
int j = 0; j < mpoly[i].totloop; j++, ml++) {
1691 if (curr_ref->
polys == 1) {
1692 curr_ref->
index = i;
1695 else if (curr_ref->
polys == 2) {
1696 spring = curr_ref->
spring;
1700 spring->
la = mpoly[curr_ref->
index].totloop;
1701 spring->
lb = mpoly[i].totloop;
1704 &spring->
pa, spring->
la, &mloop[mpoly[curr_ref->
index].loopstart]) ||
1706 &spring->
pb, spring->
lb, &mloop[mpoly[i].loopstart])) {
1728 else if (curr_ref->
polys == 3) {
1729 spring = curr_ref->
spring;
1747 for (
int i = struct_springs; i < struct_springs + shear_springs; i++) {
1752 tspring2 = search2->
link;
1753 search =
edgelist[tspring2->kl].list;
1756 tspring = search->link;
1757 index2 = ((tspring->ij == tspring2->kl) ? (tspring->kl) : (tspring->ij));
1761 if ((index2 != tspring2->ij) && !
BLI_edgeset_haskey(edgeset, tspring2->ij, index2)) {
1784 search = search->next;
1787 search2 = search2->next;
1791 else if (struct_springs > 2) {
1792 if (
G.debug_value != 1112) {
1794 search2 = search->
next;
1795 while (search && search2) {
1796 tspring = search->
link;
1797 tspring2 = search2->link;
1799 if (tspring->ij == tspring2->kl) {
1807 spring->
ij = tspring2->ij;
1808 spring->
kl = tspring->ij;
1809 spring->
mn = tspring->kl;
1821 search = search->next;
1822 search2 = search2->next;
1834 search2 = search->
next;
1835 while (search && search2) {
1836 tspring = search->
link;
1837 tspring2 = search2->link;
1839 if (tspring->ij == tspring2->kl) {
1847 spring->
ij = tspring2->ij;
1848 spring->
kl = tspring->kl;
1860 search = search->next;
1861 search2 = search2->next;
1871 for (
int i = 0; i < numedges; i++) {
1875 for (
int i = 0; i < numpolys; i++) {
1876 if (mpoly[i].totloop == 4) {
1877 BLI_edgeset_add(edgeset, mloop[mpoly[i].loopstart + 0].
v, mloop[mpoly[i].loopstart + 2].
v);
1878 BLI_edgeset_add(edgeset, mloop[mpoly[i].loopstart + 1].
v, mloop[mpoly[i].loopstart + 3].
v);
1884 cloth->
numsprings = struct_springs + shear_springs + bend_springs;
1889 if (
G.debug_value > 0) {
typedef float(TangentPoint)[2]
void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data)
BVHTree * BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, const struct Mesh *mesh, BVHCacheType bvh_cache_type, int tree_type)
@ CLOTH_SPRING_TYPE_SEWING
@ CLOTH_SPRING_TYPE_SHEAR
@ CLOTH_SPRING_TYPE_BENDING_HAIR
@ CLOTH_SPRING_TYPE_STRUCTURAL
@ CLOTH_SPRING_TYPE_BENDING
@ CLOTH_SPRING_TYPE_INTERNAL
@ CLOTH_VERT_FLAG_NOSELFCOLL
@ CLOTH_VERT_FLAG_NOOBJCOLL
@ CLOTH_SPRING_FLAG_DEACTIVATE
void * CustomData_get_layer(const struct CustomData *data, int type)
void * CustomData_get(const struct CustomData *data, int index, int type)
void BKE_effectors_free(struct ListBase *lb)
struct ListBase * BKE_effectors_create(struct Depsgraph *depsgraph, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights, bool use_rotation)
void BKE_id_free(struct Main *bmain, void *idv)
struct Mesh * BKE_mesh_copy_for_eval(const struct Mesh *source, bool reference)
void BKE_mesh_tag_coords_changed(struct Mesh *mesh)
void BKE_mesh_runtime_verttri_from_looptri(struct MVertTri *r_verttri, const struct MLoop *mloop, const struct MLoopTri *looptri, int looptri_num)
const struct MLoopTri * BKE_mesh_runtime_looptri_ensure(const struct Mesh *mesh)
void BKE_modifier_set_error(const struct Object *ob, struct ModifierData *md, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale)
#define PTCACHE_CLEAR_AFTER
void BKE_ptcache_validate(struct PointCache *cache, int framenr)
void BKE_ptcache_id_clear(PTCacheID *id, int mode, unsigned int cfra)
#define PTCACHE_READ_INTERPOLATED
int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *id, int mode)
int BKE_ptcache_read(PTCacheID *pid, float cfra, bool no_extrapolate_old)
void BKE_ptcache_id_from_cloth(PTCacheID *pid, struct Object *ob, struct ClothModifierData *clmd)
int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra)
#define PTCACHE_RESET_OUTDATED
void BKE_ptcache_invalidate(struct PointCache *cache)
#define PTCACHE_READ_EXACT
bool BLI_edgeset_haskey(const EdgeSet *es, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT
bool BLI_edgeset_add(EdgeSet *es, unsigned int v0, unsigned int v1)
void BLI_edgeset_insert(EdgeSet *es, unsigned int v0, unsigned int v1)
EdgeSet * BLI_edgeset_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_edgeset_free(EdgeSet *es)
EdgeSet * BLI_edgeset_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_bvhtree_balance(BVHTree *tree)
BVHTree * BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
void BLI_bvhtree_update_tree(BVHTree *tree)
void BLI_bvhtree_free(BVHTree *tree)
void BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints)
bool BLI_bvhtree_update_node(BVHTree *tree, int index, const float co[3], const float co_moving[3], int numpoints)
int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata)
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
void void void void BLI_linklist_append(LinkNodePair *list_pair, void *ptr) ATTR_NONNULL(1)
void void BLI_linklist_prepend(LinkNode **listp, void *ptr) ATTR_NONNULL(1)
MINLINE float pow4f(float x)
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
void copy_m3_m3(float m1[3][3], const float m2[3][3])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void zero_m3(float m[3][3])
void mul_m4_v3(const float M[4][4], float r[3])
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
void mul_transposed_m3_v3(const float M[3][3], float r[3])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void rotation_between_vecs_to_mat3(float m[3][3], const float v1[3], const float v2[3])
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_v3_v3(float r[3], const float a[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
struct RNG * BLI_rng_new_srandom(unsigned int seed)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
struct Depsgraph Depsgraph
float DEG_get_ctime(const Depsgraph *graph)
@ CLOTH_COLLSETTINGS_FLAG_ENABLED
@ CLOTH_COLLSETTINGS_FLAG_SELF
@ CLOTH_SIMSETTINGS_FLAG_DYNAMIC_BASEMESH
@ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS_NORMAL
@ CLOTH_SIMSETTINGS_FLAG_PRESSURE_VOL
@ CLOTH_SIMSETTINGS_FLAG_SEW
@ CLOTH_SIMSETTINGS_FLAG_PRESSURE
@ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS
Object is a sort of wrapper for general info.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint i1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
void SIM_cloth_solver_free(ClothModifierData *clmd)
int SIM_cloth_solver_init(Object *UNUSED(ob), ClothModifierData *clmd)
void SIM_cloth_solver_set_volume(ClothModifierData *clmd)
void SIM_mass_spring_set_implicit_vertex_mass(Implicit_Data *data, int index, float mass)
void SIM_cloth_solver_set_positions(ClothModifierData *clmd)
int SIM_cloth_solve(Depsgraph *depsgraph, Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
static void cloth_update_verts(Object *ob, ClothModifierData *clmd, Mesh *mesh)
static bool do_init_cloth(Object *ob, ClothModifierData *clmd, Mesh *result, int framenr)
static float cloth_spring_angle(ClothVertex *verts, int i, int j, int *i_a, int *i_b, int len_a, int len_b)
BLI_INLINE void cross_identity_v3(float r[3][3], const float v[3])
void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr)
static void cloth_apply_vgroup(ClothModifierData *clmd, Mesh *mesh)
BLI_INLINE void cloth_bend_poly_dir(ClothVertex *verts, int i, int j, const int *inds, int len, float r_dir[3])
static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
static void cloth_to_object(Object *ob, ClothModifierData *clmd, float(*vertexCos)[3])
static bool cloth_add_shear_bend_spring(ClothModifierData *clmd, LinkNodePair *edgelist, const MLoop *mloop, const MPoly *mpoly, int i, int j, int k)
struct BendSpringRef BendSpringRef
static float cloth_shrink_factor(ClothModifierData *clmd, ClothVertex *verts, int i1, int i2)
static int do_step_cloth(Depsgraph *depsgraph, Object *ob, ClothModifierData *clmd, Mesh *result, int framenr)
static bool cloth_from_object(Object *ob, ClothModifierData *clmd, Mesh *mesh, float framenr, int first)
void clothModifier_do(ClothModifierData *clmd, Depsgraph *depsgraph, Scene *scene, Object *ob, Mesh *mesh, float(*vertexCos)[3])
BLI_INLINE void madd_m3_m3fl(float r[3][3], const float m[3][3], float f)
static void cloth_hair_update_bending_rest_targets(ClothModifierData *clmd)
static void cloth_hair_update_bending_targets(ClothModifierData *clmd)
void cloth_free_modifier_extern(ClothModifierData *clmd)
void bvhtree_update_from_cloth(ClothModifierData *clmd, bool moving, bool self)
BLI_INLINE bool cloth_bend_set_poly_vert_array(int **poly, int len, const MLoop *mloop)
int cloth_uses_vgroup(ClothModifierData *clmd)
static void cloth_update_springs(ClothModifierData *clmd)
static BVHTree * bvhtree_build_from_cloth(ClothModifierData *clmd, float epsilon)
static bool find_internal_spring_target_vertex(BVHTreeFromMesh *treedata, unsigned int v_idx, RNG *rng, float max_length, float max_diversion, bool check_normal, unsigned int *r_tar_v_idx)
void cloth_parallel_transport_hair_frame(float mat[3][3], const float dir_old[3], const float dir_new[3])
static void cloth_free_edgelist(LinkNodePair *edgelist, unsigned int mvert_num)
static void cloth_update_spring_lengths(ClothModifierData *clmd, Mesh *mesh)
BLI_INLINE void spring_verts_ordered_set(ClothSpring *spring, int v0, int v1)
static void cloth_free_errorsprings(Cloth *cloth, LinkNodePair *edgelist, BendSpringRef *spring_ref)
void cloth_free_modifier(ClothModifierData *clmd)
static void cloth_from_mesh(ClothModifierData *clmd, const Object *ob, Mesh *mesh)
static Mesh * cloth_make_rest_mesh(ClothModifierData *clmd, Mesh *mesh)
const Depsgraph * depsgraph
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
BVHTree_RayCastCallback raycast_callback
const float(* vert_normals)[3]
const struct MLoop * loop
const struct MVert * vert
const struct MLoopTri * looptri
struct ClothHairData * hairdata
struct Cloth * clothObject
struct PointCache * point_cache
struct ClothSimSettings * sim_parms
struct ClothCollSettings * coll_parms
struct EffectorWeights * effector_weights
float internal_spring_max_length
float internal_spring_max_diversion
struct LinkNode * springs
struct EdgeSet * sew_edge_graph
struct Implicit_Data * implicit
struct BVHTree * bvhselftree
unsigned char old_solver_type
struct ClothVertex * verts
unsigned int primitive_num
struct MLoopTri_Store looptris
struct PointCache * cache
struct PTCacheEdit * edit