IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]


14.6 Pick-Assistance Routines

The pick structure output of the Pick tool is a Field and the picked points are listed in the "positions" component of that Field. Other information may be accessed using the pick-assistance routines listed here. These allow you to query the pick structure and to traverse a picked Object. (See 9.2 , "ShowPick Module Example--Using Color to Show a Picked Object".)

It is recommended that you use the pick-assistance routines to manipulate picked Objects and pick structures, since the pick structure is undefined internally and may change in future.

Error DXGetPickPoint()

Returns the pick point in world coordinates. See DXGetPickPoint.

Error DXQueryPickCount()

Returns the number of picks resulting from a poke. See "Example". See DXQueryPickCount.

Error DXQueryPickPath()

Returns information about the pick path. See "Example". See DXQueryPickPath.

Error DXQueryPokeCount()

Returns the number of pokes. See "Example". See DXQueryPokeCount.

Error DXTraversePickPath()

Returns the subObject of the current Object selected by a pick path. See "Example". See DXTraversePickPath.

Example

The following code segment finds every picked vertex. (The comment at bottom is left as an exercise for the user.)

       DXQueryPokeCount(pickField, &nPokes);
       for (poke = 0; poke < nPokes; poke++)
       {
           DXQueryPickCount(pickField, poke, &nPicks);
           for (pick = 0; pick < nPicks; pick++)
           {
               DXQueryPickPath(pickField, poke, pick,
                               &pathLen, &path, &elementId, &vertexId);
               current = dataObject;
               matrix  = Identity;
               for (i = 0; i < pathLen; i++)
               {
                   current = DXTraversePickPath(current, path[i], &matrix);
                   if (current == NULL)
                       goto error;
               }
            /* now manipulate vertex #vertexId in field current. */
           }
       }


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]


[IBM Home Page | Order | Search | Contact IBM | Legal ]