All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.badlogic.gdx.physics.bullet.dynamics.btGearConstraint 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.dynamics;

import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.physics.bullet.collision.*;
import com.badlogic.gdx.math.Vector3;

public class btGearConstraint extends btTypedConstraint {
	private long swigCPtr;

	protected btGearConstraint (final String className, long cPtr, boolean cMemoryOwn) {
		super(className, DynamicsJNI.btGearConstraint_SWIGUpcast(cPtr), cMemoryOwn);
		swigCPtr = cPtr;
	}

	/** Construct a new btGearConstraint, normally you should not need this constructor it's intended for low-level usage. */
	public btGearConstraint (long cPtr, boolean cMemoryOwn) {
		this("btGearConstraint", cPtr, cMemoryOwn);
		construct();
	}

	@Override
	protected void reset (long cPtr, boolean cMemoryOwn) {
		if (!destroyed) destroy();
		super.reset(DynamicsJNI.btGearConstraint_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
	}

	public static long getCPtr (btGearConstraint 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;
				DynamicsJNI.delete_btGearConstraint(swigCPtr);
			}
			swigCPtr = 0;
		}
		super.delete();
	}

	public btGearConstraint (btRigidBody rbA, btRigidBody rbB, Vector3 axisInA, Vector3 axisInB, float ratio) {
		this(DynamicsJNI.new_btGearConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, axisInA,
			axisInB, ratio), true);
	}

	public btGearConstraint (btRigidBody rbA, btRigidBody rbB, Vector3 axisInA, Vector3 axisInB) {
		this(
			DynamicsJNI.new_btGearConstraint__SWIG_1(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, axisInA, axisInB),
			true);
	}

	public void setAxisA (Vector3 axisA) {
		DynamicsJNI.btGearConstraint_setAxisA(swigCPtr, this, axisA);
	}

	public void setAxisB (Vector3 axisB) {
		DynamicsJNI.btGearConstraint_setAxisB(swigCPtr, this, axisB);
	}

	public void setRatio (float ratio) {
		DynamicsJNI.btGearConstraint_setRatio(swigCPtr, this, ratio);
	}

	public Vector3 getAxisA () {
		return DynamicsJNI.btGearConstraint_getAxisA(swigCPtr, this);
	}

	public Vector3 getAxisB () {
		return DynamicsJNI.btGearConstraint_getAxisB(swigCPtr, this);
	}

	public float getRatio () {
		return DynamicsJNI.btGearConstraint_getRatio(swigCPtr, this);
	}

	public void setParam (int num, float value, int axis) {
		DynamicsJNI.btGearConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
	}

	public void setParam (int num, float value) {
		DynamicsJNI.btGearConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
	}

	public float getParam (int num, int axis) {
		return DynamicsJNI.btGearConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
	}

	public float getParam (int num) {
		return DynamicsJNI.btGearConstraint_getParam__SWIG_1(swigCPtr, this, num);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy