Difference between revisions of "API Mouse.GetClickSide"
From Flowcode Help
Jump to navigationJump to search (XML import) |
(XML import) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <sidebar>API | + | <sidebar>API Contents</sidebar> |
− | Gets the side of the component clicked on, 0 to | + | Gets the side of the component clicked on, 0 to 5 |
<div style="width:25%; float:right" class="toc"> | <div style="width:25%; float:right" class="toc"> | ||
− | ===Class hierarchy=== | + | ====Class hierarchy==== |
− | + | [[API Mouse|Mouse]] | |
− | : | + | :[[API Mouse|GetClickSide]] |
</div> | </div> | ||
__TOC__ | __TOC__ | ||
Line 11: | Line 11: | ||
==Parameters== | ==Parameters== | ||
''This function has no parameters'' | ''This function has no parameters'' | ||
+ | |||
==Return value== | ==Return value== | ||
− | [[Variable | + | [[Variable Types|BYTE]] |
+ | |||
+ | Returns the side of the component clicked on, 0 to 5 | ||
− | |||
==Detailed description== | ==Detailed description== | ||
− | + | This call retrieves the face of the bounding box intersected by the mouse. This is always the closest face to the screen. | |
+ | |||
+ | [[file:SIMAPI Mouse.GetPosition Faces.svg|thumb|none|Face numbers]] | ||
+ | The faces of the bounding box are ordered according to the following table: | ||
+ | {| | ||
+ | |- | ||
+ | !Face | ||
+ | !Position | ||
+ | |- | ||
+ | |0 | ||
+ | |XY plane, Z=-1 | ||
+ | |- | ||
+ | |1 | ||
+ | |YZ plane, X=-1 | ||
+ | |- | ||
+ | |2 | ||
+ | |XZ plane, Y=-1 | ||
+ | |- | ||
+ | |3 | ||
+ | |XZ plane, Y=1 | ||
+ | |- | ||
+ | |4 | ||
+ | |YZ plane, X=1 | ||
+ | |- | ||
+ | |5 | ||
+ | |XY plane, Z=1 | ||
+ | |} | ||
+ | Each face, when added to the opposite face on the cube, adds up to 5 (so each YZ face = 1 + 4 = 5). | ||
+ | |||
==Examples== | ==Examples== | ||
Line 24: | Line 54: | ||
* Declare a variable 'result' of type BYTE | * Declare a variable 'result' of type BYTE | ||
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Mouse.GetClickSide()</pre> | * Add to a calculation icon: <pre class="brush:[cpp]">result = ::Mouse.GetClickSide()</pre> | ||
+ | |||
+ | ''<span style="color:red;">No additional examples</span>'' |
Latest revision as of 15:57, 16 January 2014
<sidebar>API Contents</sidebar> Gets the side of the component clicked on, 0 to 5
Contents
Parameters
This function has no parameters
Return value
Returns the side of the component clicked on, 0 to 5
Detailed description
This call retrieves the face of the bounding box intersected by the mouse. This is always the closest face to the screen.
The faces of the bounding box are ordered according to the following table:
Face | Position |
---|---|
0 | XY plane, Z=-1 |
1 | YZ plane, X=-1 |
2 | XZ plane, Y=-1 |
3 | XZ plane, Y=1 |
4 | YZ plane, X=1 |
5 | XY plane, Z=1 |
Each face, when added to the opposite face on the cube, adds up to 5 (so each YZ face = 1 + 4 = 5).
Examples
Calling in a calculation
- Declare a variable 'result' of type BYTE
- Add to a calculation icon:
result = ::Mouse.GetClickSide()
No additional examples