I am trying to figure out what exactly does the Set Pivot operation do and understand the ways you move around objects in CGA. I have read the manual but I am still having troubles grasping the whole thing, maybe because of the terminology used. The questions might seem a bit obvious, please be patient with me.
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's scope axes, the axisMapSelector and the cornerIndex.
If i got it correctly, there are 4 coordinates system:
World Coordinates. These are fixed, one set of coordinates for the whole scene.
Object Coordinates. These are fixed, one set of coordinates for the InitialShape, shared by its whole shape tree.
Pivot Coordinates. Each current shape has one. It changes after each comp operation and can be set with CGA.
Scope Coordinates. Each current shape has one. It changes after each shape transformations and can be set with CGA.
Now, there are 2 ways to translate, 3 ways to rotate and 1 way to scale.
t: translates the scope in relation to the scope coordinates. It is a special case of translate, like writing translate(rel, scope, x, y, z).
translate:translates the scope of the current shape in relation to one of the 4 different coordinate systems.
r: rotates the scope of the current shape around EITHER the scope origin or the scope centre , using the pivot coordinates. If the rotation centre is the scope origin, it is a special case of rotate, like writing rotate(rel, pivot, x, y, z).
rotate: rotates the scope of the current shape around the scope origin using one of the 4 different coordinate systems.
rotateScope: rotates the scope of the current shape around the pivot-axes in xyz order. The geometry is not rotated, and the size and translation of the scope is adjusted such that the scope is the geometry's bounding box aligned to the scope axes.
s: sets the size vector scope.s. Negative sizes result in mirroring along the corresponding axes; this means inverted normals.
Mirror: mirrors the geometry of the current shape. BUT it keeps the scope unchanged.
Mirror Scope: mirrors the scope of the current shape BUT it keeps the shape's geometry unchanged.
question 1: While "t" is a special case of "translate", "r" is ONLY a special case of "rotate" when centerSelector is the SCOPE ORIGIN, did I got it right or i misunderstood?
It seems to me like t and r are a shortened simplified version of translate and rotate, the same way like "texture ()" is a quick way to say set(material.colormap, ).
question 2: Does rotateScope ONLY rotates the scope while "r" and "rotate" turn the scope AND the geometry together?
question 3: "r" uses the pivot cordinates, "rotate" allows you to choose one of the 4 coordinates system. What about rotateScope, does it uses world, object, pivot or scope? Is "pivot axes" referring to the point around which it can rotate or the coordinates system which is using to calculate the rotation?
question 4: "r" can rotate around the scope origin or the scope centre, "rotate" only around the scope origin. "rotateScope" rotates the scope around the "pivot-axes", does it means around the pivot position vector p(origin) ?
Final question: Why would I want to change the pivot?, what is the benefit from doing it? Does it changes the first edge of the shape? What is a situation in which changing the pivot could be important or required? Why not changing the object
Thanks for all the help