public class DOF3Event extends MotionEvent
ALT, ALT_GRAPH, CTRL, META, NO_ID, NO_MODIFIER_MASK, SHIFT
Constructor and Description |
---|
DOF3Event(DOF3Event prevEvent,
float x,
float y,
float z)
Construct a relative event from the given previous event, dof's and modifiers.
|
DOF3Event(DOF3Event prevEvent,
float x,
float y,
float z,
int modifiers,
int id)
Construct a relative event from the given previous event, dof's and modifiers.
|
DOF3Event(float dx,
float dy,
float dz)
Construct an absolute event from the given dof's.
|
DOF3Event(float dx,
float dy,
float dz,
int modifiers,
int id)
Construct an absolute event from the given dof's and modifiers.
|
DOF3Event(MotionEvent prevEvent,
float x,
float y,
float z)
Same as
this(prevEvent instanceof DOF3Event ? (DOF3Event) prevEvent : null, x, y, z) . |
DOF3Event(MotionEvent prevEvent,
float x,
float y,
float z,
int modifiers,
int id)
Same as
this(prevEvent instanceof DOF3Event ? (DOF3Event) prevEvent : null, x, y, z, modifiers, id) . |
Modifier and Type | Method and Description |
---|---|
DOF2Event |
dof2Event()
Reduces the event to a
DOF2Event (lossy reduction). |
float |
dx() |
float |
dy() |
float |
dz() |
boolean |
equals(Object obj) |
DOF3Event |
fire()
Same as
this.get() but sets the BogusEvent.fired() flag to true. |
DOF3Event |
flush()
Same as
this.get() but sets the BogusEvent.flushed() flag to true. |
DOF3Event |
get()
Returns a deep copy of the object.
|
int |
hashCode() |
boolean |
isNull()
Only
MotionEvent s may be null. |
void |
modulate(float[] sens)
Modulate the event dofs according to
sens . |
float |
prevX() |
float |
prevY() |
float |
prevZ() |
float |
x() |
float |
y() |
float |
z() |
delay, distance, dof1Event, dof1Event, dof2Event, dof2Event, dof3Event, dof3Event, dof6Event, isAbsolute, isRelative, shortcut, speed
fired, flushed, id, isAltDown, isAltGraph, isControlDown, isMetaDown, isShiftDown, modifiers, modifiersText, timestamp
public DOF3Event(float dx, float dy, float dz, int modifiers, int id)
dx
- dy
- dz
- modifiers
- id
- public DOF3Event(MotionEvent prevEvent, float x, float y, float z, int modifiers, int id)
this(prevEvent instanceof DOF3Event ? (DOF3Event) prevEvent : null, x, y, z, modifiers, id)
.public DOF3Event(DOF3Event prevEvent, float x, float y, float z, int modifiers, int id)
If the BogusEvent.id()
of the prevEvent
is different then BogusEvent.id()
, sets
the MotionEvent.distance()
, MotionEvent.delay()
and MotionEvent.speed()
all to zero
.
prevEvent
- x
- y
- z
- modifiers
- id
- public DOF3Event(float dx, float dy, float dz)
dx
- dy
- dz
- public DOF3Event(MotionEvent prevEvent, float x, float y, float z)
this(prevEvent instanceof DOF3Event ? (DOF3Event) prevEvent : null, x, y, z)
.public DOF3Event(DOF3Event prevEvent, float x, float y, float z)
If the BogusEvent.id()
of the prevEvent
is different then BogusEvent.id()
, sets
the MotionEvent.distance()
, MotionEvent.delay()
and MotionEvent.speed()
all to zero
.
prevEvent
- x
- y
- z
- public int hashCode()
hashCode
in class MotionEvent
public boolean equals(Object obj)
equals
in class MotionEvent
public DOF3Event get()
Copyable
Typical implementation should simple look like: return new Object(this)
.
get
in interface Copyable
get
in class MotionEvent
public DOF3Event flush()
BogusEvent
this.get()
but sets the BogusEvent.flushed()
flag to true. Only agents
may call this.flush
in class MotionEvent
BogusEvent.flushed()
public DOF3Event fire()
BogusEvent
this.get()
but sets the BogusEvent.fired()
flag to true. Only agents
may call this.fire
in class MotionEvent
BogusEvent.flushed()
public float x()
MotionEvent.isRelative()
public float dx()
public float prevX()
MotionEvent.isRelative()
public float y()
MotionEvent.isRelative()
public float dy()
public float prevY()
MotionEvent.isRelative()
public float z()
MotionEvent.isRelative()
public float dz()
public float prevZ()
MotionEvent.isRelative()
public void modulate(float[] sens)
MotionEvent
sens
. Only meaningful if the event
MotionEvent.isAbsolute()
.modulate
in class MotionEvent
public boolean isNull()
BogusEvent
MotionEvent
s may be null.isNull
in class BogusEvent
Processing Library proscene by Jean Pierre Charalambos. (c) 2014-2017 National University of Colombia