Class SpinEvent
java.lang.Object
com.sparshui.common.messages.events.SpinEvent
- All Implemented Interfaces:
Event, Serializable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the integer value of this event type.floatfloatfloatbyte[]Constructs the data packet with this event data.voidsetRotationX(float rotation) voidsetRotationY(float rotation) voidsetRotationZ(float rotation) toString()
-
Constructor Details
-
SpinEvent
public SpinEvent() -
SpinEvent
public SpinEvent(float rotationX, float rotationY, float rotationZ) -
SpinEvent
public SpinEvent(byte[] data) Constructs a new SpinEvent from a serialized version - 4 bytes : rotationX - 4 bytes : rotationY - 4 bytes : rotationZ - 12 bytes total- Parameters:
data- the serialized version of touchEvent
-
-
Method Details
-
getEventType
public int getEventType()Description copied from interface:EventReturns the integer value of this event type. Event type values are defined in the enumeration com.sparshui.common.messages.events.EventType.java- Specified by:
getEventTypein interfaceEvent- Returns:
- The event type
-
getRotationX
public float getRotationX() -
getRotationY
public float getRotationY() -
getRotationZ
public float getRotationZ() -
setRotationX
public void setRotationX(float rotation) -
setRotationY
public void setRotationY(float rotation) -
setRotationZ
public void setRotationZ(float rotation) -
serialize
-
toString
-