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

From Flowcode Help
Jump to navigationJump to search
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Rotates the object by the given rotation along an axis
+
|-
 
+
| 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;" | '''RotateAlong'''
====Class hierarchy====
+
|-
[[API Panel|Panel]]
+
| colspan="2" | Rotates the object by the given rotation along an axis&nbsp;
:[[API Panel.Position|Position]]
+
|-
::[[API Panel.Position|RotateAlong]]
+
|-
</div>
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
__TOC__
+
| width="90%" | Handle
 
+
|-
==Parameters==
+
| colspan="2" | The position or component to update&nbsp;
[[Variable types|HANDLE]] ''Handle''
+
|-
:The position or component to update
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
:''The default value for this parameter is: '''''this'''
+
| width="90%" | Pivot
 
+
|-
[[Variable types|HANDLE]] ''Pivot''
+
| colspan="2" | The coordinates of the rotation center&nbsp;
:The coordinates of the rotation center
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
[[Variable types|HANDLE]] ''Axis''
+
| width="90%" | Axis
:An axis to align the angles to
+
|-
 
+
| colspan="2" | An axis to align the angles to&nbsp;
[[Variable types|FLOAT]] ''X_Pitch''
+
|-
:The local X degrees to increment by
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
:''The default value for this parameter is: '''''0'''
+
| width="90%" | X_Pitch
 
+
|-
[[Variable types|FLOAT]] ''Y_Yaw''
+
| colspan="2" | The local X degrees to increment by&nbsp;
:The local Y degrees to increment by
+
|-
:''The default value for this parameter is: '''''0'''
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
+
| width="90%" | Y_Yaw
[[Variable types|FLOAT]] ''Z_Roll''
+
|-
:The local Z degrees to increment by
+
| colspan="2" | The local Y degrees to increment by&nbsp;
:''The default value for this parameter is: '''''0'''
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
+
| width="90%" | Z_Roll
==Return value==
+
|-
''This call does not return a value''
+
| colspan="2" | The local Z degrees to increment by&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''
 +
|}
  
  
 
==Detailed description==
 
==Detailed description==
 
[[File:SIMAPI_Panel_Position_Rotate_Pic1.png|thumb|200px|right|Rotation around X]]
 
[[File:SIMAPI_Panel_Position_Rotate_Pic1.png|thumb|200px|right|Rotation around X]]
The rotation calls allow an object to be [[Object rotation|rotated]] around any point in any axis.
+
The rotation calls allow an object to be [[Object Rotation|rotated]] around any point in any axis.
  
The handle must be a valid handle to a component, or a quoted (string) name of an object that can be selected on the panel.
+
The ''Handle'' must be a valid handle to a component or [[Object Position|position]], or a quoted (string) name of an object that can be selected on the panel.
  
 
An object can rotate around it's own '''axis''', or around the axis of another object's axis(x,y,x). An axis is the direction an object is facing.
 
An object can rotate around it's own '''axis''', or around the axis of another object's axis(x,y,x). An axis is the direction an object is facing.
  
The '''Pivot''' is an optional position to rotate around. The object will adjust its angle as though it is sliding around the edge of a circle, so at 180 degrees the object will appear 'upside-down' in the same way as a human walking around the globe from the north to south pole.
+
The ''Pivot'' is a component or position to rotate around. The object will adjust its angle as though it is sliding around the edge of a circle, so at 180 degrees the object will appear 'upside-down' in the same way as a human walking around the globe from the north to south pole.
  
If the Pivot is zero the object rotates around its own center.
+
If the ''Pivot'' is zero the object rotates around its own center.
 +
 
 +
The ''Axis'' is the alignment to rotate around. Specifying zero will cause the object to rotate around its own axis, or this may be the handle of another component or position.
  
The '''axis''' is the alignment to rotate around. Specifying zero will cause the object to rotate around its own axis.
 
  
 
==Examples==
 
==Examples==
 
===Calling in a calculation===
 
===Calling in a calculation===
 
* Add to a calculation icon: <pre class="brush:[cpp]">::Panel.Position.RotateAlong(handle, pivot, axis, x_pitch, y_yaw, z_roll)</pre>
 
* Add to a calculation icon: <pre class="brush:[cpp]">::Panel.Position.RotateAlong(handle, pivot, axis, x_pitch, y_yaw, z_roll)</pre>
 
''<span style="color:red;">No additional information</span>''
 

Latest revision as of 11:54, 16 January 2023

Fc9-comp-macro.png RotateAlong
Rotates the object by the given rotation along an axis 
Fc9-h32-icon.png - HANDLE Handle
The position or component to update 
Fc9-h32-icon.png - HANDLE Pivot
The coordinates of the rotation center 
Fc9-h32-icon.png - HANDLE Axis
An axis to align the angles to 
Fc9-f32-icon.png - FLOAT X_Pitch
The local X degrees to increment by 
Fc9-f32-icon.png - FLOAT Y_Yaw
The local Y degrees to increment by 
Fc9-f32-icon.png - FLOAT Z_Roll
The local Z degrees to increment by 
Fc9-void-icon.png - NONE Return


Detailed description

Rotation around X

The rotation calls allow an object to be rotated around any point in any axis.

The Handle must be a valid handle to a component or position, or a quoted (string) name of an object that can be selected on the panel.

An object can rotate around it's own axis, or around the axis of another object's axis(x,y,x). An axis is the direction an object is facing.

The Pivot is a component or position to rotate around. The object will adjust its angle as though it is sliding around the edge of a circle, so at 180 degrees the object will appear 'upside-down' in the same way as a human walking around the globe from the north to south pole.

If the Pivot is zero the object rotates around its own center.

The Axis is the alignment to rotate around. Specifying zero will cause the object to rotate around its own axis, or this may be the handle of another component or position.


Examples

Calling in a calculation

  • Add to a calculation icon:
    ::Panel.Position.RotateAlong(handle, pivot, axis, x_pitch, y_yaw, z_roll)