blob: 3e44a7c5ec86b39fa2f63d0820747235c5f03775 (
plain) (
blame)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#ifndef BLAST_DATA_EXPORTER
#define BLAST_DATA_EXPORTER
#include <NvBlastIndexFns.h>
#include <NvBlastExtAuthoringTypes.h>
#include <NvBlastExtPxAsset.h>
#include <vector>
#include <string>
using namespace Nv::Blast;
namespace physx
{
class PxCooking;
}
struct NvBlastBondDesc;
struct NvBlastChunkDesc;
struct NvBlastAsset;
namespace Nv
{
namespace Blast
{
class TkAsset;
class ExtPxAsset;
}
}
/**
Tool for Blast asset creation and exporting
*/
class BlastDataExporter
{
public:
BlastDataExporter(TkFramework* framework, physx::PxCooking* cooking, NvBlastLog log) : mFramework(framework), mCooking(cooking), m_log(log) {};
/**
Creates ExtPxAsset
*/
ExtPxAsset* createExtBlastAsset(std::vector<NvBlastBondDesc>& bondDescs, const std::vector<NvBlastChunkDesc>& chunkDescs,
std::vector<ExtPxAssetDesc::ChunkDesc>& physicsChunks);
/**
Creates Low Level Blast asset
*/
NvBlastAsset* createLlBlastAsset(std::vector<NvBlastBondDesc>& bondDescs, const std::vector<NvBlastChunkDesc>& chunkDescs);
/**
Creates Blast Toolkit Asset asset
*/
TkAsset* createTkBlastAsset(const std::vector<NvBlastBondDesc>& bondDescs, const std::vector<NvBlastChunkDesc>& chunkDescs);
/*
Saves Blast LL asset to given path
*/
bool saveBlastLLAsset(const std::string& outputFilePath, const NvBlastAsset* asset);
/*
Saves Blast Tk asset to given path
*/
bool saveBlastTkAsset(const std::string& outputFilePath, const TkAsset* asset);
/*
Saves Blast BPXA asset to given path
*/
bool saveBlastExtAsset(const std::string& outputFilePath, const ExtPxAsset* asset);
private:
TkFramework* mFramework;
physx::PxCooking* mCooking;
NvBlastLog m_log;
};
#endif
|