CreateLineOfSight
Creates a visual marker for the existence of a line of sight between two points.
JavaScript |
|
CreateLineOfSight( ViewerPosition, SampleInterval, arrTargetPosition, GroupID, Description) |
C# |
|
ILineOfSight80 CreateLineOfSight( IPosition80 ViewerPosition, double SampleInterval, object arrTargetPosition, string ParentGroupID = "", string Description) |
C++ |
|
HRESULT CreateLineOfSight( IPosition80 * ViewerPosition, double SampleInterval, VARIANT arrTargetPosition, BSTR ParentGroupID, BSTR Description, ILineOfSight80 ** pLineOfSight) |
Parameters
ViewerPosition
The position of the viewer, defined by its coordinates in the 3D world.
SampleInterval
The distance between terrain samples for the measurement along each line. A smaller sample size is more accurate but slower to calculate.
arrTargetPosition
An array of IPosition80 objects that contains the target positions in the 3D World.
ParentGroupID
The Project Tree group in which the line of sight object is created. If it is set to an empty string, the object is created under the root. You can obtain the GroupID by one of the following methods:
· Create the group using IProjectTree80.CreateGroup.
· Find the group, if you know the name, using IProjectTree80.FindItem.
· Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.
Description
The name of the line of sight object as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.
Return Value
pLineOfSight
An ILineOfSight80 representing the line of sight visual marker created.
Exceptions
HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:
TE_E_INFOTREE_PARENTNOTGROUP |
The group ID entered does not represent a valid group in the Project Tree. |
TE_E_INFOTREE_ITEMNOTGROUP |
The item entered is not a group and therefore cannot be used as a group. |
TE_E_INFOTREE_CANTUSEROOT |
Cannot use Tree root for this operation |
TE_E_INFOTREE_ITEMISGROUP |
Item ID is a group so an object cannot be retrieved. |