Transform¶
-
class
rnamake.transform.
Transform
(*args)[source]¶ Bases:
object
Basic transform object, stores a 4x4 homogenous transform that contains both the rotation and translation of a transform
#with full matrix >>> t = Transform(np.eye(4)) >>> t.rotation() [[ 1. 0. 0.] [ 0. 1. 0.] [ 0. 0. 1.]] >>> print t.translation() [ 0. 0. 0.] # with rotation and translation >>> r = np.eye(3) >>> d = np.array([1, 1, 1]) >>> t = Transform(r, d) >>> print t.rotation() [[ 1. 0. 0.] [ 0. 1. 0.] [ 0. 0. 1.]] >>> print t.translation() [ 1. 1. 1.]
Attributes: - matrix : np.array
- 4x4 matrix that holds both the rotation and translation