Difference between revisions of "API Mouse.GetPosition"
(XML import of API documentation) |
(XML import) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
<sidebar>API Contents</sidebar> | <sidebar>API Contents</sidebar> | ||
Gets the position of the mouse, intersecting with a component or the viewing plane | Gets the position of the mouse, intersecting with a component or the viewing plane |
Revision as of 15:57, 16 January 2014
<sidebar>API Contents</sidebar> Gets the position of the mouse, intersecting with a component or the viewing plane
Contents
Parameters
This function has no parameters
Return value
Returns the position of the mouse, intersecting with a component or the viewing plane
Detailed description
This returns a position object, with the Z axis being a ray from the eye plane (intersecting the mouse) into the screen, and the coordinates being the intersection point of a component under the mouse. If no component under the mouse the ray intersection is the cameras target plane.
To calculate the mouse position a ray is projected into the screen. The first (i.e. nearest) solid object intersected by the mouse is considered to be the object under the mouse.
If the ray intersects the back plane before any other object, the distance along the ray from the eye is the same as the distance from the eye to the target.
Examples
Calling in a calculation
- Declare a variable 'result' of type HANDLE
- Add to a calculation icon:
result = ::Mouse.GetPosition()
No additional examples