Commits

German Larrain committed 5042d1c

utils.mathematical: added new axes definitions X_AXIS, X_AXIS_NEG, Y_AXIS, etc; expressed the existing ones in terms of the new ones.

Comments (0)

Files changed (1)

ars/utils/mathematical.py

 downRot = (1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0)
 bkwdRot = (1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)
 
+X_AXIS = (1.0, 0.0, 0.0)
+X_AXIS_NEG = (-1.0, 0.0, 0.0)
+Y_AXIS = (0.0, 1.0, 0.0)
+Y_AXIS_NEG = (0.0, -1.0, 0.0)
+Z_AXIS = (0.0, 0.0, 1.0)
+Z_AXIS_NEG = (0.0, 0.0, -1.0)
+
 # axes used to determine constrained joint rotations
-rightAxis = (1.0, 0.0, 0.0)
-leftAxis = (-1.0, 0.0, 0.0)
-upAxis = (0.0, 1.0, 0.0)
-downAxis = (0.0, -1.0, 0.0)
-bkwdAxis = (0.0, 0.0, 1.0)
-fwdAxis = (0.0, 0.0, -1.0)
+rightAxis = X_AXIS
+leftAxis = X_AXIS_NEG
+upAxis = Y_AXIS
+downAxis = Y_AXIS_NEG
+bkwdAxis = Z_AXIS  # direction: out of the screen
+fwdAxis = Z_AXIS_NEG  # direction: into the screen
 
 #===============================================================================
 # added to the original refactored code