本文整理匯總了C#中System.IO.BinaryReader.ReadVector4方法的典型用法代碼示例。如果您正苦於以下問題:C# BinaryReader.ReadVector4方法的具體用法?C# BinaryReader.ReadVector4怎麽用?C# BinaryReader.ReadVector4使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.IO.BinaryReader
的用法示例。
在下文中一共展示了BinaryReader.ReadVector4方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RoGndTileData
public char[] color; // BGRA -- "A" seems to be ignored by the official client
public RoGndTileData(BinaryReader bin, GenericFileFormatVersion version)
: base(bin, version) {
VectorWidth = bin.ReadVector4();
VectorHeight = bin.ReadVector4();
TextureIndex = bin.ReadUInt16();
Lightmap = bin.ReadUInt16();
color = bin.ReadChars(4);
}
示例2: RoGndCubeData
public RoGndCubeData(BinaryReader bin, GenericFileFormatVersion version)
: base(bin, version) {
Height = bin.ReadVector4();
TileUp = bin.ReadInt32();
TileSide = bin.ReadInt32();
TileAside = bin.ReadInt32();
}
示例3: QuatKey
/// <summary>
/// Initializes a new instance of the <see cref="QuatKey"/> class.
/// </summary>
/// <param name="reader">The reader.</param>
/// <param name="type">The type.</param>
/// <exception cref="Exception">Invalid eKeyType</exception>
public QuatKey(BinaryReader reader, eKeyType type)
{
this.Time = reader.ReadSingle();
if (type < eKeyType.LINEAR_KEY || type > eKeyType.TBC_KEY)
{
throw new Exception("Invalid eKeyType");
}
this.Value = reader.ReadVector4();
if (type == eKeyType.TBC_KEY)
{
this.TBC = reader.ReadVector3();
}
}
示例4: NiRotatingParticlesData
/// <summary>
/// Initializes a new instance of the <see cref="NiRotatingParticlesData"/> class.
/// </summary>
/// <param name="file">The file.</param>
/// <param name="reader">The reader.</param>
public NiRotatingParticlesData(NiFile file, BinaryReader reader) : base(file, reader)
{
if (base.Version <= eNifVersion.VER_4_2_2_0)
{
this.HasRotations2 = reader.ReadBoolean(Version);
this.Rotations2 = new Vector4[this.NumVertices];
int num = 0;
while ((long)num < (long)((ulong)this.NumVertices))
{
this.Rotations2[num] = reader.ReadVector4();
num++;
}
}
}
示例5: ErrorReportCommentsBlock
public ErrorReportCommentsBlock(BinaryReader binaryReader)
{
this.paddingtext = binaryReader.ReadBytes(8);
this.position = binaryReader.ReadVector3();
this.nodeIndices = new NodeIndices[4];
for (int i = 0; i < 4; ++i)
{
this.nodeIndices[i] = new NodeIndices(binaryReader);
}
this.nodeWeights = new NodeWeights[4];
for (int i = 0; i < 4; ++i)
{
this.nodeWeights[i] = new NodeWeights(binaryReader);
}
this.color = binaryReader.ReadVector4();
}
示例6: ErrorReportQuadsBlock
public ErrorReportQuadsBlock(BinaryReader binaryReader)
{
this.points = new Points[4];
for (int i = 0; i < 4; ++i)
{
this.points[i] = new Points(binaryReader);
}
this.color = binaryReader.ReadVector4();
}
示例7: ErrorReportTrianglesBlock
public ErrorReportTrianglesBlock(BinaryReader binaryReader)
{
this.points = new Points[3];
for (int i = 0; i < 3; ++i)
{
this.points[i] = new Points(binaryReader);
}
this.color = binaryReader.ReadVector4();
}
示例8: ErrorReportVectorsBlock
public ErrorReportVectorsBlock(BinaryReader binaryReader)
{
this.position = binaryReader.ReadVector3();
this.nodeIndices = new NodeIndices[4];
for (int i = 0; i < 4; ++i)
{
this.nodeIndices[i] = new NodeIndices(binaryReader);
}
this.nodeWeights = new NodeWeights[4];
for (int i = 0; i < 4; ++i)
{
this.nodeWeights[i] = new NodeWeights(binaryReader);
}
this.color = binaryReader.ReadVector4();
this.normal = binaryReader.ReadVector3();
this.screenLength = binaryReader.ReadSingle();
}
示例9: ModelNodeBlock
public ModelNodeBlock(BinaryReader binaryReader)
{
this.name = binaryReader.ReadStringID();
this.parentNode = binaryReader.ReadShortBlockIndex1();
this.firstChildNode = binaryReader.ReadShortBlockIndex1();
this.nextSiblingNode = binaryReader.ReadShortBlockIndex1();
this.padding = binaryReader.ReadBytes(2);
this.defaultTranslation = binaryReader.ReadVector3();
this.defaultRotation = binaryReader.ReadVector4();
this.defaultInverseScale = binaryReader.ReadSingle();
this.defaultInverseForward = binaryReader.ReadVector3();
this.defaultInverseLeft = binaryReader.ReadVector3();
this.defaultInverseUp = binaryReader.ReadVector3();
this.defaultInversePosition = binaryReader.ReadVector3();
}
示例10: StructureBspFogPlaneBlock
public StructureBspFogPlaneBlock(BinaryReader binaryReader)
{
this.scenarioPlanarFogIndex = binaryReader.ReadInt16();
this.padding = binaryReader.ReadBytes(2);
this.plane = binaryReader.ReadVector4();
this.flags = (Flags)binaryReader.ReadInt16();
this.priority = binaryReader.ReadInt16();
}
示例11: Axes
public Axes(Stream stream)
{
BinaryReader reader = new BinaryReader(stream);
m_PreQ = reader.ReadVector4();
m_PostQ = reader.ReadVector4();
m_Sgn = reader.ReadVector4();
m_Limit = new Limit(stream);
m_Length = reader.ReadSingle();
m_Type = reader.ReadUInt32();
}
示例12: Load
/// <summary>
/// Loads the file from the specified stream.
/// </summary>
/// <param name="stream">The stream to read from.</param>
public override void Load(Stream stream)
{
BinaryReader reader = new BinaryReader(stream, Encoding.GetEncoding("EUC-KR"));
string identifier = reader.ReadNullTerminatedString();
int version;
if (string.Compare(identifier, FILE_IDENTIFIER_7, false) == 0) {
version = 7;
} else if (string.Compare(identifier, FILE_IDENTIFIER_8, false) == 0) {
version = 8;
} else {
throw new FileIdentifierMismatchException(FilePath, string.Format("{0} / {1}", FILE_IDENTIFIER_7, FILE_IDENTIFIER_8), identifier);
}
format = (VertexFormat)reader.ReadInt32();
BoundingBox = new Bounds(reader.ReadVector3(), reader.ReadVector3());
short boneCount = reader.ReadInt16();
for (int i = 0; i < boneCount; i++) {
BoneTable.Add(reader.ReadInt16());
}
short vertexCount = reader.ReadInt16();
for (int i = 0; i < vertexCount; i++) {
ModelVertex vertex = new ModelVertex();
vertex.Position = reader.ReadVector3();
Vertices.Add(vertex);
}
if (NormalsEnabled) {
for (int i = 0; i < vertexCount; i++) {
ModelVertex vertex = Vertices[i];
vertex.Normal = reader.ReadVector3();
}
}
if (ColoursEnabled) {
for (int i = 0; i < vertexCount; i++) {
float a = reader.ReadSingle();
ModelVertex vertex = Vertices[i];
vertex.Colour = new Color(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), a);
}
}
if (BonesEnabled) {
for (int i = 0; i < vertexCount; i++) {
ModelVertex vertex = Vertices[i];
vertex.BoneWeights = reader.ReadVector4();
vertex.BoneIndices = reader.ReadShortVector4();
}
}
if (TangentsEnabled) {
for (int i = 0; i < vertexCount; i++) {
ModelVertex vertex = Vertices[i];
vertex.Tangent = reader.ReadVector3();
}
}
if (TextureCoordinates1Enabled) {
for (int i = 0; i < vertexCount; i++) {
ModelVertex vertex = Vertices[i];
vertex.TextureCoordinates[0] = reader.ReadVector2();
}
}
if (TextureCoordinates2Enabled) {
for (int i = 0; i < vertexCount; i++) {
ModelVertex vertex = Vertices[i];
vertex.TextureCoordinates[1] = reader.ReadVector2();
}
}
if (TextureCoordinates3Enabled) {
for (int i = 0; i < vertexCount; i++) {
ModelVertex vertex = Vertices[i];
vertex.TextureCoordinates[2] = reader.ReadVector2();
}
}
if (TextureCoordinates4Enabled) {
for (int i = 0; i < vertexCount; i++) {
ModelVertex vertex = Vertices[i];
vertex.TextureCoordinates[3] = reader.ReadVector2();
}
}
short indexCount = reader.ReadInt16();
for (int i = 0; i < indexCount; i++) {
Indices.Add(reader.ReadShortVector3());
//.........這裏部分代碼省略.........
示例13: PlanesBlock
public PlanesBlock(BinaryReader binaryReader)
{
this.plane = binaryReader.ReadVector4();
}
示例14: RoRsmMeshPositionFrame
public RoRsmMeshPositionFrame(BinaryReader bin, GenericFileFormatVersion version)
: base(bin, version) {
Frame = bin.ReadInt32();
Position = bin.ReadVector4();
}
示例15: TransparentPlanesBlock
public TransparentPlanesBlock(BinaryReader binaryReader)
{
this.sectionIndex = binaryReader.ReadInt16();
this.partIndex = binaryReader.ReadInt16();
this.plane = binaryReader.ReadVector4();
}