Blender V4.3
BKE_cloth.hh File Reference
#include "BLI_math_vector_types.hh"
#include "BLI_ordered_edge.hh"
#include "BLI_set.hh"
#include <float.h>

Go to the source code of this file.

Classes

struct  ClothHairData
 
struct  ClothSolverResult
 
struct  Cloth
 
struct  ClothVertex
 
struct  ClothSpring
 
struct  ColliderContacts
 

Macros

#define DO_INLINE   MALWAYS_INLINE
 
#define SOFTGOALSNAP   0.999f
 
#define ALMOST_ZERO   FLT_EPSILON
 
#define VECSUBADDSS(v1, v2, aS, v3, bS)
 
#define VECADDSS(v1, v2, aS, v3, bS)
 
#define VECADDS(v1, v2, v3, bS)
 
#define VECSUBMUL(v1, v2, aS)
 
#define VECSUBS(v1, v2, v3, bS)
 
#define VECADDMUL(v1, v2, aS)
 

Enumerations

enum  eClothVertexFlag { CLOTH_VERT_FLAG_PINNED = (1 << 0) , CLOTH_VERT_FLAG_NOSELFCOLL = (1 << 1) , CLOTH_VERT_FLAG_NOOBJCOLL = (1 << 2) }
 
enum  CLOTH_SPRING_TYPES {
  CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1) , CLOTH_SPRING_TYPE_SHEAR = (1 << 2) , CLOTH_SPRING_TYPE_BENDING = (1 << 3) , CLOTH_SPRING_TYPE_GOAL = (1 << 4) ,
  CLOTH_SPRING_TYPE_SEWING = (1 << 5) , CLOTH_SPRING_TYPE_BENDING_HAIR = (1 << 6) , CLOTH_SPRING_TYPE_INTERNAL = (1 << 7)
}
 
enum  CLOTH_SPRINGS_FLAGS { CLOTH_SPRING_FLAG_DEACTIVATE = (1 << 1) , CLOTH_SPRING_FLAG_NEEDED = (1 << 2) }
 

Functions

int cloth_bvh_collision (Depsgraph *depsgraph, Object *ob, ClothModifierData *clmd, float step, float dt)
 
void cloth_free_modifier_extern (ClothModifierData *clmd)
 
void cloth_free_modifier (ClothModifierData *clmd)
 
void clothModifier_do (ClothModifierData *clmd, Depsgraph *depsgraph, Scene *scene, Object *ob, Mesh *mesh, float(*vertexCos)[3])
 
int cloth_uses_vgroup (ClothModifierData *clmd)
 
void bvhtree_update_from_cloth (ClothModifierData *clmd, bool moving, bool self)
 
void cloth_clear_cache (Object *ob, ClothModifierData *clmd, float framenr)
 
void cloth_parallel_transport_hair_frame (float mat[3][3], const float dir_old[3], const float dir_new[3])
 

Macro Definition Documentation

◆ ALMOST_ZERO

◆ DO_INLINE

#define DO_INLINE   MALWAYS_INLINE

Definition at line 27 of file BKE_cloth.hh.

◆ SOFTGOALSNAP

#define SOFTGOALSNAP   0.999f

Definition at line 30 of file BKE_cloth.hh.

Referenced by cloth_apply_vgroup().

◆ VECADDMUL

#define VECADDMUL ( v1,
v2,
aS )
Value:
{ \
*(v1) += *(v2) * aS; \
*(v1 + 1) += *(v2 + 1) * aS; \
*(v1 + 2) += *(v2 + 2) * aS; \
} \
((void)0)
ATTR_WARN_UNUSED_RESULT const BMVert * v2

Definition at line 176 of file BKE_cloth.hh.

Referenced by cloth_collision_response_static(), cloth_selfcollision_response_static(), and collision_interpolateOnTriangle().

◆ VECADDS

#define VECADDS ( v1,
v2,
v3,
bS )
Value:
{ \
*(v1) = *(v2) + *(v3) * bS; \
*(v1 + 1) = *(v2 + 1) + *(v3 + 1) * bS; \
*(v1 + 2) = *(v2 + 2) + *(v3 + 2) * bS; \
} \
((void)0)

Definition at line 155 of file BKE_cloth.hh.

Referenced by add_lfvector_lfvectorS().

◆ VECADDSS

#define VECADDSS ( v1,
v2,
aS,
v3,
bS )
Value:
{ \
*(v1) = *(v2) * aS + *(v3) * bS; \
*(v1 + 1) = *(v2 + 1) * aS + *(v3 + 1) * bS; \
*(v1 + 2) = *(v2 + 2) * aS + *(v3 + 2) * bS; \
} \
((void)0)

Definition at line 148 of file BKE_cloth.hh.

Referenced by add_lfvectorS_lfvectorS().

◆ VECSUBADDSS

#define VECSUBADDSS ( v1,
v2,
aS,
v3,
bS )
Value:
{ \
*(v1) -= *(v2) * aS + *(v3) * bS; \
*(v1 + 1) -= *(v2 + 1) * aS + *(v3 + 1) * bS; \
*(v1 + 2) -= *(v2 + 2) * aS + *(v3 + 2) * bS; \
} \
((void)0)

Definition at line 141 of file BKE_cloth.hh.

Referenced by subadd_fmatrixS_fmatrixS().

◆ VECSUBMUL

#define VECSUBMUL ( v1,
v2,
aS )
Value:
{ \
*(v1) -= *(v2) * aS; \
*(v1 + 1) -= *(v2 + 1) * aS; \
*(v1 + 2) -= *(v2 + 2) * aS; \
} \
((void)0)

Definition at line 162 of file BKE_cloth.hh.

Referenced by submul_lfvectorS().

◆ VECSUBS

#define VECSUBS ( v1,
v2,
v3,
bS )
Value:
{ \
*(v1) = *(v2) - *(v3) * bS; \
*(v1 + 1) = *(v2 + 1) - *(v3 + 1) * bS; \
*(v1 + 2) = *(v2 + 2) - *(v3 + 2) * bS; \
} \
((void)0)

Definition at line 169 of file BKE_cloth.hh.

Referenced by sub_lfvector_lfvectorS().

Enumeration Type Documentation

◆ CLOTH_SPRING_TYPES

Enumerator
CLOTH_SPRING_TYPE_STRUCTURAL 
CLOTH_SPRING_TYPE_SHEAR 
CLOTH_SPRING_TYPE_BENDING 
CLOTH_SPRING_TYPE_GOAL 
CLOTH_SPRING_TYPE_SEWING 
CLOTH_SPRING_TYPE_BENDING_HAIR 
CLOTH_SPRING_TYPE_INTERNAL 

Definition at line 185 of file BKE_cloth.hh.

◆ CLOTH_SPRINGS_FLAGS

Enumerator
CLOTH_SPRING_FLAG_DEACTIVATE 
CLOTH_SPRING_FLAG_NEEDED 

Definition at line 196 of file BKE_cloth.hh.

◆ eClothVertexFlag

Enumerator
CLOTH_VERT_FLAG_PINNED 
CLOTH_VERT_FLAG_NOSELFCOLL 
CLOTH_VERT_FLAG_NOOBJCOLL 

Definition at line 37 of file BKE_cloth.hh.

Function Documentation

◆ bvhtree_update_from_cloth()

void bvhtree_update_from_cloth ( ClothModifierData * clmd,
bool moving,
bool self )

◆ cloth_bvh_collision()

◆ cloth_clear_cache()

◆ cloth_free_modifier()

◆ cloth_free_modifier_extern()

◆ cloth_parallel_transport_hair_frame()

void cloth_parallel_transport_hair_frame ( float mat[3][3],
const float dir_old[3],
const float dir_new[3] )

◆ cloth_uses_vgroup()

◆ clothModifier_do()