NvBlastExtExporterFbxUtils.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 NVBLASTEXTEXPORTERFBXUTILS_H
30 #define NVBLASTEXTEXPORTERFBXUTILS_H
31 
32 #include "fbxsdk.h"
33 #include <NvCTypes.h>
34 #include <string>
35 
36 namespace Nv
37 {
38  namespace Blast
39  {
40  struct Vertex;
41  }
42 }
43 
44 class FbxUtils
45 {
46 public:
47  static void VertexToFbx(const Nv::Blast::Vertex& vert, FbxVector4& outVertex, FbxVector4& outNormal, FbxVector2& outUV);
48 
49  static void NvcVec3ToFbx(const NvcVec3& inVector, FbxVector4& outVector);
50  static void NvcVec2ToFbx(const NvcVec2& inVector, FbxVector2& outVector);
51 
52  static FbxAxisSystem getBlastFBXAxisSystem();
53  static FbxSystemUnit getBlastFBXUnit();
54 
55  static std::string FbxAxisSystemToString(const FbxAxisSystem& axisSystem);
56  static std::string FbxSystemUnitToString(const FbxSystemUnit& systemUnit);
57 
58  //returns UINT32_MAX if not a chunk
59  static uint32_t getChunkIndexForNode(FbxNode* node, uint32_t* outParentChunkIndex = nullptr);
60  //Search using the old naming
61  static uint32_t getChunkIndexForNodeBackwardsCompatible(FbxNode* node, uint32_t* outParentChunkIndex = nullptr);
62  static std::string getChunkNodeName(uint32_t chunkIndex);
63 
64  static std::string getCollisionGeometryLayerName();
65  static std::string getRenderGeometryLayerName();
66 };
67 
68 #endif //NVBLASTEXTEXPORTERFBXUTILS_H
Definition: NvCTypes.h:43
Definition: NvBlastExtExporterFbxUtils.h:44
Definition: NvBlastExtAuthoringTypes.h:67
Definition: NvBlastArray.h:37
Definition: NvCTypes.h:49