PenSample Class Reference

List of all members.

Public Member Functions

 PenSample (double xVal, double yVal, int f, long ts)
 PenSample (double theX, double theY, int theForce, long theTimestamp, boolean isPenUp)
double getDistanceFrom (PenSample otherSample)
int getForce ()
Date getTime ()
long getTimestamp ()
double getX ()
double getY ()
boolean isPenUp ()
void setForce (int f)
void setPenUp (boolean b)
 Does this sample represent a Pen Up? Perhaps we should subclass PenSample, instead of storing another field in here? It seems a little wasteful if most samples are not pen up samples.
void setTimestamp (long t)
void setX (double xVal)
void setY (double yVal)
String toCommaSeparatedString ()
String toString ()
String toXMLString ()
 So far, this is used when communicating with Flash in real time.

Public Attributes

int force
 measure of force from pen tip
boolean penUp
 whether pen is up
long timestamp
 timestamp of server when received
double x
 x location of the point, in physical Anoto coordinates TODO: Make these private later.
double y
 y location of the point, in physical Anoto coordinates

Detailed Description

Stores a pen sample or ink samples.

This software is distributed under the BSD License.

Author:
Ron B Yeh (ronyeh(AT)cs.stanford.edu)

Joel Brandt

Definition at line 22 of file PenSample.java.


Constructor & Destructor Documentation

PenSample ( double  xVal,
double  yVal,
int  f,
long  ts 
)

Parameters:
xVal 
yVal 
f 
ts 

Definition at line 60 of file PenSample.java.

PenSample ( double  theX,
double  theY,
int  theForce,
long  theTimestamp,
boolean  isPenUp 
)

Parameters:
theX 
theY 
theForce hehehe.
theTimestamp 
isPenUp 

Definition at line 72 of file PenSample.java.

References PenSample.force, PenSample.penUp, PenSample.timestamp, PenSample.x, and PenSample.y.


Member Function Documentation

int getForce (  ) 

Returns:

Definition at line 87 of file PenSample.java.

References PenSample.force.

Referenced by RegionComponent.RegionComponent().

Date getTime (  ) 

Returns:

Definition at line 94 of file PenSample.java.

References PenSample.timestamp.

long getTimestamp (  ) 

Returns:

Definition at line 101 of file PenSample.java.

References PenSample.timestamp.

double getX (  ) 

Returns:

Definition at line 108 of file PenSample.java.

References PenSample.x.

Referenced by StreamedPatternCoordinates.StreamedPatternCoordinates(), and SketchToPaperUI.translate().

double getY (  ) 

Returns:

Definition at line 115 of file PenSample.java.

References PenSample.y.

Referenced by StreamedPatternCoordinates.StreamedPatternCoordinates(), and SketchToPaperUI.translate().

boolean isPenUp (  ) 

Returns:

Definition at line 122 of file PenSample.java.

References PenSample.penUp.

Referenced by PenSample.toCommaSeparatedString(), PenSample.toString(), and PenSample.toXMLString().

void setForce ( int  f  ) 

Parameters:
f 

Definition at line 129 of file PenSample.java.

References PenSample.force.

void setPenUp ( boolean  b  ) 

Does this sample represent a Pen Up? Perhaps we should subclass PenSample, instead of storing another field in here? It seems a little wasteful if most samples are not pen up samples.

=\

Parameters:
b 

Definition at line 139 of file PenSample.java.

References PenSample.penUp.

Referenced by PenSimulator.mouseReleased().

void setTimestamp ( long  t  ) 

Parameters:
t 

Definition at line 146 of file PenSample.java.

References PenSample.timestamp.

void setX ( double  xVal  ) 

Parameters:
xVal 

Definition at line 153 of file PenSample.java.

References PenSample.x.

void setY ( double  yVal  ) 

Parameters:
yVal 

Definition at line 160 of file PenSample.java.

References PenSample.y.

String toCommaSeparatedString (  ) 

Returns:

Definition at line 167 of file PenSample.java.

References PenSample.force, PenSample.isPenUp(), PenSample.timestamp, PenSample.x, and PenSample.y.

String toString (  ) 

See also:
java.lang.Object.toString()

Definition at line 178 of file PenSample.java.

References PenSample.force, PenSample.isPenUp(), PenSample.timestamp, PenSample.x, and PenSample.y.

String toXMLString (  ) 

So far, this is used when communicating with Flash in real time.

Returns:

Definition at line 188 of file PenSample.java.

References PenSample.force, PenSample.isPenUp(), PenSample.timestamp, PenSample.x, and PenSample.y.

Referenced by FlashWhiteboard.addPen().


Member Data Documentation

double x

x location of the point, in physical Anoto coordinates TODO: Make these private later.

..

Definition at line 47 of file PenSample.java.

Referenced by InkStroke.addSample(), ShapeContext.blendHelper(), GestureDatabase.display(), GestureDatabase.generateGesture(), ShapeContext.generateShapeHistogram(), PenSample.getDistanceFrom(), PenSample.getX(), ShapeContext.logPolarAndTime(), PenSample.PenSample(), InkSimplification.processNewSample(), PenSample.setX(), ShapeContext.tangent(), PenSample.toCommaSeparatedString(), PenSample.toString(), and PenSample.toXMLString().


The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:43 2007 for R3 Paper Toolkit by  doxygen 1.4.7