de.jreality.tools
Class FlyToPickTool

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

public class FlyToPickTool
extends AbstractTool

Tool to fly to a picked target without "fixedYAxis" the avatar will Fly to the picked destination, while rotating around the target. The animation stops at a fixed Ratio of the way from start to picked destination. with "fixedYAxis" enabled, the avatar will only rotate around the vertical Axis by the target, changing hight and distance. The Avatar and Camera stay in the same allign except turning around the Y Axis. By simulating a Scene with no specified up/Down-direktion one should use "fixedYAxis=false" Otherwise "fixedYAxis=true" is strongly recommend

Author:
gonska

Constructor Summary
FlyToPickTool()
           
 
Method Summary
 void activate(ToolContext tc)
          This method is called when the tool gets activated.
 void deactivate(ToolContext tc)
          this method is called when the tool was activate and the AxisState of the activation slot changes to AxisState.RELEASED - to zero.
 String getDescription()
          Gives an overall description of this Tool.
 double getFlightTime()
           
 double getGoFactor()
           
 boolean isHoldYAxis()
           
 void perform(ToolContext tc)
          This method is called when the tool is activated and any AxisState or TransformationMatrix of the current slots changes.
 void setFlightTime(double flightTime)
           
 void setGoFactor(double goFactor)
           
 void setHoldYAxis(boolean holdYAxis)
           
 
Methods inherited from class de.jreality.scene.tool.AbstractTool
fullDescription, getActivationSlots, getCurrentSlots, getDescription, setDescription
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlyToPickTool

public FlyToPickTool()
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

deactivate

public void deactivate(ToolContext tc)
Description copied from interface: Tool
this method is called when the tool was activate and the AxisState of the activation slot changes to AxisState.RELEASED - to zero. Note that it will never be called for always active tools.

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

perform

public void perform(ToolContext tc)
Description copied from interface: Tool
This method is called when the tool is activated and any AxisState or TransformationMatrix of the current slots changes.

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

getDescription

public String getDescription()
Description copied from interface: Tool
Gives an overall description of this Tool.

Specified by:
getDescription in interface Tool
Overrides:
getDescription in class AbstractTool
Returns:
A description of the Tool including information about activation and overall behaviour.

getFlightTime

public double getFlightTime()

setFlightTime

public void setFlightTime(double flightTime)

getGoFactor

public double getGoFactor()

setGoFactor

public void setGoFactor(double goFactor)

isHoldYAxis

public boolean isHoldYAxis()

setHoldYAxis

public void setHoldYAxis(boolean holdYAxis)