Syntax
- float convert(coordSelector, fromSysSelector, toSysSelector, typeSelector, x, y, z)
Parameters
- coordSelector—float{ x | y | z }—coordinate component selector.
- fromSysSelector—float{ scope | pivot | object | world }—selector for coordinate system to which to convert.
- toSysSelector—float{ scope | pivot | object | world }—selector for coordinate system to which to convert.
- typeSelector—float{ pos | orient }—selector to choose interpretation of the x, y, z - triple as coordinates or angles.
- x, y, z—floatPosition (coordinates) / orientation (angles in degrees) in the fromSystem to convert to the toSystem.
Returns
The selected coordinate component of the tuple (x, y, z), converted from the fromSys coordinate system to the toSys coordinate system. The tuple can either describe angles or a position.
Description
The convert function converts positions and orientations between different coordinate systems.
Related
Examples
Using convert() to find the position and orientation of the scope origin in world and pivot coordinates as well as the highest point of the scope in world coordinates
| ![]() |
The output of the cga code:
![CGA code output CGA code output](GUID-BE74F658-C8BB-463D-ACB6-CB3BBD99B323-web.png)