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.linearmath; 10 11 import com.badlogic.gdx.physics.bullet.BulletBase; 12 import com.badlogic.gdx.math.Vector3; 13 import com.badlogic.gdx.math.Quaternion; 14 import com.badlogic.gdx.math.Matrix3; 15 import com.badlogic.gdx.math.Matrix4; 16 17 public class btIDebugDraw extends BulletBase { 18 private long swigCPtr; 19 btIDebugDraw(final String className, long cPtr, boolean cMemoryOwn)20 protected btIDebugDraw(final String className, long cPtr, boolean cMemoryOwn) { 21 super(className, cPtr, cMemoryOwn); 22 swigCPtr = cPtr; 23 } 24 25 /** Construct a new btIDebugDraw, normally you should not need this constructor it's intended for low-level usage. */ btIDebugDraw(long cPtr, boolean cMemoryOwn)26 public btIDebugDraw(long cPtr, boolean cMemoryOwn) { 27 this("btIDebugDraw", cPtr, cMemoryOwn); 28 construct(); 29 } 30 31 @Override reset(long cPtr, boolean cMemoryOwn)32 protected void reset(long cPtr, boolean cMemoryOwn) { 33 if (!destroyed) 34 destroy(); 35 super.reset(swigCPtr = cPtr, cMemoryOwn); 36 } 37 getCPtr(btIDebugDraw obj)38 public static long getCPtr(btIDebugDraw obj) { 39 return (obj == null) ? 0 : obj.swigCPtr; 40 } 41 42 @Override finalize()43 protected void finalize() throws Throwable { 44 if (!destroyed) 45 destroy(); 46 super.finalize(); 47 } 48 delete()49 @Override protected synchronized void delete() { 50 if (swigCPtr != 0) { 51 if (swigCMemOwn) { 52 swigCMemOwn = false; 53 LinearMathJNI.delete_btIDebugDraw(swigCPtr); 54 } 55 swigCPtr = 0; 56 } 57 super.delete(); 58 } 59 swigDirectorDisconnect()60 protected void swigDirectorDisconnect() { 61 swigCMemOwn = false; 62 delete(); 63 } 64 swigReleaseOwnership()65 public void swigReleaseOwnership() { 66 swigCMemOwn = false; 67 LinearMathJNI.btIDebugDraw_change_ownership(this, swigCPtr, false); 68 } 69 swigTakeOwnership()70 public void swigTakeOwnership() { 71 swigCMemOwn = true; 72 LinearMathJNI.btIDebugDraw_change_ownership(this, swigCPtr, true); 73 } 74 75 static public class DefaultColors extends BulletBase { 76 private long swigCPtr; 77 DefaultColors(final String className, long cPtr, boolean cMemoryOwn)78 protected DefaultColors(final String className, long cPtr, boolean cMemoryOwn) { 79 super(className, cPtr, cMemoryOwn); 80 swigCPtr = cPtr; 81 } 82 83 /** Construct a new DefaultColors, normally you should not need this constructor it's intended for low-level usage. */ DefaultColors(long cPtr, boolean cMemoryOwn)84 public DefaultColors(long cPtr, boolean cMemoryOwn) { 85 this("DefaultColors", cPtr, cMemoryOwn); 86 construct(); 87 } 88 89 @Override reset(long cPtr, boolean cMemoryOwn)90 protected void reset(long cPtr, boolean cMemoryOwn) { 91 if (!destroyed) 92 destroy(); 93 super.reset(swigCPtr = cPtr, cMemoryOwn); 94 } 95 getCPtr(DefaultColors obj)96 public static long getCPtr(DefaultColors obj) { 97 return (obj == null) ? 0 : obj.swigCPtr; 98 } 99 100 @Override finalize()101 protected void finalize() throws Throwable { 102 if (!destroyed) 103 destroy(); 104 super.finalize(); 105 } 106 delete()107 @Override protected synchronized void delete() { 108 if (swigCPtr != 0) { 109 if (swigCMemOwn) { 110 swigCMemOwn = false; 111 LinearMathJNI.delete_btIDebugDraw_DefaultColors(swigCPtr); 112 } 113 swigCPtr = 0; 114 } 115 super.delete(); 116 } 117 setActiveObject(btVector3 value)118 public void setActiveObject(btVector3 value) { 119 LinearMathJNI.btIDebugDraw_DefaultColors_activeObject_set(swigCPtr, this, btVector3.getCPtr(value), value); 120 } 121 getActiveObject()122 public btVector3 getActiveObject() { 123 long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_activeObject_get(swigCPtr, this); 124 return (cPtr == 0) ? null : new btVector3(cPtr, false); 125 } 126 setDeactivatedObject(btVector3 value)127 public void setDeactivatedObject(btVector3 value) { 128 LinearMathJNI.btIDebugDraw_DefaultColors_deactivatedObject_set(swigCPtr, this, btVector3.getCPtr(value), value); 129 } 130 getDeactivatedObject()131 public btVector3 getDeactivatedObject() { 132 long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_deactivatedObject_get(swigCPtr, this); 133 return (cPtr == 0) ? null : new btVector3(cPtr, false); 134 } 135 setWantsDeactivationObject(btVector3 value)136 public void setWantsDeactivationObject(btVector3 value) { 137 LinearMathJNI.btIDebugDraw_DefaultColors_wantsDeactivationObject_set(swigCPtr, this, btVector3.getCPtr(value), value); 138 } 139 getWantsDeactivationObject()140 public btVector3 getWantsDeactivationObject() { 141 long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_wantsDeactivationObject_get(swigCPtr, this); 142 return (cPtr == 0) ? null : new btVector3(cPtr, false); 143 } 144 setDisabledDeactivationObject(btVector3 value)145 public void setDisabledDeactivationObject(btVector3 value) { 146 LinearMathJNI.btIDebugDraw_DefaultColors_disabledDeactivationObject_set(swigCPtr, this, btVector3.getCPtr(value), value); 147 } 148 getDisabledDeactivationObject()149 public btVector3 getDisabledDeactivationObject() { 150 long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_disabledDeactivationObject_get(swigCPtr, this); 151 return (cPtr == 0) ? null : new btVector3(cPtr, false); 152 } 153 setDisabledSimulationObject(btVector3 value)154 public void setDisabledSimulationObject(btVector3 value) { 155 LinearMathJNI.btIDebugDraw_DefaultColors_disabledSimulationObject_set(swigCPtr, this, btVector3.getCPtr(value), value); 156 } 157 getDisabledSimulationObject()158 public btVector3 getDisabledSimulationObject() { 159 long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_disabledSimulationObject_get(swigCPtr, this); 160 return (cPtr == 0) ? null : new btVector3(cPtr, false); 161 } 162 setAabb(btVector3 value)163 public void setAabb(btVector3 value) { 164 LinearMathJNI.btIDebugDraw_DefaultColors_aabb_set(swigCPtr, this, btVector3.getCPtr(value), value); 165 } 166 getAabb()167 public btVector3 getAabb() { 168 long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_aabb_get(swigCPtr, this); 169 return (cPtr == 0) ? null : new btVector3(cPtr, false); 170 } 171 setContactPoint(btVector3 value)172 public void setContactPoint(btVector3 value) { 173 LinearMathJNI.btIDebugDraw_DefaultColors_contactPoint_set(swigCPtr, this, btVector3.getCPtr(value), value); 174 } 175 getContactPoint()176 public btVector3 getContactPoint() { 177 long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_contactPoint_get(swigCPtr, this); 178 return (cPtr == 0) ? null : new btVector3(cPtr, false); 179 } 180 DefaultColors()181 public DefaultColors() { 182 this(LinearMathJNI.new_btIDebugDraw_DefaultColors(), true); 183 } 184 185 } 186 getDefaultColors()187 public btIDebugDraw.DefaultColors getDefaultColors() { 188 return new btIDebugDraw.DefaultColors((getClass() == btIDebugDraw.class) ? LinearMathJNI.btIDebugDraw_getDefaultColors(swigCPtr, this) : LinearMathJNI.btIDebugDraw_getDefaultColorsSwigExplicitbtIDebugDraw(swigCPtr, this), true); 189 } 190 setDefaultColors(btIDebugDraw.DefaultColors arg0)191 public void setDefaultColors(btIDebugDraw.DefaultColors arg0) { 192 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_setDefaultColors(swigCPtr, this, btIDebugDraw.DefaultColors.getCPtr(arg0), arg0); else LinearMathJNI.btIDebugDraw_setDefaultColorsSwigExplicitbtIDebugDraw(swigCPtr, this, btIDebugDraw.DefaultColors.getCPtr(arg0), arg0); 193 } 194 drawLine(Vector3 from, Vector3 to, Vector3 color)195 public void drawLine(Vector3 from, Vector3 to, Vector3 color) { 196 LinearMathJNI.btIDebugDraw_drawLine__SWIG_0(swigCPtr, this, from, to, color); 197 } 198 drawLine(Vector3 from, Vector3 to, Vector3 fromColor, Vector3 toColor)199 public void drawLine(Vector3 from, Vector3 to, Vector3 fromColor, Vector3 toColor) { 200 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawLine__SWIG_1(swigCPtr, this, from, to, fromColor, toColor); else LinearMathJNI.btIDebugDraw_drawLineSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, from, to, fromColor, toColor); 201 } 202 drawSphere(float radius, Matrix4 transform, Vector3 color)203 public void drawSphere(float radius, Matrix4 transform, Vector3 color) { 204 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawSphere__SWIG_0(swigCPtr, this, radius, transform, color); else LinearMathJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, radius, transform, color); 205 } 206 drawSphere(Vector3 p, float radius, Vector3 color)207 public void drawSphere(Vector3 p, float radius, Vector3 color) { 208 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawSphere__SWIG_1(swigCPtr, this, p, radius, color); else LinearMathJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, p, radius, color); 209 } 210 drawTriangle(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 arg3, Vector3 arg4, Vector3 arg5, Vector3 color, float alpha)211 public void drawTriangle(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 arg3, Vector3 arg4, Vector3 arg5, Vector3 color, float alpha) { 212 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawTriangle__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5, color, alpha); else LinearMathJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5, color, alpha); 213 } 214 drawTriangle(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 color, float arg4)215 public void drawTriangle(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 color, float arg4) { 216 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawTriangle__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4); else LinearMathJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4); 217 } 218 drawContactPoint(Vector3 PointOnB, Vector3 normalOnB, float distance, int lifeTime, Vector3 color)219 public void drawContactPoint(Vector3 PointOnB, Vector3 normalOnB, float distance, int lifeTime, Vector3 color) { 220 LinearMathJNI.btIDebugDraw_drawContactPoint(swigCPtr, this, PointOnB, normalOnB, distance, lifeTime, color); 221 } 222 reportErrorWarning(String warningString)223 public void reportErrorWarning(String warningString) { 224 LinearMathJNI.btIDebugDraw_reportErrorWarning(swigCPtr, this, warningString); 225 } 226 draw3dText(Vector3 location, String textString)227 public void draw3dText(Vector3 location, String textString) { 228 LinearMathJNI.btIDebugDraw_draw3dText(swigCPtr, this, location, textString); 229 } 230 setDebugMode(int debugMode)231 public void setDebugMode(int debugMode) { 232 LinearMathJNI.btIDebugDraw_setDebugMode(swigCPtr, this, debugMode); 233 } 234 getDebugMode()235 public int getDebugMode() { 236 return LinearMathJNI.btIDebugDraw_getDebugMode(swigCPtr, this); 237 } 238 drawAabb(Vector3 from, Vector3 to, Vector3 color)239 public void drawAabb(Vector3 from, Vector3 to, Vector3 color) { 240 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawAabb(swigCPtr, this, from, to, color); else LinearMathJNI.btIDebugDraw_drawAabbSwigExplicitbtIDebugDraw(swigCPtr, this, from, to, color); 241 } 242 drawTransform(Matrix4 transform, float orthoLen)243 public void drawTransform(Matrix4 transform, float orthoLen) { 244 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawTransform(swigCPtr, this, transform, orthoLen); else LinearMathJNI.btIDebugDraw_drawTransformSwigExplicitbtIDebugDraw(swigCPtr, this, transform, orthoLen); 245 } 246 drawArc(Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect, float stepDegrees)247 public void drawArc(Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect, float stepDegrees) { 248 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawArc__SWIG_0(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect, stepDegrees); else LinearMathJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect, stepDegrees); 249 } 250 drawArc(Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect)251 public void drawArc(Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect) { 252 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawArc__SWIG_1(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect); else LinearMathJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect); 253 } 254 drawSpherePatch(Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color, float stepDegrees, boolean drawCenter)255 public void drawSpherePatch(Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color, float stepDegrees, boolean drawCenter) { 256 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawSpherePatch__SWIG_0(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees, drawCenter); else LinearMathJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees, drawCenter); 257 } 258 drawSpherePatch(Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color, float stepDegrees)259 public void drawSpherePatch(Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color, float stepDegrees) { 260 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawSpherePatch__SWIG_1(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees); else LinearMathJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees); 261 } 262 drawSpherePatch(Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color)263 public void drawSpherePatch(Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color) { 264 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawSpherePatch__SWIG_2(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color); else LinearMathJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_2(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color); 265 } 266 drawBox(Vector3 bbMin, Vector3 bbMax, Vector3 color)267 public void drawBox(Vector3 bbMin, Vector3 bbMax, Vector3 color) { 268 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawBox__SWIG_0(swigCPtr, this, bbMin, bbMax, color); else LinearMathJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, bbMin, bbMax, color); 269 } 270 drawBox(Vector3 bbMin, Vector3 bbMax, Matrix4 trans, Vector3 color)271 public void drawBox(Vector3 bbMin, Vector3 bbMax, Matrix4 trans, Vector3 color) { 272 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawBox__SWIG_1(swigCPtr, this, bbMin, bbMax, trans, color); else LinearMathJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, bbMin, bbMax, trans, color); 273 } 274 drawCapsule(float radius, float halfHeight, int upAxis, Matrix4 transform, Vector3 color)275 public void drawCapsule(float radius, float halfHeight, int upAxis, Matrix4 transform, Vector3 color) { 276 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawCapsule(swigCPtr, this, radius, halfHeight, upAxis, transform, color); else LinearMathJNI.btIDebugDraw_drawCapsuleSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis, transform, color); 277 } 278 drawCylinder(float radius, float halfHeight, int upAxis, Matrix4 transform, Vector3 color)279 public void drawCylinder(float radius, float halfHeight, int upAxis, Matrix4 transform, Vector3 color) { 280 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawCylinder(swigCPtr, this, radius, halfHeight, upAxis, transform, color); else LinearMathJNI.btIDebugDraw_drawCylinderSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis, transform, color); 281 } 282 drawCone(float radius, float height, int upAxis, Matrix4 transform, Vector3 color)283 public void drawCone(float radius, float height, int upAxis, Matrix4 transform, Vector3 color) { 284 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawCone(swigCPtr, this, radius, height, upAxis, transform, color); else LinearMathJNI.btIDebugDraw_drawConeSwigExplicitbtIDebugDraw(swigCPtr, this, radius, height, upAxis, transform, color); 285 } 286 drawPlane(Vector3 planeNormal, float planeConst, Matrix4 transform, Vector3 color)287 public void drawPlane(Vector3 planeNormal, float planeConst, Matrix4 transform, Vector3 color) { 288 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_drawPlane(swigCPtr, this, planeNormal, planeConst, transform, color); else LinearMathJNI.btIDebugDraw_drawPlaneSwigExplicitbtIDebugDraw(swigCPtr, this, planeNormal, planeConst, transform, color); 289 } 290 flushLines()291 public void flushLines() { 292 if (getClass() == btIDebugDraw.class) LinearMathJNI.btIDebugDraw_flushLines(swigCPtr, this); else LinearMathJNI.btIDebugDraw_flushLinesSwigExplicitbtIDebugDraw(swigCPtr, this); 293 } 294 btIDebugDraw()295 public btIDebugDraw() { 296 this(LinearMathJNI.new_btIDebugDraw(), true); 297 LinearMathJNI.btIDebugDraw_director_connect(this, swigCPtr, swigCMemOwn, true); 298 } 299 300 public final static class DebugDrawModes { 301 public final static int DBG_NoDebug = 0; 302 public final static int DBG_DrawWireframe = 1; 303 public final static int DBG_DrawAabb = 2; 304 public final static int DBG_DrawFeaturesText = 4; 305 public final static int DBG_DrawContactPoints = 8; 306 public final static int DBG_NoDeactivation = 16; 307 public final static int DBG_NoHelpText = 32; 308 public final static int DBG_DrawText = 64; 309 public final static int DBG_ProfileTimings = 128; 310 public final static int DBG_EnableSatComparison = 256; 311 public final static int DBG_DisableBulletLCP = 512; 312 public final static int DBG_EnableCCD = 1024; 313 public final static int DBG_DrawConstraints = (1 << 11); 314 public final static int DBG_DrawConstraintLimits = (1 << 12); 315 public final static int DBG_FastWireframe = (1 << 13); 316 public final static int DBG_DrawNormals = (1 << 14); 317 public final static int DBG_DrawFrames = (1 << 15); 318 public final static int DBG_MAX_DEBUG_DRAW_MODE = DBG_DrawFrames + 1; 319 } 320 321 } 322