Allow to change the gravity vector of the DynamicsWorld
This commit is contained in:
parent
39ddabb6f5
commit
80cf65ccf2
|
@ -220,6 +220,9 @@ class DynamicsWorld : public CollisionWorld {
|
||||||
/// Return the gravity vector of the world
|
/// Return the gravity vector of the world
|
||||||
Vector3 getGravity() const;
|
Vector3 getGravity() const;
|
||||||
|
|
||||||
|
/// Set the gravity vector of the world
|
||||||
|
void setGravity(Vector3& gravity);
|
||||||
|
|
||||||
/// Return if the gravity is on
|
/// Return if the gravity is on
|
||||||
bool isGravityEnabled() const;
|
bool isGravityEnabled() const;
|
||||||
|
|
||||||
|
@ -366,6 +369,14 @@ inline Vector3 DynamicsWorld::getGravity() const {
|
||||||
return mGravity;
|
return mGravity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the gravity vector of the world
|
||||||
|
/**
|
||||||
|
* @param gravity The gravity vector (in meter per seconds squared)
|
||||||
|
*/
|
||||||
|
inline Vector3 DynamicsWorld::setGravity(Vector3& gravity) {
|
||||||
|
mGravity = gravity;
|
||||||
|
}
|
||||||
|
|
||||||
// Return if the gravity is enaled
|
// Return if the gravity is enaled
|
||||||
/**
|
/**
|
||||||
* @return True if the gravity is enabled in the world
|
* @return True if the gravity is enabled in the world
|
||||||
|
|
Loading…
Reference in New Issue
Block a user