Difference between revisions of "API Panel.Position.GetQuat"

From Flowcode Help
Jump to navigationJump to search
(XML import of new API docs)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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''
 +
|}
  
  
<sidebar>API contents</sidebar>
+
==Detailed description==
Returns the positions quaternion in (X,Y,Z,W) array
 
  
<div style="width:25%; float:right" class="toc">
 
====Class hierarchy====
 
[[API Panel|Panel]]
 
:[[API Panel.Position|Position]]
 
::[[API Panel.Position|GetQuat]]
 
</div>
 
__TOC__
 
 
==Parameters==
 
[[Variable types|HANDLE]] ''Handle''
 
:The position or component to read
 
:''The default value for this parameter is: '''''this'''
 
 
[[Variable types|HANDLE]] ''Target''
 
:The position or component to convert relative to
 
:''The default value for this parameter is: '''''this'''
 
 
 
==Return value==
 
[[Variable types|FLOAT[]]]
 
 
Returns the positions quaternion in (X,Y,Z,W) array
 
 
 
==Detailed description==
 
''<span style="color:red;">No additional information</span>''
 
  
  
Line 38: Line 32:
  
 
===Flowcode example file===
 
===Flowcode example file===
Download [[File:SIMAPI_Panel_Position_GetQuat.fcf]] 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.  
+
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.
 
The screenshots below show the effect and also highlight the code used by the example.

Latest revision as of 11:54, 16 January 2023

Fc9-comp-macro.png GetQuat
Returns the positions quaternion in (X,Y,Z,W) array 
Fc9-h32-icon.png - HANDLE Handle
The position or component to read 
Fc9-h32-icon.png - HANDLE Target
The position or component to convert relative to 
Fc9-f32-icon.png - FLOAT[] 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 FC6 Icon.png 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.


SIMAPI Panel Position GetQuat Pic0.png