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

com.badlogic.gdx.physics.bullet.collision.btCollisionWorld 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.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.btIDebugDraw;
import com.badlogic.gdx.physics.bullet.linearmath.btTransform;
import com.badlogic.gdx.physics.bullet.linearmath.btVector3;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Matrix4;

/**
 * @author xpenatan
 */
public class btCollisionWorld extends BulletBase {

    public static btCollisionWorld WRAPPER_GEN_01 = new btCollisionWorld(false);

    public btCollisionWorld() {
        initObject(createNative(), true);
    }

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

    @org.teavm.jso.JSBody(script = "var jsObj = new Bullet.btCollisionWorld(); return Bullet.getPointer(jsObj);")
    private static native int createNative();

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

    public btCollisionWorld(boolean cMemoryOwn) {
    }

    public void setBroadphase(btBroadphaseInterface pairCache) {
        setBroadphaseNATIVE((int) cPointer, (int) pairCache.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "pairCacheAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.setBroadphase(pairCacheAddr);")
    private static native void setBroadphaseNATIVE(int addr, int pairCacheAddr);

    public btDispatcher getDispatcher() {
        int pointer = getDispatcherNATIVE((int) cPointer);
        btDispatcher.WRAPPER_GEN_01.setPointer(pointer);
        return btDispatcher.WRAPPER_GEN_01;
    }

    @org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);var returnedJSObj = jsObj.getDispatcher();return Bullet.getPointer(returnedJSObj);")
    private static native int getDispatcherNATIVE(int addr);

