Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

smatrix

  • Last UpdatedMar 12, 2025
  • 3 minute read

This topic is about the SMATRIX data type.

Value syntax

1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1

Description

4×4 Matrix used to handle geometric transformations.

Attributes

These are the attributes for SMATRIX.

Attribute

Type

Description

compose(SMATRIX)

smatrix

Used only as op inside a modify statement. It overwrites the matrix with the result of the multiplication of the initial matrix value by the provided SMATRIX.

getAt()

svec3

Returns matrix direction vector.

getInvert()

smatrix

Returns the inverse of the matrix.

getPosition()

svec3

Returns matrix position vector.

getRight()

svec3

Returns matrix right vector.

getRotation()

squat

Returns the quaternion representation of the matrix rotation.

getScale()

svec3

Returns the matrix scale vector.

getUp()

svec3

Returns matrix up vector.

identity

smatrix

Used only as op inside a modify statement. It overwrites the matrix with an identity matrix.

invert

smatrix

Used only as op inside a modify statement. It overwrites the matrix with its inverted matrix.

isModified

sbool

Set to True in the frame where the value of this field is modified.

rotation(SVEC4)

smatrix

Used only as op inside a modify statement. It overwrites the matrix with a rotation matrix according to provided quaternion.

rotationx(SFLOAT)

smatrix

Used only as op inside a modify statement. It overwrites the matrix with a rotation matrix around X axis. The values are in radians.

rotationy(SFLOAT)

smatrix

Used only as op inside a modify statement. It overwrites the matrix with a rotation matrix around Y axis. The values are in radians.

rotationz(SFLOAT)

smatrix

Used only as op inside a modify statement. It overwrites the matrix with a rotation matrix around Z axis. The values are in radians.

scale(SVEC3)

smatrix

Used only as op inside a modify statement. It overwrites the matrix with a scale matrix according to provided scale value.

slerp(SMATRIX,SDOUBLE,SSTRING)

smatrix

Interpolates the matrix to the given SMATRIX target, at the given SDOUBLE interpolation step (from 0 to 1). Optionally, an ease can be used passing an SSTRING: easeIn, easeOut, easeInOut. No string or any other string would interpolate linearly.

swaplhrh

smatrix

Used only as op inside a modify statement. It overwrites the matrix by transforming from left hand coordinate system to right hand and vice versa.

transform(SVEC3,SQUAT,SVEC3

smatrix

Used only as op inside a modify statement. It overwrites the matrix with a matrix applying provided translation (SVEC3), rotation (SQUAT), and scale (SVEC3). Example: (0 0 0,1 0 1 0,1 1 1).

transformPosition(SVEC3)

svec3

Transforms the input vector (SVEC3) from its original space to the space defined by the initial matrix value.

transformVector(SVEC3)

svec3

Transforms the input vector (SVEC3) from its original space to the space defined by the initial matrix value. This operation does not include the matrix translation contribute.

translation(SVEC3)

smatrix

Used only as op inside a modify statement. It overwrites the matrix with a translation matrix according to provided vector.

type

sstring

Returns the type name.

yawpitchroll(SVEC3)

smatrix

Used only as op inside a modify statement. It overwrites the matrix with a rotation matrix according to provided yaw, pitch, and roll.

yuptozup

smatrix

Used only as op inside a modify statement. It overwrites the matrix after transforming the up vector from Y to Z.

zuptoyup

smatrix

Used only as op inside a modify statement. It overwrites the matrix after transforming the up vector from Z to Y.

Related Links
TitleResults for “How to create a CRG?”Also Available in