//AUTOMATICALLY GENERATED BY genfields.pl.
//DO NOT EDIT!!!!

package vrml.field;
import vrml.*;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.IOException;

public class SFRotation extends Field {
     float axisX;
     float axisY;
     float axisZ;
     float angle;

    public SFRotation() { }

    public SFRotation(float axisX, float axisY, float axisZ, float angle) {
	        this.axisX = axisX;
        this.axisY = axisY;
        this.axisZ = axisZ;
        this.angle = angle;
    }

    public void getValue(float[] values) {
        __updateRead();
        values[0] = axisX;
        values[1] = axisY;
        values[2] = axisZ;
        values[3] = angle;
    }

    public void setValue(float axisX, float axisY, float axisZ, float angle) {
        this.axisX = axisX;
        this.axisY = axisY;
        this.axisZ = axisZ;
        this.angle = angle;
        __updateWrite();
    }


    public void setValue(float[] values) {
        this.axisX = values[0];
        this.axisY = values[1];
        this.axisZ = values[2];
        this.angle = values[3];
        __updateWrite();
    }

    public void setValue(ConstSFRotation sfRotation) {
        sfRotation.__updateRead();
        axisX = sfRotation.axisX;
        axisY = sfRotation.axisY;
        axisZ = sfRotation.axisZ;
        angle = sfRotation.angle;
        __updateWrite();
    }

    public void setValue(SFRotation sfRotation) {
        sfRotation.__updateRead();
        axisX = sfRotation.axisX;
        axisY = sfRotation.axisY;
        axisZ = sfRotation.axisZ;
        angle = sfRotation.angle;
        __updateWrite();
    }


    public String toString() {
        __updateRead();
        return ""+axisX+" "+axisY+" "+axisZ+" "+angle;
    }

    public void __fromPerl(BufferedReader in)  throws IOException {

	//System.out.println ("fromPerl, Rotation");
		axisX = Float.parseFloat(in.readLine());
	        axisY = Float.parseFloat(in.readLine());
        	axisZ = Float.parseFloat(in.readLine());
        	angle = Float.parseFloat(in.readLine());
    }

    public void __toPerl(PrintWriter out)  throws IOException {
        out.print(axisX+" "+axisY+" "+axisZ+" "+angle);
	//out.println();
    }
    //public void setOffset(String offs) { this.offset = offs; } //JAS2
    //public String getOffset() { return this.offset; } //JAS2
}