#include #include "ModelInfo.h" #include "Globals.h" using namespace Framework; ModelInfo::ModelInfo(Framework::StreamReader* reader) { char len; reader->lese(&len, 1); char* path = new char[len + 1]; reader->lese(path, len); path[len] = 0; modelPath = path; delete[] path; short count; reader->lese((char*)&count, 2); for (int i = 0; i < count; i++) { reader->lese(&len, 1); path = new char[len + 1]; reader->lese(path, len); path[len] = 0; texturPaths.add(new Text(path)); delete[] path; } } Framework::Model3DData* ModelInfo::getModel() const { return uiFactory.initParam.bildschirm->zGraphicsApi()->getModel(modelPath); } Framework::Model3DTextur* ModelInfo::getTexture() const { Model3DTextur* textur = new Model3DTextur(); int index = 0; for (Text* texturPath : texturPaths) { Textur* tex = uiFactory.initParam.bildschirm->zGraphicsApi()->createOrGetTextur(texturPath->getText(), 0); textur->setPolygonTextur(index++, tex); } return textur; }