2-component Vector of the Half type. Occupies 4 Byte total. More...
Public Member Functions | |
| Vector2h (Half x, Half y) | |
| The new Half2 instance will avoid conversion and copy directly from the Half parameters. | |
| Vector2h (Single x, Single y) | |
| The new Half2 instance will convert the 2 parameters into 16-bit half-precision floating-point. | |
| Vector2h (Single x, Single y, bool throwOnError) | |
| The new Half2 instance will convert the 2 parameters into 16-bit half-precision floating-point. | |
| Vector2h (Vector2 v) | |
| The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point. | |
| Vector2h (Vector2 v, bool throwOnError) | |
| The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point. | |
| Vector2h (ref Vector2 v) | |
| The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point. This is the fastest constructor. | |
| Vector2h (ref Vector2 v, bool throwOnError) | |
| The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point. | |
| Vector2h (Vector2d v) | |
| The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. | |
| Vector2h (Vector2d v, bool throwOnError) | |
| The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. | |
| Vector2h (ref Vector2d v) | |
| The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. This is the faster constructor. | |
| Vector2h (ref Vector2d v, bool throwOnError) | |
| The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. | |
| Vector2 | ToVector2 () |
| Returns this Half2 instance's contents as Vector2. | |
| Vector2d | ToVector2d () |
| Returns this Half2 instance's contents as Vector2d. | |
| Vector2h (SerializationInfo info, StreamingContext context) | |
| Constructor used by ISerializable to deserialize the object. | |
| void | GetObjectData (SerializationInfo info, StreamingContext context) |
| Used by ISerialize to serialize the object. | |
| void | FromBinaryStream (BinaryReader bin) |
| Updates the X and Y components of this instance by reading from a Stream. | |
| void | ToBinaryStream (BinaryWriter bin) |
| Writes the X and Y components of this instance into a Stream. | |
| bool | Equals (Vector2h other) |
| Returns a value indicating whether this instance is equal to a specified OpenTK.Half2 vector. | |
| override string | ToString () |
| Returns a string that contains this Half2's numbers in human-legible form. | |
Static Public Member Functions | |
| static | operator Vector2h (Vector2 v) |
| Converts OpenTK.Vector2 to OpenTK.Half2. | |
| static | operator Vector2h (Vector2d v) |
| Converts OpenTK.Vector2d to OpenTK.Half2. | |
| static | operator Vector2 (Vector2h h) |
| Converts OpenTK.Half2 to OpenTK.Vector2. | |
| static | operator Vector2d (Vector2h h) |
| Converts OpenTK.Half2 to OpenTK.Vector2d. | |
| static byte[] | GetBytes (Vector2h h) |
| Returns the Half2 as an array of bytes. | |
| static Vector2h | FromBytes (byte[] value, int startIndex) |
| Converts an array of bytes into Half2. | |
Public Attributes | |
| Half | X |
| The X component of the Half2. | |
| Half | Y |
| The Y component of the Half2. | |
Static Public Attributes | |
| static readonly int | SizeInBytes = 4 |
| The size in bytes for an instance of the Half2 struct is 4. | |
2-component Vector of the Half type. Occupies 4 Byte total.
Definition at line 35 of file Vector2h.cs.
The new Half2 instance will avoid conversion and copy directly from the Half parameters.
| x | An Half instance of a 16-bit half-precision floating-point number. | |
| y | An Half instance of a 16-bit half-precision floating-point number. |
Definition at line 54 of file Vector2h.cs.
| 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. |
Definition at line 65 of file Vector2h.cs.
| 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. |
Definition at line 77 of file Vector2h.cs.
| OpenTK.Vector2h.Vector2h | ( | Vector2 | v | ) |
The new Half2 instance will convert the Vector2 into 16-bit half-precision floating-point.
| v | OpenTK.Vector2 |
Definition at line 88 of file Vector2h.cs.
| 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. |
Definition at line 100 of file Vector2h.cs.
| 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 |
Definition at line 111 of file Vector2h.cs.
| 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. |
Definition at line 122 of file Vector2h.cs.
| OpenTK.Vector2h.Vector2h | ( | Vector2d | v | ) |
The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point.
| v | OpenTK.Vector2d |
Definition at line 132 of file Vector2h.cs.
| 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. |
Definition at line 143 of file Vector2h.cs.
| 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 |
Definition at line 155 of file Vector2h.cs.
| 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. |
Definition at line 167 of file Vector2h.cs.
| OpenTK.Vector2h.Vector2h | ( | SerializationInfo | info, | |
| StreamingContext | context | |||
| ) |
Constructor used by ISerializable to deserialize the object.
| info | ||
| context |
Definition at line 244 of file Vector2h.cs.
| 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.. |
Definition at line 286 of file Vector2h.cs.
| 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. |
Definition at line 265 of file Vector2h.cs.
| static Vector2h OpenTK.Vector2h.FromBytes | ( | byte[] | value, | |
| int | startIndex | |||
| ) | [static] |
Converts an array of bytes into Half2.
| value | A Half2 in it's byte[] representation. | |
| startIndex | The starting position within value. |
Definition at line 326 of file Vector2h.cs.
| static byte [] OpenTK.Vector2h.GetBytes | ( | Vector2h | h | ) | [static] |
Returns the Half2 as an array of bytes.
| h | The Half2 to convert. |
Definition at line 308 of file Vector2h.cs.
00309 { 00310 byte[] result = new byte[SizeInBytes]; 00311 00312 byte[] temp = Half.GetBytes(h.X); 00313 result[0] = temp[0]; 00314 result[1] = temp[1]; 00315 temp = Half.GetBytes(h.Y); 00316 result[2] = temp[0]; 00317 result[3] = temp[1]; 00318 00319 return result; 00320 }
| void OpenTK.Vector2h.GetObjectData | ( | SerializationInfo | info, | |
| StreamingContext | context | |||
| ) |
Used by ISerialize to serialize the object.
| info | ||
| context |
Definition at line 253 of file Vector2h.cs.
Converts OpenTK.Half2 to OpenTK.Vector2.
| h | The Half2 to convert. |
Definition at line 217 of file Vector2h.cs.
Converts OpenTK.Half2 to OpenTK.Vector2d.
| h | The Half2 to convert. |
Definition at line 225 of file Vector2h.cs.
Converts OpenTK.Vector2d to OpenTK.Half2.
| v | The Vector2d to convert. |
Definition at line 209 of file Vector2h.cs.
00210 { 00211 return new Vector2h(v); 00212 }
Converts OpenTK.Vector2 to OpenTK.Half2.
| v | The Vector2 to convert. |
Definition at line 201 of file Vector2h.cs.
00202 { 00203 return new Vector2h(v); 00204 }
| 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. |
Definition at line 273 of file Vector2h.cs.
| override string OpenTK.Vector2h.ToString | ( | ) |
Returns a string that contains this Half2's numbers in human-legible form.
Definition at line 296 of file Vector2h.cs.
| Vector2 OpenTK.Vector2h.ToVector2 | ( | ) |
Returns this Half2 instance's contents as Vector2.
Definition at line 181 of file Vector2h.cs.
| Vector2d OpenTK.Vector2h.ToVector2d | ( | ) |
Returns this Half2 instance's contents as Vector2d.
Definition at line 189 of file Vector2h.cs.
readonly int OpenTK.Vector2h.SizeInBytes = 4 [static] |
The size in bytes for an instance of the Half2 struct is 4.
Definition at line 235 of file Vector2h.cs.
The X component of the Half2.
Definition at line 40 of file Vector2h.cs.
The Y component of the Half2.
Definition at line 43 of file Vector2h.cs.
1.6.1