Blender V2.61 - r43446
Functions | Variables

cloth.c File Reference

#include "MEM_guardedalloc.h"
#include "DNA_cloth_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_utildefines.h"
#include "BLI_linklist.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_cloth.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_modifier.h"
#include "BKE_pointcache.h"
#include <sys/time.h>

Go to the source code of this file.

Functions

void tstart (void)
void tend (void)
double tval (void)
static void cloth_to_object (Object *ob, ClothModifierData *clmd, DerivedMesh *dm)
static void cloth_from_mesh (ClothModifierData *clmd, DerivedMesh *dm)
static int cloth_from_object (Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr, int first)
static int cloth_build_springs (ClothModifierData *clmd, DerivedMesh *dm)
static void cloth_apply_vgroup (ClothModifierData *clmd, DerivedMesh *dm)
void cloth_init (ClothModifierData *clmd)
static BVHTreebvhselftree_build_from_cloth (ClothModifierData *clmd, float epsilon)
static BVHTreebvhtree_build_from_cloth (ClothModifierData *clmd, float epsilon)
void bvhtree_update_from_cloth (ClothModifierData *clmd, int moving)
void bvhselftree_update_from_cloth (ClothModifierData *clmd, int moving)
void cloth_clear_cache (Object *ob, ClothModifierData *clmd, float framenr)
static int do_init_cloth (Object *ob, ClothModifierData *clmd, DerivedMesh *result, int framenr)
static int do_step_cloth (Object *ob, ClothModifierData *clmd, DerivedMesh *result, int framenr)
DerivedMeshclothModifier_do (ClothModifierData *clmd, Scene *scene, Object *ob, DerivedMesh *dm)
void cloth_free_modifier (ClothModifierData *clmd)
void cloth_free_modifier_extern (ClothModifierData *clmd)
int cloth_uses_vgroup (ClothModifierData *clmd)
static int cloth_from_object (Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float UNUSED(framenr), int first)
int cloth_add_spring (ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type)
static void cloth_free_errorsprings (Cloth *cloth, EdgeHash *UNUSED(edgehash), LinkNode **edgelist)

Variables

static struct timeval _tstart _tend
static struct timezone tz
static CM_SOLVER_DEF solvers []

Detailed Description

Definition in file cloth.c.


Function Documentation

static BVHTree* bvhselftree_build_from_cloth ( ClothModifierData clmd,
float  epsilon 
) [static]
void bvhselftree_update_from_cloth ( ClothModifierData clmd,
int  moving 
)
static BVHTree* bvhtree_build_from_cloth ( ClothModifierData clmd,
float  epsilon 
) [static]
void bvhtree_update_from_cloth ( ClothModifierData clmd,
int  moving 
)
int cloth_add_spring ( ClothModifierData clmd,
unsigned int  indexA,
unsigned int  indexB,
float  restlength,
int  spring_type 
)
static void cloth_apply_vgroup ( ClothModifierData clmd,
DerivedMesh dm 
) [static]
static int cloth_build_springs ( ClothModifierData clmd,
DerivedMesh dm 
) [static]
void cloth_clear_cache ( Object ob,
ClothModifierData clmd,
float  framenr 
)
static void cloth_free_errorsprings ( Cloth cloth,
EdgeHash UNUSEDedgehash,
LinkNode **  edgelist 
) [static]
void cloth_free_modifier ( ClothModifierData clmd)
void cloth_free_modifier_extern ( ClothModifierData clmd)
static void cloth_from_mesh ( ClothModifierData clmd,
DerivedMesh dm 
) [static]
static int cloth_from_object ( Object ob,
ClothModifierData clmd,
DerivedMesh dm,
float   UNUSEDframenr,
int  first 
) [static]
static int cloth_from_object ( Object ob,
ClothModifierData clmd,
DerivedMesh dm,
float  framenr,
int  first 
) [static]

Referenced by do_init_cloth().

void cloth_init ( ClothModifierData clmd)
static void cloth_to_object ( Object ob,
ClothModifierData clmd,
DerivedMesh dm 
) [static]

cloth_to_object - copies the deformed vertices to the object.

Definition at line 709 of file cloth.c.

References CDDM_get_verts(), ClothModifierData::clothObject, MVert::co, co, copy_v3_v3(), DerivedMesh::getNumVerts, i, Object::imat, invert_m4_m4(), mul_m4_v3(), NULL, Object::obmat, Cloth::verts, and ClothVertex::x.

Referenced by clothModifier_do().

int cloth_uses_vgroup ( ClothModifierData clmd)
DerivedMesh* clothModifier_do ( ClothModifierData clmd,
Scene scene,
Object ob,
DerivedMesh dm 
) [read]
static int do_init_cloth ( Object ob,
ClothModifierData clmd,
DerivedMesh result,
int  framenr 
) [static]
static int do_step_cloth ( Object ob,
ClothModifierData clmd,
DerivedMesh result,
int  framenr 
) [static]
void tend ( void  )

Definition at line 68 of file cloth.c.

References _tend, and tz.

Referenced by do_step_cloth(), draw_volume(), and TNT::operator*().

void tstart ( void  )

Definition at line 64 of file cloth.c.

References tz.

Referenced by do_step_cloth(), and draw_volume().

double tval ( void  )

Definition at line 72 of file cloth.c.

References _tend.

Referenced by BPY_driver_exec(), and pose_slide_apply_props().


Variable Documentation

struct timeval _tstart _tend [static]

Definition at line 62 of file cloth.c.

Referenced by tend(), and tval().

CM_SOLVER_DEF solvers[] [static]
Initial value:

Definition at line 84 of file cloth.c.

struct timezone tz [static]

Definition at line 63 of file cloth.c.

Referenced by atHomePosition(), lensDistort(), nearHomePosition(), RE_make_stars(), tend(), and tstart().