Beispiel #1
0
 public Transform lerp(
     final Vector3 targetT, final Quaternion targetR, final Vector3 targetS, final float alpha) {
   translation.lerp(targetT, alpha);
   rotation.slerp(targetR, alpha);
   scale.lerp(targetS, alpha);
   return this;
 }
Beispiel #2
0
  @Override
  public boolean touchDragged(int x, int y, int pointer) {

    if (howmanyfingers == 1 && pointer == 0) {
      delta.set(x, y).sub(last);
      delta.mul(0.01f * Constants.MOVESPEED);
      Vector3 temp = new Vector3(delta.y, 0, -delta.x);
      Quaternion rotation = new Quaternion();
      camera.combined.getRotation(rotation);
      rotation.transform(temp);
      camera.translate(temp);
      camera.update();
      last.set(x, y);
    }

    if (pointer == 0) last.set(x, y);

    return true;
  }
 @Override
 protected void processSystem() {
   final int index = MathUtils.random(this.nodes.size - 1);
   final Matrix4 transform =
       new Matrix4()
           .set(
               tmpV.set(MathUtils.random(-5f, 5f), 10f, MathUtils.random(-5f, 5f)),
               tmpQ.setEulerAngles(
                   MathUtils.random(90f), MathUtils.random(90f), MathUtils.random(90f)));
   this.modelConstructionManager
       .getConstructor(this.nodes.get(index))
       .construct(transform, false, true);
 }
Beispiel #4
0
 public Transform set(final Vector3 t, final Quaternion r, final Vector3 s) {
   translation.set(t);
   rotation.set(r);
   scale.set(s);
   return this;
 }
Beispiel #5
0
 public Transform idt() {
   translation.set(0, 0, 0);
   rotation.idt();
   scale.set(1, 1, 1);
   return this;
 }