com.badlogic.gdx.physics.bullet.linearmath.btVector3 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gdx-bullet-teavm Show documentation
Show all versions of gdx-bullet-teavm Show documentation
Tool to generate libgdx to javascript using teaVM
/*-------------------------------------------------------
* This file was generated by JParser
*
* Do not make changes to this file
*-------------------------------------------------------*/
package com.badlogic.gdx.physics.bullet.linearmath;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.physics.bullet.BulletBase;
/**
* @author xpenatan
*/
public class btVector3 extends BulletBase {
public static btVector3 WRAPPER_GEN_01 = new btVector3(false);
public static btVector3 TEMP_0 = new btVector3(true);
public static btVector3 TEMP_1 = new btVector3(true);
public static btVector3 TEMP_2 = new btVector3(true);
public static btVector3 TEMP_3 = new btVector3(true);
public static btVector3 TEMP_4 = new btVector3(true);
public static btVector3 emptyTransform = new btVector3(false);
public static Vector3 TEMP_GDX_01 = new Vector3();
public btVector3() {
this(true);
}
public btVector3(float x, float y, float z) {
initObject(createNative(x, y, z), true);
}
/**
* Useful on creating temp objects
*/
public btVector3(boolean cMemoryOwn) {
initObject(cMemoryOwn ? createNative(0, 0, 0) : 0, cMemoryOwn);
}
@org.teavm.jso.JSBody(params = {"x", "y", "z"}, script = "var jsObj = new Bullet.btVector3(x,y,z); return Bullet.getPointer(jsObj);")
private static native int createNative(float x, float y, float z);
@Override
protected void deleteNative() {
deleteNative((int) cPointer);
}
@org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3); Bullet.destroy(jsObj);")
private static native void deleteNative(int addr);
public float getX() {
return getX((int) cPointer);
}
@org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3); return jsObj.x();")
private static native float getX(int addr);
public float getY() {
return getY((int) cPointer);
}
@org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3); return jsObj.y();")
private static native float getY(int addr);
public float getZ() {
return getZ((int) cPointer);
}
@org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3); return jsObj.z();")
private static native float getZ(int addr);
public void setValue(float x, float y, float z) {
setValue((int) cPointer, x, y, z);
}
@org.teavm.jso.JSBody(params = {"addr", "x", "y", "z"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3); jsObj.setValue(x, y, z);")
private static native void setValue(int addr, float x, float y, float z);
public static void convert(Vector3 in, btVector3 out) {
out.setValue(in.x, in.y, in.z);
}
public static void convert(btVector3 in, Vector3 out) {
float x = in.getX();
float y = in.getY();
float z = in.getZ();
out.set(x, y, z);
}
public static void convert(Vector3 in, long outAddr) {
emptyTransform.setPointer(outAddr);
convert(in, emptyTransform);
}
public static void convert(long inAddr, Vector3 out) {
emptyTransform.setPointer(inAddr);
convert(emptyTransform, out);
}
public float length() {
return lengthNATIVE((int) cPointer);
}
@org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3);var returnedJSObj = jsObj.length();return returnedJSObj;")
private static native float lengthNATIVE(int addr);
public float x() {
return xNATIVE((int) cPointer);
}
@org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3);var returnedJSObj = jsObj.x();return returnedJSObj;")
private static native float xNATIVE(int addr);
public float y() {
return yNATIVE((int) cPointer);
}
@org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3);var returnedJSObj = jsObj.y();return returnedJSObj;")
private static native float yNATIVE(int addr);
public float z() {
return zNATIVE((int) cPointer);
}
@org.teavm.jso.JSBody(params = {"addr"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3);var returnedJSObj = jsObj.z();return returnedJSObj;")
private static native float zNATIVE(int addr);
public void setX(float x) {
setXNATIVE((int) cPointer, x);
}
@org.teavm.jso.JSBody(params = {"addr", "x"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3);jsObj.setX(x);")
private static native void setXNATIVE(int addr, float x);
public void setY(float y) {
setYNATIVE((int) cPointer, y);
}
@org.teavm.jso.JSBody(params = {"addr", "y"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3);jsObj.setY(y);")
private static native void setYNATIVE(int addr, float y);
public void setZ(float z) {
setZNATIVE((int) cPointer, z);
}
@org.teavm.jso.JSBody(params = {"addr", "z"}, script = "var jsObj = Bullet.wrapPointer(addr, Bullet.btVector3);jsObj.setZ(z);")
private static native void setZNATIVE(int addr, float z);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy