Dev:Source/Physics/SoftBody Vars
This page is *severely outdated* | |
This page has not been updated since 2005, it is very outdated. If you have questions, ask in #blendercoders at IRC |
Summary
To add get / set functionality to all the variables in the Softbody and Particle Deflection
Particle Deflection Datastruct
typedef struct [[BlenderDev/PartDeflect|PartDeflect]] {
short deflect; /* A- Deflection flag - does mesh deflect particles*/
short forcefield; /* B- Force field type, do the vertices attract / repel particles ?*/
short flag; /* C- general settings flag */
short pad;
float pdef_damp; /* D- Damping factor for particle deflection */
float pdef_rdamp; /* E- Random element of damping for deflection */
float pdef_perm; /* F- Chance of particle passing through mesh */
float f_strength; /* G- The strength of the force (+ or - ) */
float f_power; /* H- The power law - real gravitation is 2 (square) */
float maxdist; /* I- if indicated, use this maximum */
} PartDeflect;
These are implemented in the following functions in this patch https://projects.blender.org/tracker/?func=detail&aid=2406&group_id=9&atid=127
A - getPIDeflection, setPIDeflection B - getPIType, setPIType C - getPIUseMaxDist, setPIUseMaxDist D - getPISurfaceDamp, setPISurfaceDamp E - getPIRandomDamp, setPIRandomDamp F - getPIPerm, setPIPerm G - getPIStrength, setPIStrength H - getPIFalloff, setPIFalloff I - getPIMaxDist, setPIMaxDist
Softbody Datastruct
typedef struct [[BlenderDev/SoftBody|SoftBody]] { /* dynamic data */
int totpoint, totspring;
struct [[BlenderDev/BodyPoint|BodyPoint]] '''bpoint; /''' not saved in file */
struct [[BlenderDev/BodySpring|BodySpring]] '''bspring; /''' not saved in file */
float ctime; /* last time calculated */ /* part of UI: */
float nodemass; /* softbody mass of '''vertex''' */
float grav; /* softbody amount of gravitaion to apply */
float mediafrict; /* friction to env */
float rklimit; /* error limit for ODE solver */
float goalspring; /* softbody goal springs */
float goalfrict; /* softbody goal springs friction */
float mingoal; /* quick limits for goal */
float maxgoal;
float inspring; /* softbody inner springs */
float infrict; /* softbody inner springs friction */
float defgoal; /* default goal for vertices without vgroup */
} SoftBody;
-- JohnnyMatthews - 06 Apr 2005