vrml.field
Class SFVec2d

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

public class SFVec2d
extends Field

Represents a VRML SFVec2d field in Java.


Constructor Summary
SFVec2d()
          Construct a default SFVec2d field.
SFVec2d(double x, double y)
          Construct an SFVec2d field.
 
Method Summary
 void getValue(double[] vec2s)
          Get the X and Y values representing the SFVec2d.
 double getX()
          Get the X-component of the vector.
 double getY()
          Get the Y-component of the vector.
 void setValue(ConstSFVec2d vec)
          Set the value of an SFVec2d using the given ConstSFVec2d.
 void setValue(double[] vec2s)
          Set the value of an SFVec2d.
 void setValue(double x, double y)
          Set the value of SFVec2d with the given values.
 void setValue(SFVec2d vec)
          Set the value of an SFVec2d using the given SFVec2d.
 
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

SFVec2d

public SFVec2d()
Construct a default SFVec2d field.


SFVec2d

public SFVec2d(double x,
               double y)
Construct an SFVec2d field.

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

getValue

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

Parameters:
vec2s - X and Y values representing the SFVec2d

getX

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

Returns:
X-component of the vector

getY

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

Returns:
Y-component of the vector

setValue

public void setValue(double[] vec2s)
Set the value of an SFVec2d.

Parameters:
vec2s - X, Y value

setValue

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

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

setValue

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

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

setValue

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

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