A generic container for various pure value types. Each Value is for a specific property,
retrieved by get(int, Value)
. Each Value must be retrieved as the correct
type, which are documented in Properties.PropertyType
.
Public Constructors
Value()
Creates a new, unpopulated, value.
|
Public Methods
long |
asFlags()
Converts this value into flags.
|
float |
asFloat()
Converts this value into a float.
|
int |
asInt()
Converts this value into an int.
|
void |
asMat4f(float[] outTransform)
Converts this value into a mat4 (represented by a float[16]).
|
void |
close()
Destroys the value.
|
long |
getFlags()
Returns the value's flags; always 0 for now.
|
Inherited Methods
Public Constructors
public Value ()
Creates a new, unpopulated, value. This event may be reused for multiple calls to get(int, Value)
. It's recommended to have one Value object for the lifetime of the
app to reduce allocations.
Public Methods
public long asFlags ()
Converts this value into flags.
Throws
IllegalStateException | if this value is the wrong type. |
---|
public float asFloat ()
Converts this value into a float.
Throws
IllegalStateException | if this value is the wrong type. |
---|
public int asInt ()
Converts this value into an int.
Throws
IllegalStateException | if this value is the wrong type. |
---|
public void asMat4f (float[] outTransform)
Converts this value into a mat4 (represented by a float[16]).
Parameters
outTransform | the float[16] to write the result. Must not be null. |
---|
Throws
IllegalStateException | if this value is the wrong type. |
---|
public void close ()
Destroys the value. Must be called when done with the value.
public long getFlags ()
Returns the value's flags; always 0 for now. Note that this is different from asFlags()
. This method returns the flags for the Value and is valid for any Value type;
asFlags()
returns the flags for properties such as TRACKING_STATUS
.