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

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<sidebar>API Contents</sidebar>
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Blends positions from two sources to a destination
+
|-
 
+
| 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;" | '''Morph'''
====Class hierarchy====
+
|-
[[API Panel|Panel]]
+
| colspan="2" | Blends positions from two sources to a destination&nbsp;
:[[API Panel.Position|Position]]
+
|-
::[[API Panel.Position|Morph]]
+
|-
</div>
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
__TOC__
+
| width="90%" | Dest
 
+
|-
==Parameters==
+
| colspan="2" | The position or component to update&nbsp;
[[Variable Types|HANDLE]] ''Dest''
+
|-
:The position or component to update
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 
+
| width="90%" | Start
[[Variable Types|HANDLE]] ''Start''
+
|-
:The initial position at Step=0
+
| colspan="2" | The initial position at Step=0&nbsp;
 
+
|-
[[Variable Types|HANDLE]] ''End''
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
:The final position at Step=1
+
| width="90%" | End
 
+
|-
[[Variable Types|FLOAT]] ''Step''
+
| colspan="2" | The final position at Step=1&nbsp;
:A value from 0 to 1 for the position between Start and End
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
[[Variable Types|BOOL]] ''CurveArcs''
+
| width="90%" | Step
:True to curve movement if rotation is applied, false for linear movement
+
|-
:''The default value for this parameter is: '''''1'''
+
| colspan="2" | A value from 0 to 1 for the position between Start and End&nbsp;
 
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
==Return value==
+
| width="90%" | CurveArcs
''This call does not return a value''
+
|-
 +
| colspan="2" | True to curve movement if rotation is applied, false for linear movement&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - NONE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
Line 47: Line 52:
 
===Calling in a calculation===
 
===Calling in a calculation===
 
* Add to a calculation icon: <pre class="brush:[cpp]">::Panel.Position.Morph(dest, start, end, step, false)</pre>
 
* Add to a calculation icon: <pre class="brush:[cpp]">::Panel.Position.Morph(dest, start, end, step, false)</pre>
 
''<span style="color:red;">No additional examples</span>''
 

Latest revision as of 11:54, 16 January 2023

Fc9-comp-macro.png Morph
Blends positions from two sources to a destination 
Fc9-h32-icon.png - HANDLE Dest
The position or component to update 
Fc9-h32-icon.png - HANDLE Start
The initial position at Step=0 
Fc9-h32-icon.png - HANDLE End
The final position at Step=1 
Fc9-f32-icon.png - FLOAT Step
A value from 0 to 1 for the position between Start and End 
Fc9-bool-icon.png - BOOL CurveArcs
True to curve movement if rotation is applied, false for linear movement 
Fc9-void-icon.png - NONE Return


Detailed description

This call smoothly interpolates between two objects, storing the result in a third Dest position.

SIMAPI Panel.Position.Morph.svg


The Step may be any value and is not bounded by Flowcode, but typically lies within the range of 0 to 1. A value of 0 represents the position of Start and 1 represents End.


The Animate call performs this operation over a fixed time, selecting the Step from 0 to 1 appropriately then invoking this routine.


Examples

Calling in a calculation

  • Add to a calculation icon:
    ::Panel.Position.Morph(dest, start, end, step, false)