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;
}
}