Gets information about the pointer position.
getMouseInfo(coord2D)
Parameter |
Description |
coord2D |
Out parameter. An SGCoord2D object that accepts the current mouse coordinates in the 3D window |
Return Value
An integer value that represents flags that indicates the states of the mouse buttons. Can be any combination of the following values:
Left button = 1
Right button = 2
Shift = 4
Control = 8
Middle button = 16
Remarks
In some scenarios, it is useful to query the pointer position during the SGWorld event onFrame and to use the returned information. For instance, to query the real world coordinate behind that pixel (using the pixelToWorld method).