24 #define DO_INLINE MALWAYS_INLINE
27 #define SOFTGOALSNAP 0.999f
31 #define ALMOST_ZERO FLT_EPSILON
138 #define VECSUBADDSS(v1, v2, aS, v3, bS) \
140 *(v1) -= *(v2)*aS + *(v3)*bS; \
141 *(v1 + 1) -= *(v2 + 1) * aS + *(v3 + 1) * bS; \
142 *(v1 + 2) -= *(v2 + 2) * aS + *(v3 + 2) * bS; \
145 #define VECADDSS(v1, v2, aS, v3, bS) \
147 *(v1) = *(v2)*aS + *(v3)*bS; \
148 *(v1 + 1) = *(v2 + 1) * aS + *(v3 + 1) * bS; \
149 *(v1 + 2) = *(v2 + 2) * aS + *(v3 + 2) * bS; \
152 #define VECADDS(v1, v2, v3, bS) \
154 *(v1) = *(v2) + *(v3)*bS; \
155 *(v1 + 1) = *(v2 + 1) + *(v3 + 1) * bS; \
156 *(v1 + 2) = *(v2 + 2) + *(v3 + 2) * bS; \
159 #define VECSUBMUL(v1, v2, aS) \
162 *(v1 + 1) -= *(v2 + 1) * aS; \
163 *(v1 + 2) -= *(v2 + 2) * aS; \
166 #define VECSUBS(v1, v2, v3, bS) \
168 *(v1) = *(v2) - *(v3)*bS; \
169 *(v1 + 1) = *(v2 + 1) - *(v3 + 1) * bS; \
170 *(v1 + 2) = *(v2 + 2) - *(v3 + 2) * bS; \
173 #define VECADDMUL(v1, v2, aS) \
176 *(v1 + 1) += *(v2 + 1) * aS; \
177 *(v1 + 2) += *(v2 + 2) * aS; \
231 float (*vertexCos)[3]);
242 const float dir_old[3],
243 const float dir_new[3]);
int cloth_uses_vgroup(struct ClothModifierData *clmd)
void bvhtree_update_from_cloth(struct ClothModifierData *clmd, bool moving, bool self)
void cloth_free_modifier(struct ClothModifierData *clmd)
@ 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
struct ClothSpring ClothSpring
@ CLOTH_VERT_FLAG_NOSELFCOLL
@ CLOTH_VERT_FLAG_NOOBJCOLL
int cloth_bvh_collision(struct Depsgraph *depsgraph, struct Object *ob, struct ClothModifierData *clmd, float step, float dt)
void clothModifier_do(struct ClothModifierData *clmd, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Mesh *me, float(*vertexCos)[3])
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])
@ CLOTH_SPRING_FLAG_DEACTIVATE
@ CLOTH_SPRING_FLAG_NEEDED
struct ClothSolverResult ClothSolverResult
struct ColliderContacts ColliderContacts
struct ClothVertex ClothVertex
void cloth_free_modifier_extern(struct ClothModifierData *clmd)
struct ClothHairData ClothHairData
struct Depsgraph Depsgraph
const Depsgraph * depsgraph
unsigned int impulse_count
struct LinkNode * springs
struct EdgeSet * sew_edge_graph
float initial_mesh_volume
float average_acceleration[3]
struct Implicit_Data * implicit
struct BVHTree * bvhselftree
unsigned char old_solver_type
struct ClothVertex * verts
unsigned int primitive_num