OpenMetaverse Protocol Library Developers API Documentation
Utils Class
NamespacesOpenMetaverseUtils
Declaration Syntax
C#
public 
static 
class 
Utils
Members
All Members Methods Fields



Icon Member Description
AssetTypeToString(AssetType)
Takes an AssetType and returns the string representation

BytesToDouble( array< Byte > [] () [] [] , Int32)
BytesToFloat( array< Byte > [] () [] [] , Int32)
Convert four bytes in little endian ordering to a floating point value

BytesToHexString( array< Byte > [] () [] [] , String)
Converts a byte array to a string containing hexadecimal characters

BytesToHexString( array< Byte > [] () [] [] , Int32, String)
Converts a byte array to a string containing hexadecimal characters

BytesToInt( array< Byte > [] () [] [] , Int32)
Convert the first four bytes starting at the given position in little endian ordering to a signed integer

BytesToInt( array< Byte > [] () [] [] )
Convert the first four bytes of the given array in little endian ordering to a signed integer

BytesToInt16( array< Byte > [] () [] [] )
Convert the first two bytes starting in the byte array in little endian ordering to a signed short integer

BytesToInt16( array< Byte > [] () [] [] , Int32)
Convert the first two bytes starting at the given position in little endian ordering to a signed short integer

BytesToInt64( array< Byte > [] () [] [] )
Convert the first eight bytes of the given array in little endian ordering to a signed long integer

BytesToInt64( array< Byte > [] () [] [] , Int32)
Convert the first eight bytes starting at the given position in little endian ordering to a signed long integer

BytesToString( array< Byte > [] () [] [] )
Convert a variable length UTF8 byte array to a string

BytesToString( array< Byte > [] () [] [] , Int32, Int32)
BytesToUInt( array< Byte > [] () [] [] , Int32)
Convert the first four bytes starting at the given position in little endian ordering to an unsigned integer

BytesToUInt( array< Byte > [] () [] [] )
Convert the first four bytes of the given array in little endian ordering to an unsigned integer

BytesToUInt16( array< Byte > [] () [] [] , Int32)
Convert the first two bytes starting at the given position in little endian ordering to an unsigned short

BytesToUInt16( array< Byte > [] () [] [] )
Convert two bytes in little endian ordering to an unsigned short

BytesToUInt64( array< Byte > [] () [] [] )
Convert the first eight bytes of the given array in little endian ordering to an unsigned 64-bit integer

ByteToFloat( array< Byte > [] () [] [] , Int32, Single, Single)
Convert a byte to a float value given a minimum and maximum range

ByteToFloat(Byte, Single, Single)
Convert a byte to a float value given a minimum and maximum range

Clamp(Single, Single, Single)
Clamp a given value between a range

Clamp(Double, Double, Double)
Clamp a given value between a range

Clamp(Int32, Int32, Int32)
Clamp a given value between a range

CopyBytes( array< Byte > [] () [] [] )
Copy a byte array

DateTimeToUnixTime(DateTime)
Convert a native DateTime object to a UNIX timestamp

DEG_TO_RAD
Used for converting degrees to radians

Distance(Single, Single)
Get the distance between two floating-point values

DoubleToBytes(Double)
DoubleToBytes(Double, array< Byte > [] () [] [] , Int32)
DoubleToBytesBig(Double)
E
EmptyBytes
EnumToText(Enum)
Returns text specified in EnumInfo attribute of the enumerator To add the text use [EnumInfo(Text = "Some nice text here")] before declaration of enum values

EnumTryParse < (Of < <' ( T > ) > > ) (String, T % )
Try to parse an enumeration value from a string

EnUsCulture
Provide a single instance of the CultureInfo class to help parsing in situations where the grid assumes an en-us culture

Epoch
UNIX epoch in DateTime format

FloatToByte(Single, Single, Single)
Convert a float value to a byte given a minimum and maximum range

FloatToBytes(Single)
Convert a floating point value to four bytes in little endian ordering

FloatToBytes(Single, array< Byte > [] () [] [] , Int32)
FloatToUInt16(Single, Single, Single)
GetRunningPlatform () () () ()
Get the current running platform

GetRunningRuntime () () () ()
Get the current running runtime

GetUnixTime () () () ()
Gets a unix timestamp for the current time

Hermite(Single, Single, Single, Single, Single)
Hermite(Double, Double, Double, Double, Double)
HexStringToBytes(String, Boolean)
Converts a string containing hexadecimal characters to a byte array

HostnameToIPv4(String)
Attempts to convert a string representation of a hostname or IP address to a

Int16ToBytes(Int16)
Int16ToBytes(Int16, array< Byte > [] () [] [] , Int32)
Int64ToBytes(Int64)
Convert a 64-bit integer to a byte array in little endian format

Int64ToBytes(Int64, array< Byte > [] () [] [] , Int32)
InternStrings
IntToBytes(Int32)
Convert an integer to a byte array in little endian format

IntToBytes(Int32, array< Byte > [] () [] [] , Int32)
IntToBytesBig(Int32)
Convert an integer to a byte array in big endian format

InventoryTypeToString(InventoryType)
Convert an InventoryType to a string

IPToUInt(IPAddress)
Convert an IP address object to an unsigned 32-bit integer

IsFinite(Single)
Test if a single precision float is a finite number

IsFinite(Double)
Test if a double precision float is a finite number

Lerp(Single, Single, Single)
Lerp(Double, Double, Double)
LOG10E
LOG2E
LongToUInts(UInt64, UInt32 % , UInt32 % )
Unpacks two 32-bit unsigned integers from a 64-bit unsigned integer

MD5( array< Byte > [] () [] [] )
Compute the MD5 hash for a byte array

MD5(String)
Calculate the MD5 hash of a given string

MD5String(String)
Calculate the MD5 hash of a given string

PI
PI_OVER_FOUR
PI_OVER_TWO
RAD_TO_DEG
Used for converting radians to degrees

RandomDouble () () () ()
Generate a random double precision floating point value

Round(Single)
Round a floating-point value to the nearest integer

SaleTypeToString(SaleType)
Convert a SaleType to a string

SHA1( array< Byte > [] () [] [] )
Compute the SHA1 hash for a byte array

SHA1String(String)
Calculate the SHA1 hash of a given string

SHA256( array< Byte > [] () [] [] )
Compute the SHA256 hash for a byte array

SHA256String(String)
Calculate the SHA256 hash of a given string

SmoothStep(Single, Single, Single)
SmoothStep(Double, Double, Double)
StringToAssetType(String)
Translate a string name of an AssetType into the proper Type

StringToAttachmentPoint(String)
Converts a string used in LLSD to AttachmentPoint type

StringToBytes(String)
Convert a string to a UTF8 encoded byte array

StringToInventoryType(String)
Convert a string into a valid InventoryType

StringToSaleType(String)
Convert a string into a valid SaleType

Swap < (Of < <' ( T > ) > > ) (T % , T % )
Swap two values

SwapWords(Byte)
Swaps the high and low words in a byte. Converts aaaabbbb to bbbbaaaa

ToDegrees(Single)
ToRadians(Single)
TryParseDouble(String, Double % )
Attempts to parse a floating point value from a string, using an EN-US number format

TryParseHex(String, UInt32 % )
Tries to parse an unsigned 32-bit integer from a hexadecimal string

TryParseSingle(String, Single % )
Attempts to parse a floating point value from a string, using an EN-US number format

TWO_PI
UInt16ToBytes(UInt16)
UInt16ToBytes(UInt16, array< Byte > [] () [] [] , Int32)
UInt16ToBytesBig(UInt16, array< Byte > [] () [] [] , Int32)
UInt16ToFloat( array< Byte > [] () [] [] , Int32, Single, Single)
UInt16ToFloat(UInt16, Single, Single)
UInt64ToBytes(UInt64)
Convert a 64-bit unsigned integer to a byte array in little endian format

UInt64ToBytes(UInt64, array< Byte > [] () [] [] , Int32)
UInt64ToBytesBig(UInt64)
UInt64ToBytesBig(UInt64, array< Byte > [] () [] [] , Int32)
UIntsToLong(UInt32, UInt32)
Packs to 32-bit unsigned integers in to a 64-bit unsigned integer

UIntToBytes(UInt32)
UIntToBytes(UInt32, array< Byte > [] () [] [] , Int32)
UIntToBytesBig(UInt32, array< Byte > [] () [] [] , Int32)
UIntToHexString(UInt32)
Converts an unsigned integer to a hexadecimal string

UnixTimeToDateTime(UInt32)
Convert a UNIX timestamp to a native DateTime object

UnixTimeToDateTime(Int32)
Convert a UNIX timestamp to a native DateTime object

Inheritance Hierarchy
Object
Utils

Assembly: OpenMetaverseTypes(Module: OpenMetaverseTypes.dll) Version: 0.0.0.0