Vector2h 结构

定义

Half 类型的 2 分量向量。 总共占用 4 字节。

[System.Serializable]
public struct Vector2h : IEquatable<OpenTK.Vector2h>, System.Runtime.Serialization.ISerializable
type Vector2h = struct
    interface ISerializable
继承
Vector2h
属性
实现

构造函数

Vector2h(Half)

Half 类型的 2 分量向量。 总共占用 4 字节。

Vector2h(Half, Half)

新的 Half2 实例将避免转换和直接从 Half 参数复制。

Vector2h(SerializationInfo, StreamingContext)

ISerializable 用于反序列化对象的构造函数。

Vector2h(Single)

Half 类型的 2 分量向量。 总共占用 4 字节。

Vector2h(Single, Single)

新的 Half2 实例会将 2 个参数转换为 16 位半精度浮点。

Vector2h(Single, Single, Boolean)

新的 Half2 实例会将 2 个参数转换为 16 位半精度浮点。

Vector2h(Vector2)

新的 Half2 实例会将 Vector2 转换为 16 位半精度浮点。

Vector2h(Vector2)

新的 Half2 实例会将 Vector2 转换为 16 位半精度浮点。 这是最快的构造函数。

Vector2h(Vector2, Boolean)

Half 类型的 2 分量向量。 总共占用 4 字节。

Vector2h(Vector2, Boolean)

Half 类型的 2 分量向量。 总共占用 4 字节。

Vector2h(Vector2d)

新的 Half2 实例会将 Vector2d 转换为 16 位半精度浮点。

Vector2h(Vector2d)

新的 Half2 实例会将 Vector2d 转换为 16 位半精度浮点。 这是更快的构造函数。

Vector2h(Vector2d, Boolean)

Half 类型的 2 分量向量。 总共占用 4 字节。

Vector2h(Vector2d, Boolean)

Half 类型的 2 分量向量。 总共占用 4 字节。

字段

SizeInBytes

Half2 结构的实例的大小(以字节为单位)为 4。

X

Half2 的 X 分量。

Y

Half2 的 Y 组件。

方法

Equals(Vector2h)

返回一个值,该值指示此实例是否等于指定的 OpenTK.Half2 向量。

FromBinaryStream(BinaryReader)

汇报从 Stream 读取此实例的 X 和 Y 组件。

FromBytes(Byte[], Int32)

Half 类型的 2 分量向量。 总共占用 4 字节。

GetBytes(Vector2h)

以字节数组的形式返回 Half2。

GetObjectData(SerializationInfo, StreamingContext)

由 ISerialize 用于序列化对象。

ToBinaryStream(BinaryWriter)

将此实例的 X 和 Y 组件写入 Stream。

ToString()

返回一个字符串,其中包含此 Half2 的数字,其形式为人可读。

ToVector2()

Half 类型的 2 分量向量。 总共占用 4 字节。

ToVector2d()

Half 类型的 2 分量向量。 总共占用 4 字节。

运算符

Explicit(Vector2 to Vector2h)

Half 类型的 2 分量向量。 总共占用 4 字节。

Explicit(Vector2d to Vector2h)

Half 类型的 2 分量向量。 总共占用 4 字节。

Explicit(Vector2h to Vector2)

Half 类型的 2 分量向量。 总共占用 4 字节。

Explicit(Vector2h to Vector2d)

Half 类型的 2 分量向量。 总共占用 4 字节。

适用于