Difference between revisions of "API Panel.Position"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The start line of the article
+
<sidebar>API Contents</sidebar>
==PanelPosition==
+
Coordinate manipulation functions
 +
 
 +
This class is contained within [[API Panel|Panel]].
 +
 
 +
__TOC__
 +
 
 +
==Sub-classes provided for this class==
 +
{|
 +
|-
 +
|width="35%"|[[API Panel.Position.Math|Math]]
 +
|Coordinate maths functions
 +
|-
 +
|width="35%"|[[API Panel.Position.Camera|Camera]]
 +
|Camera positioning
 +
|}
 +
 
 +
 
 +
==Functions provided for this class==
 +
{|
 +
|-
 +
|width="35%"|[[API Panel.Position.Get|Get]]
 +
|Gets a handle to an object representing the components current position
 +
|-
 +
|width="35%"|[[API Panel.Position.GetOrigin|GetOrigin]]
 +
|Gets a handle to an empty position
 +
|-
 +
|width="35%"|[[API Panel.Position.Set|Set]]
 +
|Sets an objects position based on a component or pre-defined position
 +
|-
 +
|width="35%"|[[API Panel.Position.SetCoords|SetCoords]]
 +
|Sets an objects coordinates based on a position
 +
|-
 +
|width="35%"|[[API Panel.Position.SetScale|SetScale]]
 +
|Sets an objects scale based on a position
 +
|-
 +
|width="35%"|[[API Panel.Position.SetRotation|SetRotation]]
 +
|Sets an objects orientation based on a position
 +
|-
 +
|width="35%"|[[API Panel.Position.GetBox|GetBox]]
 +
|Gets a handle to an object representing the components bounding box position
 +
|-
 +
|width="35%"|[[API Panel.Position.Morph|Morph]]
 +
|Blends positions from two sources to a destination
 +
|-
 +
|width="35%"|[[API Panel.Position.Animate|Animate]]
 +
|Blends positions from two sources to a destination over time
 +
|-
 +
|width="35%"|[[API Panel.Position.StopAnimate|StopAnimate]]
 +
|Stops all animations started by this component
 +
|-
 +
|width="35%"|[[API Panel.Position.MoveAlong|MoveAlong]]
 +
|Moves the object by the given offset relative to its parent along an axis
 +
|-
 +
|width="35%"|[[API Panel.Position.MoveBy|MoveBy]]
 +
|Moves the object by the given offset relative to its parent
 +
|-
 +
|width="35%"|[[API Panel.Position.MoveTo|MoveTo]]
 +
|Moves the object to the given coordinates relative to its parent
 +
|-
 +
|width="35%"|[[API Panel.Position.ScaleTo|ScaleTo]]
 +
|Sets the objects scale to a value
 +
|-
 +
|width="35%"|[[API Panel.Position.ScaleUp|ScaleUp]]
 +
|Multiplies the objects scale by a value
 +
|-
 +
|width="35%"|[[API Panel.Position.ScaleDown|ScaleDown]]
 +
|Divides the objects scale by a value
 +
|-
 +
|width="35%"|[[API Panel.Position.RotateTo|RotateTo]]
 +
|Rotates the object to the given rotation
 +
|-
 +
|width="35%"|[[API Panel.Position.RotateAlong|RotateAlong]]
 +
|Rotates the object by the given rotation along an axis
 +
|-
 +
|width="35%"|[[API Panel.Position.RotateX|RotateX]]
 +
|Rotates the object around the X axis
 +
|-
 +
|width="35%"|[[API Panel.Position.RotateY|RotateY]]
 +
|Rotates the object around the Y axis
 +
|-
 +
|width="35%"|[[API Panel.Position.RotateZ|RotateZ]]
 +
|Rotates the object around the Z axis
 +
|-
 +
|width="35%"|[[API Panel.Position.GetCoords|GetCoords]]
 +
|Returns the positions coordinates in (X,Y,Z) array
 +
|-
 +
|width="35%"|[[API Panel.Position.GetScale|GetScale]]
 +
|Returns the positions scale in (X,Y,Z) array
 +
|-
 +
|width="35%"|[[API Panel.Position.GetQuat|GetQuat]]
 +
|Returns the positions quaternion in (X,Y,Z,W) array
 +
|-
 +
|width="35%"|[[API Panel.Position.GetEuler|GetEuler]]
 +
|Returns the positions euler angles in (P,Y,R) array
 +
|}
  
Coordinate manipulation functions
 
----
 
===Functions provided for this class===
 
