Blender  V3.3
Classes | Typedefs | Functions
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] 
)

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 3227 of file softbody.c.

References Freestyle::a, SoftBody::bpoint, copy_m3_m3(), copy_v3_v3(), float(), ReferenceState::ivert, SoftBody::lcom, SoftBody::lrot, SoftBody::lscale, MEM_callocN, MEM_freeN, NULL, 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()

void sbFree ( struct Object ob)

◆ sbFreeSimulation()

void sbFreeSimulation ( struct SoftBody sb)

Frees simulation data to reset simulation.

Definition at line 3173 of file softbody.c.

References free_softbody_intern().

Referenced by BKE_ptcache_id_reset().

◆ sbNew()

struct SoftBody* sbNew ( void  )

◆ sbObjectStep()

void sbObjectStep ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob,
float  cfra,
float(*)  vertexCos[3],
int  numVerts 
)

◆ sbObjectToSoftbody()

void sbObjectToSoftbody ( struct Object ob)

Makes totally fresh start situation, resets time.

Definition at line 3178 of file softbody.c.

References free_softbody_intern(), and Object::soft.

◆ sbSetInterruptCallBack()

void sbSetInterruptCallBack ( int(*)(void f)

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 3197 of file softbody.c.

References SB_localInterruptCallBack.