Synopsis
define the Graphics Display Kit pick information
GDpick_info_templ
group+OPort GDpick_info_templ
{
float objxform[4][4];
float topxform[4][4];
float viewxform[4][4];
int selected;
int npicked;
GDpick_data pick_data[npicked]; // See below for GDpick_data.
group &src_field;
group &view;
group &camera;
int nobjs;
group *objects[nobjs];
ptr+nonotify local_ptr;
};
GDpick_info
GDpick_info_templ GDpick_info
{
method+notify_deinst del_func = "GDpick_info_delete";
};
GDpick_info DefaultPickInfo;
Description
These templates define the Graphics Display Kit pick information. GDpick_info_templ defines the elements that make up the base template. GDpick_info defines an instanceable version without default values. DefaultPickInfo defines an instanceable version with default values.
The pick information is attached to a Graphics Display Kit object. The pick information is an output of the Graphics Display Kit. It is updated when you pick the object. If no pick information is attached to the object, it cannot be picked.
Parameters
objxform
The transformation matrix of the object from top to the object, including the object itself.
topxform
The transformation matrix of the object from top to the object, not including the object itself.
viewxform
The transformation matrix of the camera in which the object was selected. The matrix along with objxform provide the full transformation that was applied to the object to render it.
selected
This parameter indicates if the object is currently selected. 1 means the object is selected; 0 means the object is not selected. This value should be used instead of the npicked subobject which indicates the size of the Pick Data array.
npicked
The number of points actually picked in the object. This number is always 1, only the front-most point is picked.
pick_data
One occurrence of a GDpick_data object for each point picked.
src_field
The source field from which the picked field was generated. This is used by the GDpick_process module to map a pick back to the original source field.
view
The picked object's view. An object can be rendered in several views; view is automatically connected to the view where the object was selected.
camera
The picked object's camera. An object can be connected to several cameras; camera is automatically connected to the camera where the object was selected.
nobjs
The number of objects in the object hierarchy leading to the picked object. nobjs is updated automatically.
objects
An array of connections to the objects in the picked object's hierarchy. For example, if picked-object A is a child of object GroupObject, then objects consists of connections to, in order, GroupObject and A. objects is updated automatically.
Example
Libraries.Graphics_Display.Objects.DataObject
File
v/gdif.v