summaryrefslogtreecommitdiff
path: root/legacy/ephysics/src/lib/EPhysics.h
diff options
context:
space:
mode:
authorLeandro Dorileo <dorileo@profusion.mobi>2012-12-05 13:50:20 +0000
committerLeandro Dorileo <dorileo@profusion.mobi>2012-12-05 13:50:20 +0000
commit4640e5cdca1987d96fa755af676a0f07b32be98e (patch)
treed1fc4a7a19617d5c9a7822f461ea0fe93b297955 /legacy/ephysics/src/lib/EPhysics.h
parentd435db293105f9319fc8865558bd0edac104d318 (diff)
EPhysics: soft body drag coefficient
Add API for handling with soft body drag coefficient. --This line, and those below, will be ignored-- SVN revision: 80249
Diffstat (limited to '')
-rw-r--r--legacy/ephysics/src/lib/EPhysics.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h
index 5a3f9b124f..5647134982 100644
--- a/legacy/ephysics/src/lib/EPhysics.h
+++ b/legacy/ephysics/src/lib/EPhysics.h
@@ -2372,6 +2372,53 @@ EAPI double ephysics_body_soft_body_anchor_hardness_get(EPhysics_Body *body);
2372 2372
2373/** 2373/**
2374 * @brief 2374 * @brief
2375 * Set the drag coefficient of a soft body.
2376 *
2377 * Drag coefficient is a dimensionless quantity used to quantify an objects drag
2378 * or resistance in the environment - like air or water resistance. It is used in
2379 * the drag equation, where a lower drag coefficient indicates the object will
2380 * have less aerodynamic or hydrodynamic drag.
2381 *
2382 * The drag coefficient is defined as:
2383 *
2384 * cd = 2Fd / (pv ^ 2)A
2385 *
2386 * Where:
2387 *
2388 * - @c Fd is the drag force, which is by definition the force component in the
2389 * direction of the flow velocity;
2390 * - @c p is the mass density;
2391 * - @c v is the speed;
2392 * - @c A is the reference area;
2393 *
2394 * The reference area depends on what type of drag coefficient is being measured.
2395 *
2396 * @note default value set to 0.
2397 *
2398 * @param body The body to be set.
2399 * @param coefficient The drag coefficient.
2400 *
2401 * @see ephysics_body_soft_body_drag_coefficient_get().
2402 *
2403 * @ingroup EPhysics_Body
2404 */
2405EAPI void ephysics_body_soft_body_drag_coefficient_set(EPhysics_Body *body, double coefficient);
2406
2407/**
2408 * @brief
2409 * Get the drag coefficient of a soft body.
2410 *
2411 * @param body The body to get the drag coefficient from.
2412 * @return The drag coefficient set to @p body on success, -1 on failure.
2413 *
2414 * @see ephysics_body_soft_body_drag_coefficient_set().
2415 *
2416 * @ingroup EPhysics_Body
2417 */
2418EAPI double ephysics_body_soft_body_drag_coefficient_get(const EPhysics_Body *body);
2419
2420/**
2421 * @brief
2375 * Set the soft body dragging status. 2422 * Set the soft body dragging status.
2376 * 2423 *
2377 * While dragging a soft body the user may want to freeze a specific trimesh 2424 * While dragging a soft body the user may want to freeze a specific trimesh