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

From Flowcode Help
Jump to navigationJump to search
(XML Import to change Variable types into Variable Types)
Line 23: Line 23:
  
 
==Detailed description==
 
==Detailed description==
''<span style="color:red;">No additional information</span>''
+
This is equivalent to the call to [[API Panel.Position.Set|Set]], except that the ''scale'' and ''rotation'' of the position are omitted.
 +
 
 +
 
 +
This call is useful for building up a position from multiple sources.
  
  

Revision as of 23:50, 13 June 2013

<sidebar>API contents</sidebar> Sets an objects coordinates based on a position

Class hierarchy

Panel

Position
SetCoords

Parameters

HANDLE Dest

The position or component to update

HANDLE Source

The position or component to read from


Return value

This call does not return a value


Detailed description

This is equivalent to the call to Set, except that the scale and rotation of the position are omitted.


This call is useful for building up a position from multiple sources.


Examples

Calling in a calculation

  • Add to a calculation icon:
    ::Panel.Position.SetCoords(dest, source)

Flowcode example file

Download File:SIMAPI Panel Position SetCoords.fcf and open it in Flowcode v6. In this example there are two spheres (sourceball & destinationball) and a LCD showing the coordinates of each sphere. Every two seconds the program will move the red sphere to the coordinates of the yellow sphere, and then return the red sphere to its original position. The red sphere is slightly larger than the yellow sphere. This is purely to illustrate the red sphere moves to its correct destination (if the spheres are the exact same size then you may or may not see the red sphere properly as the program is rendering two spheres of exact dimensions in exactly the same coordinates)

The screenshots below show the effect and also highlight the code used by the example.

SIMAPI Panel Position SetCoords Pic1.pngSIMAPI Panel Position SetCoords Pic2.png SIMAPI Panel Position SetCoords Pic0.png