setPivot

Synopsis

setPivot(axisMapSelector, cornerIndex)

Parameters

The setPivot operation lets you re-position and re-orient the current shape's pivot. The new orientation will be based on the current shape'sscope axes, the axisMapSelector and the cornerIndex.

The new pivot.p will lie at a selected corner (cornerIndex) of the current shape'sscope, and the pivot will be rotated such that all axes point inside the scope.

The new scope will have zero translation and rotation (relative to the pivot), and will stay at the same place (in world coordinates), but with different axes. The geometry is projected to the new scope (i.e. stays at the same place in world coordinates).

 

Visual Guide


The initial scope.
The scope of the current shape prior to the setPivot() operation is depicted in the picture on the left. The numbers depict the cornerIndices.

XYZ

The pivots after setPivot(xyz, v) with v = the cornerIndex.

Note the orientation of the pivots: in corner 0, the axes are the same as the original scope axes; at all other corners, the direction of y is the same (or the negative) of the y axis of the original scope. The other axes are oriented such that they conicide with a scope axis.


XYZ

The pivots after setPivot(yzx, v) with v = the cornerIndex.

Note the orientation of the pivots: in corner 0, the scope axes xyz are replaced by the axes yzx.

 


XYZ

The pivots after setPivot(zxy, v) with v = the cornerIndex.

Note the orientation of the pivots: in corner 0, the scope axes xyz are replaced by the axes zxy.

 

Related

Copyright ©2008-2016 Esri R&D Center Zurich. All rights reserved.