Package com.openinventor.inventor.fields
Class SoSFRotation
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.fields.SoField
-
- com.openinventor.inventor.fields.SoSField
-
- com.openinventor.inventor.fields.SoSFRotation
-
public class SoSFRotation extends SoSField
Field containing a rotation. A field containing a singleSbRotation
(an arbitrary rotation).SoSFRotations are written to file as four floating point values separated by whitespace. The 4 values represent an axis of rotation followed by the amount of right-handed rotation about that axis, in radians. For example, a 180 degree rotation about the Y axis is:
NOTE: When you specify an0 1 0 3.14159265 SoSFRotation
value using setValue with 4 floating point values, those values will be interpreted as a quaternion (x, y, z, w) rather than an axis and a rotation. To specify anSoSFRotation
value using an axis and a rotation, you must use the following method:setValue(const SbVec3f &axis, float angle)
.- See Also:
SbRotation
,SoField
,SoSField
,SoMFRotation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.fields.SoField
SoField.FieldTypes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoSFRotation(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType, SbRotation defaultValue)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
SbRotation
getValue()
Returns this field's value.void
setValue(float[] q)
Sets the field to the given quaternion (x, y, z, w).void
setValue(float q0, float q1, float q2, float q3)
Sets the field to the given quaternion (x, y, z, w).void
setValue(SbRotation newValue)
Sets this field to newValue.void
setValue(SbRotationd rotd)
Convenience method that allows you to specify a field value using a double precision variable.void
setValue(SbVec3f axis, float angle)
Sets the field to the rotation given by axis/angle.-
Methods inherited from class com.openinventor.inventor.fields.SoField
appendConnection, appendConnection, connectFrom, connectFrom, disconnect, disconnect, disconnect, enableConnection, get, getConnectedEngine, getConnectedField, getContainer, getNumConnections, getValueSize, isConnected, isConnectedFromEngine, isConnectedFromField, isConnectedFromVRMLInterp, isConnectionEnabled, isDefault, isIgnored, set, setIgnored, touch
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SoSFRotation
public SoSFRotation(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType, SbRotation defaultValue)
Default constructor.
-
-
Method Detail
-
setValue
public void setValue(float q0, float q1, float q2, float q3)
Sets the field to the given quaternion (x, y, z, w).
-
setValue
public void setValue(float[] q)
Sets the field to the given quaternion (x, y, z, w).
-
setValue
public void setValue(SbRotation newValue)
Sets this field to newValue.
-
getValue
public SbRotation getValue()
Returns this field's value.
-
setValue
public void setValue(SbRotationd rotd)
Convenience method that allows you to specify a field value using a double precision variable. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.
-
setValue
public void setValue(SbVec3f axis, float angle)
Sets the field to the rotation given by axis/angle.
-
-