vrml.field
Class SFVec2f

java.lang.Object
  extended by vrml.Field
      extended by vrml.field.SFVec2f
All Implemented Interfaces:
java.lang.Cloneable

public class SFVec2f
extends Field

Represents a VRML SFVec2f field in Java.


Constructor Summary
SFVec2f()
          Construct a default SFVec2f field.
SFVec2f(float x, float y)
          Construct an SFVec2f field.
 
Method Summary
 void getValue(float[] vec2s)
          Get the X and Y values representing the SFVec2f.
 float getX()
          Get the X-component of the vector.
 float getY()
          Get the Y-component of the vector.
 void setValue(ConstSFVec2f vec)
          Set the value of an SFVec2f using the given ConstSFVec2f.
 void setValue(float[] vec2s)
          Set the value of an SFVec2f.
 void setValue(float x, float y)
          Set the value of SFVec2f with the given values.
 void setValue(SFVec2f vec)
          Set the value of an SFVec2f using the given SFVec2f.
 
Methods inherited from class vrml.Field
clone, dispose, finalize, getPeer, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SFVec2f

public SFVec2f()
Construct a default SFVec2f field.


SFVec2f

public SFVec2f(float x,
               float y)
Construct an SFVec2f field.

Parameters:
x - X-component
y - Y-component
Method Detail

getValue

public void getValue(float[] vec2s)
Get the X and Y values representing the SFVec2f.

Parameters:
vec2s - X and Y values representing the SFVec2f

getX

public float getX()
Get the X-component of the vector.

Returns:
X-component of the vector

getY

public float getY()
Get the Y-component of the vector.

Returns:
Y-component of the vector

setValue

public void setValue(float[] vec2s)
Set the value of an SFVec2f.

Parameters:
vec2s - X, Y value

setValue

public void setValue(float x,
                     float y)
Set the value of SFVec2f with the given values.

Parameters:
x - X-component of vector
y - Y-component of vector

setValue

public void setValue(ConstSFVec2f vec)
Set the value of an SFVec2f using the given ConstSFVec2f.

Parameters:
vec - ConstSFVec3f to take X, Y values from.

setValue

public void setValue(SFVec2f vec)
Set the value of an SFVec2f using the given SFVec2f.

Parameters:
vec - ConstSFVec3f to take X, Y values from.