Rotation

Update the rotation property of one entity's transform. If this property is used as the Pipeline.updateSceneGraphProperty's targetProperty parameter, the data tensor parameter must be:

  1. A multi-dimensional tensor of 1 channel and 2 dimensions: 1x3 or 3x1 if the rotation is expressed as a rotation vector, or 1x4 or 4x1 if the rotation is expressed as a quaternion, or 3x3 is the rotation is expressed as a rotation matrix.

  2. A multi-dimensional tensor of 3 channels or 4 channels and all dimensions must be 1. If the number of channel is 3, the tensor is treated as a rotation vector; otherwise if the number of channel is 4, the tensor is treated as a quaternion.

  3. A scalar array of size 3 or 4. Similarly, if the size of the scalar array equals 3, the tensor is treated as a rotation vector; otherwise if the size is 4, the tensor is treated as a quaternion.

The datatype of the data tensor must be Tensor.DataType.FLOAT32 or Tensor.DataType.FLOAT64.