Add getState and setState

This commit is contained in:
thegrb93
2020-09-15 12:56:56 -04:00
committed by Garrett Brown
parent 365387150e
commit e4c7a4e777
3 changed files with 55 additions and 0 deletions
+10
View File
@@ -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.
**/