TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class SystemUtil in Tinman.Core.System

Provides static helper method for dealing with objects.

static class SystemUtil  

Public / Constants

CompareBool

Compares values.

public static readonly field CompareBool
type CompareDelegate<bool>

See also:

CompareDelegate

CompareChar

Compares values.

public static readonly field CompareChar
type CompareDelegate<char>

See also:

CompareDelegate

CompareFloat32

Compares values.

public static readonly field CompareFloat32
type CompareDelegate<float32>

See also:

CompareDelegate

CompareFloat64

Compares values.

public static readonly field CompareFloat64
type CompareDelegate<float64>

See also:

CompareDelegate

CompareInt16

Compares values.

public static readonly field CompareInt16
type CompareDelegate<int16>

See also:

CompareDelegate

CompareInt32

Compares values.

public static readonly field CompareInt32
type CompareDelegate<int32>

See also:

CompareDelegate

CompareInt64

Compares values.

public static readonly field CompareInt64
type CompareDelegate<int64>

See also:

CompareDelegate

CompareInt8

Compares values.

public static readonly field CompareInt8
type CompareDelegate<int8>

See also:

CompareDelegate

EqualsBool

Compares values.

public static readonly field EqualsBool
type EqualsDelegate<bool>

See also:

EqualsDelegate

EqualsChar

Compares values.

public static readonly field EqualsChar
type EqualsDelegate<char>

See also:

EqualsDelegate

EqualsFloat32

Compares values.

public static readonly field EqualsFloat32
type EqualsDelegate<float32>

See also:

EqualsDelegate

EqualsFloat64

Compares values.

public static readonly field EqualsFloat64
type EqualsDelegate<float64>

See also:

EqualsDelegate

EqualsInt16

Compares values.

public static readonly field EqualsInt16
type EqualsDelegate<int16>

See also:

EqualsDelegate

EqualsInt32

Compares values.

public static readonly field EqualsInt32
type EqualsDelegate<int32>

See also:

EqualsDelegate

EqualsInt64

Compares values.

public static readonly field EqualsInt64
type EqualsDelegate<int64>

See also:

EqualsDelegate

EqualsInt8

Compares values.

public static readonly field EqualsInt8
type EqualsDelegate<int8>

See also:

EqualsDelegate

Public / Methods

ArrayClear

Clears the elements of the given array to the default value.

public static method ArrayClear (bool[] array, int32 offset = 0, int32 count = -1)
params array [not-null] The array to clear.
  offset [>=0] Offset to first element in array to clear. Defaults to 0.
  count [>=-1] Number of elements in array to clear. If -1, all remaining elements will be cleared. Defaults to -1.

Clears the elements of the given array to the default value.

public static method ArrayClear (int8[] array, int32 offset = 0, int32 count = -1)
params array [not-null] The array to clear.
  offset [>=0] Offset to first element in array to clear. Defaults to 0.
  count [>=-1] Number of elements in array to clear. If -1, all remaining elements will be cleared. Defaults to -1.

Clears the elements of the given array to the default value.

public static method ArrayClear (char[] array, int32 offset = 0, int32 count = -1)
params array [not-null] The array to clear.
  offset [>=0] Offset to first element in array to clear. Defaults to 0.
  count [>=-1] Number of elements in array to clear. If -1, all remaining elements will be cleared. Defaults to -1.

Clears the elements of the given array to the default value.

public static method ArrayClear (int16[] array, int32 offset = 0, int32 count = -1)
params array [not-null] The array to clear.
  offset [>=0] Offset to first element in array to clear. Defaults to 0.
  count [>=-1] Number of elements in array to clear. If -1, all remaining elements will be cleared. Defaults to -1.

Clears the elements of the given array to the default value.

public static method ArrayClear (int32[] array, int32 offset = 0, int32 count = -1)
params array [not-null] The array to clear.
  offset [>=0] Offset to first element in array to clear. Defaults to 0.
  count [>=-1] Number of elements in array to clear. If -1, all remaining elements will be cleared. Defaults to -1.

Clears the elements of the given array to the default value.

