Beispiel #1
0
        private void ReadModels(InternalBspLump lump, BinaryReader reader)
        {
            reader.BaseStream.Seek(lump.offset, SeekOrigin.Begin);
            models = new InternalBspModel[lump.size / Marshal.SizeOf(typeof(InternalBspModel))];

            for (int i = 0; i < models.Length; i++)
            {
                models[i]      = new InternalBspModel();
                models[i].bbox = new float[6];

                for (int j = 0; j < models[i].bbox.Length; j++)
                {
                    models[i].bbox[j] = reader.ReadSingle();
                }

                models[i].faceStart  = reader.ReadInt32();
                models[i].faceCount  = reader.ReadInt32();
                models[i].brushStart = reader.ReadInt32();
                models[i].brushCount = reader.ReadInt32();

                TransformBoundingBox(models[i].bbox);
            }
        }
Beispiel #2
0
		private void ReadModels( InternalBspLump lump, BinaryReader reader )
		{
			reader.BaseStream.Seek( lump.offset, SeekOrigin.Begin );

			for ( int i = 0; i < models.Length; i++ )
			{
				models[ i ] = new InternalBspModel();
				models[ i ].bbox = new float[ 6 ];

				for ( int j = 0; j < models[ i ].bbox.Length; j++ )
					models[ i ].bbox[ j ] = reader.ReadSingle();

				models[ i ].faceStart = reader.ReadInt32();
				models[ i ].faceCount = reader.ReadInt32();
				models[ i ].brushStart = reader.ReadInt32();
				models[ i ].brushCount = reader.ReadInt32();

				TransformBoundingBox( models[ i ].bbox );
			}
		}