warp.transform_vector#
- warp.transform_vector( ) Vector[Float, Literal[3]]#
Return
vectransformed by the rotation ofxform, ignoring its translation.xform.qmust have unit length; otherwise the result may distort. Usetransform_point()to transform positions.- Parameters:
xform – Transformation whose rotation is applied.
vec – Direction vector to transform, which need not be normalized.
- Returns:
quat_rotate(xform.q, vec), equivalent to using homogeneous coordinatew = 0.
See
transform_point()for a usage example.
- warp.transform_vector( ) Vector[Float, Literal[3]]
Return
vectransformed by the 4x4 matrixmat, using homogeneous coordinatew = 0.Matrices that use row-vector conventions, such as those from USD, must be transposed. When
matcontains non-uniform scale, transform normals using the inverse transpose of its upper-left 3x3 linear component, then normalize the result. Usetransform_point()to transform positions.- Parameters:
mat – Transformation matrix, applied to a column vector.
vec – Direction vector to transform, which need not be normalized.
- Returns:
The first three components of
mat * (vec.x, vec.y, vec.z, 0), ignoring translation.
See
transform_point()for a usage example.