Package edu.ups.gamedev.net.message

Source Code of edu.ups.gamedev.net.message.TeapotSynchronizeCreateMessage

package edu.ups.gamedev.net.message;

import com.captiveimagination.jgn.synchronization.message.SynchronizeCreateMessage;
import com.jme.math.Quaternion;
import com.jme.math.Vector3f;
import com.jme.scene.shape.Teapot;

public class TeapotSynchronizeCreateMessage extends SynchronizeCreateMessage {
  Vector3f translation;
  Quaternion rotation;
 
  public TeapotSynchronizeCreateMessage() {
    super();
    System.out.println("Creating TeapotSyncCreateMessage");
    this.translation = new Vector3f();
    this.rotation = new Quaternion();
  }
 
  public TeapotSynchronizeCreateMessage(Teapot teapot) {
    super();
    System.out.println("Creating TeapotSyncCreateMessage");
    this.translation = teapot.getLocalTranslation();
    this.rotation = teapot.getLocalRotation();
  }
 
  public Teapot getTeapot() {
    Teapot teapot = new Teapot("killer teapot");
    teapot.setLocalTranslation(translation);
    teapot.setLocalRotation(rotation);
    return teapot;
  }
}
TOP

Related Classes of edu.ups.gamedev.net.message.TeapotSynchronizeCreateMessage

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.