mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Add getState and setState
This commit is contained in:
@@ -129,6 +129,11 @@ public:
|
||||
**/
|
||||
float getAngularVelocity() const;
|
||||
|
||||
/**
|
||||
* Get the current Body kinematic state. (Position, angle, velocity, angle velocity).
|
||||
**/
|
||||
void getState(b2Vec2 &pos_o, float &a_o, b2Vec2& vel_o, float &da_o) const;
|
||||
|
||||
/**
|
||||
* Gets the Body's mass.
|
||||
**/
|
||||
@@ -219,6 +224,11 @@ public:
|
||||
**/
|
||||
void setAngularVelocity(float r);
|
||||
|
||||
/**
|
||||
* Set the current Body kinematic state. (Position, angle, velocity, angle velocity).
|
||||
**/
|
||||
void setState(b2Vec2 pos, float a, b2Vec2 vel, float da);
|
||||
|
||||
/**
|
||||
* Sets the current position of the Body.
|
||||
**/
|
||||
|
||||
Reference in New Issue
Block a user