Example #1
0
        /// <summary>
        /// Reads the resource data for a model from a stream and passes it to an IModelProcessor.
        /// </summary>
        /// <param name="reader">The stream to read the model data from.</param>
        /// <param name="model">The model's metadata.</param>
        /// <param name="sectionsToRead">A BitArray controlling which sections to read. Indices which are set to to true will be read.</param>
        /// <param name="buildInfo">Information about the cache file's target engine.</param>
        /// <param name="processor">The IModelProcessor to pass the read model data to.</param>
        public static void ReadModelData(IReader reader, IRenderModel model, BitArray sectionsToRead, BuildInformation buildInfo, IModelProcessor processor)
        {
            processor.BeginModel(model);

            ReadVertexBuffers(reader, model, sectionsToRead, buildInfo, processor);
            ReadIndexBuffers(reader, model, sectionsToRead, buildInfo, processor);

            processor.EndModel(model);
        }
Example #2
0
        /// <summary>
        ///     Reads the resource data for a model from a stream and passes it to an IModelProcessor.
        /// </summary>
        /// <param name="reader">The stream to read the model data from.</param>
        /// <param name="model">The model's metadata.</param>
        /// <param name="sectionsToRead">
        ///     A BitArray controlling which sections to read. Indices which are set to to true will be
        ///     read.
        /// </param>
        /// <param name="buildInfo">Information about the cache file's target engine.</param>
        /// <param name="processor">The IModelProcessor to pass the read model data to.</param>
        public static void ReadModelData(IReader reader, IRenderModel model, BitArray sectionsToRead,
                                         EngineDescription buildInfo, IModelProcessor processor)
        {
            processor.BeginModel(model);

            ReadVertexBuffers(reader, model, sectionsToRead, buildInfo, processor);
            ReadIndexBuffers(reader, model, sectionsToRead, buildInfo, processor);

            processor.EndModel(model);
        }