FreeWRL / FreeX3D 4.3.0
ConstSFVec3f.java
1//AUTOMATICALLY GENERATED BY genfields.pl.
2//DO NOT EDIT!!!!
3
4package vrml.field;
5import vrml.*;
6import java.io.BufferedReader;
7import java.io.PrintWriter;
8import java.io.IOException;
9
10public class ConstSFVec3f extends ConstField {
11 float x;
12 float y;
13 float z;
14
15 public ConstSFVec3f() { }
16
17 public ConstSFVec3f(float x, float y, float z) {
18 this.x = x;
19 this.y = y;
20 this.z = z;
21 }
22
23 public void getValue(float[] values) {
24 __updateRead();
25 values[0] = x;
26 values[1] = y;
27 values[2] = z;
28 }
29
30 public float getX() {
31 __updateRead();
32 return x;
33 }
34
35 public float getY() {
36 __updateRead();
37 return y;
38 }
39
40 public float getZ() {
41 __updateRead();
42 return z;
43 }
44
45 public String toString() {
46 __updateRead();
47 return ""+x+" "+y+" "+z;
48 }
49
50 public void __fromPerl(BufferedReader in) throws IOException {
51
52 //System.out.println ("fromPerl, Vec3f");
53 x = Float.parseFloat(in.readLine());
54 y = Float.parseFloat(in.readLine());
55 z = Float.parseFloat(in.readLine());
56 }
57
58 public void __toPerl(PrintWriter out) throws IOException {
59 out.print(x + " " + y + " " + z);
60 //out.println();
61 }
62 //public void setOffset(String offs) { this.offset = offs; } //JAS2
63 //public String getOffset() { return this.offset; } //JAS2
64}