Blender V4.3
BKE_softbody.h File Reference

Go to the source code of this file.

Classes

struct  BodyPoint
 

Typedefs

typedef struct BodyPoint BodyPoint
 

Functions

struct SoftBodysbNew (void)
 
void sbFree (struct Object *ob)
 
void sbFreeSimulation (struct SoftBody *sb)
 
void sbObjectStep (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float cfra, float(*vertexCos)[3], int numVerts)
 
void sbObjectToSoftbody (struct Object *ob)
 
void sbSetInterruptCallBack (int(*f)(void))
 
void SB_estimate_transform (Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3])
 

Typedef Documentation

◆ BodyPoint

typedef struct BodyPoint BodyPoint

Function Documentation

◆ SB_estimate_transform()

void SB_estimate_transform ( Object * ob,
float lloc[3],
float lrot[3][3],
float lscale[3][3] )
extern

A precise position vector denoting the motion of the center of mass give a rotation/scale matrix using averaging method, that's why estimate and not calculate see: this is kind of reverse engineering: having to states of a point cloud and recover what happened our advantage here we know the identity of the vertex there are others methods giving other results.

Parameters
obAny object that can do soft-body e.g. mesh, lattice, curve.
llocOutput of the calculated location (or NULL).
lrotOutput of the calculated rotation (or NULL).
lscaleOutput for the calculated scale (or NULL).

For velocity & 2nd order stuff see: vcloud_estimate_transform_v3.

Definition at line 3247 of file softbody.cc.

References SoftBody::bpoint, copy_m3_m3(), copy_v3_v3(), float, ReferenceState::ivert, SoftBody::lcom, SoftBody::lrot, SoftBody::lscale, MEM_callocN, MEM_freeN(), BodyPoint::pos, ReferenceVert::pos, SBScratch::Ref, SoftBody::scratch, Object::soft, SoftBody::totpoint, and vcloud_estimate_transform_v3().

Referenced by softbody_reset(), and softbody_to_object().

◆ sbFree()

◆ sbFreeSimulation()

void sbFreeSimulation ( struct SoftBody * sb)
extern

Frees simulation data to reset simulation.

Definition at line 3193 of file softbody.cc.

References free_softbody_intern().

Referenced by BKE_ptcache_id_reset().

◆ sbNew()

◆ sbObjectStep()

◆ sbObjectToSoftbody()

void sbObjectToSoftbody ( struct Object * ob)
extern

Makes totally fresh start situation, resets time.

Definition at line 3198 of file softbody.cc.

References free_softbody_intern(), and Object::soft.

◆ sbSetInterruptCallBack()

void sbSetInterruptCallBack ( int(* )(void))
extern

Soft-body global visible functions. Links the soft-body module to a 'test for Interrupt' function, pass NULL to clear the callback.

Definition at line 3217 of file softbody.cc.

References SB_localInterruptCallBack.