public static method ArrayClear (float32[] array, int32 offset = 0, int32 count = -1)
params array [not-null] The array to clear.
  offset [>=0] Offset to first element in array to clear. Defaults to 0.
  count [>=-1] Number of elements in array to clear. If -1, all remaining elements will be cleared. Defaults to -1.

Clears the elements of the given array to the default value.

public static method ArrayClear (int64[] array, int32 offset = 0, int32 count = -1)
params array [not-null] The array to clear.
  offset [>=0] Offset to first element in array to clear. Defaults to 0.
  count [>=-1] Number of elements in array to clear. If -1, all remaining elements will be cleared. Defaults to -1.

Clears the elements of the given array to the default value.

public static method ArrayClear (float64[] array, int32 offset = 0, int32 count = -1)
params array [not-null] The array to clear.
  offset [>=0] Offset to first element in array to clear. Defaults to 0.
  count [>=-1] Number of elements in array to clear. If -1, all remaining elements will be cleared. Defaults to -1.

ArrayCopy

Copies elements from one array to another.

public static method ArrayCopy ([] bool[] source, int32 sourceIdx, [] bool[] target, int32 targetIdx, int32 count)
params source [not-null] The source array.
  sourceIdx [>=0] Index of first element in source to copy.
  target [not-null] The target array.
  targetIdx [>=0] Index of first element in target to write.
  count [>=0] Total number of array elements to copy.

Copies elements from one array to another.

public static method ArrayCopy ([] int8[] source, int32 sourceIdx, [] int8[] target, int32 targetIdx, int32 count)
params source [not-null] The source array.
  sourceIdx [>=0] Index of first element in source to copy.
  target [not-null] The target array.
  targetIdx [>=0] Index of first element in target to write.
  count [>=0] Total number of array elements to copy.

Copies elements from one array to another.

public static method ArrayCopy ([] char[] source, int32 sourceIdx, [] char[] target, int32 targetIdx, int32 count)
params source [not-null] The source array.
  sourceIdx [>=0] Index of first element in source to copy.
  target [not-null] The target array.
  targetIdx [>=0] Index of first element in target to write.
  count [>=0] Total number of array elements to copy.

Copies elements from one array to another.

public static method ArrayCopy ([] int16[] source, int32 sourceIdx, [] int16[] target, int32 targetIdx, int32 count)
params source [not-null] The source array.
  sourceIdx [>=0] Index of first element in source to copy.
  target [not-null] The target array.
  targetIdx [>=0] Index of first element in target to write.
  count [>=0] Total number of array elements to copy.

Copies elements from one array to another.

public static method ArrayCopy ([] int32[] source, int32 sourceIdx, [] int32[] target, int32 targetIdx, int32 count)
params source [not-null] The source array.
  sourceIdx [>=0] Index of first element in source to copy.
  target [not-null] The target array.
  targetIdx [>=0] Index of first element in target to write.
  count [>=0] Total number of array elements to copy.

Copies elements from one array to another.

public static method ArrayCopy ([] float32[] source, int32 sourceIdx, [] float32[] target, int32 targetIdx, int32 count)
params source [not-null] The source array.
  sourceIdx [>=0] Index of first element in source to copy.
  target [not-null] The target array.
  targetIdx [>=0] Index of first element in target to write.
  count [>=0] Total number of array elements to copy.

Copies elements from one array to another.

public static method ArrayCopy ([] int64[] source, int32 sourceIdx, [] int64[] target, int32 targetIdx, int32 count)
params source [not-null] The source array.
  sourceIdx [>=0] Index of first element in source to copy.
  target [not-null] The target array.
  targetIdx [>=0] Index of first element in target to write.
  count [>=0] Total number of array elements to copy.

Copies elements from one array to another.

public static method ArrayCopy ([] float64[] source, int32 sourceIdx, [] float64[] target, int32 targetIdx, int32 count)
params source [not-null] The source array.
  sourceIdx [>=0] Index of first element in source to copy.
  target [not-null] The target array.
  targetIdx [>=0] Index of first element in target to write.
  count [>=0] Total number of array elements to copy.

Dispose

