de.jreality.tools
Class DampedDraggingTool

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

public class DampedDraggingTool
extends AbstractTool

works just like the draggingTool has spezial feature: the movement of a dragged object is damped(if the corresponding flag is set ). If the mouse stops moving the object will "float" to the same Point as if no damping where selected you can modify how strong and fast the damping is

Author:
Gonska

Constructor Summary
DampedDraggingTool()
           
 
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.
 java.lang.String getDescription()
          Gives an overall description of this Tool.
 double getFeatherPow()
           
 double getLinearScaleFactor()
           
 boolean isFeathered()
           
 boolean isMoveChildren()
           
 void perform(ToolContext tc)
          This method is called when the tool is activated and any AxisState or TransformationMatrix of the current slots changes.
 void setFeathered(boolean feathered)
           
 void setFeatherPow(double featherPow)
           
 void setLinearScaleFactor(double linearScaleFactor)
           
 void setMoveChildren(boolean moveChildren)
           
 
Methods inherited from class de.jreality.scene.tool.AbstractTool
addCurrentSlot, equals, fullDescription, getActivationSlots, getCurrentSlots, getDescription, hashCode, removeCurrentSlot, setDescription
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DampedDraggingTool

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

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

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

setMoveChildren

public void setMoveChildren(boolean moveChildren)

isMoveChildren

public boolean isMoveChildren()

setFeathered

public void setFeathered(boolean feathered)

isFeathered

public boolean isFeathered()

setLinearScaleFactor

public void setLinearScaleFactor(double linearScaleFactor)

getLinearScaleFactor

public double getLinearScaleFactor()

setFeatherPow

public void setFeatherPow(double featherPow)

getFeatherPow

public double getFeatherPow()

getDescription

public java.lang.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.