All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.badlogic.gdx.physics.bullet.dynamics.btConeTwistConstraint Maven / Gradle / Ivy

There is a newer version: 1.0.0-b6
Show newest version
/*-------------------------------------------------------
 * This file was generated by JParser
 *
 * Do not make changes to this file
 *-------------------------------------------------------*/
package com.badlogic.gdx.physics.bullet.dynamics;

import com.badlogic.gdx.math.Matrix4;
import com.badlogic.gdx.physics.bullet.linearmath.btTransform;
import com.badlogic.gdx.physics.bullet.linearmath.btQuaternion;
import com.badlogic.gdx.math.Quaternion;

/**
 * @author xpenatan
 */
public class btConeTwistConstraint extends btTypedConstraint {

    public static btConeTwistConstraint WRAPPER_GEN_01 = new btConeTwistConstraint(false);

    public btConeTwistConstraint(btRigidBody rbA, btRigidBody rbB, Matrix4 rbAFrame, Matrix4 rbBFrame) {
        btTransform btframeInA = btTransform.TEMP_0;
        btTransform btframeInB = btTransform.TEMP_1;
        btTransform.convert(rbAFrame, btframeInA);
        btTransform.convert(rbBFrame, btframeInB);
        initObject(createNative((int) rbA.getCPointer(), (int) rbB.getCPointer(), (int) btframeInA.getCPointer(), (int) btframeInB.getCPointer()), true);
    }

    public btConeTwistConstraint(btRigidBody rbA, Matrix4 rbAFrame) {
        btTransform btrbAFrame = btTransform.TEMP_0;
        btTransform.convert(rbAFrame, btrbAFrame);
        initObject(createNative((int) rbA.getCPointer(), (int) btrbAFrame.getCPointer()), true);
    }

    @org.teavm.jso.JSBody(params = {"rbAAddr", "rbBAddr", "frameInAAddr", "frameInBAddr"}, script = "var jsObj = new Bullet.btConeTwistConstraint(rbAAddr, rbBAddr, frameInAAddr, frameInBAddr); return Bullet.getPointer(jsObj);")
    private static native int createNative(int rbAAddr, int rbBAddr, int frameInAAddr, int frameInBAddr);

    @org.teavm.jso.JSBody(params = {"rbAAddr", "rbAFrameAddr"}, script = "var jsObj = new Bullet.btConeTwistConstraint(rbAAddr, rbAFrameAddr); return Bullet.getPointer(jsObj);")
    private static native int createNative(int rbAAddr, int rbAFrameAddr);

    @Override
    protected void deleteNative() {
        deleteNative((int) cPointer);
    }

