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 RayResultCallback extends BulletBase { 19 private long swigCPtr; 20 RayResultCallback(final String className, long cPtr, boolean cMemoryOwn)21 protected RayResultCallback(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, cPtr, cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new RayResultCallback, normally you should not need this constructor it's intended for low-level usage. */ RayResultCallback(long cPtr, boolean cMemoryOwn)27 public RayResultCallback(long cPtr, boolean cMemoryOwn) { 28 this("RayResultCallback", 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(swigCPtr = cPtr, cMemoryOwn); 37 } 38 getCPtr(RayResultCallback obj)39 public static long getCPtr(RayResultCallback 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_RayResultCallback(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 swigDirectorDisconnect()61 protected void swigDirectorDisconnect() { 62 swigCMemOwn = false; 63 delete(); 64 } 65 swigReleaseOwnership()66 public void swigReleaseOwnership() { 67 swigCMemOwn = false; 68 CollisionJNI.RayResultCallback_change_ownership(this, swigCPtr, false); 69 } 70 swigTakeOwnership()71 public void swigTakeOwnership() { 72 swigCMemOwn = true; 73 CollisionJNI.RayResultCallback_change_ownership(this, swigCPtr, true); 74 } 75 setClosestHitFraction(float value)76 public void setClosestHitFraction(float value) { 77 CollisionJNI.RayResultCallback_closestHitFraction_set(swigCPtr, this, value); 78 } 79 getClosestHitFraction()80 public float getClosestHitFraction() { 81 return CollisionJNI.RayResultCallback_closestHitFraction_get(swigCPtr, this); 82 } 83 setCollisionObject(btCollisionObject value)84 public void setCollisionObject(btCollisionObject value) { 85 CollisionJNI.RayResultCallback_collisionObject_set(swigCPtr, this, btCollisionObject.getCPtr(value), value); 86 } 87 getCollisionObject()88 public btCollisionObject getCollisionObject() { 89 return btCollisionObject.getInstance(CollisionJNI.RayResultCallback_collisionObject_get(swigCPtr, this), false); 90 } 91 setCollisionFilterGroup(short value)92 public void setCollisionFilterGroup(short value) { 93 CollisionJNI.RayResultCallback_collisionFilterGroup_set(swigCPtr, this, value); 94 } 95 getCollisionFilterGroup()96 public short getCollisionFilterGroup() { 97 return CollisionJNI.RayResultCallback_collisionFilterGroup_get(swigCPtr, this); 98 } 99 setCollisionFilterMask(short value)100 public void setCollisionFilterMask(short value) { 101 CollisionJNI.RayResultCallback_collisionFilterMask_set(swigCPtr, this, value); 102 } 103 getCollisionFilterMask()104 public short getCollisionFilterMask() { 105 return CollisionJNI.RayResultCallback_collisionFilterMask_get(swigCPtr, this); 106 } 107 setFlags(long value)108 public void setFlags(long value) { 109 CollisionJNI.RayResultCallback_flags_set(swigCPtr, this, value); 110 } 111 getFlags()112 public long getFlags() { 113 return CollisionJNI.RayResultCallback_flags_get(swigCPtr, this); 114 } 115 hasHit()116 public boolean hasHit() { 117 return CollisionJNI.RayResultCallback_hasHit(swigCPtr, this); 118 } 119 RayResultCallback()120 public RayResultCallback() { 121 this(CollisionJNI.new_RayResultCallback(), true); 122 CollisionJNI.RayResultCallback_director_connect(this, swigCPtr, swigCMemOwn, true); 123 } 124 needsCollision(btBroadphaseProxy proxy0)125 public boolean needsCollision(btBroadphaseProxy proxy0) { 126 return (getClass() == RayResultCallback.class) ? CollisionJNI.RayResultCallback_needsCollision(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0) : CollisionJNI.RayResultCallback_needsCollisionSwigExplicitRayResultCallback(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0); 127 } 128 addSingleResult(LocalRayResult rayResult, boolean normalInWorldSpace)129 public float addSingleResult(LocalRayResult rayResult, boolean normalInWorldSpace) { 130 return CollisionJNI.RayResultCallback_addSingleResult(swigCPtr, this, LocalRayResult.getCPtr(rayResult), rayResult, normalInWorldSpace); 131 } 132 133 } 134