director.transformUtils module¶
-
director.transformUtils.
concatenateTransforms
(transformList)[source]¶ Given a list of vtkTransform objects, returns a new vtkTransform which is a concatenation of the whole list using vtk post multiply. See documentation for vtkTransform::PostMultiply.
-
director.transformUtils.
crossProductMatrix
(x)[source]¶ Computes the matrix P such that P*y = cross product of x and y :param x: :return: P, a 3x3 matrix
-
director.transformUtils.
findTransformAxis
(transform, referenceVector)[source]¶ Given a vtkTransform and a reference vector, find a +/- axis of the transform that most closely matches the reference vector. Returns the matching axis index, axis, and sign.
-
director.transformUtils.
forceMomentTransformation
(inputFrame, outputFrame)[source]¶ Utility getting the force-moment transformation for converting wrenches from one frame to another. Ff wrench is 6 x 1 (moment, force) expressed in input frame, then corresponding wrench in output frame would be numpy.dot(FM, wrench) = wrench_in_output_frame. :param inputFrame: A vtkTransform defining the input frame :param outputFrame: A vtkTransform defining the output frame :return: 4x4 matrix that transform a wrench from the input frame to the output frame
-
director.transformUtils.
frameInterpolate
(trans_a, trans_b, weight_b)[source]¶ Interpolate two frames where weight_b=[0,1]
-
director.transformUtils.
getLookAtTransform
(lookAtPosition, lookFromPosition, viewUp=[0.0, 0.0, 1.0])[source]¶
-
director.transformUtils.
getNumpyFromTransform
(transform)[source]¶ Given a vtkTransform, return a numpy 4x4 array
-
director.transformUtils.
getTransformFromNumpy
(mat)[source]¶ Given a numpy 4x4 array, return a vtkTransform.