Exemplo n.º 1
0
        public IObjLoader Create(IMaterialStreamProvider materialStreamProvider)
        {
            var dataStore = new DataStore();
            
            var faceParser = new FaceParser(dataStore);
            var groupParser = new GroupParser(dataStore);
            var normalParser = new NormalParser(dataStore);
            var textureParser = new TextureParser(dataStore);
            var vertexParser = new VertexParser(dataStore);

            var materialLibraryLoader = new MaterialLibraryLoader(dataStore);
            var materialLibraryLoaderFacade = new MaterialLibraryLoaderFacade(materialLibraryLoader, materialStreamProvider);
            var materialLibraryParser = new MaterialLibraryParser(materialLibraryLoaderFacade);
            var useMaterialParser = new UseMaterialParser(dataStore);

            return new ObjLoader(dataStore, faceParser, groupParser, normalParser, textureParser, vertexParser, materialLibraryParser, useMaterialParser);
        }
Exemplo n.º 2
0
        public void SetUp()
        {
            _textureDataStore = new DataStore();

            _faceParser = new FaceParser(_textureDataStore);
            _groupParser = new GroupParser(_textureDataStore);
            _normalParser = new NormalParser(_textureDataStore);
            _textureParser = new TextureParser(_textureDataStore);
            _vertexParser = new VertexParser(_textureDataStore);
            _materialStreamProviderSpy = new MaterialStreamProviderSpy();
            _materialStreamProviderSpy.StreamToReturn = CreateMemoryStreamFromString(MaterialLibraryString);

            _materialLibraryLoader = new MaterialLibraryLoader(_textureDataStore);
            _materialLibraryLoaderFacade = new MaterialLibraryLoaderFacade(_materialLibraryLoader, _materialStreamProviderSpy);
            _materialLibraryParser = new MaterialLibraryParser(_materialLibraryLoaderFacade);
            _useMaterialParser = new UseMaterialParser(_textureDataStore);

            _loader = new Loader.Loaders.ObjLoader(_textureDataStore, _faceParser, _groupParser, _normalParser, _textureParser, _vertexParser, _materialLibraryParser, _useMaterialParser);
        }
Exemplo n.º 3
0
        public void SetUp()
        {
            _vertexDataStoreMock = new VertexDataStoreMock();

            _vertexParser = new VertexParser(_vertexDataStoreMock);
        }