Package vrml.field
Class SFVec3f
java.lang.Object
vrml.Field
vrml.field.SFVec3f
-
Field Summary
FieldsFields inherited from class vrml.Field
valueChanged
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Create a cloned copy of this node.void
getValue
(float[] vec) Copy this angle into the user arrayfloat
getX()
Get the x component of the colorfloat
getY()
Get the y component of the colorfloat
getZ()
Get the z component of the colorvoid
setValue
(float[] vec) Set the field to the new value based on the user datavoid
setValue
(float x, float y, float z) Set the field to the new components.void
setValue
(ConstSFVec3f vec) Set this field to the values from the passed in fieldvoid
Set this field to the values from the passed in fieldtoString()
Create a string representation of this field.
-
Field Details
-
data
protected float[] dataThe components of the field
-
-
Constructor Details
-
SFVec3f
public SFVec3f()Create a new default vec with the fields set to 0 0 0 -
SFVec3f
public SFVec3f(float x, float y, float z) Create a new vec based on the given values.- Parameters:
x
- The x component of the vecy
- The y component of the vecz
- The z component of the vec
-
-
Method Details
-
getValue
public void getValue(float[] vec) Copy this angle into the user array- Parameters:
vec
- The target array to copy into
-
getX
public float getX()Get the x component of the color- Returns:
- The x value
-
getY
public float getY()Get the y component of the color- Returns:
- The y value
-
getZ
public float getZ()Get the z component of the color- Returns:
- The z value
-
setValue
public void setValue(float[] vec) Set the field to the new value based on the user data- Parameters:
vec
- The new data to copy
-
setValue
public void setValue(float x, float y, float z) Set the field to the new components.- Parameters:
x
- The x component of the vecy
- The y component of the vecz
- The z component of the vec
-
setValue
Set this field to the values from the passed in field- Parameters:
vec
- The field to copy the values from
-
setValue
Set this field to the values from the passed in field- Parameters:
vec
- The field to copy the values from
-
toString
-
clone
-