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

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

There is a newer version: 1.0.0-b6
Show newest version
/*-------------------------------------------------------
 * This file was generated by JParser
 *
 * Do not make changes to this file
 *-------------------------------------------------------*/
package com.badlogic.gdx.physics.bullet.linearmath;

import com.badlogic.gdx.math.Matrix4;

/**
 * @author xpenatan
 */
public class btDefaultMotionState extends btMotionState {

    private Matrix4 worldTrans;

    public btDefaultMotionState() {
        this(new Matrix4());
    }

    public btDefaultMotionState(Matrix4 renderTrans) {
        worldTrans = renderTrans;
    }

    @Override
    public void getWorldTransform(Matrix4 centerOfMassWorldTrans) {
        centerOfMassWorldTrans.set(this.worldTrans);
    }

    // /synchronizes world transform from physics to user
    // /Bullet only calls the update of worldtransform for active objects
    public void setWorldTransform(Matrix4 centerOfMassWorldTrans) {
        this.worldTrans.set(centerOfMassWorldTrans);
    }

    @Override
    protected void deleteNative() {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy