33 lines
1.2 KiB
C++
33 lines
1.2 KiB
C++
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#if __has_include("assimp/Exporter.hpp")
|
|
#include <assimp/scene.h>
|
|
#endif
|
|
|
|
namespace OpenVulkano::Scene
|
|
{
|
|
class Geometry;
|
|
class MeshWriter
|
|
{
|
|
public:
|
|
static void WriteAsOBJ(Geometry* geometry, const std::string& filePath);
|
|
static void WriteAsUSD(Geometry* geometry, const std::string& filePath);
|
|
static void WriteObjAsZip(Geometry* geometry, const std::string& texturePath, const std::string& zipPath);
|
|
static void WriteAsUSDZ(Geometry* geometry, const std::string& texturePath, const std::string& usdzPath);
|
|
static void WriteAsFBX(Geometry* geometry, const std::string& texturePath, const std::string& fbxPath);
|
|
static void WriteAsSTL(Geometry* geometry, const std::string& filePath, bool binary);
|
|
private:
|
|
#if __has_include("assimp/Exporter.hpp")
|
|
static void SetupAssimpScene(Geometry* geometry, aiScene& scene, aiNode& rootNode, aiMesh& mesh,
|
|
bool withTexCoords, float scaling);
|
|
#endif
|
|
};
|
|
} |