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

com.badlogic.gdx.physics.bullet.collision.btConvexShape 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.collision;

import com.badlogic.gdx.physics.bullet.linearmath.btVector3;
import com.badlogic.gdx.math.Vector3;

/**
 * @author xpenatan
 */
public class btConvexShape extends btCollisionShape {

    public static btConvexShape WRAPPER_GEN_01 = new btConvexShape(false);

    public btConvexShape(boolean cMemoryOwn) {
    }

    public btConvexShape() {
    }

    public int getNumPreferredPenetrationDirections() {
        return getNumPreferredPenetrationDirectionsNATIVE((int) cPointer);
    }

    @org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConvexShape);var returnedJSObj = jsObj.getNumPreferredPenetrationDirections();return returnedJSObj;")
    private static native int getNumPreferredPenetrationDirectionsNATIVE(int addr);

    public void getPreferredPenetrationDirection(int index, btVector3 penetrationVector) {
        getPreferredPenetrationDirectionNATIVE((int) cPointer, index, (int) penetrationVector.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "index", "penetrationVectorAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btConvexShape);jsObj.getPreferredPenetrationDirection(index, penetrationVectorAddr);")
    private static native void getPreferredPenetrationDirectionNATIVE(int addr, int index, int penetrationVectorAddr);

    public void getPreferredPenetrationDirection(int index, Vector3 penetrationVectorGDX) {
        btVector3.convert(penetrationVectorGDX, btVector3.TEMP_0);
        btVector3 penetrationVector = btVector3.TEMP_0;
        getPreferredPenetrationDirectionNATIVE((int) cPointer, index, (int) penetrationVector.getCPointer());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy