Enfusion Script API
|
Public Member Functions | |
proto void | Write (void src, int sizeInBits) |
Writes sizeInBits bits of data to internal storage. | |
proto void | WriteRplId (RplId val) |
Compresses a RplId and writes it to internal storage. | |
proto void | WriteEntityId (EntityID val) |
Compresses a EntityID and writes it to internal storage. | |
proto void | WriteInt (int val) |
Compresses an integer and writes it to internal storage. | |
proto void | WriteIntRange (int val, int min, int max) |
Compresses an integer and writes it to internal storage. | |
proto void | WriteHalf (float val) |
Compresses a float into a half and writes it to internal storage. | |
proto void | WriteFloat01 (float val) |
Compresses a float into <0;1> range and writes it to internal storage. | |
proto void | WriteRadian (float val) |
Compresses an angle in radians and writes it to internal storage. | |
proto void | WriteQuaternion (float val[4]) |
Compresses a quaternion and writes it to internal storage. | |
proto void | WriteResourceName (ResourceName val) |
Writes a ResourceName to internal storage. | |
proto void | WriteString (string val) |
Writes a string to internal storage. | |
proto native int | Tell () |
Returns the current position in internal storage in bits. | |
void | WriteBool (bool val) |
void | WriteFloat (float val) |
void | WriteVector (vector val) |
Public Member Functions inherited from Managed | |
proto external ref Managed | Clone () |
Return shallow copy of object, or null if it is not allowed (not public constructor) | |
proto native int ScriptBitWriter.Tell | ( | ) |
Returns the current position in internal storage in bits.
proto void ScriptBitWriter.Write | ( | void | src, |
int | sizeInBits | ||
) |
Writes sizeInBits
bits of data to internal storage.
void ScriptBitWriter.WriteBool | ( | bool | val | ) |
proto void ScriptBitWriter.WriteEntityId | ( | EntityID | val | ) |
Compresses a EntityID and writes it to internal storage.
The resulting data is about 1 to 8 bytes in size.
void ScriptBitWriter.WriteFloat | ( | float | val | ) |
proto void ScriptBitWriter.WriteFloat01 | ( | float | val | ) |
Compresses a float into <0;1> range and writes it to internal storage.
The resulting data is 1 byte in size.
proto void ScriptBitWriter.WriteHalf | ( | float | val | ) |
Compresses a float into a half and writes it to internal storage.
The resulting data is 2 bytes in size.
proto void ScriptBitWriter.WriteInt | ( | int | val | ) |
Compresses an integer and writes it to internal storage.
Compression goes down to the byte level. Therefore, the resulting data is about 1 to 4 bytes in size.
Compresses an integer and writes it to internal storage.
Compression uses only as many bits as necessary taking the range defined by {min..max} into account.
proto void ScriptBitWriter.WriteQuaternion | ( | float | val[4] | ) |
Compresses a quaternion and writes it to internal storage.
The resulting data is 4 byte in size.
proto void ScriptBitWriter.WriteRadian | ( | float | val | ) |
Compresses an angle in radians and writes it to internal storage.
The resulting data is 1 byte in size.
proto void ScriptBitWriter.WriteResourceName | ( | ResourceName | val | ) |
Writes a ResourceName to internal storage.
The resulting data is 8 byte in size.
proto void ScriptBitWriter.WriteRplId | ( | RplId | val | ) |
Compresses a RplId and writes it to internal storage.
The resulting data is about 1 to 4 bytes in size.
proto void ScriptBitWriter.WriteString | ( | string | val | ) |
Writes a string to internal storage.
void ScriptBitWriter.WriteVector | ( | vector | val | ) |