Disposes the given object if it is an instance of IDisposable.

public static method Dispose ([Owner] object obj)
params obj The object or null.

FuncCompareBool

public static method FuncCompareBool (bool a, bool b)
type int32
params a
  b

FuncCompareChar

public static method FuncCompareChar (char a, char b)
type int32
params a
  b

FuncCompareFloat32

public static method FuncCompareFloat32 (float32 a, float32 b)
type int32
params a
  b

FuncCompareFloat64

public static method FuncCompareFloat64 (float64 a, float64 b)
type int32
params a
  b

FuncCompareInt16

public static method FuncCompareInt16 (int16 a, int16 b)
type int32
params a
  b

FuncCompareInt32

public static method FuncCompareInt32 (int32 a, int32 b)
type int32
params a
  b

FuncCompareInt64

public static method FuncCompareInt64 (int64 a, int64 b)
type int32
params a
  b

FuncCompareInt8

public static method FuncCompareInt8 (int8 a, int8 b)
type int32
params a
  b

GrowCapacity

Grows the given capacity, making sure it stays within [0..2147483647] and is larger than or equal to required.

[Pure]
public static method GrowCapacity (int32 current, int64 required = 0, int32 numerator = 5, int32 denominator = 4)
type int32
params current The current capacity.
  required The required capacity. Defaults to 0.
  numerator Numerator of fraction to use for growing current. Defaults to 5.
  denominator Denominator of fraction to use for growing current. Defaults to 4.
returns [0..2147483647] The grown capacity.

Exceptions:

IsValid

Is this object valid (see remarks)?

public static method IsValid (object obj)
type bool
params obj The object to check.
returns true if the object is valid, false if not.

Remarks:

An object is considered valid if it is in one of the following lifecycle states:

An non-null object that does not implement the ILifecycleState interface is always valid. Null objects are always invalid.

MemoryConsumptionOf

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (IMemoryConsumption thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (ByteBuffer thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (object thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (bool[] thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (int8[] thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (int16[] thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (int32[] thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (int64[] thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (float32[] thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given thing.

[Pure]
public static method MemoryConsumptionOf (float64[] thing)
type int64
params thing The thing.
returns [>=0] The estimated memory consumption, in bytes.

Sort4

Sorts the given values.

[Pure]
public static method Sort4 (float64 d0, float64 d1, float64 d2, float64 d3)
type int32
params d0 First value to sort.
  d1 Second value to sort.
  d2 Third value to sort.
  d3 Fourth value to sort.
returns Bits 0..1 : sort order index of d0
Bits 2..3 : sort order index of d1
Bits 4..5 : sort order index of d2
Bits 6..7 : sort order index of d3

VarIntLength

Returns the number of bytes that are required to encode the given value using variable coding from one to nine bytes.

[Pure]
public static method VarIntLength (int64 value)
type int32
params value The value to encode.
returns [1..9] The number of required bytes.

VarIntRead

Reads a signed 64-bit value from the IDataStream using variable coding from one to nine bytes.

public static method VarIntRead (IBinaryReader stream)
type int64
params stream [not-null] The input data stream.
returns The read value.

Remarks:

The encoding is independent on byte endianess.

See also:

SystemUtil

Reads a signed 64-bit value from the ByteBuffer using variable coding from one to nine bytes.

public static method VarIntRead (ByteBuffer buffer)
type int64
params buffer [not-null] The input byte buffer.
returns The read value.

Remarks:

The encoding is independent on byte endianess.

See also:

SystemUtil

VarIntWrite

Writes a signed 64-bit value to the IDataStream using variable coding from one to nine bytes.

public static method VarIntWrite (IBinaryWriter stream, int64 value)
params stream [not-null] The output stream.
  value The value to write.

Remarks:

The encoding is independent on byte endianess.

See also:

SystemUtil

Writes a signed 64-bit value to the ByteBuffer using variable coding from one to nine bytes.

public static method VarIntWrite (ByteBuffer buffer, int64 value)
params buffer [not-null] The output byte buffer.
  value The value to write.

Remarks:

The encoding is independent on byte endianess.

See also:

SystemUtil