public DecoratorCacheBlockBlock(BinaryReader binaryReader) { this.geometryBlockInfo = new GlobalGeometryBlockInfoStruct(binaryReader); { var elementSize = Marshal.SizeOf(typeof(DecoratorCacheBlockDataBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.cacheBlockData = new DecoratorCacheBlockDataBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.cacheBlockData[i] = new DecoratorCacheBlockDataBlock(binaryReader); } } } }
public GlobalWaterDefinitionsBlock(BinaryReader binaryReader) { this.shader = binaryReader.ReadTagReference(); { var elementSize = Marshal.SizeOf(typeof(WaterGeometrySectionBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.section = new WaterGeometrySectionBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.section[i] = new WaterGeometrySectionBlock(binaryReader); } } } this.geometryBlockInfo = new GlobalGeometryBlockInfoStruct(binaryReader); this.sunSpotColor = binaryReader.ReadColorR8G8B8(); this.reflectionTint = binaryReader.ReadColorR8G8B8(); this.refractionTint = binaryReader.ReadColorR8G8B8(); this.horizonColor = binaryReader.ReadColorR8G8B8(); this.sunSpecularPower = binaryReader.ReadSingle(); this.reflectionBumpScale = binaryReader.ReadSingle(); this.refractionBumpScale = binaryReader.ReadSingle(); this.fresnelScale = binaryReader.ReadSingle(); this.sunDirHeading = binaryReader.ReadSingle(); this.sunDirPitch = binaryReader.ReadSingle(); this.fOV = binaryReader.ReadSingle(); this.aspect = binaryReader.ReadSingle(); this.height = binaryReader.ReadSingle(); this.farz = binaryReader.ReadSingle(); this.rotateOffset = binaryReader.ReadSingle(); this.center = binaryReader.ReadVector2(); this.extents = binaryReader.ReadVector2(); this.fogNear = binaryReader.ReadSingle(); this.fogFar = binaryReader.ReadSingle(); this.dynamicHeightBias = binaryReader.ReadSingle(); }