Home > Working with SGWorld > Window (IWindow6) > PixelToWorld
Returns the real world coordinates on the terrain, behind a specified pixel on the window.
JavaScript |
|
PixelToWorld( PixelX, PixelY, TypeFilterFlags) |
C# |
|
IWorldPointInfo6 PixelToWorld( int PixelX, int PixelY, WorldPointType TypeFilterFlags = WorldPointType.WPT_ALL) |
C++ |
|
HRESULT PixelToWorld( long PixelX, long PixelY, WorldPointType TypeFilterFlags, IWorldPointInfo6 ** pWorldPointInfo) |
Parameters
PixelX
The left-right coordinate in pixels of a specified point on the window. If this parameter is not specified, the method assumes that the x coordinate of the center of the window is requested.
PixelY
The top-bottom coordinate in pixels of a specified point on the window. If this parameter is not specified, the method assumes that the y-coordinate of the center of the window is requested.
TypeFilterFlags
The following are the possible WorldPointType enumeration values for this parameter:
· WPT_TERRAIN = 0
· WPT_MODEL = 1
· WPT_LABEL = 2
· WPT_PRIMITIVE = 4
· WPT_ANIM = 8
· WPT_BUILDING = 16
· WPT_SKY = 32
· WPT_ACCURATE_CPT = 64
· WPT_BBOX_CPT = 128
· WPT_VIDEO = 256
· WPT_UNDERGROUND = 512
· WPT_SCREEN_OVERLAY = 1024
· WPT_SCREEN_CONTROL = 2048
· WPT_SCREEN_COVERED = 4096
· WPT_ALL = -1
Return Value
pWorldPointInfo
An IWorldPointInfo6 representing information about the specified point.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.