aboutsummaryrefslogtreecommitdiff
path: root/src/raylib.h
diff options
context:
space:
mode:
authorvictorfisac <victorfisac@gmail.com>2016-01-03 17:53:29 +0100
committervictorfisac <victorfisac@gmail.com>2016-01-03 17:53:29 +0100
commita299bc289b36a40efcf9d02597d5122546458021 (patch)
treeed9ce7d1f7b141ed3a697aaff9a0c48e51d4591f /src/raylib.h
parente0d8cceb65def88e6c425b1d78b3d84655cb9967 (diff)
downloadraylib-a299bc289b36a40efcf9d02597d5122546458021.tar.gz
raylib-a299bc289b36a40efcf9d02597d5122546458021.zip
Improved and added functions to physac engine module
- Improved physics calculations. - Added AddForceAtPosition function (added to all enabled rigidbodies). - Updated raylib header.
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 864a240a..99a6979c 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -793,21 +793,23 @@ void SetMaterialNormalDepth(Material *material, float depth); // Set n
//----------------------------------------------------------------------------------
// Physics System Functions (engine-module: physics)
//----------------------------------------------------------------------------------
-void InitPhysics(); // Initialize all internal physics values
-void SetPhysics(Physics settings); // Set physics settings values using Physics data type to overwrite internal physics settings
+void InitPhysics(); // Initialize all internal physics values
+void SetPhysics(Physics settings); // Set physics settings values using Physics data type to overwrite internal physics settings
-void AddRigidbody(int index, Rigidbody rigidbody); // Initialize a new rigidbody with parameters to internal index slot
-void AddCollider(int index, Collider collider); // Initialize a new Collider with parameters to internal index slot
+void AddRigidbody(int index, Rigidbody rigidbody); // Initialize a new rigidbody with parameters to internal index slot
+void AddCollider(int index, Collider collider); // Initialize a new Collider with parameters to internal index slot
-void ApplyPhysics(int index, Vector2 *position); // Apply physics to internal rigidbody, physics calculations are applied to position pointer parameter
-void SetRigidbodyEnabled(int index, bool state); // Set enabled state to a defined rigidbody
-void SetRigidbodyVelocity(int index, Vector2 velocity); // Set velocity of rigidbody (without considering of mass value)
-void AddRigidbodyForce(int index, Vector2 force); // Set rigidbody force (considering mass value)
+void ApplyPhysics(int index, Vector2 *position); // Apply physics to internal rigidbody, physics calculations are applied to position pointer parameter
+void SetRigidbodyEnabled(int index, bool state); // Set enabled state to a defined rigidbody
+void SetRigidbodyVelocity(int index, Vector2 velocity); // Set velocity of rigidbody (without considering of mass value)
+void SetRigidbodyAcceleration(int index, Vector2 acceleration); // Set acceleration of rigidbody (without considering of mass value)
+void AddRigidbodyForce(int index, Vector2 force); // Set rigidbody force (considering mass value)
+void AddForceAtPosition(Vector2 position, float intensity, float radius); // Add a force to all enabled rigidbodies at a position
-void SetColliderEnabled(int index, bool state); // Set enabled state to a defined collider
+void SetColliderEnabled(int index, bool state); // Set enabled state to a defined collider
-Rigidbody GetRigidbody(int index); // Returns the internal rigidbody data defined by index parameter
-Collider GetCollider(int index); // Returns the internal collider data defined by index parameter
+Rigidbody GetRigidbody(int index); // Returns the internal rigidbody data defined by index parameter
+Collider GetCollider(int index); // Returns the internal collider data defined by index parameter
//------------------------------------------------------------------------------------
// Audio Loading and Playing Functions (Module: audio)