}
}
+/*
+ * Effectors
+ */
+
+static void rb_effect_simple_bouyency( rigidbody *ra, v4f plane,
+ float amt, float drag )
+{
+ /* float */
+ float depth = v3_dot( plane, ra->co ) - plane[3],
+ lambda = vg_clampf( -depth, 0.0f, 1.0f ) * amt;
+
+ v3_muladds( ra->v, plane, lambda * ktimestep, ra->v );
+
+ if( depth < 0.0f )
+ v3_muls( ra->v, 1.0f-(drag*ktimestep), ra->v );
+}
+
/*
* -----------------------------------------------------------------------------
* BVH implementation, this is ONLY for static rigidbodies, its to slow for