Blender V5.3
cloth.cc File Reference
#include <algorithm>
#include "MEM_guardedalloc.h"
#include "DNA_cloth_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_linklist.hh"
#include "BLI_math_geom_c.hh"
#include "BLI_math_matrix_c.hh"
#include "BLI_math_rotation_c.hh"
#include "BLI_math_vector.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_rand_c.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "BKE_bvhutils.hh"
#include "BKE_cloth.hh"
#include "BKE_customdata.hh"
#include "BKE_effect.h"
#include "BKE_global.hh"
#include "BKE_lib_id.hh"
#include "BKE_mesh.hh"
#include "BKE_modifier.hh"
#include "BKE_pointcache.h"
#include "SIM_mass_spring.h"

Go to the source code of this file.

Classes

struct  blender::BendSpringRef

Namespaces

namespace  blender
 BMesh Iterators.

Functions

static void blender::cloth_to_object (Object *ob, ClothModifierData *clmd, float(*vertexCos)[3])
static void blender::cloth_apply_vgroup (ClothModifierData *clmd, const Mesh *mesh)
void blender::clothModifier_do (ClothModifierData *clmd, Depsgraph *depsgraph, Scene *scene, Object *ob, const Mesh *mesh, float(*vertexCos)[3])
Internal Functions
static void blender::cloth_from_mesh (ClothModifierData *clmd, const Object *ob, const Mesh *mesh)
static bool blender::cloth_from_object (Object *ob, ClothModifierData *clmd, const Mesh *mesh, float framenr, int first)
int blender::cloth_uses_vgroup (ClothModifierData *clmd)
static float blender::cloth_shrink_factor (ClothModifierData *clmd, ClothVertex *verts, int i1, int i2)
Spring Network Building Implementation
static void blender::cloth_update_springs (ClothModifierData *clmd)
static void blender::cloth_update_verts (Object *ob, ClothModifierData *clmd, const Mesh *mesh)
static void blender::cloth_update_spring_lengths (ClothModifierData *clmd, const Mesh *mesh)
static bool blender::cloth_build_springs (ClothModifierData *clmd, const Mesh *mesh)
BLI_INLINE void blender::spring_verts_ordered_set (ClothSpring *spring, int v0, int v1)
static void blender::cloth_free_edgelist (LinkNodePair *edgelist, uint mvert_num)
static void blender::cloth_free_errorsprings (Cloth *cloth, LinkNodePair *edgelist, BendSpringRef *spring_ref)
BLI_INLINE void blender::cloth_bend_poly_dir (ClothVertex *verts, int i, int j, const int *inds, int len, float r_dir[3])
static float blender::cloth_spring_angle (ClothVertex *verts, int i, int j, int *i_a, int *i_b, int len_a, int len_b)
static void blender::cloth_hair_update_bending_targets (ClothModifierData *clmd)
static void blender::cloth_hair_update_bending_rest_targets (ClothModifierData *clmd)
static Mesh * blender::cloth_make_rest_mesh (ClothModifierData *clmd, const Mesh *mesh)
BLI_INLINE void blender::cross_identity_v3 (float r[3][3], const float v[3])
BLI_INLINE void blender::madd_m3_m3fl (float r[3][3], const float m[3][3], float f)
void blender::cloth_parallel_transport_hair_frame (float mat[3][3], const float dir_old[3], const float dir_new[3])
static bool blender::cloth_add_shear_bend_spring (ClothModifierData *clmd, LinkNodePair *edgelist, const Span< int > corner_verts, const OffsetIndices< int > faces, int i, int j, int k)
BLI_INLINE bool blender::cloth_bend_set_poly_vert_array (int **poly, int len, const int *corner_verts)
static bool blender::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)
BVH Tree
static BVHTree * blender::bvhtree_build_from_cloth (ClothModifierData *clmd, float epsilon)
void blender::bvhtree_update_from_cloth (ClothModifierData *clmd, bool moving, bool self)
Modifier Simulation Entry Points
void blender::cloth_clear_cache (Object *ob, ClothModifierData *clmd, float framenr)
static bool blender::do_init_cloth (Object *ob, ClothModifierData *clmd, const Mesh *result, int framenr)
static int blender::do_step_cloth (Depsgraph *depsgraph, Object *ob, ClothModifierData *clmd, const Mesh *result, int framenr)
Free Modifier Data
void blender::cloth_free_modifier (ClothModifierData *clmd)
void blender::cloth_free_modifier_extern (ClothModifierData *clmd)