29 #ifndef NVBLASTEXTEXPORTERFBXREADER_H 30 #define NVBLASTEXTEXPORTERFBXREADER_H 50 CollisionHullImpl(
const CollisionHullImpl& other) : CollisionHullImpl()
62 polygonData =
nullptr;
65 CollisionHullImpl(CollisionHullImpl&& other)
67 operator=(std::move(other));
70 CollisionHullImpl& operator=(
const CollisionHullImpl& other)
82 CollisionHullImpl& operator=(CollisionHullImpl&& other)
86 pointsCount = other.pointsCount;
87 indicesCount = other.indicesCount;
88 polygonDataCount = other.polygonDataCount;
89 points = other.points;
90 indices = other.indices;
91 polygonData = other.polygonData;
93 other.pointsCount = 0;
94 other.indicesCount = 0;
95 other.polygonDataCount = 0;
96 other.points =
nullptr;
97 other.indices =
nullptr;
98 other.polygonData =
nullptr;
103 virtual ~CollisionHullImpl()
107 delete[] polygonData;
111 void copyFrom(
const CollisionHullImpl& other)
113 pointsCount = other.pointsCount;
114 indicesCount = other.indicesCount;
115 polygonDataCount = other.polygonDataCount;
116 points =
new NvcVec3[pointsCount];
117 indices =
new uint32_t[indicesCount];
119 memcpy(points, other.points,
sizeof(points[0]) * pointsCount);
120 memcpy(indices, other.indices,
sizeof(indices[0]) * indicesCount);
121 memcpy(polygonData, other.polygonData,
sizeof(polygonData[0]) * polygonDataCount);
129 virtual void release()
override;
134 virtual void loadFromFile(
const char* filename)
override;
138 return mVertexPositions.size();
143 return mIndices.size();
198 uint32_t mChunkCount;
199 std::vector<uint32_t> mHullsOffset;
200 std::vector<CollisionHullImpl> mHulls;
201 std::vector<uint32_t> mVertexToContainingChunkMap;
202 std::multimap<uint32_t, FbxNode*> mCollisionNodes;
203 std::vector<NvcVec3> mVertexPositions;
204 std::vector<NvcVec3> mVertexNormals;
205 std::vector<NvcVec2> mVertexUv;
206 std::vector<uint32_t> mIndices;
207 std::vector<int32_t> mSmoothingGroups;
208 std::vector<int32_t> mMaterialIds;
209 std::vector<std::string> mMaterialNames;
211 FbxAMatrix getTransformForNode(FbxNode* node);
212 void getFbxMeshes(FbxDisplayLayer* collisionDisplayLayer, FbxNode* node, std::vector<FbxNode*>& meshNodes);
213 bool getCollisionInternal();
214 bool getBoneInfluencesInternal(FbxMesh* meshNode);
virtual bool isCollisionLoaded() override
Definition: NvBlastExtExporterFbxReader.h:45
virtual uint32_t getBoneInfluences(uint32_t *&out) override
virtual uint32_t getCollision(uint32_t *&hullsOffset, Nv::Blast::CollisionHull **&hulls) override
virtual uint32_t * getIndexArray() override
virtual NvcVec3 * getPositionArray() override
int32_t * getMaterialIds() override
Definition: NvCTypes.h:43
const char * getMaterialName(int32_t id) override
Definition: NvBlastExtAuthoringTypes.h:120
Definition: NvBlastExtExporter.h:187
Definition: NvBlastExtAuthoringTypes.h:133
virtual void loadFromFile(const char *filename) override
int32_t getMaterialCount() override
virtual uint32_t getVerticesCount() const override
Definition: NvBlastExtExporterFbxReader.h:136
virtual NvcVec3 * getNormalsArray() override
int32_t * getSmoothingGroups() override
virtual NvcVec2 * getUvArray() override
virtual void release() override
virtual uint32_t getBoneCount() override
Definition: NvBlastArray.h:37
Definition: NvCTypes.h:49
virtual uint32_t getIndicesCount() const override
Definition: NvBlastExtExporterFbxReader.h:141