Each surface has a location vector and a rotation matrix. Together they define the frame of reference of the object. The rotation and location are accessible from the _rot and _loc attributes, respectively, or from the appropriate places in the homogenous transformation stored in _transform and kept in sync with _rot and _loc.
A surface may construct its own local coordinates from the vectors of the rotation matrix. The rotation matrix is from the global to the local, so its columns are the basis of the local coordinates, written in the global coordinates. See [1] p. 25
Tentative transformations are held in _temp_frame, which allows to preserve the relative transform while holding a global transform.
[1] | John J. Craig, Introduction to Robotics, 3rd ed., 2005. |
Sets the location within the object
Sets the rotation within the object
Defines the transformation matrix the puts the surface into the coordinates of the object containing the surface (the parent object).
Arguments
Updates the transformation matrix that puts the surface into the global coordinates. I.e., if the object the surface is in is rotated, than the surface is also rotated. It then defines a temporary rotated frame for use of calculations.