Init
This commit is contained in:
46
exchange/exchangesource/PRC2XML/ExchangeManagement.cpp
Normal file
46
exchange/exchangesource/PRC2XML/ExchangeManagement.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// Created by mathis on 27/05/2016.
|
||||
//
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include "TargetConditionals.h"
|
||||
# if TARGET_OS_IPHONE == 1 || TARGET_IPHONE_SIMULATOR == 1
|
||||
# define INITIALIZE_A3D_API_STATIC
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "ExchangeManagement.h"
|
||||
|
||||
#include <A3DSDKIncludes.h>
|
||||
|
||||
#include "PRC2XML.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include "TargetConditionals.h"
|
||||
# if TARGET_OS_IPHONE == 1 || TARGET_IPHONE_SIMULATOR == 1
|
||||
# include <A3DSDKInternalConvert.hxx>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
ExchangeManagement::ExchangeManagement() {
|
||||
m_libraryLoadingStatus = A3D_SUCCESS;
|
||||
|
||||
m_sHoopsExchangeLoader = new A3DSDKHOOPSExchangeLoader(NULL);
|
||||
m_libraryLoadingStatus = m_sHoopsExchangeLoader->m_eSDKStatus;
|
||||
}
|
||||
|
||||
A3DInt32 ExchangeManagement::convert(const std::string& filename, const std::string& outputPath) {
|
||||
|
||||
A3DInt32 iRet = A3D_ERROR;
|
||||
if (m_libraryLoadingStatus == A3D_SUCCESS) {
|
||||
A3DImport sImport(filename.c_str());
|
||||
|
||||
iRet = ProcessFile(*m_sHoopsExchangeLoader, sImport, filename.c_str(), outputPath.c_str());
|
||||
}
|
||||
return iRet;
|
||||
}
|
||||
|
||||
ExchangeManagement::~ExchangeManagement() {
|
||||
delete m_sHoopsExchangeLoader;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user