{||-|[[API Panel.Position.Get|Get]]|Gets a handle to an object representing the components current position|-|[[API Panel.Position.GetOrigin|GetOrigin]]|Gets a handle to an empty position|-|[[API Panel.Position.Set|Set]]|Sets an objects position based on a component or pre-defined position|-|[[API Panel.Position.SetCoords|SetCoords]]|Sets an objects coordinates based on a position|-|[[API Panel.Position.SetScale|SetScale]]|Sets an objects scale based on a position|-|[[API Panel.Position.SetRotation|SetRotation]]|Sets an objects orientation based on a position|-|[[API Panel.Position.GetBox|GetBox]]|Gets a handle to an object representing the components bounding box position|-|[[API Panel.Position.Morph|Morph]]|Blends positions from two sources to a destination|-|[[API Panel.Position.Animate|Animate]]|Blends positions from two sources to a destination over time|-|[[API Panel.Position.StopAnimate|StopAnimate]]|Stops all animations started by this component|-|[[API Panel.Position.MoveAlong|MoveAlong]]|Moves the object by the given offset relative to its parent along an axis|-|[[API Panel.Position.MoveBy|MoveBy]]|Moves the object by the given offset relative to its parent|-|[[API Panel.Position.MoveTo|MoveTo]]|Moves the object to the given coordinates relative to its parent|-|[[API Panel.Position.ScaleTo|ScaleTo]]|Sets the objects scale to a value|-|[[API Panel.Position.ScaleUp|ScaleUp]]|Multiplies the objects scale by a value|-|[[API Panel.Position.ScaleDown|ScaleDown]]|Divides the objects scale by a value|-|[[API Panel.Position.RotateTo|RotateTo]]|Rotates the object to the given rotation|-|[[API Panel.Position.RotateAlong|RotateAlong]]|Rotates the object by the given rotation along an axis|-|[[API Panel.Position.RotateX|RotateX]]|Rotates the object around the X axis|-|[[API Panel.Position.RotateY|RotateY]]|Rotates the object around the Y axis|-|[[API Panel.Position.RotateZ|RotateZ]]|Rotates the object around the Z axis|-|[[API Panel.Position.GetCoords|GetCoords]]|Returns the positions coordinates inarray|-|[[API Panel.Position.GetScale|GetScale]]|Returns the positions scale inarray|-|[[API Panel.Position.GetQuat|GetQuat]]|Returns the positions quaternion inarray|-|[[API Panel.Position.GetEuler|GetEuler]]|Returns the positions euler angles inarray|-|[[API Panel.Position.Math|Math]]|Coordinate maths functions|-|[[API Panel.Position.Camera|Camera]]|Camera positioning|}
 
  
===Examples===
+
==Examples==
 +
===Moving a panel item===
 +
 
 +
Simple example showing how to detect for collisions between objects on the panel. An object moves back and forth between two fixed objects. Each time the moving object hits a static object it will change it's direction.
 +
 
 +
{{Fcfile|Collide.fcfx|Collide}}
 +
 
 +
==See also==
 +
''<span style="color:red;">No additional information</span>''

Latest revision as of 15:15, 11 May 2016

<sidebar>API Contents</sidebar> Coordinate manipulation functions

This class is contained within Panel.

Sub-classes provided for this class

Math Coordinate maths functions
Camera Camera positioning


Functions provided for this class

Get Gets a handle to an object representing the components current position
GetOrigin Gets a handle to an empty position
Set Sets an objects position based on a component or pre-defined position
SetCoords Sets an objects coordinates based on a position
SetScale Sets an objects scale based on a position
SetRotation Sets an objects orientation based on a position
GetBox Gets a handle to an object representing the components bounding box position
Morph Blends positions from two sources to a destination
Animate Blends positions from two sources to a destination over time
StopAnimate Stops all animations started by this component
MoveAlong Moves the object by the given offset relative to its parent along an axis
MoveBy Moves the object by the given offset relative to its parent
MoveTo Moves the object to the given coordinates relative to its parent
ScaleTo Sets the objects scale to a value
ScaleUp Multiplies the objects scale by a value
ScaleDown Divides the objects scale by a value
RotateTo Rotates the object to the given rotation
RotateAlong Rotates the object by the given rotation along an axis
RotateX Rotates the object around the X axis
RotateY Rotates the object around the Y axis
RotateZ Rotates the object around the Z axis
GetCoords Returns the positions coordinates in (X,Y,Z) array
GetScale Returns the positions scale in (X,Y,Z) array
GetQuat Returns the positions quaternion in (X,Y,Z,W) array
GetEuler Returns the positions euler angles in (P,Y,R) array


Examples

Moving a panel item

Simple example showing how to detect for collisions between objects on the panel. An object moves back and forth between two fixed objects. Each time the moving object hits a static object it will change it's direction.

FC6 Icon.png Collide

See also

No additional information