PixelFromWorld

This method returns an indication of whether a specified terrain coordinate is visible in the 3D Window. If it is visible, the screen coordinates of the specified pixel are returned.

 

JavaScript

 

PixelFromWorld(

       Position,

       Mode)

 

C#

 

IScreenPointInfo80 PixelFromWorld(

       IPosition80 Position,

       PixelFromWorldMode Mode = PixelFromWorldMode.PFW_IGNORE_Z_BUFFER)

 

C++

 

HRESULT PixelFromWorld(

       IPosition80 * Position,

       PixelFromWorldMode Mode,

       IScreenPointInfo80 ** 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 in determining the visibility of  the world point. This following are the possible values:

·          PFW_IGNORE_Z_BUFFER = 0

Visibility check is made only for the world point. If the point is in the view, the result is TRUE even if it is obstructed by other objects or by the terrain.

·          PFW_USE_Z_BUFFER = 1

Visibility check is made for the world point taking into account other objects and all the terrain. If the point is in the view but obstructed by other objects or by the terrain the result is FALSE.

Return Value

PScreenPointInfo

An IScreenPointInfo80 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.