Example usage for com.badlogic.gdx.physics.box2d.joints RevoluteJoint getMotorSpeed

List of usage examples for com.badlogic.gdx.physics.box2d.joints RevoluteJoint getMotorSpeed

Introduction

In this page you can find the example usage for com.badlogic.gdx.physics.box2d.joints RevoluteJoint getMotorSpeed.

Prototype

public float getMotorSpeed() 

Source Link

Document

Get the motor speed in radians per second.

Usage

From source file:org.ams.physics.things.def.DefParser.java

License:Open Source License

public static HingeDef hingeToDefinition(Hinge hinge) {
    HingeDef hingeDef = new HingeDef();
    RevoluteJoint joint = hinge.getJoint();

    jointToDefinition(hinge, hingeDef);/*  w w w.j  a  v  a  2 s.  c o m*/

    hingeDef.enableLimit = joint.isLimitEnabled();
    hingeDef.enableMotor = joint.isMotorEnabled();
    hingeDef.lowerLimit = joint.getLowerLimit();
    hingeDef.upperLimit = joint.getUpperLimit();
    hingeDef.motorSpeed = joint.getMotorSpeed();
    hingeDef.maxMotorTorque = joint.getMaxMotorTorque();

    return hingeDef;
}