diff options
| author | victorfisac <victorfisac@gmail.com> | 2016-05-20 14:03:23 +0200 |
|---|---|---|
| committer | victorfisac <victorfisac@gmail.com> | 2016-05-20 14:03:23 +0200 |
| commit | 4f1bee31654dec5f5cea2ac9d291d202df504745 (patch) | |
| tree | 42a5028ebab3277a8d46bdcf3fea2990e1aa590d /src/physac.h | |
| parent | ea7afc8ec835040d84d79ae318f7aebb9f1e189c (diff) | |
| parent | dcf5f45f687f2a534286aecd5e6471a0440b0c21 (diff) | |
| download | raylib-4f1bee31654dec5f5cea2ac9d291d202df504745.tar.gz raylib-4f1bee31654dec5f5cea2ac9d291d202df504745.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'src/physac.h')
| -rw-r--r-- | src/physac.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/physac.h b/src/physac.h index 37544686..6cef480a 100644 --- a/src/physac.h +++ b/src/physac.h @@ -66,13 +66,13 @@ typedef struct Collider { int radius; // Used for COLLIDER_CIRCLE } Collider; -typedef struct PhysicObject { +typedef struct PhysicObjectData { unsigned int id; Transform transform; Rigidbody rigidbody; Collider collider; bool enabled; -} PhysicObject; +} PhysicObjectData, *PhysicObject; #ifdef __cplusplus extern "C" { // Prevents name mangling of functions @@ -85,14 +85,14 @@ void InitPhysics(Vector2 gravity); void UpdatePhysics(); // Update physic objects, calculating physic behaviours and collisions detection void ClosePhysics(); // Unitialize all physic objects and empty the objects pool -PhysicObject *CreatePhysicObject(Vector2 position, float rotation, Vector2 scale); // Create a new physic object dinamically, initialize it and add to pool -void DestroyPhysicObject(PhysicObject *pObj); // Destroy a specific physic object and take it out of the list +PhysicObject CreatePhysicObject(Vector2 position, float rotation, Vector2 scale); // Create a new physic object dinamically, initialize it and add to pool +void DestroyPhysicObject(PhysicObject pObj); // Destroy a specific physic object and take it out of the list -void ApplyForce(PhysicObject *pObj, Vector2 force); // Apply directional force to a physic object +void ApplyForce(PhysicObject pObj, Vector2 force); // Apply directional force to a physic object void ApplyForceAtPosition(Vector2 position, float force, float radius); // Apply radial force to all physic objects in range Rectangle TransformToRectangle(Transform transform); // Convert Transform data type to Rectangle (position and scale) -void DrawPhysicObjectInfo(PhysicObject *pObj, Vector2 position, int fontSize); // Draw physic object information at screen position +void DrawPhysicObjectInfo(PhysicObject pObj, Vector2 position, int fontSize); // Draw physic object information at screen position #ifdef __cplusplus } |
