German Larrain avatar 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.