Package com.openinventor.inventor.fields
Class SoSFMatrix
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.fields.SoField
com.openinventor.inventor.fields.SoSField
com.openinventor.inventor.fields.SoSFMatrix
Field containing a 4x4 matrix.
A field containing a transformation matrix (an
SbMatrix
).
SoSFMatrixs are written to file as 16 floating point numbers separated by whitespace. For example, an identity matrix is written as:
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
- See Also:
-
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
ConstructorsConstructorDescriptionSoSFMatrix
(SoFieldContainer fieldContainer, String fieldName, SoField.FieldTypes fieldType, SbMatrix defaultValue) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getValue()
Returns this field's value.void
setValue
(float a11, float a12, float a13, float a14, float a21, float a22, float a23, float a24, float a31, float a32, float a33, float a34, float a41, float a42, float a43, float a44) Sets this field to contain the matrix given by the 16 values.void
Sets this field to newValue.void
Convenience method that allows you to specify a field value using a double precision variable.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 Details
-
SoSFMatrix
public SoSFMatrix(SoFieldContainer fieldContainer, String fieldName, SoField.FieldTypes fieldType, SbMatrix defaultValue) Default constructor.
-
-
Method Details
-
setValue
Sets this field to newValue. -
equals
-
setValue
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(float a11, float a12, float a13, float a14, float a21, float a22, float a23, float a24, float a31, float a32, float a33, float a34, float a41, float a42, float a43, float a44) Sets this field to contain the matrix given by the 16 values. For a translation matrix, the x, y and z translations should be in the a41, a42, and a43 arguments. -
getValue
Returns this field's value.
-