view src/main/java/alice/test/topology/aquarium/fx/FishInfo.java @ 419:aefbe41fcf12 dispose

change tab to space
author sugi
date Tue, 15 Jul 2014 16:00:22 +0900
parents 4b38d3e6520e
children
line wrap: on
line source

package alice.test.topology.aquarium.fx;

import org.msgpack.annotation.Message;

@Message
public class FishInfo {
    // public fields are serialized.
    public double x = 0;
    public double y = 0;
    public double z = 0;
    public String name;
    public double size = 0.1;
    public String type = "defalut"; // use select object type. after implement may be...

    public double rolX = 0; // these parameters use RotationAxis
    public double rolY = 0;
    public double rolZ = 0;
    public double rotate = 0;

    public boolean fromCheckExist = false;

    public FishInfo(){
        // this constructor is nothing to do, but need for serializing with MessagePack
    }

    public FishInfo(double x,double y,double z){
        this.x = x;
        this.y = y;
        this.z = z;
    }

    public void setName(String name){
        this.name = name;
    }

    public void setSize(double size){
        this.size = size;
    }

    public double getX(){
        return this.x;
    }

    public void setX(double x){
        this.x = x;
    }

    public double getY(){
        return this.y;
    }

    public void setY(double y){
        this.y = y;
    }

    public double getZ(){
        return this.z;
    }

    public void setZ(double z){
        this.z = z;
    }

    public FishInfo clone(){
        FishInfo info = new FishInfo(this.x,this.y,this.z);
        info.setName(this.name);
        return info;
    }

}