Next: , Previous: Loading, Up: Interaction


3.5 Using the Mouse to Manipulate Objects

Geomview permite a você manipular objetos com o mouse. Existem seis diferentes modos de movimento do mouse: rotação (Rotate), translação (Translate), vôo da câmera (Cam Fly), zoom da câmera (Cam Zoom), homotetia de um objeto geométrico (Geom Scale), e órbita de câmera (Cam Orbit). O painel de ferramentas tem um botão para cada um desses modos; para tracar os modos, clique sobre o botão correspondente. você pode também selecionar um modo através do navegador de modos de movimento (Motion Mode) no painel principal (Main).

Essa seção descreve a interação básica com o mouse. Para detalhes, veja Commands.

figs/tools.png

Figure 3.4: O Painel de Ferramentas.

Cada um dos modos de movimento usa um paradigma comum para como o movimento é aplicado. Em particular, cada modo de movimento depende do objeto alvo (target) atual e do atual objeto do centro (center. O obejto alvo atual e o atual objeto do centro são explicados nos parágrafos seguintes.

O objeto alvo atual é mostrado no campo Target no painel de ferramentas (Tools). Isso é o mesmo que o objeto selecionado no navegador de alvos (Targets) no painel principal (Main), e você pode mudar o alvo ou selecionando um novo objeto no navegador, digitando uma nova entrada no campo, ou selecionando um objeto na janela de câmera duplo-clicando no botão direito do mouse com o cursor sobre o objeto.

O atual objeto do centro é mostrado no campo Center no painel de ferramentas(Tools). Seu valor padrão é a palavra especial "target", que significa que o odbjeto do centro é o objeto que estiver designado como objeto alvo. Você pode mudar o objeto atual do centro para qualquer objeto digitando seu nome no campo Center. A orígem do objeto do centro é mantido fixo no modo rotação Rotate e no modo Orbit. Normalmente o objeto do centro é um dos objetos geométricos (geoms) existentes listados no navegador de alvos (Targets), o centro atual das rotações é a orígem daquele sistema de coordenadas daquele objeto. É possível, todavia, selecionar um ponto arbitrário de interesse sobre um objeto como o centro. Para detalhes, veja Point of Interest.

Isso também é possível mudando o botão BBox Center para escolher o centro de movimento como sendo o centro do objeto atual da caixa associada. Uma vez modificado o centro da caixa geométrica ativa associada irá tornar-se o centro do movimento, se você selecionar outro objeto, então o centro do movimento irá tornar-se o centro da caixa associada à aquele objeto. Nada modificação ocorrerá quando uma câmera ou o mundo (World) for selecionado, você tem que digitar a palavra target no campo Center para retornar ao valor padrão.

Você aplica um movimento de mouse pressionando ou o botão esquerdo ou o botão do meio do mouse com o cursor em uma janela de câmera e movendo o mouse. A maioria dos modos de movimento possui inércia (inertia), que significa que se você soltar o botão enquanto move o mouse, o movimento irá continuar. Para imaginar a inércia pode ser útil imaginar o cursor do mouse como sendo uma alça; quando você pressiona um botão do mouse para baixo, o mouse agarra firmemente no objeto alvo e você pode mover esse objeto. Quando você libera o botão do mouse, a alça libera o objeto. Liberando o botão do mouse enquanto move o mesmo é como abandonar o objeto — o objeto continua movendo-se independentemente do mouse. Inércia pode ser desligada; veja o menu de movimento (Motion) no painel principal (Main), descrito abaixo.

Generally, the botão esquerdo do mouse controla movimento no plano da tela, enquanto o botão médio do mouse controla movimento ao longo ou em torno da direção de avanço.

Pressionando o tecla "shift" enquanto arrasta com o botão esquerdo ou médio do mouse na maioria dos modos de movimento fornece movimentos de baixa velocidade , útil para ajustes finos.

Você pode selecionar qualquer ponto sobre um objeto (não apenas sua orígem) como centro do movimento pressionando a tecla "shift" enquanto clica no botão direito do mouse; isso escolhe o ponto de interesse.

Rotate
No modo rotação (Rotate), pressione o botão esquerdo do mouse para rotacionar o objeto alvo en torno do objeto do centro. A rotação ocorre na direção que você move o mouse. Especificamente, o eixo de rotação passa através da orígem do objeto do centro, é paralelo ao plano de visão da câmera, e é perpendicular à direção do movimento do mouse. Quando o centro for o alvo ("target"), isso significa que o objeto alvo rotaciona em torno de sua própria orígem.

O botã do meio do mouse no modo de movimento tipo rotação (Rotate) rotaciona o objeto alvo em torno de um eixo perpendicular ao plano de visão.

Translate
In Translate mode, hold the botão esquerdo do mouse down to translate the objeto alvo in the direction of mouse movimento. The middle mouse botão translates the target along an axis perpendicular to the view plane.

In Euclidean space, the objeto do centro is essentially irrelevant for translations. In hyperbolic and spherical spaces, where translations have a unique axis, this axis is chosen to go through the origin of the objeto do centro.

Cam Fly
Cam Fly is a crude flight simulator that lets you fly around the scene. It works by moving the camera. Move the mouse while holding the botão esquerdo do mouse down to point the câmera in a different direction. To move forward or backward, hold down the botã do meio and move the mouse vertically. Both of these movimentos have inertia; typically the easiest way to fly around a scene is to give the câmera a slight forward push by letting go of the botã do meio while moving the mouse upward, and then using the left botão to steer.

Cam Fly affects the janela de câmera that the mouse is in; it ignores the objeto alvo and the objeto do centro.

Cam Orbit
Cam Orbit mode lets you rotate the current câmera around the current center. The botão esquerdo do mouse does this rotation. The middle botão do mouse in Cam Orbit mode acts as in Cam Fly mode: it moves the câmera forward or backward.

In general Cam Orbit does not move the objeto alvo, although if the current câmera is selected as the target and the center is also the target, it will pivot that câmera about itself just as in Cam Fly mode.

Cam Zoom
Cam Zoom mode lets you change the current camera's field of view with the mouse; hold the botão esquerdo do mouse down and move the mouse to change it. The numeric value of the field of view is shown in the FOV field in the Camera panel.
Geom Scale
Geom Scale mode lets you enlarge or shrink a geom. It operates on the objeto alvo if that objeto is a geom. If the target is a camera, Geom Scale operates on the geom that was most recently the objeto alvo. Moving the mouse while holding down the botão esquerdo do mouse scales the objeto either up or down, depending on the direction of mouse movimento. The center of the applied scaling transformation is the objeto do centro.

Scaling is meaningful only in Euclidean space; attempts to scale are ignored in other spaces.

Geom Scale mode does not have inertia.

The Stop, Look At, Center, and Reset botões on the Tools panel perform actions related to movimentos but do not change the current modo de movimento.

Stop
The Stop botão causes all movimentos to stop. It affects all moving objetos, not just the objeto alvo. Its tecla de atalho is H.

The keyboard command h, which does not correspond to a panel botão, stops the current movimento for the objeto alvo only.

Look At
The Look At botão causes the current câmera to be moved to a position such that it is looking at the objeto alvo, and such that the objeto alvo more or less fills the window.

The Look At command is unreliable in non-Euclidean spaces.

Center
The Center botão undoes the objeto alvo's transformation, moving it back to its home position, which is where it was when you originally loaded it into Geomview.
Reset
The Reset botão stops all movimento and causes all objetos to move back to their home positions.

The Tools panel also sports a Main botão, to invoke the main panel in case it was dismissed or buried, and a Done botão to close the Tools panel.

The Main panel's Motion menu has special controls affecting how mouse movimentos are interpreted; the toggles are also accessible through a GCL command. See (ui-motion ...).

[ui] Inertia
Normally, moving objetos have inertia: if the mouse is still moving when the botão is released, the selected objeto continues to move. When Inertia is off, objetos cease to move as soon as you release the mouse.
[uc] Constrain Motion
It's sometimes handy to move an objeto in a direction aligned with a coordinate axis: exactly horizontally or vertically. Selecting Constrain Motion changes the interpretation of mouse movimentos to allow this; approximately-horizontal or approximately-vertical mouse dragging becomes exactly horizontal or vertical movimento. Note that the movimento is still along the X or Y axes of the câmera in which you move the mouse, not necessarily the objeto's own coordinate system.
[uo] Own Coordinates
It's sometimes handy to move objetos with respect to the coordinate system where they were defined, rather than with respect to some camera's view. While Own Coordinates is selected, all movimentos are interpreted that way: dragging the mouse rightward in translate mode moves the objeto in its own +X direction, and so on. May be especially useful in conjunction with the Constrain Motion botão.