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 objeto in a geomview window as the center point for mouse movimentos. You can do this by shift-clicando the botão direito do mouse (i.e. clique 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 objeto.

Selecting a point of interest simplifies examining a small portion of a larger objeto. Shift-right-clique sobre o an interesting point, and select Orbit mode. Use the botã do meio do mouse 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 objeto do centro changes to an objeto named "CENTER", which is an invisible objeto located at the point of interest. In addition, mouse movimentos 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-clicando the botão direito do mouse again. You can cancel the point of interest altogether by shift-clicando the right botão do mouse with the cursor on the background (i.e. not on any objeto). This changes the objeto do centro back to its default value, "target".

The objeto named "CENTER", which serves as the objeto do centro 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 objeto called CENTER, and that objeto is positioned at the point of interest. In addition, in order for mouse movimentos to track the point of interest, the current camera's focal length is set to be the distance from the câmera 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.