Previous: Mouse Motions, Up: Mouse Motions

#### 3.5.1 Selecting a Point of Interest

It is sometimes useful to specify a particular point on some object in a geomview window as the center point for mouse motions. You can do this by shift-clicking the right mouse button (i.e. click it once while holding down the shift key on the keyboard) with the cursor over the desired point. This point then becomes the point of interest. The point of interest must be on an existing object.

Selecting a point of interest simplifies examining a small portion of a larger object. Shift-right-click on an interesting point, and select Orbit mode. Use the middle mouse button to approach, and the left mouse to orbit the point, examining the region from different directions.

When you have selected a point of interest, the current center object changes to an object named "CENTER", which is an invisible object located at the point of interest. In addition, mouse motions for the window in which you made the selection are adjusted so that the point of interest follows the mouse.

You can change the point of interest at any time by selecting a new one by shift-clicking the right mouse button again. You can cancel the point of interest altogether by shift-clicking the right mouse button with the cursor on the background (i.e. not on any object). This changes the center object back to its default value, "target".

The object named "CENTER", which serves as the center object for the point of interest, is a special kind of geom called an "alien". It does not appear in the Targets browser. By default it has no geometry associated with it and hence is invisible. You can, however, explicitly give it some geometry using a GCL command, causing it to appear. Use the `geometry` command for this: `(geometry CENTER` geometry`)`, where geometry is any valid geometry. For example, `(geometry CENTER { < xyz.vect })` causes the file `xyz.vect`, which is one of the standard example files distributed with geomview, to be used at the geometry for CENTER. See `(geometry ...)`.

What happens internally when you select a point of interest is that the center is set to the object called CENTER, and that object is positioned at the point of interest. In addition, in order for mouse motions to track the point of interest, the current camera's focal length is set to be the distance from the camera to the point of interest. You can accomplish this via GCL with the following commands:

         (if (real-id CENTER) nil (new-alien CENTER {}))
         (ui-center CENTER)
         (transform-set CENTER universe universe translate x y z)
         (merge camera cam-id { focus d })

where `(`x`,`y`,`z`)` are the (universe) coordinates of the point of interest, and d is the distance from that point to the current camera, cam-id. The first command above creates the "alien" CENTER if it does not yet exist.