Home > Working with SGWorld > Window (IWindow6) > PixelFromWorld
This method returns an indication of whether a specified terrain coordinate is visible in the 3D Window. If it does, the screen coordinates of the specified pixel are returned.
JavaScript |
|
PixelFromWorld( Position, Mode) |
C# |
|
IScreenPointInfo6 PixelFromWorld( IPosition6 Position, int Mode = 0) |
C++ |
|
HRESULT PixelFromWorld( IPosition6 * Position, PixelFromWorldMode Mode, IScreenPointInfo6 ** pScreenPointInfo) |
Parameters
Position
The position of the specified coordinate, defined by its coordinates in the 3D world.
Mode
An enum that determines if the method takes obstructions into account. This affects the return value of the method that identifies if the world point is visible. This following are the possible values:
· PFW_IGNORE_Z_BUFFER
Visibility check is made only for the world point. If the point is in the view and obstructed by other objects or by the terrain the result is TRUE.
· PFW_USE_Z_BUFFER
Visibility check is made only for the world point with regards to other objects and all the terrain. If the point is in the view and obstructed by other objects or by the terrain the result is FALSE.
Return Value
PScreenPointInfo
An IScreenPointInfo6 representing the pixel and its visibility status in the 3D window.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.