Jump to content

API Panel.Position.GetQuat: Difference between revisions

From Flowcode Help
JonnyW (talk | contribs)
XML import
No edit summary
Line 1: Line 1:
<sidebar>API Contents</sidebar>
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Returns the positions quaternion in (X,Y,Z,W) array
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
<div style="width:25%; float:right" class="toc">
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetQuat'''
====Class hierarchy====
|-
[[API Panel|Panel]]
| colspan="2" | Returns the positions quaternion in (X,Y,Z,W) array&nbsp;
:[[API Panel.Position|Position]]
|-
::[[API Panel.Position|GetQuat]]
|-
</div>
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
__TOC__
| width="90%" | Handle
 
|-
==Parameters==
| colspan="2" | The position or component to read&nbsp;
[[Variable Types|HANDLE]] ''Handle''
|-
:The position or component to read
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
:''The default value for this parameter is: '''''this'''
| width="90%" | Target
 
|-
[[Variable Types|HANDLE]] ''Target''
| colspan="2" | The position or component to convert relative to&nbsp;
:The position or component to convert relative to
|-
:''The default value for this parameter is: '''''this'''
| 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''
 
|}
==Return value==
[[Variable Types|FLOAT[]]]
 
Returns the positions quaternion in (X,Y,Z,W) array





Revision as of 11:41, 16 January 2023

GetQuat
Returns the positions quaternion in (X,Y,Z,W) array 
- HANDLE Handle
The position or component to read 
- HANDLE Target
The position or component to convert relative to 
- FLOAT[] Return


Detailed description

No additional information


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.