Constructor and Description |
---|
DefaultDraggable(com.jme3.math.Vector2f start,
com.jme3.scene.Spatial spatial,
com.jme3.math.Vector3f origin,
com.jme3.math.Vector3f xAxis,
com.jme3.math.Vector3f yAxis)
Creates a DefaultDraggable that will set the location of the spatial in
3D space relative to the specified origin.
|
DefaultDraggable(com.jme3.renderer.ViewPort view,
com.jme3.scene.Spatial spatial,
com.jme3.math.Vector2f start)
Creates a 3D draggable that will move the specified spatial relative to
its current translation in a plane relative to the current viewport camera.
|
Modifier and Type | Method and Description |
---|---|
com.jme3.math.Vector2f |
getLocation()
Returns the current location of the draggable in camera/viewport space.
|
com.jme3.scene.Spatial |
getSpatial() |
void |
release()
Called when the drag session is done and the Draggable can
clean up any of its internal stuff.
|
void |
setLocation(float x,
float y)
Called by the drag session to update the position of the draggable
in camera/viewport space.
|
void |
updateDragStatus(DragStatus status)
Called by the drag session to update the drag status.
|
protected void |
updateTranslation() |
public DefaultDraggable(com.jme3.math.Vector2f start, com.jme3.scene.Spatial spatial, com.jme3.math.Vector3f origin, com.jme3.math.Vector3f xAxis, com.jme3.math.Vector3f yAxis)
public DefaultDraggable(com.jme3.renderer.ViewPort view, com.jme3.scene.Spatial spatial, com.jme3.math.Vector2f start)
public com.jme3.scene.Spatial getSpatial()
protected void updateTranslation()
public void setLocation(float x, float y)
Draggable
setLocation
in interface Draggable
public com.jme3.math.Vector2f getLocation()
Draggable
getLocation
in interface Draggable
public void updateDragStatus(DragStatus status)
Draggable
updateDragStatus
in interface Draggable