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 btHeightfieldTerrainShape extends btConcaveShape { 19 private long swigCPtr; 20 btHeightfieldTerrainShape(final String className, long cPtr, boolean cMemoryOwn)21 protected btHeightfieldTerrainShape(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, CollisionJNI.btHeightfieldTerrainShape_SWIGUpcast(cPtr), cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new btHeightfieldTerrainShape, normally you should not need this constructor it's intended for low-level usage. */ btHeightfieldTerrainShape(long cPtr, boolean cMemoryOwn)27 public btHeightfieldTerrainShape(long cPtr, boolean cMemoryOwn) { 28 this("btHeightfieldTerrainShape", 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.btHeightfieldTerrainShape_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn); 37 } 38 getCPtr(btHeightfieldTerrainShape obj)39 public static long getCPtr(btHeightfieldTerrainShape 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_btHeightfieldTerrainShape(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 setUseDiamondSubdivision(boolean useDiamondSubdivision)61 public void setUseDiamondSubdivision(boolean useDiamondSubdivision) { 62 CollisionJNI.btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_0(swigCPtr, this, useDiamondSubdivision); 63 } 64 setUseDiamondSubdivision()65 public void setUseDiamondSubdivision() { 66 CollisionJNI.btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_1(swigCPtr, this); 67 } 68 setUseZigzagSubdivision(boolean useZigzagSubdivision)69 public void setUseZigzagSubdivision(boolean useZigzagSubdivision) { 70 CollisionJNI.btHeightfieldTerrainShape_setUseZigzagSubdivision__SWIG_0(swigCPtr, this, useZigzagSubdivision); 71 } 72 setUseZigzagSubdivision()73 public void setUseZigzagSubdivision() { 74 CollisionJNI.btHeightfieldTerrainShape_setUseZigzagSubdivision__SWIG_1(swigCPtr, this); 75 } 76 SwigConstructbtHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.FloatBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges)77 static private long SwigConstructbtHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.FloatBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges) { 78 assert heightfieldData.isDirect() : "Buffer must be allocated direct."; 79 return CollisionJNI.new_btHeightfieldTerrainShape__SWIG_0(heightStickWidth, heightStickLength, heightfieldData, heightScale, minHeight, maxHeight, upAxis, flipQuadEdges); 80 } 81 btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.FloatBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges)82 public btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.FloatBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges) { 83 this(btHeightfieldTerrainShape.SwigConstructbtHeightfieldTerrainShape(heightStickWidth, heightStickLength, heightfieldData, heightScale, minHeight, maxHeight, upAxis, flipQuadEdges), true); 84 } 85 SwigConstructbtHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.ShortBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges)86 static private long SwigConstructbtHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.ShortBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges) { 87 assert heightfieldData.isDirect() : "Buffer must be allocated direct."; 88 return CollisionJNI.new_btHeightfieldTerrainShape__SWIG_1(heightStickWidth, heightStickLength, heightfieldData, heightScale, minHeight, maxHeight, upAxis, flipQuadEdges); 89 } 90 btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.ShortBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges)91 public btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.ShortBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges) { 92 this(btHeightfieldTerrainShape.SwigConstructbtHeightfieldTerrainShape(heightStickWidth, heightStickLength, heightfieldData, heightScale, minHeight, maxHeight, upAxis, flipQuadEdges), true); 93 } 94 95 } 96