-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathw3dObjConverter.cpp
More file actions
executable file
·44 lines (31 loc) · 925 Bytes
/
Copy pathw3dObjConverter.cpp
File metadata and controls
executable file
·44 lines (31 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright(c) 2005-2006. All Rights Reserved
// By Jean-René Bédard (https://github.com/jrbedard/3d-converter)
#include "StdAfx.h"
#include "objFile.h"
#include "w3dFile.h"
#include "w3dObjConverter.h"
CW3dObjConverter::CW3dObjConverter():
m_pW3dFile(NULL),
m_pOptions(NULL)
{
}
CW3dObjConverter::~CW3dObjConverter()
{
}
bool CW3dObjConverter::ParseOptions(const std::string& optionString)
{
m_pOptions = new CW3dObjOptions();
CToObjConverter::ParseOptions(optionString, m_pOptions);
return true;
}
// Convert a W3d file into an OBJ file
bool CW3dObjConverter::Convert(CFile* pOtherFile, CFile* pObjFile)
{
// Initialize W3d -> OBJ
m_pW3dFile = InitConversion<CW3dFile>(pOtherFile, pObjFile);
OBJ_ASSERT(m_pW3dFile && m_pOptions);
if(!m_pW3dFile || !m_pOptions)
return false;
MSG_INFO("Converting W3D file format into OBJ file format...");
return true;
}