Files
Hoops_Exchange/exchange/exchangesource/PRC2XML/ExchangeManagement.cpp
2025-12-15 23:22:33 +08:00

48 lines
1.1 KiB
C++

//
// 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 <hoops_license.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, HOOPS_LICENSE);
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(), false);
}
return iRet;
}
ExchangeManagement::~ExchangeManagement() {
delete m_sHoopsExchangeLoader;
}