1 /* ----------------------------------------------------------------------------
\r
2 * This file was automatically generated by SWIG (http://www.swig.org).
\r
5 * Do not make changes to this file unless you know what you are doing--modify
\r
6 * the SWIG interface file instead.
\r
7 * ----------------------------------------------------------------------------- */
\r
9 package com.badlogic.gdx.physics.bullet;
\r
11 import com.badlogic.gdx.math.Vector3;
\r
12 import com.badlogic.gdx.math.Quaternion;
\r
13 import com.badlogic.gdx.math.Matrix3;
\r
14 import com.badlogic.gdx.math.Matrix4;
\r
16 public class btBox2dShape extends btPolyhedralConvexShape {
\r
17 private long swigCPtr;
\r
19 protected btBox2dShape(final String className, long cPtr, boolean cMemoryOwn) {
\r
20 super(className, gdxBulletJNI.btBox2dShape_SWIGUpcast(cPtr), cMemoryOwn);
\r
24 protected btBox2dShape(long cPtr, boolean cMemoryOwn) {
\r
25 this("btBox2dShape", cPtr, cMemoryOwn);
\r
30 protected void reset(long cPtr, boolean cMemoryOwn) {
\r
33 super.reset(gdxBulletJNI.btBox2dShape_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
\r
36 public static long getCPtr(btBox2dShape obj) {
\r
37 return (obj == null) ? 0 : obj.swigCPtr;
\r
41 protected void finalize() throws Throwable {
\r
47 @Override protected synchronized void delete() {
\r
48 if (swigCPtr != 0) {
\r
50 swigCMemOwn = false;
\r
51 gdxBulletJNI.delete_btBox2dShape(swigCPtr);
\r
58 public Vector3 getHalfExtentsWithMargin() {
\r
59 return gdxBulletJNI.btBox2dShape_getHalfExtentsWithMargin(swigCPtr, this);
\r
62 public Vector3 getHalfExtentsWithoutMargin() {
\r
63 return gdxBulletJNI.btBox2dShape_getHalfExtentsWithoutMargin(swigCPtr, this);
\r
66 public btBox2dShape(Vector3 boxHalfExtents) {
\r
67 this(gdxBulletJNI.new_btBox2dShape(boxHalfExtents), true);
\r
70 public int getVertexCount() {
\r
71 return gdxBulletJNI.btBox2dShape_getVertexCount(swigCPtr, this);
\r
74 public btVector3 getVertices() {
\r
75 long cPtr = gdxBulletJNI.btBox2dShape_getVertices(swigCPtr, this);
\r
76 return (cPtr == 0) ? null : new btVector3(cPtr, false);
\r
79 public btVector3 getNormals() {
\r
80 long cPtr = gdxBulletJNI.btBox2dShape_getNormals(swigCPtr, this);
\r
81 return (cPtr == 0) ? null : new btVector3(cPtr, false);
\r
84 public Vector3 getCentroid() {
\r
85 return gdxBulletJNI.btBox2dShape_getCentroid(swigCPtr, this);
\r
88 public void getPlaneEquation(btVector4 plane, int i) {
\r
89 gdxBulletJNI.btBox2dShape_getPlaneEquation(swigCPtr, this, btVector4.getCPtr(plane), plane, i);
\r