instantreality 1.0

SFMatrix4f

The SFMatrix4f object provides many useful functions for performing manipulations on 4x4 matrices.

Each of element of the matrix can be accessed using C-style array dereferencing (i.e., m[0][1] is the element in row 0, column 1). The results of dereferencing a SFMatrix4f object using a single index (i.e., m[0]) are undefined. The translation elements are in the third row. For example, m[2][0] is the X offset.Additionally the individual rows of the matrix may be addressed using array-style indexing returning a SFMatrix4Row instance. The values of the SFMatrix4Row instance can be accessed using C-Style array dereferencing (e.g., m[0] is f11, [2] is f12, [3] is f13 and [4] is f14.

Properties

TypePropertyDescriptionStandard

Functions

Return typeFunctionDescriptionStandard
voidsetTransform(SFVec3f translation, SFRotation rotation, SFVec3f scale, SFRotation scaleOrientation, SFVec3f center)

Sets the Matrix to the passed values.

Any of the rightmost parameters may be omitted. The function has zero to five parameters. For example, specifying zero parameters results in an identity matrix while specifying one parameter results in a translation and specifying two parameters results in a translation and a rotation. Any unspecified parameter is set to its default as specified for the Transform node. Values are applied to the matrix in the same order as the matrix field calculations for the Transform node.

Avalon
voidgetTransform(SFVec3f translation, SFRotation rotation, SFVec3f scale)

Decomposes the Matrix and returns the components in the passed translation, rotation, and scale objects.

The types of these passed objects is the same as the first three arguments to setTransform. If any passed object is not sent, or if the null object is sent for any value, that value is not returned. Any projection or shear information in the matrix is ignored.

Avalon
SFMatrix4finverse()

Returns a new SFMatrix4f whose value is the inverse of this object.

Avalon
SFMatrix4ftranspose()

Returns a new SFMatrix4f whose value is the transpose of this object.

Avalon
SFMatrix4fmultLeft(SFMatrix4f n)

Returns a new SFMatrix4f whose value is the object multiplied by the passed matrix on the left.

Avalon
SFMatrix4fmultRight(SFMatrix4f m)

Returns a new SFMatrix4f whose value is the object multiplied by the passed matrix on the right.

Avalon
SFVec3fmultVecMatrix(SFVec3f vec)

Returns a new SFVec3f whose value is the object multiplied by the passed row vector.

Avalon
SFVec3fmultMatrixVec(SFVec3f vec)

Returns a new SFVec3f whose value is the object multiplied by the passed column vector.

Avalon
StringtoString()

Returns a String containing the matrix contents encoded using the X3D Classic VRML encoding.

Avalon