de.jreality.tools
Class LineDragEvent

java.lang.Object
  extended by java.util.EventObject
      extended by de.jreality.tools.LineDragEvent
All Implemented Interfaces:
java.io.Serializable

public class LineDragEvent
extends java.util.EventObject

See Also:
Serialized Form

Constructor Summary
LineDragEvent(IndexedLineSet lineSet, int index, double[] translation, double[] position)
           
 
Method Summary
 int getIndex()
           
 IndexedLineSet getIndexedLineSet()
           
 int[] getLineIndices()
          BE CAREFUL: this method uses the line index when the drag started.
 double[][] getLineVertices()
          BE CAREFUL: this method uses the line index when the drag started.
 double[] getPosition()
           
 double[] getTranslation()
           
 double getX()
          The x-coordinate of this event's translation.
 double getY()
          The y-coordinate of this event's translation.
 double getZ()
          The z-coordinate of this event's translation.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineDragEvent

public LineDragEvent(IndexedLineSet lineSet,
                     int index,
                     double[] translation,
                     double[] position)
Method Detail

getX

public double getX()
The x-coordinate of this event's translation.


getY

public double getY()
The y-coordinate of this event's translation.


getZ

public double getZ()
The z-coordinate of this event's translation.


getTranslation

public double[] getTranslation()

getPosition

public double[] getPosition()

getIndex

public int getIndex()

getLineIndices

public int[] getLineIndices()
BE CAREFUL: this method uses the line index when the drag started. So it makes only sense to use it when the combinatorics of the indexed line set was not changed while dragging.

Returns:
an array containing the indices of the line vertices
Throws:
java.lang.ArrayIndexOutOfBoundsException

getLineVertices

public double[][] getLineVertices()
BE CAREFUL: this method uses the line index when the drag started. So it makes only sense to use it when the combinatorics of the indexed line set was not changed while dragging.

Returns:
an array containing the line vertices
Throws:
java.lang.ArrayIndexOutOfBoundsException

getIndexedLineSet

public IndexedLineSet getIndexedLineSet()