Switched get/setMeter from being a World method to a love.physics function

--HG--
branch : box2d-update
This commit is contained in:
Bill Meltsner
2011-09-15 16:13:54 -04:00
parent 1fa99d022a
commit e69cafe868
22 changed files with 270 additions and 256 deletions
-71
View File
@@ -84,9 +84,6 @@ namespace box2d
// Contact callbacks.
ContactCallback add, persist, remove, result;
// The length of one meter in pixels.
int meter;
public:
/**
@@ -176,74 +173,6 @@ namespace box2d
* @return The number of joints.
**/
int getJointCount();
/**
* Sets the number of pixels in one meter.
* @param pixels The number of pixels in one meter. (1m ~= 3.3ft).
**/
void setMeter(int meter);
/**
* Gets the number of pixels in one meter.
* @param pixels The number of pixels in one meter. (1m ~= 3.3ft).
**/
int getMeter() const;
/**
* Scales a value down according to the current meter in pixels.
* @param f The unscaled input value.
**/
float scaleDown(float f);
/**
* Scales a value up according to the current meter in pixels.
* @param f The unscaled input value.
**/
float scaleUp(float f);
/**
* Scales a point down according to the current meter
* in pixels, for instance x = x0/meter, y = x0/meter.
* @param x The x-coordinate of the point to scale.
* @param y The y-coordinate of the point to scale.
**/
void scaleDown(float & x, float & y);
/**
* Scales a point up according to the current meter
* in pixels, for instance x = x0/meter, y = x0/meter.
* @param x The x-coordinate of the point to scale.
* @param y The y-coordinate of the point to scale.
**/
void scaleUp(float & x, float & y);
/**
* Scales a b2Vec2 down according to the current meter in pixels.
* @param v The unscaled input vector.
* @return The scaled vector.
**/
b2Vec2 scaleDown(const b2Vec2 & v);
/**
* Scales a b2Vec up according to the current meter in pixels.
* @param v The unscaled input vector.
* @return The scaled vector.
**/
b2Vec2 scaleUp(const b2Vec2 & v);
/**
* Scales a b2AABB down according to the current meter in pixels.
* @param v The unscaled input AABB.
* @return The scaled AABB.
**/
b2AABB scaleDown(const b2AABB & aabb);
/**
* Scales a b2AABB up according to the current meter in pixels.
* @param v The unscaled input AABB.
* @return The scaled AABB.
**/
b2AABB scaleUp(const b2AABB & aabb);
/**
* Gets the ground body.