public NiLight(NIFReader file, BinaryReader reader) : base(file, reader) { Dimmer = reader.ReadSingle(); AmbientColor = reader.ReadColor3(); DiffuseColor = reader.ReadColor3(); SpecularColor = reader.ReadColor3(); }
public NiUVData(NIFReader file, BinaryReader reader) : base(file, reader) { UTranslation = new KeyGroup <FloatKey>(reader); VTranslation = new KeyGroup <FloatKey>(reader); UScalingAndTiling = new KeyGroup <FloatKey>(reader); VScalingAndTiling = new KeyGroup <FloatKey>(reader); }
public NiOutlineData(NIFReader file, BinaryReader reader) : base(file, reader) { EdgeCount = reader.ReadUInt32(); TrisCount = reader.ReadUInt32(); VerticesCount = reader.ReadUInt32(); Edges = new ushort[EdgeCount][]; for (var i = 0; i < EdgeCount; i++) { Edges[i] = reader.ReadArray <ushort>(4); } Tris = new ushort[TrisCount][]; for (var i = 0; i < TrisCount; i++) { Tris[i] = reader.ReadArray <ushort>(7); } VerticesGroups = reader.ReadArray <uint>((int)VerticesCount); Vertices = new ushort[VerticesCount][]; for (var i = 0; i < VerticesCount; i++) { Vertices[i] = reader.ReadArray <ushort>((int)VerticesGroups[i]); } }
public NiGeometryData(NIFReader file, BinaryReader reader) : base(file, reader) { NumVertices = reader.ReadUInt16(); HasVertices = reader.ReadBoolean(); if (HasVertices) { Vertices = reader.ReadArray <Vector3>(NumVertices); } HasNormals = reader.ReadBoolean(); if (HasNormals) { Normals = reader.ReadArray <Vector3>(NumVertices); } Center = reader.Read <Vector3>(); Radius = reader.ReadSingle(); HasVertexColors = reader.ReadBoolean(); if (HasVertexColors) { VertexColors = reader.ReadArray <Color4>(NumVertices); } var numUvSets = reader.ReadByte(); TSpaceFlag = reader.ReadByte(); UVSets = new Vector2[numUvSets][]; for (var i = 0; i < numUvSets; i++) { UVSets[i] = reader.ReadArray <Vector2>(NumVertices); } }
public NiTextureTransformController(NIFReader file, BinaryReader reader) : base(file, reader) { Unknown2 = reader.ReadByte(); TextureSlot = (TexType)reader.ReadUInt32(); Operation = (TexTransform)reader.ReadUInt32(); Data = new NiRef <NiFloatData>(reader); }
public NiKeyframeData(NIFReader file, BinaryReader reader) : base(file, reader) { var count = reader.ReadUInt32(); if (count != 0u) { KeyType = (KeyType)reader.ReadUInt32(); } if (KeyType == KeyType.XYZ_ROTATION_KEY) { UnknownFloat = reader.ReadSingle(); Rotations = new KeyGroup <FloatKey>[] { new KeyGroup <FloatKey>(reader), new KeyGroup <FloatKey>(reader), new KeyGroup <FloatKey>(reader) }; } else { QuaternionKeys = new QuatKey[count]; for (var i = 0; i < QuaternionKeys.Length; i++) { QuaternionKeys[i] = new QuatKey(reader, KeyType); } } Translations = new KeyGroup <VecKey>(reader); Scales = new KeyGroup <FloatKey>(reader); }
public NiRoom(NIFReader file, BinaryReader reader) : base(file, reader) { Walls = new NiRef <NiWall> [reader.ReadInt32()]; for (var i = 0; i < Walls.Length; i++) { Walls[i] = new NiRef <NiWall>(reader); } InteriorPortals = new NiRef <NiPortal> [reader.ReadInt32()]; for (var i = 0; i < InteriorPortals.Length; i++) { InteriorPortals[i] = new NiRef <NiPortal>(reader); } ExteriorPortals = new NiRef <NiPortal> [reader.ReadInt32()]; for (var i = 0; i < ExteriorPortals.Length; i++) { ExteriorPortals[i] = new NiRef <NiPortal>(reader); } Fixtures = new NiRef <NiAVObject> [reader.ReadInt32()]; for (var i = 0; i < Fixtures.Length; i++) { Fixtures[i] = new NiRef <NiAVObject>(reader); } }
public void SetRef(NIFReader file) { if (IsValid) { Object = (T)file.ObjectsByRef[RefId]; } }
public NiGravity(NIFReader file, BinaryReader reader) : base(file, reader) { UnknownFloat1 = reader.ReadSingle(); Force = reader.ReadSingle(); Type = reader.ReadUInt32(); Position = reader.Read <Vector3>(); Direction = reader.Read <Vector3>(); }
public NiStringsExtraData(NIFReader file, BinaryReader reader) : base(file, reader) { ExtraStringData = new NiString[reader.ReadUInt32()]; for (var i = 0; i < ExtraStringData.Length; i++) { ExtraStringData[i] = new NiString(reader); } }
public NiVisData(NIFReader file, BinaryReader reader) : base(file, reader) { Keys = new ByteKey[reader.ReadUInt32()]; for (var i = 0; i < Keys.Length; i++) { Keys[i] = new ByteKey(reader, KeyType.LINEAR_KEY); } }
public NiSkinPartition(NIFReader file, BinaryReader reader) : base(file, reader) { Partitions = new SkinPartition[reader.ReadUInt32()]; for (var i = 0; i < Partitions.Length; i++) { Partitions[i] = new SkinPartition(reader); } }
public NiParticleMeshModifier(NIFReader file, BinaryReader reader) : base(file, reader) { ParticleMeshes = new NiRef <NiAVObject> [reader.ReadUInt32()]; for (var i = 0; i < ParticleMeshes.Length; i++) { ParticleMeshes[i] = new NiRef <NiAVObject>(reader); } }
public NiScreenLODData(NIFReader file, BinaryReader reader) : base(file, reader) { BoundCenter = reader.Read <Vector3>(); BoundRadius = reader.ReadSingle(); WorldCenter = reader.Read <Vector3>(); WorldRadius = reader.ReadSingle(); ProportionLevels = reader.ReadArray <float>(reader.ReadInt32()); }
public NiPathController(NIFReader file, BinaryReader reader) : base(file, reader) { Unknown2 = reader.ReadUInt32(); Unknown3 = reader.ReadSingle(); Unknown4 = reader.ReadSingle(); Unknown5 = reader.ReadUInt16(); PosData = new NiRef <NiPosData>(reader); FloatData = new NiRef <NiFloatData>(reader); }
public NiRoomGroup(NIFReader file, BinaryReader reader) : base(file, reader) { Shell = new NiRef <NiNode>(reader); Rooms = new NiRef <NiRoom> [reader.ReadInt32()]; for (var i = 0; i < Rooms.Length; i++) { Rooms[i] = new NiRef <NiRoom>(reader); } }
public NiObjectNET(NIFReader file, BinaryReader reader) : base(file, reader) { Name = new NiString(reader); ExtraData = new NiRef <NiExtraData>[] { new NiRef <NiExtraData>(reader.ReadUInt32()) }; Controller = new NiRef <NiTimeController>(reader.ReadUInt32()); }
public NiExtraData(NIFReader file, BinaryReader reader) : base(file, reader) { NextExtraData = new NiRef <NiExtraData>(reader.ReadUInt32()); if (GetType() == typeof(NiExtraData)) { ExtraData = reader.ReadBytes(reader.ReadInt32()); } }
public NiLODNode(NIFReader file, BinaryReader reader) : base(file, reader) { LODCenter = reader.Read <Vector3>(); LODLevels = new LODRange[reader.ReadUInt32()]; for (var i = 0; i < LODLevels.Length; i++) { LODLevels[i] = new LODRange(reader); } }
public NiMaterialProperty(NIFReader file, BinaryReader reader) : base(file, reader) { Flags = reader.ReadUInt16(); AmbientColor = reader.ReadColor3(); DiffuseColor = reader.ReadColor3(); SpecularColor = reader.ReadColor3(); EmissiveColor = reader.ReadColor3(); Glossiness = reader.ReadSingle(); Alpha = reader.ReadSingle(); }
public NiPixelData(NIFReader file, BinaryReader reader) : base(file, reader) { NumPixels = reader.ReadUInt32(); PixelData = reader.ReadBytes((int)NumPixels); if (Version >= NifVersion.VER_4_2_1_1) { Unknown = reader.ReadUInt32(); } }
public NiSkinInstance(NIFReader file, BinaryReader reader) : base(file, reader) { Data = new NiRef <NiSkinData>(reader); SkeletonRoot = new NiRef <NiNode>(reader); Bones = new NiRef <NiNode> [reader.ReadUInt32()]; for (var i = 0; i < Bones.Length; i++) { Bones[i] = new NiRef <NiNode>(reader); } }
public NiTimeController(NIFReader file, BinaryReader reader) : base(file, reader) { NextController = new NiRef <NiTimeController>(reader); Flags = reader.ReadUInt16(); Frequency = reader.ReadSingle(); Phase = reader.ReadSingle(); StartTime = reader.ReadSingle(); StopTime = reader.ReadSingle(); Target = new NiRef <NiObjectNET>(reader); }
public NiTextKeyExtraData(NIFReader file, BinaryReader reader) : base(file, reader) { UnknownInt1 = reader.ReadUInt32(); TextKeys = new StringKey[reader.ReadUInt32()]; for (var i = 0; i < TextKeys.Length; i++) { TextKeys[i] = new StringKey(reader, KeyType.LINEAR_KEY); } }
public NiTriStripsData(NIFReader file, BinaryReader reader) : base(file, reader) { var array = reader.ReadArray <ushort>(reader.ReadUInt16()); Points = new ushort[array.Length][]; for (var i = 0; i < array.Length; i++) { Points[i] = reader.ReadArray <ushort>(array[i]); } }
public NiParticlesData(NIFReader file, BinaryReader reader) : base(file, reader) { ParticleRadius = reader.ReadSingle(); NumActive = reader.ReadUInt16(); HasSizes = reader.ReadBoolean(); if (HasSizes) { Sizes = reader.ReadArray <float>((int)NumVertices); } }
public NiTriShapeData(NIFReader file, BinaryReader reader) : base(file, reader) { NumTrianglePoints = reader.ReadUInt32(); Triangles = reader.ReadArray <Triangle>(NumTriangles); MatchGroups = new ushort[reader.ReadUInt16()][]; for (var i = 0; i < MatchGroups.Length; i++) { MatchGroups[i] = reader.ReadArray <ushort>(reader.ReadUInt16()); } }
public NiParticleBomb(NIFReader file, BinaryReader reader) : base(file, reader) { Decay = reader.ReadSingle(); Duration = reader.ReadSingle(); DeltaV = reader.ReadSingle(); Start = reader.ReadSingle(); DecayType = (DecayType)reader.ReadUInt32(); SymmetryType = (SymmetryType)reader.ReadUInt32(); Position = reader.Read <Vector3>(); Direction = reader.Read <Vector3>(); }
public NiFlipController(NIFReader file, BinaryReader reader) : base(file, reader) { TextureSlot = reader.ReadUInt32(); Delta = reader.ReadSingle(); Unknown = reader.ReadUInt32(); Textures = new NiRef <NiSourceTexture> [reader.ReadInt32()]; for (var i = 0; i < Textures.Length; i++) { Textures[i] = new NiRef <NiSourceTexture>(reader); } }
public NiMorphData(NIFReader file, BinaryReader reader) : base(file, reader) { NumMorphs = reader.ReadUInt32(); NumVertices = reader.ReadUInt32(); RelativeTargets = reader.ReadByte(); Morphs = new Morph[NumMorphs]; for (var i = 0; i < NumMorphs; i++) { Morphs[i] = new Morph(reader, NumVertices); } }