org.jdesktop.wonderland.client.jme.input
Class MouseDraggedEvent3D

java.lang.Object
  extended by org.jdesktop.wonderland.client.input.Event
      extended by org.jdesktop.wonderland.client.jme.input.InputEvent3D
          extended by org.jdesktop.wonderland.client.jme.input.MouseEvent3D
              extended by org.jdesktop.wonderland.client.jme.input.MouseMovedEvent3D
                  extended by org.jdesktop.wonderland.client.jme.input.MouseDraggedEvent3D
All Implemented Interfaces:
java.io.Serializable

public class MouseDraggedEvent3D
extends MouseMovedEvent3D

An event which indicates that a mouse drag action occurred.

Author:
deronj
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.wonderland.client.jme.input.MouseEvent3D
MouseEvent3D.ButtonId
 
Nested classes/interfaces inherited from class org.jdesktop.wonderland.client.jme.input.InputEvent3D
InputEvent3D.ModifierId
 
Field Summary
protected  org.jdesktop.mtgame.PickDetails hitPickDetails
          The raw pick details of the actual pick hit.
 
Fields inherited from class org.jdesktop.wonderland.client.jme.input.MouseEvent3D
world2Local
 
Fields inherited from class org.jdesktop.wonderland.client.jme.input.InputEvent3D
awtEvent
 
Fields inherited from class org.jdesktop.wonderland.client.input.Event
entity, EVENT_CLASS_ID, isFocussed
 
Constructor Summary
protected MouseDraggedEvent3D()
          Default constructor (for cloning)
 
Method Summary
 Event clone(Event event)
          Copy the members of this class into the given event.
static com.jme.math.Vector3f getDragVectorWorld(int eventX, int eventY, com.jme.math.Vector3f dragStartWorld, java.awt.Point dragStartScreen, com.jme.math.Vector3f ret)
           
 com.jme.math.Vector3f getDragVectorWorld(com.jme.math.Vector3f dragStartWorld, java.awt.Point dragStartScreen, com.jme.math.Vector3f ret)
          Returns the drag vector in world coordinates relative to the last mouse button press point.
 float getHitDistance()
          Returns the distance from the eye to the intersection point, based on the actual hit pick details.
 org.jdesktop.mtgame.Entity getHitEntity()
          Returns the actually entity hit by the event.
 com.jme.math.Vector3f getHitIntersectionPointLocal()
          Returns the intersection point in object (node) local coordinates, based on the actual hit pick details.
 com.jme.math.Vector3f getHitIntersectionPointWorld()
          Returns the intersection point in world coordinates, based on the actual hit pick details.
 org.jdesktop.mtgame.PickDetails getHitPickDetails()
          Returns the raw hit pick details of this drag event.
 void setHitPickDetails(org.jdesktop.mtgame.PickDetails hitPickDetails)
          Used by InputPicker to specify the raw hit pick details of this drag event.
 java.lang.String toString()
          
 
Methods inherited from class org.jdesktop.wonderland.client.jme.input.MouseEvent3D
getButton, getDistance, getEntity, getIntersectionPointLocal, getIntersectionPointWorld, getNode, getPickDetails, setPickDetails
 
Methods inherited from class org.jdesktop.wonderland.client.jme.input.InputEvent3D
getAwtEvent, getID, getModifiersEx, getPickInfo, getWhen, setPickInfo
 
Methods inherited from class org.jdesktop.wonderland.client.input.Event
allocateEventClassID, free, getClassID, isFocussed, setEntity, setFocussed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hitPickDetails

protected org.jdesktop.mtgame.PickDetails hitPickDetails
The raw pick details of the actual pick hit.

Constructor Detail

MouseDraggedEvent3D

protected MouseDraggedEvent3D()
Default constructor (for cloning)

Method Detail

setHitPickDetails

public void setHitPickDetails(org.jdesktop.mtgame.PickDetails hitPickDetails)
Used by InputPicker to specify the raw hit pick details of this drag event.
INTERNAL ONLY


getHitPickDetails

public org.jdesktop.mtgame.PickDetails getHitPickDetails()
Returns the raw hit pick details of this drag event.


getHitEntity

public org.jdesktop.mtgame.Entity getHitEntity()
Returns the actually entity hit by the event.


getHitDistance

public float getHitDistance()
Returns the distance from the eye to the intersection point, based on the actual hit pick details. which were calculated by the input system. (This distance is in world coordinates). If the event has no hit pick details, 0 is returned.


getHitIntersectionPointWorld

public com.jme.math.Vector3f getHitIntersectionPointWorld()
Returns the intersection point in world coordinates, based on the actual hit pick details.


getHitIntersectionPointLocal

public com.jme.math.Vector3f getHitIntersectionPointLocal()
Returns the intersection point in object (node) local coordinates, based on the actual hit pick details.


getDragVectorWorld

public com.jme.math.Vector3f getDragVectorWorld(com.jme.math.Vector3f dragStartWorld,
                                                java.awt.Point dragStartScreen,
                                                com.jme.math.Vector3f ret)
Returns the drag vector in world coordinates relative to the last mouse button press point. While dragging, the returned value is the pointer movement vector projected into the plane of the drag start (mouse button press) point.

Parameters:
ret - An Vector3f in which to store the drag vector. If null a new vector is created.
Returns:
The argument ret is returned. If it was null a new vector is returned.

getDragVectorWorld

public static com.jme.math.Vector3f getDragVectorWorld(int eventX,
                                                       int eventY,
                                                       com.jme.math.Vector3f dragStartWorld,
                                                       java.awt.Point dragStartScreen,
                                                       com.jme.math.Vector3f ret)

toString

public java.lang.String toString()

Overrides:
toString in class MouseMovedEvent3D

clone

public Event clone(Event event)
Copy the members of this class into the given event.
If event is null, a new event of this class is created and returned.
If event is null, a new event of this class is created and returned.
NOTE: any state set by setPressPointScreen and getDragVectorWorld is not copied into the newly cloned object.

Overrides:
clone in class MouseMovedEvent3D


Open Wonderland - http://openwonderland.org