public final class IntercomHelper extends Object
Modifier and Type | Method and Description |
---|---|
static Color |
decodeColor(int code)
Decodes a color from a 32-bit integer.
|
static FloatRect |
decodeFloatRect()
Decodes a float rectangle from the current float buffer content.
|
static IntRect |
decodeIntRect()
Decodes an integer rectangle from the current float buffer content.
|
static Transform |
decodeTransform()
Decodes a transformation matrix from the current float buffer content.
|
static Vector2f |
decodeVector2f(long vec)
Decodes a float vector from a 64-bit integer.
|
static Vector2i |
decodeVector2i(long vec)
Decodes an integer vector from a 64-bit integer.
|
static int |
encodeColor(Color color)
Encodes a color into a 32-bit integer.
|
static Buffer |
encodeFloatRect(FloatRect r)
Encodes a float rectangle into the current float buffer.
|
static Buffer |
encodeIntRect(IntRect r)
Encodes an integer rectangle into the current integer buffer.
|
static Buffer |
encodeTransform(Transform xform)
Encodes a transformation matrix into the current float buffer.
|
static long |
encodeVector2f(Vector2f vec)
Encodes a float vector into a 64-bit integer.
|
static long |
encodeVector2i(Vector2i vec)
Encodes an integer vector into a 64-bit integer.
|
static ByteBuffer |
getBuffer()
Gets the current thread-local buffer.
|
public static ByteBuffer getBuffer()
public static int encodeColor(Color color)
color
- the color to encode.public static Color decodeColor(int code)
code
- the encoded color.public static long encodeVector2i(Vector2i vec)
vec
- the vector.public static long encodeVector2f(Vector2f vec)
vec
- the vector.public static Vector2i decodeVector2i(long vec)
vec
- the encoded vector.public static Vector2f decodeVector2f(long vec)
vec
- the encoded vector.public static IntRect decodeIntRect()
public static Buffer encodeIntRect(IntRect r)
r
- the rectangle to encode.public static FloatRect decodeFloatRect()
public static Buffer encodeFloatRect(FloatRect r)
r
- the float to encode.public static Transform decodeTransform()