    @org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint); Bullet.destroy(jsObj);")
    private static native void deleteNative(int addr);

    public btConeTwistConstraint(boolean cMemoryOwn) {
    }

    public btConeTwistConstraint() {
    }

    public void setLimit(int limitIndex, float limitValue) {
        setLimitNATIVE((int) cPointer, limitIndex, limitValue);
    }

    @org.teavm.jso.JSBody(params = {"addr", "limitIndex", "limitValue"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setLimit(limitIndex, limitValue);")
    private static native void setLimitNATIVE(int addr, int limitIndex, float limitValue);

    public void setLimit(float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor, float _relaxationFactor) {
        setLimitNATIVE((int) cPointer, _swingSpan1, _swingSpan2, _twistSpan, _softness, _biasFactor, _relaxationFactor);
    }

    @org.teavm.jso.JSBody(params = {"addr", "_swingSpan1", "_swingSpan2", "_twistSpan", "_softness", "_biasFactor", "_relaxationFactor"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setLimit(_swingSpan1, _swingSpan2, _twistSpan, _softness, _biasFactor, _relaxationFactor);")
    private static native void setLimitNATIVE(int addr, float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor, float _relaxationFactor);

    public void setLimit(float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor) {
        setLimitNATIVE((int) cPointer, _swingSpan1, _swingSpan2, _twistSpan, _softness, _biasFactor);
    }

    @org.teavm.jso.JSBody(params = {"addr", "_swingSpan1", "_swingSpan2", "_twistSpan", "_softness", "_biasFactor"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setLimit(_swingSpan1, _swingSpan2, _twistSpan, _softness, _biasFactor);")
    private static native void setLimitNATIVE(int addr, float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor);

    public void setLimit(float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness) {
        setLimitNATIVE((int) cPointer, _swingSpan1, _swingSpan2, _twistSpan, _softness);
    }

    @org.teavm.jso.JSBody(params = {"addr", "_swingSpan1", "_swingSpan2", "_twistSpan", "_softness"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setLimit(_swingSpan1, _swingSpan2, _twistSpan, _softness);")
    private static native void setLimitNATIVE(int addr, float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness);

    public void setLimit(float _swingSpan1, float _swingSpan2, float _twistSpan) {
        setLimitNATIVE((int) cPointer, _swingSpan1, _swingSpan2, _twistSpan);
    }

    @org.teavm.jso.JSBody(params = {"addr", "_swingSpan1", "_swingSpan2", "_twistSpan"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setLimit(_swingSpan1, _swingSpan2, _twistSpan);")
    private static native void setLimitNATIVE(int addr, float _swingSpan1, float _swingSpan2, float _twistSpan);

    public void setAngularOnly(boolean angularOnly) {
        setAngularOnlyNATIVE((int) cPointer, angularOnly);
    }

    @org.teavm.jso.JSBody(params = {"addr", "angularOnly"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setAngularOnly(angularOnly);")
    private static native void setAngularOnlyNATIVE(int addr, boolean angularOnly);

    public void setDamping(float damping) {
        setDampingNATIVE((int) cPointer, damping);
    }

    @org.teavm.jso.JSBody(params = {"addr", "damping"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setDamping(damping);")
    private static native void setDampingNATIVE(int addr, float damping);

    public void enableMotor(boolean b) {
        enableMotorNATIVE((int) cPointer, b);
    }

    @org.teavm.jso.JSBody(params = {"addr", "b"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.enableMotor(b);")
    private static native void enableMotorNATIVE(int addr, boolean b);

    public void setMaxMotorImpulse(float maxMotorImpulse) {
        setMaxMotorImpulseNATIVE((int) cPointer, maxMotorImpulse);
    }

    @org.teavm.jso.JSBody(params = {"addr", "maxMotorImpulse"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setMaxMotorImpulse(maxMotorImpulse);")
    private static native void setMaxMotorImpulseNATIVE(int addr, float maxMotorImpulse);

    public void setMaxMotorImpulseNormalized(float maxMotorImpulse) {
        setMaxMotorImpulseNormalizedNATIVE((int) cPointer, maxMotorImpulse);
    }

    @org.teavm.jso.JSBody(params = {"addr", "maxMotorImpulse"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setMaxMotorImpulseNormalized(maxMotorImpulse);")
    private static native void setMaxMotorImpulseNormalizedNATIVE(int addr, float maxMotorImpulse);

    public void setMotorTarget(btQuaternion q) {
        setMotorTargetNATIVE((int) cPointer, (int) q.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "qAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setMotorTarget(qAddr);")
    private static native void setMotorTargetNATIVE(int addr, int qAddr);

    public void setMotorTarget(Quaternion qGDX) {
        btQuaternion.convert(qGDX, btQuaternion.TEMP_0);
        btQuaternion q = btQuaternion.TEMP_0;
        setMotorTargetNATIVE((int) cPointer, (int) q.getCPointer());
    }

    public void setMotorTargetInConstraintSpace(btQuaternion q) {
        setMotorTargetInConstraintSpaceNATIVE((int) cPointer, (int) q.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "qAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConeTwistConstraint);jsObj.setMotorTargetInConstraintSpace(qAddr);")
    private static native void setMotorTargetInConstraintSpaceNATIVE(int addr, int qAddr);

    public void setMotorTargetInConstraintSpace(Quaternion qGDX) {
        btQuaternion.convert(qGDX, btQuaternion.TEMP_0);
        btQuaternion q = btQuaternion.TEMP_0;
        setMotorTargetInConstraintSpaceNATIVE((int) cPointer, (int) q.getCPointer());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy