27#define DO_INLINE MALWAYS_INLINE
30#define SOFTGOALSNAP 0.999f
34#define ALMOST_ZERO FLT_EPSILON
141#define VECSUBADDSS(v1, v2, aS, v3, bS) \
143 *(v1) -= *(v2) * aS + *(v3) * bS; \
144 *(v1 + 1) -= *(v2 + 1) * aS + *(v3 + 1) * bS; \
145 *(v1 + 2) -= *(v2 + 2) * aS + *(v3 + 2) * bS; \
148#define VECADDSS(v1, v2, aS, v3, bS) \
150 *(v1) = *(v2) * aS + *(v3) * bS; \
151 *(v1 + 1) = *(v2 + 1) * aS + *(v3 + 1) * bS; \
152 *(v1 + 2) = *(v2 + 2) * aS + *(v3 + 2) * bS; \
155#define VECADDS(v1, v2, v3, bS) \
157 *(v1) = *(v2) + *(v3) * bS; \
158 *(v1 + 1) = *(v2 + 1) + *(v3 + 1) * bS; \
159 *(v1 + 2) = *(v2 + 2) + *(v3 + 2) * bS; \
162#define VECSUBMUL(v1, v2, aS) \
164 *(v1) -= *(v2) * aS; \
165 *(v1 + 1) -= *(v2 + 1) * aS; \
166 *(v1 + 2) -= *(v2 + 2) * aS; \
169#define VECSUBS(v1, v2, v3, bS) \
171 *(v1) = *(v2) - *(v3) * bS; \
172 *(v1 + 1) = *(v2 + 1) - *(v3 + 1) * bS; \
173 *(v1 + 2) = *(v2 + 2) - *(v3 + 2) * bS; \
176#define VECADDMUL(v1, v2, aS) \
178 *(v1) += *(v2) * aS; \
179 *(v1 + 1) += *(v2 + 1) * aS; \
180 *(v1 + 2) += *(v2 + 2) * aS; \
231 float (*vertexCos)[3]);
242 const float dir_old[3],
243 const float dir_new[3]);
void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr)
@ 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
void clothModifier_do(ClothModifierData *clmd, Depsgraph *depsgraph, Scene *scene, Object *ob, Mesh *mesh, float(*vertexCos)[3])
void cloth_free_modifier_extern(ClothModifierData *clmd)
void bvhtree_update_from_cloth(ClothModifierData *clmd, bool moving, bool self)
int cloth_uses_vgroup(ClothModifierData *clmd)
void cloth_parallel_transport_hair_frame(float mat[3][3], const float dir_old[3], const float dir_new[3])
@ CLOTH_SPRING_FLAG_DEACTIVATE
@ CLOTH_SPRING_FLAG_NEEDED
int cloth_bvh_collision(Depsgraph *depsgraph, Object *ob, ClothModifierData *clmd, float step, float dt)
void cloth_free_modifier(ClothModifierData *clmd)
const Depsgraph * depsgraph
unsigned int impulse_count
blender::Set< blender::OrderedEdge > edgeset
float initial_mesh_volume
float average_acceleration[3]
unsigned char old_solver_type
const blender::int2 * edges
blender::int3 * vert_tris
blender::Set< blender::OrderedEdge > sew_edge_graph
unsigned int primitive_num