SE_ptable_get

Retrieves all points in the point table within the supplied envelope

Usage syntax

LONG SE_ptable_get (SE_PTABLE ptable, SE_ENVELOPE *userwin, ULONG mask, void (*user_function) (void *argument, SE_SNAPPED_POINT *points, LONG count), void *argument);

Parameters
ptable The handle to a point table
userwin An SE_ENVELOPE structure; points inside this rectangle are returned via calls to a user-defined function.
mask The type mask for the points to retrieve; a value of zero retrieves all point types
user_function A pointer to a user function returning void
argument Argument to pass to the user-supplied function
points An array of SE_SNAPPED_POINT structures
count The number of SE_SNAPPED_POINT structures returned
Description

SE_ptable_get retrieves all points within the supplied envelope that satisfy the mask test. A point in the table satisfies the mask test only if a logical AND between the candidate’s point mask and the supplied mask is nonzero.

A user function is called to return points that satisfy the search. For efficiency, the user function returns a number of SE_SNAPPED_POINT structures each time it is called. The user function may be called more than once if a large number of SE_SNAPPED_POINT structures are to be returned.

The SE_SNAPPED_POINT structure is defined as follows:

typedef struct{
LFLOAT x,y,z;
ULONG  mask;

} SE_SNAPPED_POINT;

Tip: A useful display technique is to draw shapes concurrently with the point table loading, and to subsequently retrieve and draw the point polymarkers with a call to SE_ptable_get . Each polymarker is drawn only once, even if a point is present in different shapes and different layers. The color of each polymarker is based on the composite mask in the SE_SNAPPED_POINT structure.

Returns

The number of SNAPPED_POINT structures passed via calls to the user function
SE_FAILURE
SE_INVALID_POINTER