WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
OBJExporter.h
Go to the documentation of this file.
1/*----------------------------------------------------------------------*\
2| This file is part of WoW Model Viewer |
3| |
4| WoW Model Viewer is free software: you can redistribute it and/or |
5| modify it under the terms of the GNU General Public License as |
6| published by the Free Software Foundation, either version 3 of the |
7| License, or (at your option) any later version. |
8| |
9| WoW Model Viewer is distributed in the hope that it will be useful, |
10| but WITHOUT ANY WARRANTY; without even the implied warranty of |
11| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12| GNU General Public License for more details. |
13| |
14| You should have received a copy of the GNU General Public License |
15| along with WoW Model Viewer. |
16| If not, see <http://www.gnu.org/licenses/>. |
17\*----------------------------------------------------------------------*/
18
19/*
20 * OBJExporter.h
21 *
22 * Created on: 17 feb. 2015
23 * Copyright: 2015 , WoW Model Viewer (http://wowmodelviewer.net)
24 */
25
26#pragma once
27
28// Externals
29class WoWModel;
30
31// Other libraries
32#include "glm/glm.hpp"
33#include <fstream>
34#include <string>
35
36#include "ExporterPlugin.h"
37
39class OBJExporter : public ExporterPlugin //-V1106
40{
41
42public:
44
45 ~OBJExporter() = default;
46
47 std::wstring menuLabel() const;
48 std::wstring fileSaveTitle() const;
49 std::wstring fileSaveFilter() const;
50
51 bool exportModel(Model*, std::wstring file);
52
53private:
54 bool exportModelVertices(WoWModel* model, std::ofstream& file, int& counter, glm::mat4 m = glm::mat4(1.0),
55 glm::vec3 pos = glm::vec3(0.0f)) const;
56 bool exportModelMaterials(WoWModel* model, std::ofstream& file, std::string mtlFile) const;
57};
Abstract base class for model export plugins (OBJ, FBX, etc.).
Abstract base interface for all 3D model types.
Definition Model.h:5
Exports WoW models to Wavefront OBJ format with accompanying MTL material files.
Definition OBJExporter.h:40
bool exportModelVertices(WoWModel *model, std::ofstream &file, int &counter, glm::mat4 m=glm::mat4(1.0), glm::vec3 pos=glm::vec3(0.0f)) const
~OBJExporter()=default
bool exportModelMaterials(WoWModel *model, std::ofstream &file, std::string mtlFile) const
bool exportModel(Model *, std::wstring file)
std::wstring fileSaveFilter() const
std::wstring menuLabel() const
std::wstring fileSaveTitle() const
Core WoW .m2 model: geometry, animation, textures, and character data.
Definition WoWModel.h:50