aboutsummaryrefslogtreecommitdiff
path: root/tools/common/BlastDataExporter.h
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-02-24 09:32:20 -0800
committerBryan Galdrikian <[email protected]>2017-02-24 09:32:20 -0800
commite1bf674c16e3c8472b29574159c789cd3f0c64e0 (patch)
tree9f0cfce09c71a2c27ff19589fcad6cd83504477c /tools/common/BlastDataExporter.h
parentfirst commit (diff)
downloadblast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.tar.xz
blast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.zip
Updating to [email protected] and [email protected] with a new directory structure.
NvBlast folder is gone, files have been moved to top level directory. README is changed to reflect this.
Diffstat (limited to 'tools/common/BlastDataExporter.h')
-rw-r--r--tools/common/BlastDataExporter.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/tools/common/BlastDataExporter.h b/tools/common/BlastDataExporter.h
new file mode 100644
index 0000000..3e44a7c
--- /dev/null
+++ b/tools/common/BlastDataExporter.h
@@ -0,0 +1,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 \ No newline at end of file