NvBlastExtExporterObjWriter.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTEXPORTEROBJWRITER_H
30 #define NVBLASTEXTEXPORTEROBJWRITER_H
31 
32 #include "NvBlastExtExporter.h"
33 #include <memory>
34 #include <vector>
35 #include <PxVec2.h>
36 #include <PxVec3.h>
37 #include <string>
38 struct NvBlastAsset;
39 
40 namespace Nv
41 {
42 namespace Blast
43 {
44 
46 {
47 public:
48 
49  ObjFileWriter(): mIntSurfaceMatIndex(-1), interiorNameStr("INTERIOR_MATERIAL") { };
50  ~ObjFileWriter() = default;
51 
52  virtual void release() override;
53 
54  virtual bool appendMesh(const AuthoringResult& aResult, const char* assetName, bool nonSkinned) override;
55 
59  virtual bool appendMesh(const ExporterMeshData& meshData, const char* assetName, bool nonSkinned) override;
60 
64  virtual bool saveToFile(const char* assetName, const char* outputPath) override;
65 
69  virtual void setInteriorIndex(int32_t index) override;
70 
71 private:
72  std::shared_ptr<ExporterMeshData> mMeshData;
73  int32_t mIntSurfaceMatIndex;
74  std::string interiorNameStr;
75 };
76 
77 }
78 }
79 
80 #endif // NVBLASTEXTEXPORTEROBJWRITER_H
virtual void release() override
Definition: NvBlastExtExporterObjWriter.h:45
Definition: NvBlastExtAuthoringTypes.h:148
Definition: NvBlastExtExporter.h:50
Definition: NvBlastExtExporter.h:208
Definition: NvBlastTypes.h:286
virtual bool appendMesh(const AuthoringResult &aResult, const char *assetName, bool nonSkinned) override
virtual void setInteriorIndex(int32_t index) override
virtual bool saveToFile(const char *assetName, const char *outputPath) override
ObjFileWriter()
Definition: NvBlastExtExporterObjWriter.h:49
Definition: NvBlastArray.h:37