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

com.badlogic.gdx.physics.bullet.linearmath.btSpatialMotionVector Maven / Gradle / Ivy

There is a newer version: 1.12.1
Show newest version
/* ----------------------------------------------------------------------------
 * 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.linearmath;

import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Quaternion;
import com.badlogic.gdx.math.Matrix3;
import com.badlogic.gdx.math.Matrix4;

public class btSpatialMotionVector extends BulletBase {
	private long swigCPtr;
	
	protected btSpatialMotionVector(final String className, long cPtr, boolean cMemoryOwn) {
		super(className, cPtr, cMemoryOwn);
		swigCPtr = cPtr;
	}
	
	/** Construct a new btSpatialMotionVector, normally you should not need this constructor it's intended for low-level usage. */ 
	public btSpatialMotionVector(long cPtr, boolean cMemoryOwn) {
		this("btSpatialMotionVector", cPtr, cMemoryOwn);
		construct();
	}
	
	@Override
	protected void reset(long cPtr, boolean cMemoryOwn) {
		if (!destroyed)
			destroy();
		super.reset(swigCPtr = cPtr, cMemoryOwn);
	}
	
	public static long getCPtr(btSpatialMotionVector 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;
				LinearMathJNI.delete_btSpatialMotionVector(swigCPtr);
			}
			swigCPtr = 0;
		}
		super.delete();
	}

  public void setTopVec(btVector3 value) {
    LinearMathJNI.btSpatialMotionVector_topVec_set(swigCPtr, this, btVector3.getCPtr(value), value);
  }

  public btVector3 getTopVec() {
    long cPtr = LinearMathJNI.btSpatialMotionVector_topVec_get(swigCPtr, this);
    return (cPtr == 0) ? null : new btVector3(cPtr, false);
  }

  public void setBottomVec(btVector3 value) {
    LinearMathJNI.btSpatialMotionVector_bottomVec_set(swigCPtr, this, btVector3.getCPtr(value), value);
  }

  public btVector3 getBottomVec() {
    long cPtr = LinearMathJNI.btSpatialMotionVector_bottomVec_get(swigCPtr, this);
    return (cPtr == 0) ? null : new btVector3(cPtr, false);
  }

  public btSpatialMotionVector() {
    this(LinearMathJNI.new_btSpatialMotionVector__SWIG_0(), true);
  }

  public btSpatialMotionVector(Vector3 angular, Vector3 linear) {
    this(LinearMathJNI.new_btSpatialMotionVector__SWIG_1(angular, linear), true);
  }

  public void setVector(Vector3 angular, Vector3 linear) {
    LinearMathJNI.btSpatialMotionVector_setVector(swigCPtr, this, angular, linear);
  }

  public void setValue(float ax, float ay, float az, float lx, float ly, float lz) {
    LinearMathJNI.btSpatialMotionVector_setValue(swigCPtr, this, ax, ay, az, lx, ly, lz);
  }

  public void addVector(Vector3 angular, Vector3 linear) {
    LinearMathJNI.btSpatialMotionVector_addVector(swigCPtr, this, angular, linear);
  }

  public void addValue(float ax, float ay, float az, float lx, float ly, float lz) {
    LinearMathJNI.btSpatialMotionVector_addValue(swigCPtr, this, ax, ay, az, lx, ly, lz);
  }

  public Vector3 getAngular() {
	return LinearMathJNI.btSpatialMotionVector_getAngular(swigCPtr, this);
}

  public Vector3 getLinear() {
	return LinearMathJNI.btSpatialMotionVector_getLinear(swigCPtr, this);
}

  public void setAngular(Vector3 angular) {
    LinearMathJNI.btSpatialMotionVector_setAngular(swigCPtr, this, angular);
  }

  public void setLinear(Vector3 linear) {
    LinearMathJNI.btSpatialMotionVector_setLinear(swigCPtr, this, linear);
  }

  public void addAngular(Vector3 angular) {
    LinearMathJNI.btSpatialMotionVector_addAngular(swigCPtr, this, angular);
  }

  public void addLinear(Vector3 linear) {
    LinearMathJNI.btSpatialMotionVector_addLinear(swigCPtr, this, linear);
  }

  public void setZero() {
    LinearMathJNI.btSpatialMotionVector_setZero(swigCPtr, this);
  }

  public float dot(btSpatialForceVector b) {
    return LinearMathJNI.btSpatialMotionVector_dot(swigCPtr, this, btSpatialForceVector.getCPtr(b), b);
  }

  public btSpatialMotionVector operatorAdditionAssignment(btSpatialMotionVector vec) {
    return new btSpatialMotionVector(LinearMathJNI.btSpatialMotionVector_operatorAdditionAssignment(swigCPtr, this, btSpatialMotionVector.getCPtr(vec), vec), false);
  }

  public btSpatialMotionVector operatorSubtractionAssignment(btSpatialMotionVector vec) {
    return new btSpatialMotionVector(LinearMathJNI.btSpatialMotionVector_operatorSubtractionAssignment(swigCPtr, this, btSpatialMotionVector.getCPtr(vec), vec), false);
  }

  public btSpatialMotionVector operatorMultiplicationAssignment(float s) {
    return new btSpatialMotionVector(LinearMathJNI.btSpatialMotionVector_operatorMultiplicationAssignment(swigCPtr, this, s), false);
  }

  public btSpatialMotionVector operatorSubtraction(btSpatialMotionVector vec) {
    return new btSpatialMotionVector(LinearMathJNI.btSpatialMotionVector_operatorSubtraction__SWIG_0(swigCPtr, this, btSpatialMotionVector.getCPtr(vec), vec), true);
  }

  public btSpatialMotionVector operatorAddition(btSpatialMotionVector vec) {
    return new btSpatialMotionVector(LinearMathJNI.btSpatialMotionVector_operatorAddition(swigCPtr, this, btSpatialMotionVector.getCPtr(vec), vec), true);
  }

  public btSpatialMotionVector operatorSubtraction() {
    return new btSpatialMotionVector(LinearMathJNI.btSpatialMotionVector_operatorSubtraction__SWIG_1(swigCPtr, this), true);
  }

  public btSpatialMotionVector operatorMultiplication(float s) {
    return new btSpatialMotionVector(LinearMathJNI.btSpatialMotionVector_operatorMultiplication(swigCPtr, this, s), true);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy