Ok, project generation didn't really work out. Reverted.

This commit is contained in:
rude
2009-08-10 21:33:07 +02:00
parent ba1a75e547
commit dd420d68a3
68 changed files with 4136 additions and 4196 deletions
+44 -43
View File
@@ -326,51 +326,52 @@ namespace box2d
return 0;
}
static const luaL_Reg functions[] = {
{ "getX", w_Body_getX },
{ "getY", w_Body_getY },
{ "getAngle", w_Body_getAngle },
{ "getPosition", w_Body_getPosition },
{ "getLinearVelocity", w_Body_getLinearVelocity },
{ "getWorldCenter", w_Body_getWorldCenter },
{ "getLocalCenter", w_Body_getLocalCenter },
{ "getAngularVelocity", w_Body_getAngularVelocity },
{ "getMass", w_Body_getMass },
{ "getInertia", w_Body_getInertia },
{ "getAngularDamping", w_Body_getAngularDamping },
{ "getLinearDamping", w_Body_getLinearDamping },
{ "applyImpulse", w_Body_applyImpulse },
{ "applyTorque", w_Body_applyTorque },
{ "applyForce", w_Body_applyForce },
{ "setX", w_Body_setX },
{ "setY", w_Body_setY },
{ "setLinearVelocity", w_Body_setLinearVelocity },
{ "setAngle", w_Body_setAngle },
{ "setAngularVelocity", w_Body_setAngularVelocity },
{ "setPosition", w_Body_setPosition },
{ "setMassFromShapes", w_Body_setMassFromShapes },
{ "setMass", w_Body_setMass },
{ "setAngularDamping", w_Body_setAngularDamping },
{ "setLinearDamping", w_Body_setLinearDamping },
{ "getWorldPoint", w_Body_getWorldPoint },
{ "getWorldVector", w_Body_getWorldVector },
{ "getLocalPoint", w_Body_getLocalPoint },
{ "getLocalVector", w_Body_getLocalVector },
{ "getLinearVelocityFromWorldPoint", w_Body_getLinearVelocityFromWorldPoint },
{ "getLinearVelocityFromLocalPoint", w_Body_getLinearVelocityFromLocalPoint },
{ "isBullet", w_Body_isBullet },
{ "setBullet", w_Body_setBullet },
{ "isStatic", w_Body_isStatic },
{ "isDynamic", w_Body_isDynamic },
{ "isFrozen", w_Body_isFrozen },
{ "isSleeping", w_Body_isSleeping },
{ "setAllowSleeping", w_Body_setAllowSleeping },
{ "putToSleep", w_Body_putToSleep },
{ "wakeUp", w_Body_wakeUp },
{ 0, 0 }
};
int luaopen_body(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "getX", w_Body_getX },
{ "getY", w_Body_getY },
{ "getAngle", w_Body_getAngle },
{ "getPosition", w_Body_getPosition },
{ "getLinearVelocity", w_Body_getLinearVelocity },
{ "getWorldCenter", w_Body_getWorldCenter },
{ "getLocalCenter", w_Body_getLocalCenter },
{ "getAngularVelocity", w_Body_getAngularVelocity },
{ "getMass", w_Body_getMass },
{ "getInertia", w_Body_getInertia },
{ "getAngularDamping", w_Body_getAngularDamping },
{ "getLinearDamping", w_Body_getLinearDamping },
{ "applyImpulse", w_Body_applyImpulse },
{ "applyTorque", w_Body_applyTorque },
{ "applyForce", w_Body_applyForce },
{ "setX", w_Body_setX },
{ "setY", w_Body_setY },
{ "setLinearVelocity", w_Body_setLinearVelocity },
{ "setAngle", w_Body_setAngle },
{ "setAngularVelocity", w_Body_setAngularVelocity },
{ "setPosition", w_Body_setPosition },
{ "setMassFromShapes", w_Body_setMassFromShapes },
{ "setMass", w_Body_setMass },
{ "setAngularDamping", w_Body_setAngularDamping },
{ "setLinearDamping", w_Body_setLinearDamping },
{ "getWorldPoint", w_Body_getWorldPoint },
{ "getWorldVector", w_Body_getWorldVector },
{ "getLocalPoint", w_Body_getLocalPoint },
{ "getLocalVector", w_Body_getLocalVector },
{ "getLinearVelocityFromWorldPoint", w_Body_getLinearVelocityFromWorldPoint },
{ "getLinearVelocityFromLocalPoint", w_Body_getLinearVelocityFromLocalPoint },
{ "isBullet", w_Body_isBullet },
{ "setBullet", w_Body_setBullet },
{ "isStatic", w_Body_isStatic },
{ "isDynamic", w_Body_isDynamic },
{ "isFrozen", w_Body_isFrozen },
{ "isSleeping", w_Body_isSleeping },
{ "setAllowSleeping", w_Body_setAllowSleeping },
{ "putToSleep", w_Body_putToSleep },
{ "wakeUp", w_Body_wakeUp },
{ 0, 0 }
};
return luax_register_type(L, "Body", functions);
}
+22 -22
View File
@@ -38,30 +38,30 @@ namespace box2d
return 1;
}
static const luaL_Reg functions[] = {
{ "getRadius", w_CircleShape_getRadius },
// From Shape.
{ "getType", w_Shape_getType },
{ "setFriction", w_Shape_setFriction },
{ "setRestitution", w_Shape_setRestitution },
{ "setDensity", w_Shape_setDensity },
{ "setSensor", w_Shape_setSensor },
{ "getFriction", w_Shape_getFriction },
{ "getRestituion", w_Shape_getRestituion },
{ "getDensity", w_Shape_getDensity },
{ "isSensor", w_Shape_isSensor },
{ "testPoint", w_Shape_testPoint },
{ "testSegment", w_Shape_testSegment },
{ "setFilterData", w_Shape_setFilterData },
{ "getFilterData", w_Shape_getFilterData },
{ "setData", w_Shape_setData },
{ "getData", w_Shape_getData },
{ "getBoundingBox", w_Shape_getBoundingBox },
{ 0, 0 }
};
int luaopen_circleshape(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "getRadius", w_CircleShape_getRadius },
// From Shape.
{ "getType", w_Shape_getType },
{ "setFriction", w_Shape_setFriction },
{ "setRestitution", w_Shape_setRestitution },
{ "setDensity", w_Shape_setDensity },
{ "setSensor", w_Shape_setSensor },
{ "getFriction", w_Shape_getFriction },
{ "getRestituion", w_Shape_getRestituion },
{ "getDensity", w_Shape_getDensity },
{ "isSensor", w_Shape_isSensor },
{ "testPoint", w_Shape_testPoint },
{ "testSegment", w_Shape_testSegment },
{ "setFilterData", w_Shape_setFilterData },
{ "getFilterData", w_Shape_getFilterData },
{ "setData", w_Shape_setData },
{ "getData", w_Shape_getData },
{ "getBoundingBox", w_Shape_getBoundingBox },
{ 0, 0 }
};
return luax_register_type(L, "CircleShape", functions);
}
@@ -76,25 +76,25 @@ namespace box2d
return 1;
}
static const luaL_Reg functions[] = {
{ "setLength", w_DistanceJoint_setLength },
{ "getLength", w_DistanceJoint_getLength },
{ "setFrequency", w_DistanceJoint_setFrequency },
{ "getFrequency", w_DistanceJoint_getFrequency },
{ "setDamping", w_DistanceJoint_setDampingRatio },
{ "getDamping", w_DistanceJoint_getDampingRatio },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
int luaopen_distancejoint(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "setLength", w_DistanceJoint_setLength },
{ "getLength", w_DistanceJoint_getLength },
{ "setFrequency", w_DistanceJoint_setFrequency },
{ "getFrequency", w_DistanceJoint_getFrequency },
{ "setDamping", w_DistanceJoint_setDampingRatio },
{ "getDamping", w_DistanceJoint_getDampingRatio },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
return luax_register_type(L, "DistanceJoint", functions);
}
+13 -12
View File
@@ -46,20 +46,21 @@ namespace box2d
return 1;
}
static const luaL_Reg functions[] = {
{ "setRatio", w_GearJoint_setRatio },
{ "getRatio", w_GearJoint_getRatio },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
int luaopen_gearjoint(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "setRatio", w_GearJoint_setRatio },
{ "getRatio", w_GearJoint_getRatio },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
return luax_register_type(L, "GearJoint", functions);
}
+10 -10
View File
@@ -75,18 +75,18 @@ namespace box2d
return 1;
}
static const luaL_Reg functions[] = {
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
int luaopen_joint(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
return luax_register_type(L, "Joint", functions);
}
+15 -15
View File
@@ -62,23 +62,23 @@ namespace box2d
return 1;
}
static const luaL_Reg functions[] = {
{ "setTarget", w_MouseJoint_setTarget },
{ "getTarget", w_MouseJoint_getTarget },
{ "setMaxForce", w_MouseJoint_setMaxForce },
{ "getMaxForce", w_MouseJoint_getMaxForce },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
int luaopen_mousejoint(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "setTarget", w_MouseJoint_setTarget },
{ "getTarget", w_MouseJoint_getTarget },
{ "setMaxForce", w_MouseJoint_setMaxForce },
{ "getMaxForce", w_MouseJoint_getMaxForce },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
return luax_register_type(L, "MouseJoint", functions);
}
+47 -47
View File
@@ -203,55 +203,55 @@ namespace box2d
return 1;
}
// List of functions to wrap.
static const luaL_Reg functions[] = {
{ "newWorld", w_newWorld },
{ "newBody", w_newBody },
{ "newCircleShape", w_newCircleShape },
{ "newRectangleShape", w_newRectangleShape },
{ "newPolygonShape", w_newPolygonShape },
{ "newDistanceJoint", w_newDistanceJoint },
{ "newMouseJoint", w_newMouseJoint },
{ "newRevoluteJoint", w_newRevoluteJoint },
{ "newPrismaticJoint", w_newPrismaticJoint },
{ "newPulleyJoint", w_newPulleyJoint },
{ "newGearJoint", w_newGearJoint },
{ 0, 0 },
};
static const lua_CFunction types[] = {
luaopen_world,
luaopen_contact,
luaopen_body,
luaopen_shape,
luaopen_circleshape,
luaopen_polygonshape,
luaopen_joint,
luaopen_mousejoint,
luaopen_distancejoint,
luaopen_prismaticjoint,
luaopen_revolutejoint,
luaopen_pulleyjoint,
luaopen_gearjoint,
0
};
// List of constants.
static const LuaConstant constants[] = {
{ "shape_circle", Shape::SHAPE_CIRCLE },
{ "shape_polygon", Shape::SHAPE_POLYGON },
{ "joint_distance", Joint::JOINT_DISTANCE },
{ "joint_revolute", Joint::JOINT_REVOLUTE },
{ "joint_prismatic", Joint::JOINT_PRISMATIC },
{ "joint_mouse", Joint::JOINT_MOUSE },
{ "joint_pulley", Joint::JOINT_PULLEY },
{ "joint_gear", Joint::JOINT_GEAR },
{ 0, 0 }
};
int luaopen_love_physics(lua_State * L)
{
// List of functions to wrap.
static const luaL_Reg functions[] = {
{ "newWorld", w_newWorld },
{ "newBody", w_newBody },
{ "newCircleShape", w_newCircleShape },
{ "newRectangleShape", w_newRectangleShape },
{ "newPolygonShape", w_newPolygonShape },
{ "newDistanceJoint", w_newDistanceJoint },
{ "newMouseJoint", w_newMouseJoint },
{ "newRevoluteJoint", w_newRevoluteJoint },
{ "newPrismaticJoint", w_newPrismaticJoint },
{ "newPulleyJoint", w_newPulleyJoint },
{ "newGearJoint", w_newGearJoint },
{ 0, 0 },
};
static const lua_CFunction types[] = {
luaopen_world,
luaopen_contact,
luaopen_body,
luaopen_shape,
luaopen_circleshape,
luaopen_polygonshape,
luaopen_joint,
luaopen_mousejoint,
luaopen_distancejoint,
luaopen_prismaticjoint,
luaopen_revolutejoint,
luaopen_pulleyjoint,
luaopen_gearjoint,
0
};
// List of constants.
static const LuaConstant constants[] = {
{ "shape_circle", Shape::SHAPE_CIRCLE },
{ "shape_polygon", Shape::SHAPE_POLYGON },
{ "joint_distance", Joint::JOINT_DISTANCE },
{ "joint_revolute", Joint::JOINT_REVOLUTE },
{ "joint_prismatic", Joint::JOINT_PRISMATIC },
{ "joint_mouse", Joint::JOINT_MOUSE },
{ "joint_pulley", Joint::JOINT_PULLEY },
{ "joint_gear", Joint::JOINT_GEAR },
{ 0, 0 }
};
if(instance == 0)
{
try
+22 -21
View File
@@ -38,29 +38,30 @@ namespace box2d
return t->getPoints(L);
}
static const luaL_Reg functions[] = {
{ "getPoints", w_PolygonShape_getPoints },
// From Shape.
{ "getType", w_Shape_getType },
{ "setFriction", w_Shape_setFriction },
{ "setRestitution", w_Shape_setRestitution },
{ "setDensity", w_Shape_setDensity },
{ "setSensor", w_Shape_setSensor },
{ "getFriction", w_Shape_getFriction },
{ "getRestituion", w_Shape_getRestituion },
{ "getDensity", w_Shape_getDensity },
{ "isSensor", w_Shape_isSensor },
{ "testPoint", w_Shape_testPoint },
{ "testSegment", w_Shape_testSegment },
{ "setFilterData", w_Shape_setFilterData },
{ "getFilterData", w_Shape_getFilterData },
{ "setData", w_Shape_setData },
{ "getData", w_Shape_getData },
{ "getBoundingBox", w_Shape_getBoundingBox },
{ 0, 0 }
};
int luaopen_polygonshape(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "getPoints", w_PolygonShape_getPoints },
// From Shape.
{ "getType", w_Shape_getType },
{ "setFriction", w_Shape_setFriction },
{ "setRestitution", w_Shape_setRestitution },
{ "setDensity", w_Shape_setDensity },
{ "setSensor", w_Shape_setSensor },
{ "getFriction", w_Shape_getFriction },
{ "getRestituion", w_Shape_getRestituion },
{ "getDensity", w_Shape_getDensity },
{ "isSensor", w_Shape_isSensor },
{ "testPoint", w_Shape_testPoint },
{ "testSegment", w_Shape_testSegment },
{ "setFilterData", w_Shape_setFilterData },
{ "getFilterData", w_Shape_getFilterData },
{ "setData", w_Shape_setData },
{ "getData", w_Shape_getData },
{ "getBoundingBox", w_Shape_getBoundingBox },
{ 0, 0 }
};
return luax_register_type(L, "PolygonShape", functions);
}
@@ -158,36 +158,36 @@ namespace box2d
return t->getLimits(L);
}
int w_PrismaticJoint_open(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "getJointTranslation", w_PrismaticJoint_getJointTranslation },
{ "getJointSpeed", w_PrismaticJoint_getJointSpeed },
{ "setMotorEnabled", w_PrismaticJoint_setMotorEnabled },
{ "isMotorEnabled", w_PrismaticJoint_isMotorEnabled },
{ "setMaxMotorForce", w_PrismaticJoint_setMaxMotorForce },
{ "getMaxMotorForce", w_PrismaticJoint_getMaxMotorForce },
{ "setMotorSpeed", w_PrismaticJoint_setMotorSpeed },
{ "getMotorSpeed", w_PrismaticJoint_getMotorSpeed },
{ "getMotorForce", w_PrismaticJoint_getMotorForce },
{ "setLimitsEnabled", w_PrismaticJoint_setLimitsEnabled },
{ "isLimitsEnabled", w_PrismaticJoint_isLimitsEnabled },
{ "setUpperLimit", w_PrismaticJoint_setUpperLimit },
{ "setLowerLimit", w_PrismaticJoint_setLowerLimit },
{ "setLimits", w_PrismaticJoint_setLimits },
{ "getLowerLimit", w_PrismaticJoint_getLowerLimit },
{ "getUpperLimit", w_PrismaticJoint_getUpperLimit },
{ "getLimits", w_PrismaticJoint_getLimits },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
static const luaL_Reg functions[] = {
{ "getJointTranslation", w_PrismaticJoint_getJointTranslation },
{ "getJointSpeed", w_PrismaticJoint_getJointSpeed },
{ "setMotorEnabled", w_PrismaticJoint_setMotorEnabled },
{ "isMotorEnabled", w_PrismaticJoint_isMotorEnabled },
{ "setMaxMotorForce", w_PrismaticJoint_setMaxMotorForce },
{ "getMaxMotorForce", w_PrismaticJoint_getMaxMotorForce },
{ "setMotorSpeed", w_PrismaticJoint_setMotorSpeed },
{ "getMotorSpeed", w_PrismaticJoint_getMotorSpeed },
{ "getMotorForce", w_PrismaticJoint_getMotorForce },
{ "setLimitsEnabled", w_PrismaticJoint_setLimitsEnabled },
{ "isLimitsEnabled", w_PrismaticJoint_isLimitsEnabled },
{ "setUpperLimit", w_PrismaticJoint_setUpperLimit },
{ "setLowerLimit", w_PrismaticJoint_setLowerLimit },
{ "setLimits", w_PrismaticJoint_setLimits },
{ "getLowerLimit", w_PrismaticJoint_getLowerLimit },
{ "getUpperLimit", w_PrismaticJoint_getUpperLimit },
{ "getLimits", w_PrismaticJoint_getLimits },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
int luaopen_prismaticjoint(lua_State * L)
{
return luax_register_type(L, "PrismaticJoint", functions);
}
+20 -19
View File
@@ -98,27 +98,28 @@ namespace box2d
return 1;
}
static const luaL_Reg functions[] = {
{ "getGroundAnchors", w_PulleyJoint_getGroundAnchors },
{ "setMaxLengths", w_PulleyJoint_setMaxLengths },
{ "getMaxLengths", w_PulleyJoint_getMaxLengths },
{ "setConstant", w_PulleyJoint_setConstant },
{ "getConstant", w_PulleyJoint_getConstant },
{ "getLength1", w_PulleyJoint_getLength1 },
{ "getLength2", w_PulleyJoint_getLength2 },
{ "setRatio", w_PulleyJoint_setRatio },
{ "getRatio", w_PulleyJoint_getRatio },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
int luaopen_pulleyjoint(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "getGroundAnchors", w_PulleyJoint_getGroundAnchors },
{ "setMaxLengths", w_PulleyJoint_setMaxLengths },
{ "getMaxLengths", w_PulleyJoint_getMaxLengths },
{ "setConstant", w_PulleyJoint_setConstant },
{ "getConstant", w_PulleyJoint_getConstant },
{ "getLength1", w_PulleyJoint_getLength1 },
{ "getLength2", w_PulleyJoint_getLength2 },
{ "setRatio", w_PulleyJoint_setRatio },
{ "getRatio", w_PulleyJoint_getRatio },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
return luax_register_type(L, "PulleyJoint", functions);
}
@@ -158,35 +158,36 @@ namespace box2d
return t->getLimits(L);
}
static const luaL_Reg functions[] = {
{ "getJointAngle", w_RevoluteJoint_getJointAngle },
{ "getJointSpeed", w_RevoluteJoint_getJointSpeed },
{ "setMotorEnabled", w_RevoluteJoint_setMotorEnabled },
{ "isMotorEnabled", w_RevoluteJoint_isMotorEnabled },
{ "setMaxMotorTorque", w_RevoluteJoint_setMaxMotorTorque },
{ "getMaxMotorTorque", w_RevoluteJoint_getMaxMotorTorque },
{ "setMotorSpeed", w_RevoluteJoint_setMotorSpeed },
{ "getMotorSpeed", w_RevoluteJoint_getMotorSpeed },
{ "getMotorTorque", w_RevoluteJoint_getMotorTorque },
{ "setLimitsEnabled", w_RevoluteJoint_setLimitsEnabled },
{ "isLimitsEnabled", w_RevoluteJoint_isLimitsEnabled },
{ "setUpperLimit", w_RevoluteJoint_setUpperLimit },
{ "setLowerLimit", w_RevoluteJoint_setLowerLimit },
{ "setLimits", w_RevoluteJoint_setLimits },
{ "getLowerLimit", w_RevoluteJoint_getLowerLimit },
{ "getUpperLimit", w_RevoluteJoint_getUpperLimit },
{ "getLimits", w_RevoluteJoint_getLimits },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
int luaopen_revolutejoint(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "getJointAngle", w_RevoluteJoint_getJointAngle },
{ "getJointSpeed", w_RevoluteJoint_getJointSpeed },
{ "setMotorEnabled", w_RevoluteJoint_setMotorEnabled },
{ "isMotorEnabled", w_RevoluteJoint_isMotorEnabled },
{ "setMaxMotorTorque", w_RevoluteJoint_setMaxMotorTorque },
{ "getMaxMotorTorque", w_RevoluteJoint_getMaxMotorTorque },
{ "setMotorSpeed", w_RevoluteJoint_setMotorSpeed },
{ "getMotorSpeed", w_RevoluteJoint_getMotorSpeed },
{ "getMotorTorque", w_RevoluteJoint_getMotorTorque },
{ "setLimitsEnabled", w_RevoluteJoint_setLimitsEnabled },
{ "isLimitsEnabled", w_RevoluteJoint_isLimitsEnabled },
{ "setUpperLimit", w_RevoluteJoint_setUpperLimit },
{ "setLowerLimit", w_RevoluteJoint_setLowerLimit },
{ "setLimits", w_RevoluteJoint_setLimits },
{ "getLowerLimit", w_RevoluteJoint_getLowerLimit },
{ "getUpperLimit", w_RevoluteJoint_getUpperLimit },
{ "getLimits", w_RevoluteJoint_getLimits },
// From Joint.
{ "getType", w_Joint_getType },
{ "getAnchors", w_Joint_getAnchors },
{ "getReactionForce", w_Joint_getReactionForce },
{ "getReactionTorque", w_Joint_getReactionTorque },
{ "setCollideConnected", w_Joint_setCollideConnected },
{ "getCollideConnected", w_Joint_getCollideConnected },
{ 0, 0 }
};
return luax_register_type(L, "RevoluteJoint", functions);
}
+21 -21
View File
@@ -166,28 +166,28 @@ namespace box2d
return t->getBoundingBox(L);
}
int w_Shape_open(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "getType", w_Shape_getType },
{ "setFriction", w_Shape_setFriction },
{ "setRestitution", w_Shape_setRestitution },
{ "setDensity", w_Shape_setDensity },
{ "setSensor", w_Shape_setSensor },
{ "getFriction", w_Shape_getFriction },
{ "getRestituion", w_Shape_getRestituion },
{ "getDensity", w_Shape_getDensity },
{ "isSensor", w_Shape_isSensor },
{ "testPoint", w_Shape_testPoint },
{ "testSegment", w_Shape_testSegment },
{ "setFilterData", w_Shape_setFilterData },
{ "getFilterData", w_Shape_getFilterData },
{ "setData", w_Shape_setData },
{ "getData", w_Shape_getData },
{ "getBoundingBox", w_Shape_getBoundingBox },
{ 0, 0 }
};
static const luaL_Reg functions[] = {
{ "getType", w_Shape_getType },
{ "setFriction", w_Shape_setFriction },
{ "setRestitution", w_Shape_setRestitution },
{ "setDensity", w_Shape_setDensity },
{ "setSensor", w_Shape_setSensor },
{ "getFriction", w_Shape_getFriction },
{ "getRestituion", w_Shape_getRestituion },
{ "getDensity", w_Shape_getDensity },
{ "isSensor", w_Shape_isSensor },
{ "testPoint", w_Shape_testPoint },
{ "testSegment", w_Shape_testSegment },
{ "setFilterData", w_Shape_setFilterData },
{ "getFilterData", w_Shape_getFilterData },
{ "setData", w_Shape_setData },
{ "getData", w_Shape_getData },
{ "getBoundingBox", w_Shape_getBoundingBox },
{ 0, 0 }
};
int luaopen_shape(lua_State * L)
{
return luax_register_type(L, "Shape", functions);
}
+16 -16
View File
@@ -113,24 +113,24 @@ namespace box2d
lua_pushinteger(L, t->getMeter());
return 1;
}
static const luaL_Reg functions[] = {
{ "update", w_World_update },
{ "setCallback", w_World_setCallback },
{ "getCallback", w_World_getCallback },
{ "setGravity", w_World_setGravity },
{ "getGravity", w_World_getGravity },
{ "setAllowSleep", w_World_setAllowSleep },
{ "isAllowSleep", w_World_isAllowSleep },
{ "getBodyCount", w_World_getBodyCount },
{ "getJointCount", w_World_getJointCount },
{ "setMeter", w_World_setMeter },
{ "getMeter", w_World_getMeter },
{ 0, 0 }
};
int luaopen_world(lua_State * L)
{
static const luaL_Reg functions[] = {
{ "update", w_World_update },
{ "setCallback", w_World_setCallback },
{ "getCallback", w_World_getCallback },
{ "setGravity", w_World_setGravity },
{ "getGravity", w_World_getGravity },
{ "setAllowSleep", w_World_setAllowSleep },
{ "isAllowSleep", w_World_isAllowSleep },
{ "getBodyCount", w_World_getBodyCount },
{ "getJointCount", w_World_getJointCount },
{ "setMeter", w_World_setMeter },
{ "getMeter", w_World_getMeter },
{ 0, 0 }
};
return luax_register_type(L, "World", functions);
}