public Room(MainWindow mainWindow) { this.mainWindow = mainWindow; mainDictionairy = new BlenderResourceDictionary(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName + @"\Spielraumblend15.xaml"); BlenderModel roomModel = new BlenderModel(mainDictionairy, "Raum"); roomModel.rotate(-90, 0, 0); roomModel.rotate(0, -90, 0); roomModel.translate(0, -0.5, 3); roomModel.scale(-0.2, 0, 0); BlenderModel wallModel = new BlenderModel(mainDictionairy, "Wand"); wallModel.rotate(0, -90, 0); wallModel.rotate(0, 0, -90); wallModel.scale(-0.75, -0.75, -0.75); wallModel.translate(0, 0, 1.9); BlenderModel wallPartModel = new BlenderModel(mainDictionairy, "Wand_Teil"); wallPartModel.rotate(0, -90, 0); wallPartModel.rotate(0, 0, -90); wallPartModel.scale(-0.75, -0.75, -0.75); wallPartModel.translate(0, 0, 1.9); wallPartModel.translate(-0.5, 0.788, 0); roomModel.addToViewport(mainWindow.mainViewPort); wallModel.addToViewport(mainWindow.mainViewPort); wallPartModel.addToViewport(mainWindow.mainViewPort); populateElementList(); }
//######## right coordinates logic should be moved to room ##### /// <summary> /// Loads a model from a BlenderResourceDictionary /// </summary> /// <param name="blenderResourceDictionary">A BlenderResourceDictionary to load the model from</param> /// <param name="index">the name/key/index of the model to load</param> public BlenderModel(BlenderResourceDictionary blenderResourceDictionary, String index) : this(blenderResourceDictionary.resourceDictionary, index) { }
public Element(BlenderResourceDictionary dictionary, String index) { model = new BlenderModel(dictionary, index); setTransformations(); setAngles(); }