    public void updateSingleAabb(btCollisionObject colObj) {
        updateSingleAabbNATIVE((int) cPointer, (int) colObj.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "colObjAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.updateSingleAabb(colObjAddr);")
    private static native void updateSingleAabbNATIVE(int addr, int colObjAddr);

    public void updateAabbs() {
        updateAabbsNATIVE((int) cPointer);
    }

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

    public void computeOverlappingPairs() {
        computeOverlappingPairsNATIVE((int) cPointer);
    }

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

    public void setDebugDrawer(btIDebugDraw debugDrawer) {
        setDebugDrawerNATIVE((int) cPointer, (int) debugDrawer.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "debugDrawerAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.setDebugDrawer(debugDrawerAddr);")
    private static native void setDebugDrawerNATIVE(int addr, int debugDrawerAddr);

    public void debugDrawWorld() {
        debugDrawWorldNATIVE((int) cPointer);
    }

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

    public void debugDrawObject(btTransform worldTransform, btCollisionShape shape, btVector3 color) {
        debugDrawObjectNATIVE((int) cPointer, (int) worldTransform.getCPointer(), (int) shape.getCPointer(), (int) color.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "worldTransformAddr", "shapeAddr", "colorAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.debugDrawObject(worldTransformAddr, shapeAddr, colorAddr);")
    private static native void debugDrawObjectNATIVE(int addr, int worldTransformAddr, int shapeAddr, int colorAddr);

    public void debugDrawObject(Matrix4 worldTransformGDX, btCollisionShape shape, Vector3 colorGDX) {
        btTransform.convert(worldTransformGDX, btTransform.TEMP_0);
        btTransform worldTransform = btTransform.TEMP_0;
        btVector3.convert(colorGDX, btVector3.TEMP_0);
        btVector3 color = btVector3.TEMP_0;
        debugDrawObjectNATIVE((int) cPointer, (int) worldTransform.getCPointer(), (int) shape.getCPointer(), (int) color.getCPointer());
    }

    public int getNumCollisionObjects() {
        return getNumCollisionObjectsNATIVE((int) cPointer);
    }

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

    public void rayTest(btVector3 rayFromWorld, btVector3 rayToWorld, RayResultCallback resultCallback) {
        rayTestNATIVE((int) cPointer, (int) rayFromWorld.getCPointer(), (int) rayToWorld.getCPointer(), (int) resultCallback.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "rayFromWorldAddr", "rayToWorldAddr", "resultCallbackAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.rayTest(rayFromWorldAddr, rayToWorldAddr, resultCallbackAddr);")
    private static native void rayTestNATIVE(int addr, int rayFromWorldAddr, int rayToWorldAddr, int resultCallbackAddr);

    public void rayTest(Vector3 rayFromWorldGDX, Vector3 rayToWorldGDX, RayResultCallback resultCallback) {
        btVector3.convert(rayFromWorldGDX, btVector3.TEMP_0);
        btVector3 rayFromWorld = btVector3.TEMP_0;
        btVector3.convert(rayToWorldGDX, btVector3.TEMP_1);
        btVector3 rayToWorld = btVector3.TEMP_1;
        rayTestNATIVE((int) cPointer, (int) rayFromWorld.getCPointer(), (int) rayToWorld.getCPointer(), (int) resultCallback.getCPointer());
    }

    public void convexSweepTest(btConvexShape castShape, btTransform from, btTransform to, ConvexResultCallback resultCallback, float allowedCcdPenetration) {
        convexSweepTestNATIVE((int) cPointer, (int) castShape.getCPointer(), (int) from.getCPointer(), (int) to.getCPointer(), (int) resultCallback.getCPointer(), allowedCcdPenetration);
    }

    @org.teavm.jso.JSBody(params = {"addr", "castShapeAddr", "fromAddr", "toAddr", "resultCallbackAddr", "allowedCcdPenetration"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.convexSweepTest(castShapeAddr, fromAddr, toAddr, resultCallbackAddr, allowedCcdPenetration);")
    private static native void convexSweepTestNATIVE(int addr, int castShapeAddr, int fromAddr, int toAddr, int resultCallbackAddr, float allowedCcdPenetration);

    public void convexSweepTest(btConvexShape castShape, Matrix4 fromGDX, Matrix4 toGDX, ConvexResultCallback resultCallback, float allowedCcdPenetration) {
        btTransform.convert(fromGDX, btTransform.TEMP_0);
        btTransform from = btTransform.TEMP_0;
        btTransform.convert(toGDX, btTransform.TEMP_1);
        btTransform to = btTransform.TEMP_1;
        convexSweepTestNATIVE((int) cPointer, (int) castShape.getCPointer(), (int) from.getCPointer(), (int) to.getCPointer(), (int) resultCallback.getCPointer(), allowedCcdPenetration);
    }

    public void convexSweepTest(btConvexShape castShape, btTransform from, btTransform to, ConvexResultCallback resultCallback) {
        convexSweepTestNATIVE((int) cPointer, (int) castShape.getCPointer(), (int) from.getCPointer(), (int) to.getCPointer(), (int) resultCallback.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "castShapeAddr", "fromAddr", "toAddr", "resultCallbackAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.convexSweepTest(castShapeAddr, fromAddr, toAddr, resultCallbackAddr);")
    private static native void convexSweepTestNATIVE(int addr, int castShapeAddr, int fromAddr, int toAddr, int resultCallbackAddr);

    public void convexSweepTest(btConvexShape castShape, Matrix4 fromGDX, Matrix4 toGDX, ConvexResultCallback resultCallback) {
        btTransform.convert(fromGDX, btTransform.TEMP_0);
        btTransform from = btTransform.TEMP_0;
        btTransform.convert(toGDX, btTransform.TEMP_1);
        btTransform to = btTransform.TEMP_1;
        convexSweepTestNATIVE((int) cPointer, (int) castShape.getCPointer(), (int) from.getCPointer(), (int) to.getCPointer(), (int) resultCallback.getCPointer());
    }

    public void contactTest(btCollisionObject colObj, ContactResultCallback resultCallback) {
        contactTestNATIVE((int) cPointer, (int) colObj.getCPointer(), (int) resultCallback.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "colObjAddr", "resultCallbackAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.contactTest(colObjAddr, resultCallbackAddr);")
    private static native void contactTestNATIVE(int addr, int colObjAddr, int resultCallbackAddr);

    public void contactPairTest(btCollisionObject colObjA, btCollisionObject colObjB, ContactResultCallback resultCallback) {
        contactPairTestNATIVE((int) cPointer, (int) colObjA.getCPointer(), (int) colObjB.getCPointer(), (int) resultCallback.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "colObjAAddr", "colObjBAddr", "resultCallbackAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.contactPairTest(colObjAAddr, colObjBAddr, resultCallbackAddr);")
    private static native void contactPairTestNATIVE(int addr, int colObjAAddr, int colObjBAddr, int resultCallbackAddr);

    public void addCollisionObject(btCollisionObject collisionObject, int collisionFilterGroup, int collisionFilterMask) {
        addCollisionObjectNATIVE((int) cPointer, (int) collisionObject.getCPointer(), collisionFilterGroup, collisionFilterMask);
    }

    @org.teavm.jso.JSBody(params = {"addr", "collisionObjectAddr", "collisionFilterGroup", "collisionFilterMask"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.addCollisionObject(collisionObjectAddr, collisionFilterGroup, collisionFilterMask);")
    private static native void addCollisionObjectNATIVE(int addr, int collisionObjectAddr, int collisionFilterGroup, int collisionFilterMask);

    public void addCollisionObject(btCollisionObject collisionObject, int collisionFilterGroup) {
        addCollisionObjectNATIVE((int) cPointer, (int) collisionObject.getCPointer(), collisionFilterGroup);
    }

    @org.teavm.jso.JSBody(params = {"addr", "collisionObjectAddr", "collisionFilterGroup"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.addCollisionObject(collisionObjectAddr, collisionFilterGroup);")
    private static native void addCollisionObjectNATIVE(int addr, int collisionObjectAddr, int collisionFilterGroup);

    public void addCollisionObject(btCollisionObject collisionObject) {
        addCollisionObjectNATIVE((int) cPointer, (int) collisionObject.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "collisionObjectAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.addCollisionObject(collisionObjectAddr);")
    private static native void addCollisionObjectNATIVE(int addr, int collisionObjectAddr);

    public btCollisionObjectArray getCollisionObjectArray() {
        int pointer = getCollisionObjectArrayNATIVE((int) cPointer);
        btCollisionObjectArray.WRAPPER_GEN_01.setPointer(pointer);
        return btCollisionObjectArray.WRAPPER_GEN_01;
    }

    @org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);var returnedJSObj = jsObj.getCollisionObjectArray();return Bullet.getPointer(returnedJSObj);")
    private static native int getCollisionObjectArrayNATIVE(int addr);

    public void removeCollisionObject(btCollisionObject collisionObject) {
        removeCollisionObjectNATIVE((int) cPointer, (int) collisionObject.getCPointer());
    }

    @org.teavm.jso.JSBody(params = {"addr", "collisionObjectAddr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.removeCollisionObject(collisionObjectAddr);")
    private static native void removeCollisionObjectNATIVE(int addr, int collisionObjectAddr);

    public void performDiscreteCollisionDetection() {
        performDiscreteCollisionDetectionNATIVE((int) cPointer);
    }

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

    public btDispatcherInfo getDispatchInfo() {
        int pointer = getDispatchInfoNATIVE((int) cPointer);
        btDispatcherInfo.WRAPPER_GEN_01.setPointer(pointer);
        return btDispatcherInfo.WRAPPER_GEN_01;
    }

    @org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);var returnedJSObj = jsObj.getDispatchInfo();return Bullet.getPointer(returnedJSObj);")
    private static native int getDispatchInfoNATIVE(int addr);

    public boolean getForceUpdateAllAabbs() {
        return getForceUpdateAllAabbsNATIVE((int) cPointer);
    }

    @org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);var returnedJSObj = jsObj.getForceUpdateAllAabbs();return returnedJSObj;")
    private static native boolean getForceUpdateAllAabbsNATIVE(int addr);

    public void setForceUpdateAllAabbs(boolean f) {
        setForceUpdateAllAabbsNATIVE((int) cPointer, f);
    }

    @org.teavm.jso.JSBody(params = {"addr", "f"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btCollisionWorld);jsObj.setForceUpdateAllAabbs(f);")
    private static native void setForceUpdateAllAabbsNATIVE(int addr, boolean f);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy