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



FindEncircledData


Unit: SDL_rot3d
Class: TRot3D
Declaration: function FindEncircledData (pg: TPDblArray; var ItemList: TIntArray): integer;

The function FindEncircledData searches for all items which are within the polygonal trace specified by the property pg (assuming that the polygonal is closed, i.e. the last point of the trace is connected to the first point). The polygonal coordinates are screen coordinates. The function returns the number of found points which are inside the polygonal trace. The variable array ItemList returns the list of found items. This list is an array of indices which can be used with DataContainer to retrieve the actual data points.

Please note that both the ItemList and the DataContainer are zero-based arrays, thus in order to access for example the ith hit contained in ItemList you have to address it as follows: DataContainer[Items[i-1]-1].

Hint: The graphics elements are searched on the basis of their endpoints. This means that lines are found only if one of their endpoints is within the polgon pg.


Last Update: 2023-Dec-14