de.jreality.tools
Class ClickWheelCameraZoomTool

java.lang.Object
  extended by de.jreality.scene.tool.AbstractTool
      extended by de.jreality.tools.ClickWheelCameraZoomTool
All Implemented Interfaces:
Tool

public class ClickWheelCameraZoomTool
extends AbstractTool

This class uses the mouse wheel to implement a simple camera zoom tool. Scrolling up zooms out, scrolling down zooms in.

It has two input slots which are included in the standard configuration file with the names "PrimaryUp" and "PrimaryDown". By default they are attached to the mouse wheel.

Each up click of the wheel results in zooming in on the camera; each down click results in zooming out.

There is a settable speed control (#setSpeed(double)) which controls how large each zoom step is.

Author:
Charles Gunn

Constructor Summary
ClickWheelCameraZoomTool()
           
 
Method Summary
 void activate(ToolContext tc)
          This method is called when the tool gets activated.
 double getSpeed()
           
 void setSpeed(double speed)
           
 
Methods inherited from class de.jreality.scene.tool.AbstractTool
addCurrentSlot, deactivate, equals, fullDescription, getActivationSlots, getCurrentSlots, getDescription, getDescription, hashCode, perform, removeCurrentSlot, setDescription
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClickWheelCameraZoomTool

public ClickWheelCameraZoomTool()
Method Detail

activate

public void activate(ToolContext tc)
Description copied from interface: Tool
This method is called when the tool gets activated. Note that it will never be called if the tool is always active.

Specified by:
activate in interface Tool
Overrides:
activate in class AbstractTool
Parameters:
tc - The current tool context

getSpeed

public double getSpeed()

setSpeed

public void setSpeed(double speed)