de.jreality.tools
Class ClickWheelCameraZoomTool
java.lang.Object
de.jreality.scene.tool.AbstractTool
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
ClickWheelCameraZoomTool
public ClickWheelCameraZoomTool()
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)