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

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

Introduction

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

Prototype

public float getUpperLimit() 

Source Link

Document

Get the upper joint limit in radians.

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  ww  .j  a v a  2  s.  c  om

    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;
}