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

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

Introduction

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

Prototype

public boolean isMotorEnabled() 

Source Link

Document

Is the joint motor enabled?

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);// ww w  .ja  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;
}