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 GIM_CONTACT extends BulletBase { 19 private long swigCPtr; 20 21 protected GIM_CONTACT(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, cPtr, cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new GIM_CONTACT, normally you should not need this constructor it's intended for low-level usage. */ 27 public GIM_CONTACT(long cPtr, boolean cMemoryOwn) { 28 this("GIM_CONTACT", cPtr, cMemoryOwn); 29 construct(); 30 } 31 32 @Override 33 protected void reset(long cPtr, boolean cMemoryOwn) { 34 if (!destroyed) 35 destroy(); 36 super.reset(swigCPtr = cPtr, cMemoryOwn); 37 } 38 39 public static long getCPtr(GIM_CONTACT obj) { 40 return (obj == null) ? 0 : obj.swigCPtr; 41 } 42 43 @Override 44 protected void finalize() throws Throwable { 45 if (!destroyed) 46 destroy(); 47 super.finalize(); 48 } 49 50 @Override protected synchronized void delete() { 51 if (swigCPtr != 0) { 52 if (swigCMemOwn) { 53 swigCMemOwn = false; 54 CollisionJNI.delete_GIM_CONTACT(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 61 public void setPoint(btVector3 value) { 62 CollisionJNI.GIM_CONTACT_point_set(swigCPtr, this, btVector3.getCPtr(value), value); 63 } 64 65 public btVector3 getPoint() { 66 long cPtr = CollisionJNI.GIM_CONTACT_point_get(swigCPtr, this); 67 return (cPtr == 0) ? null : new btVector3(cPtr, false); 68 } 69 70 public void setNormal(btVector3 value) { 71 CollisionJNI.GIM_CONTACT_normal_set(swigCPtr, this, btVector3.getCPtr(value), value); 72 } 73 74 public btVector3 getNormal() { 75 long cPtr = CollisionJNI.GIM_CONTACT_normal_get(swigCPtr, this); 76 return (cPtr == 0) ? null : new btVector3(cPtr, false); 77 } 78 79 public void setDepth(float value) { 80 CollisionJNI.GIM_CONTACT_depth_set(swigCPtr, this, value); 81 } 82 83 public float getDepth() { 84 return CollisionJNI.GIM_CONTACT_depth_get(swigCPtr, this); 85 } 86 87 public void setDistance(float value) { 88 CollisionJNI.GIM_CONTACT_distance_set(swigCPtr, this, value); 89 } 90 91 public float getDistance() { 92 return CollisionJNI.GIM_CONTACT_distance_get(swigCPtr, this); 93 } 94 95 public void setFeature1(int value) { 96 CollisionJNI.GIM_CONTACT_feature1_set(swigCPtr, this, value); 97 } 98 99 public int getFeature1() { 100 return CollisionJNI.GIM_CONTACT_feature1_get(swigCPtr, this); 101 } 102 103 public void setFeature2(int value) { 104 CollisionJNI.GIM_CONTACT_feature2_set(swigCPtr, this, value); 105 } 106 107 public int getFeature2() { 108 return CollisionJNI.GIM_CONTACT_feature2_get(swigCPtr, this); 109 } 110 111 public GIM_CONTACT() { 112 this(CollisionJNI.new_GIM_CONTACT__SWIG_0(), true); 113 } 114 115 public GIM_CONTACT(GIM_CONTACT contact) { 116 this(CollisionJNI.new_GIM_CONTACT__SWIG_1(GIM_CONTACT.getCPtr(contact), contact), true); 117 } 118 119 public GIM_CONTACT(Vector3 point, Vector3 normal, float depth, int feature1, int feature2) { 120 this(CollisionJNI.new_GIM_CONTACT__SWIG_2(point, normal, depth, feature1, feature2), true); 121 } 122 123 public long calc_key_contact() { 124 return CollisionJNI.GIM_CONTACT_calc_key_contact(swigCPtr, this); 125 } 126 127 public void interpolate_normals(btVector3 normals, int normal_count) { 128 CollisionJNI.GIM_CONTACT_interpolate_normals(swigCPtr, this, btVector3.getCPtr(normals), normals, normal_count); 129 } 130 131 } 132