Synopsis
 alignScopeToAxes()
 alignScopeToAxes(alignAxesSelector)
Parameters
 alignAxesSelector—selstr{ x  y  z }— the world coordinate axis for alignment.
Description
The alignScopeToAxes operation manipulates the scope, the pivot and the geometry attributes such that the scope's axes are parallel to the main axes. After this operation, the pivot.o.scope.r(rotate) and the pivot.o.scope.t(translation) vectors are zero and the geometry is projected to the new scope (i.e. stays at the same place in world coordinates). Variants of the operation align only one axis:
 x axis of the scope (the z axis is then projected to the world coordinates yzplane)
 y axis of the scope (the x axis is then projected to the world coordinates xzplane)
 z axis of the scope (the x axis is then projected to the world coordinates xyplane)
Related
Examples
The initial scene: The pivot (fat) is in the origin; the scope (yellow) contains a translation and a rotation.
 
Applying alignScopeToAxes() removes the scope translation and rotation, rotates the pivot such that all pivot axes are parallel to the world coordinate axes and projects the geometry to the new scope such that it stays at the same place in world coordinates. Note that the pivot lies at a corner of the bounding box (which is the new scope)
 
Applying alignScopeToAxes(y) aligns the pivot to the yaxis.
