© 2006-2007 ETH Zurich

org.ximtec.igesture.util.additions3d
Class RecordedGesture3D

java.lang.Object
  extended by org.ximtec.igesture.util.additions3d.RecordedGesture3D
All Implemented Interfaces:
Cloneable, org.sigtec.input.InputHandler

public class RecordedGesture3D
extends Object
implements Cloneable, org.sigtec.input.InputHandler


Constructor Summary
RecordedGesture3D()
          Constructor
RecordedGesture3D(List<Point3D> points)
          Constructor
 
Method Summary
 void add(Point3D point)
          Adds a point to the gesture
 void addAll(List<Point3D> points)
          Adds a list of points to the gesture
 Object clone()
          Clones a recordedgesture3D.
 Point3D get(int index)
          Returns point by index
 Accelerations getAccelerations()
          Returns the list of acceleration data from this gesture
 long getDuration()
          Returns the duration of the gesture
 Point3D getEndPoint()
          Returns the end point of the gesture
 List<Point3D> getPoints()
          Returns the list of points
 Point3D getStartPoint()
          Returns the start point of the gesture
 void handle(Object invoker, org.sigtec.ink.input.TimestampedInputEvent timestampedEvent)
           
 boolean hasTimestamp()
          Returns true if the optional timestamp is available for all the points the trace contains.
 Iterator<Point3D> iterator()
          Returns an Iterator on points
 void remove(Point3D point)
          Removes a point from the gesture
 void setAccelerations(Accelerations accelerations)
          Sets an accelerations list for this gesture
 void setPoints(List<Point3D> pointsList)
          Sets a points list for this gesture
 int size()
          Returns the size of the points list
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordedGesture3D

public RecordedGesture3D()
Constructor


RecordedGesture3D

public RecordedGesture3D(List<Point3D> points)
Constructor

Parameters:
points - A list of Point3D to be set as the position data of this RecordedGesture3D
Method Detail

add

public void add(Point3D point)
Adds a point to the gesture

Parameters:
point - The Point3D to be added to the gesture

addAll

public void addAll(List<Point3D> points)
Adds a list of points to the gesture

Parameters:
points - The list of points to be added to the gesture

remove

public void remove(Point3D point)
Removes a point from the gesture

Parameters:
point - The point to be removed from the gesture

iterator

public Iterator<Point3D> iterator()
Returns an Iterator on points

Returns:
The Iterator on the points list

get

public Point3D get(int index)
Returns point by index

Parameters:
index - The index of the point to be returned
Returns:
The Point3D with the given index

getPoints

public List<Point3D> getPoints()
Returns the list of points

Returns:
The list of Point3D from this gesture

size

public int size()
Returns the size of the points list

Returns:
The size of the points list

getStartPoint

public Point3D getStartPoint()
Returns the start point of the gesture

Returns:
The start Point3D of the gesture

getEndPoint

public Point3D getEndPoint()
Returns the end point of the gesture

Returns:
The end Point3D of the gesture

getDuration

public long getDuration()
Returns the duration of the gesture

Returns:
The duration of the gesture in milliseconds

hasTimestamp

public boolean hasTimestamp()
Returns true if the optional timestamp is available for all the points the trace contains. It is assumed that either all or none of the points have a timestamp.

Returns:
true if a timestamp is available.

handle

public void handle(Object invoker,
                   org.sigtec.ink.input.TimestampedInputEvent timestampedEvent)
Specified by:
handle in interface org.sigtec.input.InputHandler

getAccelerations

public Accelerations getAccelerations()
Returns the list of acceleration data from this gesture

Returns:
The WiiAccelerations from this gesture

setAccelerations

public void setAccelerations(Accelerations accelerations)
Sets an accelerations list for this gesture

Parameters:
accelerations - The accelerations list WiiAccelerations object

setPoints

public void setPoints(List<Point3D> pointsList)
Sets a points list for this gesture

Parameters:
pointsList - The points list

clone

public Object clone()
Clones a recordedgesture3D.

Overrides:
clone in class Object
Returns:
the cloned recordedgesture3D.

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.