diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-09-15 16:18:40 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:30:01 +0300 |
commit | d0379f82d1a3e15477f6f5bcb3224903256d95cc (patch) | |
tree | ec767c579919abbdeebdeb81dcbb1b1e83ea8622 /source/blender/physics/intern/implicit.h | |
parent | a49b170b273c4dec1bd9e73173f89e09cdd1c89a (diff) |
Added a calculation function for the fictitious forces introduced by
moving hair root reference frames.
This calculates Euler, Coriolis and Centrifugal forces which result
from describing hair in a moving reference frame.
http://en.wikipedia.org/wiki/Fictitious_force
Diffstat (limited to 'source/blender/physics/intern/implicit.h')
-rw-r--r-- | source/blender/physics/intern/implicit.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/physics/intern/implicit.h b/source/blender/physics/intern/implicit.h index c7becfd808c..25771740def 100644 --- a/source/blender/physics/intern/implicit.h +++ b/source/blender/physics/intern/implicit.h @@ -118,17 +118,27 @@ void BPH_mass_spring_add_constraint_ndof2(struct Implicit_Data *data, int index, bool BPH_mass_spring_solve(struct Implicit_Data *data, float dt); void BPH_mass_spring_apply_result(struct Implicit_Data *data); +/* Clear the force vector at the beginning of the time step */ void BPH_mass_spring_force_clear(struct Implicit_Data *data); +/* Fictitious forces introduced by moving coordinate systems */ +void BPH_mass_spring_force_reference_frame(struct Implicit_Data *data, int index); +/* Simple uniform gravity force */ void BPH_mass_spring_force_gravity(struct Implicit_Data *data, const float g[3]); +/* Global drag force (velocity damping) */ void BPH_mass_spring_force_drag(struct Implicit_Data *data, float drag); +/* Wind force, acting on a face */ void BPH_mass_spring_force_face_wind(struct Implicit_Data *data, int v1, int v2, int v3, int v4, const float (*winvec)[3]); +/* Wind force, acting on an edge */ void BPH_mass_spring_force_edge_wind(struct Implicit_Data *data, int v1, int v2, const float (*winvec)[3]); +/* Linear spring force between two points */ bool BPH_mass_spring_force_spring_linear(struct Implicit_Data *data, int i, int j, int spring_index, float restlen, float stiffness, float damping, bool no_compress, float clamp_force, float r_f[3], float r_dfdx[3][3], float r_dfdv[3][3]); +/* Bending force, forming a triangle at the base of two structural springs */ bool BPH_mass_spring_force_spring_bending(struct Implicit_Data *data, int i, int j, int spring_index, float restlen, float kb, float cb, float r_f[3], float r_dfdx[3][3], float r_dfdv[3][3]); +/* Global goal spring */ bool BPH_mass_spring_force_spring_goal(struct Implicit_Data *data, int i, int spring_index, const float goal_x[3], const float goal_v[3], float stiffness, float damping, float r_f[3], float r_dfdx[3][3], float r_dfdv[3][3]); |