Package icyllis.arc3d.granite
Class DrawAtlas.AtlasToken
java.lang.Object
icyllis.arc3d.granite.DrawAtlas.AtlasToken
- Enclosing class:
DrawAtlas
AtlasToken is used to sequence uploads relative to each other and to batches of draws.
AtlasToken is represented as an unsigned long sequence number. Wrapping is allowed, 0 is reserved for the invalid token. Do not use operator to compare, use method instead.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompare(long lhs, long rhs) Compares two tokens with wrapping.static booleaninInterval(long token, long start, long end) Returns true if the token is in the [start, end] inclusive interval.static longnext(long token) Returns next valid sequence number.
-
Field Details
-
kInvalidToken
public static final long kInvalidToken- See Also:
-
-
Method Details
-
next
public static long next(long token) Returns next valid sequence number. -
compare
public static int compare(long lhs, long rhs) Compares two tokens with wrapping. -
inInterval
public static boolean inInterval(long token, long start, long end) Returns true if the token is in the [start, end] inclusive interval.
-