|
The Open Toolkit library
1.0
|
2-component Vector of the Half type. Occupies 4 Byte total. More...
Inherits ISerializable, and IEquatable< Vector2h >.
Public Member Functions | |
| Vector2h (Half value) | |
| Constructs a new instance. More... | |
| Vector2h (Single value) | |
| Constructs a new instance. More... | |
| Vector2h (Half x, Half y) | |
| The new Half2 instance will avoid conversion and copy directly from the Half parameters. More... | |
| Vector2h (Single x, Single y) | |
| The new Half2 instance will convert the 2 parameters into 16-bit half-precision floating-point. More... | |
| Vector2h (Single x, Single y, bool throwOnError) | |
| The new Half2 instance will convert the 2 parameters into 16-bit half-precision floating-point. More... | |
| Vector2h (Vector2 v) | |
| The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point. More... | |
| Vector2h (Vector2 v, bool throwOnError) | |
| The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point. More... | |
| Vector2h (ref Vector2 v) | |
| The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point. This is the fastest constructor. More... | |
| Vector2h (ref Vector2 v, bool throwOnError) | |
| The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point. More... | |
| Vector2h (Vector2d v) | |
| The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. More... | |
| Vector2h (Vector2d v, bool throwOnError) | |
| The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. More... | |
| Vector2h (ref Vector2d v) | |
| The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. This is the faster constructor. More... | |
| Vector2h (ref Vector2d v, bool throwOnError) | |
| The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. More... | |
| Vector2 | ToVector2 () |
| Returns this Half2 instance's contents as Vector2. More... | |
| Vector2d | ToVector2d () |
| Returns this Half2 instance's contents as Vector2d. More... | |
| Vector2h (SerializationInfo info, StreamingContext context) | |
| Constructor used by ISerializable to deserialize the object. More... | |
| void | GetObjectData (SerializationInfo info, StreamingContext context) |
| Used by ISerialize to serialize the object. More... | |
| void | FromBinaryStream (BinaryReader bin) |
| Updates the X and Y components of this instance by reading from a Stream. More... | |
| void | ToBinaryStream (BinaryWriter bin) |
| Writes the X and Y components of this instance into a Stream. More... | |
| bool | Equals (Vector2h other) |
| Returns a value indicating whether this instance is equal to a specified OpenTK.Half2 vector. More... | |
| override string | ToString () |
| Returns a string that contains this Half2's numbers in human-legible form. More... | |
Static Public Member Functions | |
| static | operator Vector2h (Vector2 v) |
| Converts OpenTK.Vector2 to OpenTK.Half2. More... | |
| static | operator Vector2h (Vector2d v) |
| Converts OpenTK.Vector2d to OpenTK.Half2. More... | |
| static | operator Vector2 (Vector2h h) |
| Converts OpenTK.Half2 to OpenTK.Vector2. More... | |
| static | operator Vector2d (Vector2h h) |
| Converts OpenTK.Half2 to OpenTK.Vector2d. More... | |
| static byte[] | GetBytes (Vector2h h) |
| Returns the Half2 as an array of bytes. More... | |
| static Vector2h | FromBytes (byte[] value, int startIndex) |
| Converts an array of bytes into Half2. More... | |
Public Attributes | |
| Half | X |
| The X component of the Half2. More... | |
| Half | Y |
| The Y component of the Half2. More... | |
Static Public Attributes | |
| static readonly int | SizeInBytes = 4 |
| The size in bytes for an instance of the Half2 struct is 4. More... | |
Properties | |
| Vector2h | Yx [get, set] |
| Gets or sets an OpenTK.Vector2h with the Y and X components of this instance. More... | |
2-component Vector of the Half type. Occupies 4 Byte total.
| OpenTK.Vector2h.Vector2h | ( | Half | value | ) |
Constructs a new instance.
| value | The value that will initialize this instance. |
| OpenTK.Vector2h.Vector2h | ( | Single | value | ) |
Constructs a new instance.
| value | The value that will initialize this instance. |
| OpenTK.Vector2h.Vector2h | ( | Single | x, |
| Single | y | ||
| ) |
The new Half2 instance will convert the 2 parameters into 16-bit half-precision floating-point.
| x | 32-bit single-precision floating-point number. |
| y | 32-bit single-precision floating-point number. |
| OpenTK.Vector2h.Vector2h | ( | Single | x, |
| Single | y, | ||
| bool | throwOnError | ||
| ) |
The new Half2 instance will convert the 2 parameters into 16-bit half-precision floating-point.
| x | 32-bit single-precision floating-point number. |
| y | 32-bit single-precision floating-point number. |
| throwOnError | Enable checks that will throw if the conversion result is not meaningful. |
| OpenTK.Vector2h.Vector2h | ( | Vector2 | v | ) |
The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point.
| v | OpenTK.Vector2 |
| OpenTK.Vector2h.Vector2h | ( | Vector2 | v, |
| bool | throwOnError | ||
| ) |
The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point.
| v | OpenTK.Vector2 |
| throwOnError | Enable checks that will throw if the conversion result is not meaningful. |
| OpenTK.Vector2h.Vector2h | ( | ref Vector2 | v | ) |
The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point. This is the fastest constructor.
| v | OpenTK.Vector2 |
| OpenTK.Vector2h.Vector2h | ( | ref Vector2 | v, |
| bool | throwOnError | ||
| ) |
The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point.
| v | OpenTK.Vector2 |
| throwOnError | Enable checks that will throw if the conversion result is not meaningful. |
| OpenTK.Vector2h.Vector2h | ( | Vector2d | v | ) |
The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point.
| v | OpenTK.Vector2d |
| OpenTK.Vector2h.Vector2h | ( | Vector2d | v, |
| bool | throwOnError | ||
| ) |
The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point.
| v | OpenTK.Vector2d |
| throwOnError | Enable checks that will throw if the conversion result is not meaningful. |
| OpenTK.Vector2h.Vector2h | ( | ref Vector2d | v | ) |
The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. This is the faster constructor.
| v | OpenTK.Vector2d |
| OpenTK.Vector2h.Vector2h | ( | ref Vector2d | v, |
| bool | throwOnError | ||
| ) |
The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point.
| v | OpenTK.Vector2d |
| throwOnError | Enable checks that will throw if the conversion result is not meaningful. |
| OpenTK.Vector2h.Vector2h | ( | SerializationInfo | info, |
| StreamingContext | context | ||
| ) |
Constructor used by ISerializable to deserialize the object.
| info | |
| context |
| bool OpenTK.Vector2h.Equals | ( | Vector2h | other | ) |
Returns a value indicating whether this instance is equal to a specified OpenTK.Half2 vector.
| other | OpenTK.Half2 to compare to this instance.. |
| void OpenTK.Vector2h.FromBinaryStream | ( | BinaryReader | bin | ) |
Updates the X and Y components of this instance by reading from a Stream.
| bin | A BinaryReader instance associated with an open Stream. |
|
static |
Converts an array of bytes into Half2.
| value | A Half2 in it's byte[] representation. |
| startIndex | The starting position within value. |
|
static |
Returns the Half2 as an array of bytes.
| h | The Half2 to convert. |
| void OpenTK.Vector2h.GetObjectData | ( | SerializationInfo | info, |
| StreamingContext | context | ||
| ) |
Used by ISerialize to serialize the object.
| info | |
| context |
Converts OpenTK.Half2 to OpenTK.Vector2.
| h | The Half2 to convert. |
Converts OpenTK.Half2 to OpenTK.Vector2d.
| h | The Half2 to convert. |
Converts OpenTK.Vector2 to OpenTK.Half2.
| v | The Vector2 to convert. |
Converts OpenTK.Vector2d to OpenTK.Half2.
| v | The Vector2d to convert. |
| void OpenTK.Vector2h.ToBinaryStream | ( | BinaryWriter | bin | ) |
Writes the X and Y components of this instance into a Stream.
| bin | A BinaryWriter instance associated with an open Stream. |
| override string OpenTK.Vector2h.ToString | ( | ) |
Returns a string that contains this Half2's numbers in human-legible form.
| Vector2 OpenTK.Vector2h.ToVector2 | ( | ) |
Returns this Half2 instance's contents as Vector2.
|
static |
The size in bytes for an instance of the Half2 struct is 4.
| Half OpenTK.Vector2h.X |
The X component of the Half2.
| Half OpenTK.Vector2h.Y |
The Y component of the Half2.
|
getset |
Gets or sets an OpenTK.Vector2h with the Y and X components of this instance.