public ObjLoader Create(MaterialStreamProvider materialStreamProvider) { var dataStore = new DataStore(_name); 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)); }
public IWavefrontObjLoader Create(IMaterialStreamProvider materialStreamProvider) { var dataStore = new DataStore(); var faceParser = new FaceParser(dataStore); var groupParser = new GroupParser(dataStore); var normalParser = new VertexNormalParser(dataStore); var textureParser = new TextureCoordinateParser(dataStore); var vertexParser = new GeometricVertexParser(dataStore); var materialLibraryLoader = new MaterialLibraryLoader(dataStore); var materialLibraryLoaderFacade = new MaterialLibraryLoaderFacade(materialLibraryLoader, materialStreamProvider); var materialLibraryParser = new MaterialLibraryParser(materialLibraryLoaderFacade); var useMaterialParser = new UseMaterialParser(dataStore); return(new WavefrontObjLoader(dataStore, faceParser, groupParser, normalParser, textureParser, vertexParser, materialLibraryParser, useMaterialParser)); }
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); }
public ObjLoader( DataStore dataStore, FaceParser faceParser, GroupParser groupParser, NormalParser normalParser, TextureParser textureParser, VertexParser vertexParser, MaterialLibraryParser materialLibraryParser, UseMaterialParser useMaterialParser) { _dataStore = dataStore; SetupTypeParsers( vertexParser, faceParser, normalParser, textureParser, groupParser, materialLibraryParser, useMaterialParser); }
public void SetUp() { _elementGroupSpy = new ElementGroupSpy(); _parser = new UseMaterialParser(_elementGroupSpy); }