The Open Toolkit library  1.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
OpenTK.Vector3h Struct Reference

3-component Vector of the Half type. Occupies 6 Byte total. More...

Inherits ISerializable, and IEquatable< Vector3h >.

Public Member Functions

 Vector3h (Half value)
 Constructs a new instance. More...
 
 Vector3h (Single value)
 Constructs a new instance. More...
 
 Vector3h (Half x, Half y, Half z)
 The new Half3 instance will avoid conversion and copy directly from the Half parameters. More...
 
 Vector3h (Single x, Single y, Single z)
 The new Half3 instance will convert the 3 parameters into 16-bit half-precision floating-point. More...
 
 Vector3h (Single x, Single y, Single z, bool throwOnError)
 The new Half3 instance will convert the 3 parameters into 16-bit half-precision floating-point. More...
 
 Vector3h (Vector3 v)
 The new Half3 instance will convert the Vector3 into 16-bit half-precision floating-point. More...
 
 Vector3h (Vector3 v, bool throwOnError)
 The new Half3 instance will convert the Vector3 into 16-bit half-precision floating-point. More...
 
 Vector3h (ref Vector3 v)
 The new Half3 instance will convert the Vector3 into 16-bit half-precision floating-point. This is the fastest constructor. More...
 
 Vector3h (ref Vector3 v, bool throwOnError)
 The new Half3 instance will convert the Vector3 into 16-bit half-precision floating-point. More...
 
 Vector3h (Vector3d v)
 The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point. More...
 
 Vector3h (Vector3d v, bool throwOnError)
 The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point. More...
 
 Vector3h (ref Vector3d v)
 The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point. This is the faster constructor. More...
 
 Vector3h (ref Vector3d v, bool throwOnError)
 The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point. More...
 
Vector3 ToVector3 ()
 Returns this Half3 instance's contents as Vector3. More...
 
