• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.8
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package com.badlogic.gdx.physics.bullet.collision;
10 
11 import com.badlogic.gdx.physics.bullet.BulletBase;
12 import com.badlogic.gdx.physics.bullet.linearmath.*;
13 import com.badlogic.gdx.math.Vector3;
14 import com.badlogic.gdx.math.Quaternion;
15 import com.badlogic.gdx.math.Matrix3;
16 import com.badlogic.gdx.math.Matrix4;
17 
18 public class btBox2dShape extends btPolyhedralConvexShape {
19 	private long swigCPtr;
20 
btBox2dShape(final String className, long cPtr, boolean cMemoryOwn)21 	protected btBox2dShape(final String className, long cPtr, boolean cMemoryOwn) {
22 		super(className, CollisionJNI.btBox2dShape_SWIGUpcast(cPtr), cMemoryOwn);
23 		swigCPtr = cPtr;
24 	}
25 
26 	/** Construct a new btBox2dShape, normally you should not need this constructor it's intended for low-level usage. */
btBox2dShape(long cPtr, boolean cMemoryOwn)27 	public btBox2dShape(long cPtr, boolean cMemoryOwn) {
28 		this("btBox2dShape", cPtr, cMemoryOwn);
29 		construct();
30 	}
31 
32 	@Override
reset(long cPtr, boolean cMemoryOwn)33 	protected void reset(long cPtr, boolean cMemoryOwn) {
34 		if (!destroyed)
35 			destroy();
36 		super.reset(CollisionJNI.btBox2dShape_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
37 	}
38 
getCPtr(btBox2dShape obj)39 	public static long getCPtr(btBox2dShape obj) {
40 		return (obj == null) ? 0 : obj.swigCPtr;
41 	}
42 
43 	@Override
finalize()44 	protected void finalize() throws Throwable {
45 		if (!destroyed)
46 			destroy();
47 		super.finalize();
48 	}
49 
delete()50   @Override protected synchronized void delete() {
51 		if (swigCPtr != 0) {
52 			if (swigCMemOwn) {
53 				swigCMemOwn = false;
54 				CollisionJNI.delete_btBox2dShape(swigCPtr);
55 			}
56 			swigCPtr = 0;
57 		}
58 		super.delete();
59 	}
60 
getHalfExtentsWithMargin()61   public Vector3 getHalfExtentsWithMargin() {
62 	return CollisionJNI.btBox2dShape_getHalfExtentsWithMargin(swigCPtr, this);
63 }
64 
getHalfExtentsWithoutMargin()65   public Vector3 getHalfExtentsWithoutMargin() {
66 	return CollisionJNI.btBox2dShape_getHalfExtentsWithoutMargin(swigCPtr, this);
67 }
68 
btBox2dShape(Vector3 boxHalfExtents)69   public btBox2dShape(Vector3 boxHalfExtents) {
70     this(CollisionJNI.new_btBox2dShape(boxHalfExtents), true);
71   }
72 
getVertexCount()73   public int getVertexCount() {
74     return CollisionJNI.btBox2dShape_getVertexCount(swigCPtr, this);
75   }
76 
getVertices()77   public btVector3 getVertices() {
78     long cPtr = CollisionJNI.btBox2dShape_getVertices(swigCPtr, this);
79     return (cPtr == 0) ? null : new btVector3(cPtr, false);
80   }
81 
getNormals()82   public btVector3 getNormals() {
83     long cPtr = CollisionJNI.btBox2dShape_getNormals(swigCPtr, this);
84     return (cPtr == 0) ? null : new btVector3(cPtr, false);
85   }
86 
getCentroid()87   public Vector3 getCentroid() {
88 	return CollisionJNI.btBox2dShape_getCentroid(swigCPtr, this);
89 }
90 
getPlaneEquation(btVector4 plane, int i)91   public void getPlaneEquation(btVector4 plane, int i) {
92     CollisionJNI.btBox2dShape_getPlaneEquation(swigCPtr, this, btVector4.getCPtr(plane), plane, i);
93   }
94 
95 }
96