synergynetframework.jme.cursorsystem.elements.twod
Class OrthoSnap

java.lang.Object
  extended by synergynetframework.jme.cursorsystem.MultiTouchElement
      extended by synergynetframework.jme.cursorsystem.TwoDMultiTouchElement
          extended by synergynetframework.jme.cursorsystem.elements.twod.OrthoSnap

public class OrthoSnap
extends TwoDMultiTouchElement

The Class OrthoSnap.


Nested Class Summary
static interface OrthoSnap.SnapListener
          The listener interface for receiving snap events.
 
Field Summary
 
Fields inherited from class synergynetframework.jme.cursorsystem.MultiTouchElement
AXIS_Z, DIRECTION_UP
 
Constructor Summary
OrthoSnap(com.jme.scene.Spatial pickingAndTargetSpatial)
          Instantiates a new ortho snap.
OrthoSnap(com.jme.scene.Spatial pickingSpatial, com.jme.scene.Spatial targetSpatial)
          Instantiates a new ortho snap.
 
Method Summary
 void addSnapListener(OrthoSnap.SnapListener l)
          Adds the snap listener.
 void allowSnapToOccupiedLocation(boolean allowSnapToOccupiedLocation)
          Allow snap to occupied location.
 void cursorChanged(ScreenCursor c, MultiTouchCursorEvent event)
          Cursor changed.
 void cursorClicked(ScreenCursor c, MultiTouchCursorEvent event)
          Cursor clicked.
 void cursorPressed(ScreenCursor c, MultiTouchCursorEvent event)
          Cursor pressed.
 void cursorReleased(ScreenCursor c, MultiTouchCursorEvent event)
          Cursor released.
 float getTolerance()
          Gets the tolerance.
 boolean isAllowSnapToOccupiedLocation()
          Checks if is allow snap to occupied location.
 void removeSnapListener(OrthoSnap.SnapListener l)
          Removes the snap listener.
 void setFixLocations(java.util.List<FixLocationStatus> fixLocations)
          Sets the fix locations.
 void setTolerance(float tolerance)
          Sets the tolerance.
 
Methods inherited from class synergynetframework.jme.cursorsystem.TwoDMultiTouchElement
getCursorScreenPositionAtPick, getPickDataForCursorID, getPickResultFromCursorIndex, getSpatial2DWorldPositionAtPick, registerScreenCursor
 
Methods inherited from class synergynetframework.jme.cursorsystem.MultiTouchElement
addWorldCursorRecord, getCurrentScreenAngleDifferenceFromOrigin, getCurrentScreenCursorsAngle, getCurrentTargetSpatialRotationFromCursorChange, getName, getNumRegisteredCursors, getOriginScreenCursorsAngle, getPickingSpatial, getScaleAtOrigin, getScreenCursorByID, getScreenCursorByIndex, getScreenCursorOriginForCursorID, getTargetSpatial, getTranslationAtOrigin, getWorldLocations, isActive, isPickMeOnly, registerScreenCursor, setActive, setName, setPickMeOnly, unregisterScreenCursor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrthoSnap

public OrthoSnap(com.jme.scene.Spatial pickingAndTargetSpatial)
Instantiates a new ortho snap.

Parameters:
pickingAndTargetSpatial - the picking and target spatial

OrthoSnap

public OrthoSnap(com.jme.scene.Spatial pickingSpatial,
                 com.jme.scene.Spatial targetSpatial)
Instantiates a new ortho snap.

Parameters:
pickingSpatial - the picking spatial
targetSpatial - the target spatial
Method Detail

addSnapListener

public void addSnapListener(OrthoSnap.SnapListener l)
Adds the snap listener.

Parameters:
l - the l

allowSnapToOccupiedLocation

public void allowSnapToOccupiedLocation(boolean allowSnapToOccupiedLocation)
Allow snap to occupied location.

Parameters:
allowSnapToOccupiedLocation - the allow snap to occupied location

cursorChanged

public void cursorChanged(ScreenCursor c,
                          MultiTouchCursorEvent event)
Description copied from class: MultiTouchElement
Cursor changed.

Specified by:
cursorChanged in class MultiTouchElement
Parameters:
c - the c
event - the event

cursorClicked

public void cursorClicked(ScreenCursor c,
                          MultiTouchCursorEvent event)
Description copied from class: MultiTouchElement
Cursor clicked.

Specified by:
cursorClicked in class MultiTouchElement
Parameters:
c - the c
event - the event

cursorPressed

public void cursorPressed(ScreenCursor c,
                          MultiTouchCursorEvent event)
Description copied from class: MultiTouchElement
Cursor pressed.

Specified by:
cursorPressed in class MultiTouchElement
Parameters:
c - the c
event - the event

cursorReleased

public void cursorReleased(ScreenCursor c,
                           MultiTouchCursorEvent event)
Description copied from class: MultiTouchElement
Cursor released.

Specified by:
cursorReleased in class MultiTouchElement
Parameters:
c - the c
event - the event

getTolerance

public float getTolerance()
Gets the tolerance.

Returns:
the tolerance

isAllowSnapToOccupiedLocation

public boolean isAllowSnapToOccupiedLocation()
Checks if is allow snap to occupied location.

Returns:
true, if is allow snap to occupied location

removeSnapListener

public void removeSnapListener(OrthoSnap.SnapListener l)
Removes the snap listener.

Parameters:
l - the l

setFixLocations

public void setFixLocations(java.util.List<FixLocationStatus> fixLocations)
Sets the fix locations.

Parameters:
fixLocations - the new fix locations

setTolerance

public void setTolerance(float tolerance)
Sets the tolerance.

Parameters:
tolerance - the new tolerance