Vector3d ToVector3d ()
 Returns this Half3 instance's contents as Vector3d. More...
 
 Vector3h (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,Y and Z components of this instance by reading from a Stream. More...
 
void ToBinaryStream (BinaryWriter bin)
 Writes the X,Y and Z components of this instance into a Stream. More...
 
bool Equals (Vector3h other)
 Returns a value indicating whether this instance is equal to a specified OpenTK.Half3 vector. More...
 
override string ToString ()
 Returns a string that contains this Half3's numbers in human-legible form. More...
 

Static Public Member Functions

static operator Vector3h (Vector3 v3f)
 Converts OpenTK.Vector3 to OpenTK.Half3. More...
 
static operator Vector3h (Vector3d v3d)
 Converts OpenTK.Vector3d to OpenTK.Half3. More...
 
static operator Vector3 (Vector3h h3)
 Converts OpenTK.Half3 to OpenTK.Vector3. More...
 
static operator Vector3d (Vector3h h3)
 Converts OpenTK.Half3 to OpenTK.Vector3d. More...
 
static byte[] GetBytes (Vector3h h)
 Returns the Half3 as an array of bytes. More...
 
static Vector3h FromBytes (byte[] value, int startIndex)
 Converts an array of bytes into Half3. More...
 

Public Attributes

Half X
 The X component of the Half3. More...
 
Half Y
 The Y component of the Half3. More...
 
Half Z
 The Z component of the Half3. More...
 

Static Public Attributes

static readonly int SizeInBytes = 6
 The size in bytes for an instance of the Half3 struct is 6. More...
 

Properties

Vector2h Xy [get, set]
 Gets or sets an OpenTK.Vector2h with the X and Y components of this instance. More...
 
Vector2h Xz [get, set]
 Gets or sets an OpenTK.Vector2h with the X and Z components of this instance. More...
 
Vector2h Yx [get, set]
 Gets or sets an OpenTK.Vector2h with the Y and X components of this instance. More...
 
Vector2h Yz [get, set]
 Gets or sets an OpenTK.Vector2h with the Y and Z components of this instance. More...
 
Vector2h Zx [get, set]
 Gets or sets an OpenTK.Vector2h with the Z and X components of this instance. More...
 
Vector2h Zy [get, set]
 Gets or sets an OpenTK.Vector2h with the Z and Y components of this instance. More...
 
Vector3h Xzy [get, set]
 Gets or sets an OpenTK.Vector3h with the X, Z, and Y components of this instance. More...
 
Vector3h Yxz [get, set]
 Gets or sets an OpenTK.Vector3h with the Y, X, and Z components of this instance. More...
 
Vector3h Yzx [get, set]
 Gets or sets an OpenTK.Vector3h with the Y, Z, and X components of this instance. More...
 
Vector3h Zxy [get, set]
 Gets or sets an OpenTK.Vector3h with the Z, X, and Y components of this instance. More...
 
Vector3h Zyx [get, set]
 Gets or sets an OpenTK.Vector3h with the Z, Y, and X components of this instance. More...
 

Detailed Description

3-component Vector of the Half type. Occupies 6 Byte total.

Constructor & Destructor Documentation

OpenTK.Vector3h.Vector3h ( Half  value)

Constructs a new instance.

Parameters
valueThe value that will initialize this instance.
OpenTK.Vector3h.Vector3h ( Single  value)

Constructs a new instance.

Parameters
valueThe value that will initialize this instance.
OpenTK.Vector3h.Vector3h ( Half  x,
Half  y,
Half  z 
)

The new Half3 instance will avoid conversion and copy directly from the Half parameters.

Parameters
xAn Half instance of a 16-bit half-precision floating-point number.
yAn Half instance of a 16-bit half-precision floating-point number.
zAn Half instance of a 16-bit half-precision floating-point number.
OpenTK.Vector3h.Vector3h ( Single  x,
Single  y,
Single  z 
)

The new Half3 instance will convert the 3 parameters into 16-bit half-precision floating-point.

Parameters
x32-bit single-precision floating-point number.
y32-bit single-precision floating-point number.
z32-bit single-precision floating-point number.
OpenTK.Vector3h.Vector3h ( Single  x,
Single  y,
Single  z,
bool  throwOnError 
)

The new Half3 instance will convert the 3 parameters into 16-bit half-precision floating-point.

Parameters
x32-bit single-precision floating-point number.
y32-bit single-precision floating-point number.
z32-bit single-precision floating-point number.
throwOnErrorEnable checks that will throw if the conversion result is not meaningful.
OpenTK.Vector3h.Vector3h ( Vector3  v)

The new Half3 instance will convert the Vector3 into 16-bit half-precision floating-point.

Parameters
vOpenTK.Vector3
OpenTK.Vector3h.Vector3h ( Vector3  v,
bool  throwOnError 
)

The new Half3 instance will convert the Vector3 into 16-bit half-precision floating-point.

Parameters
vOpenTK.Vector3
throwOnErrorEnable checks that will throw if the conversion result is not meaningful.
OpenTK.Vector3h.Vector3h ( ref Vector3  v)

The new Half3 instance will convert the Vector3 into 16-bit half-precision floating-point. This is the fastest constructor.

Parameters
vOpenTK.Vector3
OpenTK.Vector3h.Vector3h ( ref Vector3  v,
bool  throwOnError 
)

The new Half3 instance will convert the Vector3 into 16-bit half-precision floating-point.

Parameters
vOpenTK.Vector3
throwOnErrorEnable checks that will throw if the conversion result is not meaningful.
OpenTK.Vector3h.Vector3h ( Vector3d  v)

The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point.

Parameters
vOpenTK.Vector3d
OpenTK.Vector3h.Vector3h ( Vector3d  v,
bool  throwOnError 
)

The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point.

Parameters
vOpenTK.Vector3d
throwOnErrorEnable checks that will throw if the conversion result is not meaningful.
OpenTK.Vector3h.Vector3h ( ref Vector3d  v)

The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point. This is the faster constructor.

Parameters
vOpenTK.Vector3d
OpenTK.Vector3h.Vector3h ( ref Vector3d  v,
bool  throwOnError 
)

The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point.

Parameters
vOpenTK.Vector3d
throwOnErrorEnable checks that will throw if the conversion result is not meaningful.
OpenTK.Vector3h.Vector3h ( SerializationInfo  info,
StreamingContext  context 
)

Constructor used by ISerializable to deserialize the object.

Parameters
info
context

Member Function Documentation

bool OpenTK.Vector3h.Equals ( Vector3h  other)

Returns a value indicating whether this instance is equal to a specified OpenTK.Half3 vector.

Parameters
otherOpenTK.Half3 to compare to this instance..
Returns
True, if other is equal to this instance; false otherwise.
void OpenTK.Vector3h.FromBinaryStream ( BinaryReader  bin)

Updates the X,Y and Z components of this instance by reading from a Stream.

Parameters
binA BinaryReader instance associated with an open Stream.
static Vector3h OpenTK.Vector3h.FromBytes ( byte[]  value,
int  startIndex 
)
static

Converts an array of bytes into Half3.

Parameters
valueA Half3 in it's byte[] representation.
startIndexThe starting position within value.
Returns
A new Half3 instance.
static byte [] OpenTK.Vector3h.GetBytes ( Vector3h  h)
static

Returns the Half3 as an array of bytes.

Parameters
hThe Half3 to convert.
Returns
The input as byte array.
void OpenTK.Vector3h.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)

