Example usage for com.badlogic.gdx.math Matrix4 getTranslation

List of usage examples for com.badlogic.gdx.math Matrix4 getTranslation

Introduction

In this page you can find the example usage for com.badlogic.gdx.math Matrix4 getTranslation.

Prototype

public Vector3 getTranslation(Vector3 position) 

Source Link

Usage

From source file:com.mygdx.game.objects.Billboard.java

License:Apache License

/**
 * @param model           The model which is to be instantiated
 * @param name              Id of the model (doesn't really matter)
 * @param camera          The camera which the billboard should face
 * @param faceUp          If true, the model will always face the Y-axis, but otherwise rotate with the camera
 * @param followTransform The billboard will follow the translation of this matrix
 * @param offset          Constant offset from the follow-matrix translation
 *//*from   w  w  w .  java2  s .co  m*/
public Billboard(Model model, String name, Camera camera, boolean faceUp, Matrix4 followTransform,
        Vector3 offset) {
    super(model, name, followTransform.getTranslation(new Vector3()), new Vector3(), new Vector3(1, 1, 1));
    this.faceUp = faceUp;
    this.offset.set(offset);
    this.followTransform = followTransform;
    this.camera = camera;
}