161 float co[3][3], co_moving[3][3];
327 float (*vertexCos)[3])
332 int framenr, startframe, endframe;
353 if (framenr < startframe) {
357 if (framenr > endframe) {
366 if (framenr == startframe) {
408 if (cache->
simframe == startframe &&
461 search = search->
next;
509 printf(
"cloth_free_modifier_extern\n");
520 printf(
"cloth_free_modifier_extern in\n");
543 search = search->
next;
627 if (!clmd || !
mesh) {
636 for (
int i = 0; i < mvert_num; i++,
verts++) {
647 verts->shrink_factor = 0.0f;
655 for (
int j = 0; j < dvert->
totweight; j++) {
722 float k1 = base + shrink_factor_delta *
verts[
i1].shrink_factor;
723 float k2 = base + shrink_factor_delta *
verts[i2].shrink_factor;
727 return sqrtf(k1 * k2);
737 const float tnull[3] = {0, 0, 0};
743 printf(
"cloth_free_modifier cloth_from_object\n");
798 verts->impulse_count = 0;
807 verts->shrink_factor = 0.0f;
816 verts->impulse_count = 0;
857 ob, &(clmd->
modifier),
"Out of memory on allocating clmd->clothObject->verts");
858 printf(
"cloth_free_modifier clmd->clothObject->verts\n");
874 ob, &(clmd->
modifier),
"Out of memory on allocating clmd->clothObject->looptri");
875 printf(
"cloth_free_modifier clmd->clothObject->looptri\n");
909 for (
uint i = 0; i < mvert_num; i++) {
930 search = search->
next;
951 float fact = 1.0f /
len;
953 for (
int x = 0;
x <
len;
x++) {
963 float dir_a[3], dir_b[3];
964 float tmp[3], vec_e[3];
988 float hair_frame[3][3], dir_old[3], dir_new[3];
1004 for (search = cloth->
springs; search; search = search->
next) {
1007 bool is_root = spring->
kl != prev_mn;
1038 prev_mn = spring->
mn;
1046 float hair_frame[3][3], dir_old[3], dir_new[3];
1062 for (search = cloth->
springs; search; search = search->
next) {
1065 bool is_root = spring->
kl != prev_mn;
1093 prev_mn = spring->
mn;
1161 search = search->
next;
1201 unsigned int struct_springs = 0;
1203 unsigned int mvert_num = (
unsigned int)
mesh->
totvert;
1204 float shrink_factor;
1208 for (i = 0; i < mvert_num; i++) {
1221 shrink_factor = 1.0f;
1229 cloth->
verts, spring->
ij, spring->
kl, spring->
pa, spring->
pb, spring->
la, spring->
lb);
1240 search = search->
next;
1243 if (struct_springs > 0) {
1247 for (i = 0; i < mvert_num; i++) {
1268 r[0][0] += m[0][0] * f;
1269 r[0][1] += m[0][1] * f;
1270 r[0][2] += m[0][2] * f;
1271 r[1][0] += m[1][0] * f;
1272 r[1][1] += m[1][1] * f;
1273 r[1][2] += m[1][2] * f;
1274 r[2][0] += m[2][0] * f;
1275 r[2][1] += m[2][1] * f;
1276 r[2][2] += m[2][2] * f;
1280 const float dir_old[3],
1281 const float dir_new[3])
1303 const MLoop *tmp_loop;
1304 float shrink_factor;
1315 spring, mloop[mpoly[i].loopstart + j].
v, mloop[mpoly[i].loopstart + k].
v);
1334 spring->
la = k - j + 1;
1335 spring->
lb = mpoly[i].
totloop - k + j + 1;
1349 for (
x = 0;
x < spring->
la;
x++) {
1350 spring->
pa[
x] = tmp_loop[j +
x].
v;
1353 for (
x = 0;
x <= j;
x++) {
1354 spring->
pb[
x] = tmp_loop[
x].
v;
1358 spring->
pb[
x] = tmp_loop[
y].
v;
1364 cloth->
verts, spring->
ij, spring->
kl, spring->
pa, spring->
pb, spring->
la, spring->
lb);
1384 for (
int i = 0; i <
len; i++, mloop++) {
1397 float max_diversion,
1399 unsigned int *r_tar_v_idx)
1401 float co[3], no[3], new_co[3];
1408 float vec_len =
sin(max_diversion);
1426 if (max_length == 0.0f) {
1427 max_length = FLT_MAX;
1432 rayhit.
dist = max_length;
1437 unsigned int vert_idx = -1;
1441 if (rayhit.
index != -1 && rayhit.
dist <= max_length) {
1442 if (check_normal &&
dot_v3v3(rayhit.
no, no) < 0.0f) {
1447 float min_len = FLT_MAX;
1450 for (
int i = 0; i < 3; i++) {
1451 unsigned int tmp_vert_idx = mloop[lt->
tri[i]].
v;
1452 if (tmp_vert_idx == v_idx) {
1458 if (
len < min_len) {
1460 vert_idx = tmp_vert_idx;
1464 *r_tar_v_idx = vert_idx;
1475 unsigned int struct_springs = 0, shear_springs = 0, bend_springs = 0, struct_springs_real = 0;
1476 unsigned int mvert_num = (
unsigned int)
mesh->
totvert;
1477 unsigned int numedges = (
unsigned int)
mesh->
totedge;
1478 unsigned int numpolys = (
unsigned int)
mesh->
totpoly;
1479 float shrink_factor;
1490 if (numedges == 0) {
1503 spring_ref =
MEM_callocN(
sizeof(*spring_ref) * numedges,
"temp bend spring reference");
1519 if (use_internal_springs && numpolys > 0) {
1521 unsigned int tar_v_idx;
1536 for (
int i = 0; i < mvert_num; i++) {
1571 spring_ref[i].spring = spring;
1594 for (
int i = 0; i < mvert_num; i++) {
1605 for (
int i = 0; i < numedges; i++) {
1633 struct_springs_real++;
1642 spring_ref[i].spring = spring;
1651 if (struct_springs_real > 0) {
1655 for (
int i = 0; i < mvert_num; i++) {
1666 for (
int i = 0; i < numpolys; i++) {
1669 if (mpoly[i].totloop > 3) {
1670 for (
int j = 1; j < mpoly[i].totloop - 1; j++) {
1685 for (
int k = j + 2; k < mpoly[i].totloop; k++) {
1703 const MLoop *ml = mloop + mpoly[i].loopstart;
1705 for (
int j = 0; j < mpoly[i].totloop; j++, ml++) {
1710 if (curr_ref->
polys == 1) {
1711 curr_ref->
index = i;
1714 else if (curr_ref->
polys == 2) {
1715 spring = curr_ref->
spring;
1719 spring->
la = mpoly[curr_ref->
index].totloop;
1720 spring->
lb = mpoly[i].totloop;
1723 &spring->
pa, spring->
la, &mloop[mpoly[curr_ref->
index].loopstart]) ||
1725 &spring->
pb, spring->
lb, &mloop[mpoly[i].loopstart])) {
1747 else if (curr_ref->
polys == 3) {
1748 spring = curr_ref->
spring;
1766 for (
int i = struct_springs; i < struct_springs + shear_springs; i++) {
1771 tspring2 = search2->
link;
1772 search =
edgelist[tspring2->kl].list;
1775 tspring = search->link;
1776 index2 = ((tspring->ij == tspring2->kl) ? (tspring->kl) : (tspring->ij));
1780 if ((index2 != tspring2->ij) && !
BLI_edgeset_haskey(edgeset, tspring2->ij, index2)) {
1803 search = search->next;
1806 search2 = search2->next;
1810 else if (struct_springs > 2) {
1811 if (
G.debug_value != 1112) {
1813 search2 = search->
next;
1814 while (search && search2) {
1815 tspring = search->
link;
1816 tspring2 = search2->link;
1818 if (tspring->ij == tspring2->kl) {
1826 spring->
ij = tspring2->ij;
1827 spring->
kl = tspring->ij;
1828 spring->
mn = tspring->kl;
1840 search = search->next;
1841 search2 = search2->next;
1853 search2 = search->
next;
1854 while (search && search2) {
1855 tspring = search->
link;
1856 tspring2 = search2->link;
1858 if (tspring->ij == tspring2->kl) {
1866 spring->
ij = tspring2->ij;
1867 spring->
kl = tspring->kl;
1879 search = search->next;
1880 search2 = search2->next;
1890 for (
int i = 0; i < numedges; i++) {
1894 for (
int i = 0; i < numpolys; i++) {
1895 if (mpoly[i].totloop == 4) {
1896 BLI_edgeset_add(edgeset, mloop[mpoly[i].loopstart + 0].
v, mloop[mpoly[i].loopstart + 2].
v);
1897 BLI_edgeset_add(edgeset, mloop[mpoly[i].loopstart + 1].
v, mloop[mpoly[i].loopstart + 3].
v);
1903 cloth->
numsprings = struct_springs + shear_springs + bend_springs;
1908 if (
G.debug_value > 0) {
typedef float(TangentPoint)[2]
BVHTree * BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, struct Mesh *mesh, const BVHCacheType bvh_cache_type, const int tree_type)
void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data)
@ 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(struct Mesh *source, bool reference)
void BKE_mesh_calc_normals(struct Mesh *me)
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(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_add(EdgeSet *es, unsigned int v0, unsigned int v1)
void BLI_edgeset_insert(EdgeSet *es, unsigned int v0, unsigned int v1)
void BLI_edgeset_free(EdgeSet *es)
EdgeSet * BLI_edgeset_new_ex(const char *info, const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
EdgeSet * BLI_edgeset_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_edgeset_haskey(EdgeSet *es, unsigned int v0, unsigned int v1) 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 normal_short_to_float_v3(float r[3], const short n[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_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 negate_v3(float r[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.
#define PTCACHE_REDO_NEEDED
_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 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 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 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_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
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 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 BVHTree * bvhselftree
unsigned char old_solver_type
struct ClothVertex * verts
unsigned int primitive_num
struct MLoopTri_Store looptris
struct PointCache * cache
struct PTCacheEdit * edit