Used by ISerialize to serialize the object.

Parameters
info
context
static OpenTK.Vector3h.operator Vector3 ( Vector3h  h3)
explicitstatic

Converts OpenTK.Half3 to OpenTK.Vector3.

Parameters
h3The Half3 to convert.
Returns
The resulting Vector3.
static OpenTK.Vector3h.operator Vector3d ( Vector3h  h3)
explicitstatic

Converts OpenTK.Half3 to OpenTK.Vector3d.

Parameters
h3The Half3 to convert.
Returns
The resulting Vector3d.
static OpenTK.Vector3h.operator Vector3h ( Vector3  v3f)
explicitstatic

Converts OpenTK.Vector3 to OpenTK.Half3.

Parameters
v3fThe Vector3 to convert.
Returns
The resulting Half vector.
static OpenTK.Vector3h.operator Vector3h ( Vector3d  v3d)
explicitstatic

Converts OpenTK.Vector3d to OpenTK.Half3.

Parameters
v3dThe Vector3d to convert.
Returns
The resulting Half vector.
void OpenTK.Vector3h.ToBinaryStream ( BinaryWriter  bin)

Writes the X,Y and Z components of this instance into a Stream.

Parameters
binA BinaryWriter instance associated with an open Stream.
override string OpenTK.Vector3h.ToString ( )

Returns a string that contains this Half3's numbers in human-legible form.

Vector3 OpenTK.Vector3h.ToVector3 ( )

Returns this Half3 instance's contents as Vector3.

Returns
OpenTK.Vector3
Vector3d OpenTK.Vector3h.ToVector3d ( )

Returns this Half3 instance's contents as Vector3d.

Member Data Documentation

readonly int OpenTK.Vector3h.SizeInBytes = 6
static

The size in bytes for an instance of the Half3 struct is 6.

Half OpenTK.Vector3h.X

The X component of the Half3.

Half OpenTK.Vector3h.Y

The Y component of the Half3.

Half OpenTK.Vector3h.Z

The Z component of the Half3.

Property Documentation

Vector2h OpenTK.Vector3h.Xy
getset

Gets or sets an OpenTK.Vector2h with the X and Y components of this instance.

Vector2h OpenTK.Vector3h.Xz
getset

Gets or sets an OpenTK.Vector2h with the X and Z components of this instance.

Vector3h OpenTK.Vector3h.Xzy
getset

Gets or sets an OpenTK.Vector3h with the X, Z, and Y components of this instance.

Vector2h OpenTK.Vector3h.Yx
getset

Gets or sets an OpenTK.Vector2h with the Y and X components of this instance.

Vector3h OpenTK.Vector3h.Yxz
getset

Gets or sets an OpenTK.Vector3h with the Y, X, and Z components of this instance.

Vector2h OpenTK.Vector3h.Yz
getset

Gets or sets an OpenTK.Vector2h with the Y and Z components of this instance.

Vector3h OpenTK.Vector3h.Yzx
getset

Gets or sets an OpenTK.Vector3h with the Y, Z, and X components of this instance.

Vector2h OpenTK.Vector3h.Zx
getset

Gets or sets an OpenTK.Vector2h with the Z and X components of this instance.

Vector3h OpenTK.Vector3h.Zxy
getset

Gets or sets an OpenTK.Vector3h with the Z, X, and Y components of this instance.

Vector2h OpenTK.Vector3h.Zy
getset

Gets or sets an OpenTK.Vector2h with the Z and Y components of this instance.

Vector3h OpenTK.Vector3h.Zyx
getset

Gets or sets an OpenTK.Vector3h with the Z, Y, and X components of this instance.