The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration:function FindNearestItemReal (mx, my, mz: double; ItemID: Tr3Item; var dist: double): longint;

The function FindNearestItemReal searches for the item which is closest to the point [mx,my,mz], and belongs to the item type ItemID. In order to search through all items in the data container, ItemID should be set to tkEverything. The function returns the distance Dist and the index of the closest item, which can be used to access the found item by means of GetItemParams and SetItemParams.

The distances between the reference point [mx,my,mz] and the items of the chart are calculated using real-world coordinates. Note, the principal difference between calculating the distances in the real-world and in the screen coordinate system.

Last Update: 2012-Oct-20