API Panel.Position.GetQuat: Difference between revisions
Appearance
XML import |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (15 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
{| class="mtx-class-macrotable wikitable" | |||
Returns the positions quaternion in | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" class="mtx-class-macrohead" | '''GetQuat''' | |||
|- | |||
| colspan="2" | Returns the positions quaternion in (X,Y,Z,W) array | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | |||
| width="90%" | Handle | |||
|- | |||
| colspan="2" | The position or component to read | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | |||
| width="90%" | Target | |||
|- | |||
| colspan="2" | The position or component to convert relative to | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT[] | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
== | ==Detailed description== | ||
==Examples== | ==Examples== | ||
| Line 31: | Line 30: | ||
* Declare a variable 'result' of type FLOAT[] | * Declare a variable 'result' of type FLOAT[] | ||
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Panel.Position.GetQuat(handle, target)</pre> | * Add to a calculation icon: <pre class="brush:[cpp]">result = ::Panel.Position.GetQuat(handle, target)</pre> | ||
===Flowcode example file=== | |||
Download {{Fcfile|SIMAPI_Panel_Position_GetQuat.fcfx|SIMAPI_Panel_Position_GetQuat}} and open it in Flowcode v6. In this example a blue cuboid and a LCD are shown on the system panel. When the program starts, a [[wikipedia:Quaternion]] of the cuboid is returned into an existing Float Array variable. The Quaternion values are then displayed on the LCD display. | |||
The screenshots below show the effect and also highlight the code used by the example. | |||
[[File:SIMAPI_Panel_Position_GetQuat_Pic0.png|800px]] | |||
Latest revision as of 14:11, 13 July 2026
| GetQuat | |
| Returns the positions quaternion in (X,Y,Z,W) array | |
| Handle | |
| The position or component to read | |
| Target | |
| The position or component to convert relative to | |
| Return | |
Detailed description
Examples
Calling in a calculation
- Declare a variable 'result' of type FLOAT[]
- Add to a calculation icon:
result = ::Panel.Position.GetQuat(handle, target)
Flowcode example file
Download
SIMAPI_Panel_Position_GetQuat and open it in Flowcode v6. In this example a blue cuboid and a LCD are shown on the system panel. When the program starts, a wikipedia:Quaternion of the cuboid is returned into an existing Float Array variable. The Quaternion values are then displayed on the LCD display.
The screenshots below show the effect and also highlight the code used by the example.