This document is archived and information here might be outdated.  Recommended version.


IGlobeDisplay.LocateLayers Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GlobeCore)  

IGlobeDisplay.LocateLayers Method

Find the object and location in the line of sight.

[Visual Basic .NET]
Public Sub LocateLayers ( _
    ByVal pViewer As ISceneViewer, _
    ByVal xView As Integer, _
    ByVal yView As Integer, _
    ByVal pLayers As IEnumLayer, _
    ByVal bGetLocation As Boolean, _
    ByVal bGetTransformed As Boolean, _
    ByVal bGetEmptyGlobe As Boolean, _
    ByVal bFeaturesOnly As Boolean, _
    ByVal bTopMost As Boolean, _
    ByRef ppHits As IHit3DSet, _
    ByVal pTrackCancel As ITrackCancel _
)
[C#]
public void LocateLayers (
    ISceneViewer pViewer,
    int xView,
    int yView,
    IEnumLayer pLayers,
    bool bGetLocation,
    bool bGetTransformed,
    bool bGetEmptyGlobe,
    bool bFeaturesOnly,
    bool bTopMost,
    ref IHit3DSet ppHits,
    ref ITrackCancel pTrackCancel
);
[C++]
HRESULT LocateLayers(
  ISceneViewer* pViewer,
  long xView,
  long yView,
  IEnumLayer* pLayers,
  VARIANT_BOOL bGetLocation,
  VARIANT_BOOL bGetTransformed,
  VARIANT_BOOL bGetEmptyGlobe,
  VARIANT_BOOL bFeaturesOnly,
  VARIANT_BOOL bTopMost,
  IHit3DSet** ppHits,
  ITrackCancel* pTrackCancel
);
[C++]

Parameters pViewer [in]
pViewer is a parameter of type ISceneViewer xView [in] xView is a parameter of type long yView [in] yView is a parameter of type long pLayers [in]
pLayers is a parameter of type IEnumLayer bGetLocation [in] bGetLocation is a parameter of type VARIANT_BOOL bGetTransformed [in] bGetTransformed is a parameter of type VARIANT_BOOL bGetEmptyGlobe [in] bGetEmptyGlobe is a parameter of type VARIANT_BOOL bFeaturesOnly [in] bFeaturesOnly is a parameter of type VARIANT_BOOL bTopMost [in] bTopMost is a parameter of type VARIANT_BOOL ppHits [out]
ppHits is a parameter of type IHit3DSet pTrackCancel [in]
pTrackCancel is a parameter of type ITrackCancel

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

This method returns a set of objects (ppHits) hit by the line of sight from the observer location in the window coordinates xView, yView in pViewer. It will return hits only in the layer pLayers.

If bGetLocation is True, it indicates that the hit point coordinates must be returned. 
If both bGetLocation and bGetTransformed are True, it indicates that the returned coordinates must be in the internal geocentric coordinate system. If bGetTransformed=False, the returned hit point coordinates are in the Globe Spatial Reference: longitude, latitude and altitude in kilometers.
If bGetEmptyGlobe is True, a hit will be added for the base globe surface, even if it doesn't contain any layer.

If bTopMost is True, it will return only one hit to the topmost layer.
If bFeaturesOnly is True, only hits to features will be returned (hits to elevation surfaces will not).

pTrackCancel allows the user to cancel the method.

See Also

IGlobeDisplay Interface