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

From Flowcode Help
Jump to navigationJump to search
(XML import)
(XML import)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
+
<sidebar>API Contents</sidebar>
 
Blends positions from two sources to a destination
 
Blends positions from two sources to a destination
  
Line 11: Line 11:
  
 
==Parameters==
 
==Parameters==
[[Variable types|HANDLE]] ''Dest''
+
[[Variable Types|HANDLE]] ''Dest''
 
:The position or component to update
 
:The position or component to update
  
[[Variable types|HANDLE]] ''Start''
+
[[Variable Types|HANDLE]] ''Start''
 
:The initial position at Step=0
 
:The initial position at Step=0
  
[[Variable types|HANDLE]] ''End''
+
[[Variable Types|HANDLE]] ''End''
 
:The final position at Step=1
 
:The final position at Step=1
  
[[Variable types|FLOAT]] ''Step''
+
[[Variable Types|FLOAT]] ''Step''
 
:A value from 0 to 1 for the position between Start and End
 
:A value from 0 to 1 for the position between Start and End
 +
 +
[[Variable Types|BOOL]] ''CurveArcs''
 +
:True to curve movement if rotation is applied, false for linear movement
 +
:''The default value for this parameter is: '''''1'''
  
  
Line 29: Line 33:
  
 
==Detailed description==
 
==Detailed description==
''<span style="color:red;">No additional information</span>''
+
This call smoothly interpolates between two objects, storing the result in a third ''Dest'' position.
 +
 
 +
[[File:SIMAPI Panel.Position.Morph.svg|350px]]
 +
 
 +
 
 +
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 [[API Panel.Position.Animate|Animate]] call performs this operation over a fixed time, selecting the ''Step'' from 0 to 1 appropriately then invoking this routine.
  
  
 
==Examples==
 
==Examples==
 
===Calling in a calculation===
 
===Calling in a calculation===
* Add to a calculation icon: <pre class="brush:[cpp]">::Panel.Position.Morph(dest, start, end, step)</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 information</span>''
+
''<span style="color:red;">No additional examples</span>''

Latest revision as of 15:57, 16 January 2014

<sidebar>API Contents</sidebar> Blends positions from two sources to a destination

Class hierarchy

Panel

Position
Morph

Parameters

HANDLE Dest

The position or component to update

HANDLE Start

The initial position at Step=0

HANDLE End

The final position at Step=1

FLOAT Step

A value from 0 to 1 for the position between Start and End

BOOL CurveArcs

True to curve movement if rotation is applied, false for linear movement
The default value for this parameter is: 1


Return value

This call does not return a value


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)

No additional examples