com.badlogic.gdx.physics.bullet.collision.GIM_TRIANGLE Maven / Gradle / Ivy
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Matrix4;
public class GIM_TRIANGLE extends BulletBase {
private long swigCPtr;
protected GIM_TRIANGLE (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new GIM_TRIANGLE, normally you should not need this constructor it's intended for low-level usage. */
public GIM_TRIANGLE (long cPtr, boolean cMemoryOwn) {
this("GIM_TRIANGLE", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (GIM_TRIANGLE obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_GIM_TRIANGLE(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setMargin (float value) {
CollisionJNI.GIM_TRIANGLE_margin_set(swigCPtr, this, value);
}
public float getMargin () {
return CollisionJNI.GIM_TRIANGLE_margin_get(swigCPtr, this);
}
public void setVertices (btVector3 value) {
CollisionJNI.GIM_TRIANGLE_vertices_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getVertices () {
long cPtr = CollisionJNI.GIM_TRIANGLE_vertices_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public GIM_TRIANGLE () {
this(CollisionJNI.new_GIM_TRIANGLE(), true);
}
public GIM_AABB get_box () {
return new GIM_AABB(CollisionJNI.GIM_TRIANGLE_get_box(swigCPtr, this), true);
}
public void get_normal (Vector3 normal) {
CollisionJNI.GIM_TRIANGLE_get_normal(swigCPtr, this, normal);
}
public void get_plane (btVector4 plane) {
CollisionJNI.GIM_TRIANGLE_get_plane(swigCPtr, this, btVector4.getCPtr(plane), plane);
}
public void apply_transform (Matrix4 trans) {
CollisionJNI.GIM_TRIANGLE_apply_transform(swigCPtr, this, trans);
}
public void get_edge_plane (long edge_index, Vector3 triangle_normal, btVector4 plane) {
CollisionJNI.GIM_TRIANGLE_get_edge_plane(swigCPtr, this, edge_index, triangle_normal, btVector4.getCPtr(plane), plane);
}
public void get_triangle_transform (Matrix4 triangle_transform) {
CollisionJNI.GIM_TRIANGLE_get_triangle_transform(swigCPtr, this, triangle_transform);
}
public boolean collide_triangle_hard_test (GIM_TRIANGLE other, GIM_TRIANGLE_CONTACT_DATA contact_data) {
return CollisionJNI.GIM_TRIANGLE_collide_triangle_hard_test(swigCPtr, this, GIM_TRIANGLE.getCPtr(other), other,
GIM_TRIANGLE_CONTACT_DATA.getCPtr(contact_data), contact_data);
}
public boolean collide_triangle (GIM_TRIANGLE other, GIM_TRIANGLE_CONTACT_DATA contact_data) {
return CollisionJNI.GIM_TRIANGLE_collide_triangle(swigCPtr, this, GIM_TRIANGLE.getCPtr(other), other,
GIM_TRIANGLE_CONTACT_DATA.getCPtr(contact_data), contact_data);
}
public boolean get_uv_parameters (Vector3 point, Vector3 tri_plane, SWIGTYPE_p_float u, SWIGTYPE_p_float v) {
return CollisionJNI.GIM_TRIANGLE_get_uv_parameters(swigCPtr, this, point, tri_plane, SWIGTYPE_p_float.getCPtr(u),
SWIGTYPE_p_float.getCPtr(v));
}
public boolean is_point_inside (Vector3 point, Vector3 tri_normal) {
return CollisionJNI.GIM_TRIANGLE_is_point_inside(swigCPtr, this, point, tri_normal);
}
public boolean ray_collision (Vector3 vPoint, Vector3 vDir, Vector3 pout, Vector3 triangle_normal, SWIGTYPE_p_float tparam,
float tmax) {
return CollisionJNI.GIM_TRIANGLE_ray_collision__SWIG_0(swigCPtr, this, vPoint, vDir, pout, triangle_normal,
SWIGTYPE_p_float.getCPtr(tparam), tmax);
}
public boolean ray_collision (Vector3 vPoint, Vector3 vDir, Vector3 pout, Vector3 triangle_normal, SWIGTYPE_p_float tparam) {
return CollisionJNI.GIM_TRIANGLE_ray_collision__SWIG_1(swigCPtr, this, vPoint, vDir, pout, triangle_normal,
SWIGTYPE_p_float.getCPtr(tparam));
}
public boolean ray_collision_front_side (Vector3 vPoint, Vector3 vDir, Vector3 pout, Vector3 triangle_normal,
SWIGTYPE_p_float tparam, float tmax) {
return CollisionJNI.GIM_TRIANGLE_ray_collision_front_side__SWIG_0(swigCPtr, this, vPoint, vDir, pout, triangle_normal,
SWIGTYPE_p_float.getCPtr(tparam), tmax);
}
public boolean ray_collision_front_side (Vector3 vPoint, Vector3 vDir, Vector3 pout, Vector3 triangle_normal,
SWIGTYPE_p_float tparam) {
return CollisionJNI.GIM_TRIANGLE_ray_collision_front_side__SWIG_1(swigCPtr, this, vPoint, vDir, pout, triangle_normal,
SWIGTYPE_p_float.getCPtr(tparam));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy