Main Page Class List Class Members

NvBlastExtAuthoring.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) 2016-2020 NVIDIA Corporation. All rights reserved.
27
28
29 #ifndef NVBLASTAUTHORING_H
30 #define NVBLASTAUTHORING_H
31
32 #include "NvBlastExtAuthoringTypes.h"
33
34 namespace Nv
35 {
36 namespace Blast
37 {
38 class Mesh;
39 class VoronoiSitesGenerator;
40 class CutoutSet;
41 class RandomGeneratorBase;
42 class FractureTool;
43 class ConvexMeshBuilder;
44 class BlastBondGenerator;
45 class MeshCleaner;
46 class PatternGenerator;
47 class Grid;
48 class GridWalker;
49 } // namespace Blast
50 } // namespace Nv
51
52 struct NvBlastExtAssetUtilsBondDesc;
53
67 NVBLAST_API Nv::Blast::Mesh*
68 NvBlastExtAuthoringCreateMesh(const NvcVec3* positions, const NvcVec3* normals, const NvcVec2* uv,
69 uint32_t verticesCount, const uint32_t* indices, uint32_t indicesCount);
70
84 NVBLAST_API Nv::Blast::Mesh*
85 NvBlastExtAuthoringCreateMeshOnlyTriangles(const void* vertices, uint32_t verticesCount, uint32_t* indices,
86 uint32_t indexCount, void* materials = nullptr, uint32_t materialStride = 4);
87
101 NVBLAST_API Nv::Blast::Mesh*
102 NvBlastExtAuthoringCreateMeshFromFacets(const void* vertices, const void* edges, const void* facets,
103 uint32_t verticesCount, uint32_t edgesCount, uint32_t facetsCount);
104
112 NVBLAST_API Nv::Blast::VoronoiSitesGenerator*
113 NvBlastExtAuthoringCreateVoronoiSitesGenerator(Nv::Blast::Mesh* mesh, Nv::Blast::RandomGeneratorBase* rng);
114
116 NVBLAST_API Nv::Blast::CutoutSet* NvBlastExtAuthoringCreateCutoutSet();
117
134 NVBLAST_API void
135 NvBlastExtAuthoringBuildCutoutSet(Nv::Blast::CutoutSet& cutoutSet, const uint8_t* pixelBuffer, uint32_t bufferWidth,
136 uint32_t bufferHeight, float segmentationErrorThreshold, float snapThreshold,
137 bool periodic, bool expandGaps);
138
143 NVBLAST_API Nv::Blast::FractureTool* NvBlastExtAuthoringCreateFractureTool();
144
149 NVBLAST_API Nv::Blast::BlastBondGenerator* NvBlastExtAuthoringCreateBondGenerator(Nv::Blast::ConvexMeshBuilder* builder);
150
160 NVBLAST_API int32_t NvBlastExtAuthoringBuildMeshConvexDecomposition(Nv::Blast::ConvexMeshBuilder* cmb,
161 const Nv::Blast::Triangle* mesh,
162 uint32_t triangleCount,
163 const Nv::Blast::ConvexDecompositionParams& params,
164 Nv::Blast::CollisionHull**& convexes);
165
166
179 NVBLAST_API void NvBlastExtAuthoringTrimCollisionGeometry(Nv::Blast::ConvexMeshBuilder* cmb, uint32_t chunksCount,
180 Nv::Blast::CollisionHull** in, const uint32_t* chunkDepth);
181
182
190 NVBLAST_API void NvBlastExtAuthoringTransformCollisionHullInPlace(Nv::Blast::CollisionHull* hull, const NvcVec3* scaling,
191 const NvcQuat* rotation, const NvcVec3* translation);
192
200 NVBLAST_API Nv::Blast::CollisionHull*
201 NvBlastExtAuthoringTransformCollisionHull(const Nv::Blast::CollisionHull* hull, const NvcVec3* scaling,
202 const NvcQuat* rotation, const NvcVec3* translation);
203
215 NVBLAST_API Nv::Blast::AuthoringResult*
216 NvBlastExtAuthoringProcessFracture(Nv::Blast::FractureTool& fTool, Nv::Blast::BlastBondGenerator& bondGenerator,
217 Nv::Blast::ConvexMeshBuilder& collisionBuilder,
218 const Nv::Blast::ConvexDecompositionParams& collisionParam,
219 int32_t defaultSupportDepth = -1);
220
221
225 NVBLAST_API void NvBlastExtAuthoringReleaseAuthoringResultCollision(Nv::Blast::ConvexMeshBuilder& collisionBuilder, Nv::Blast::AuthoringResult* ar);
226
230 NVBLAST_API void NvBlastExtAuthoringReleaseAuthoringResult(Nv::Blast::ConvexMeshBuilder& collisionBuilder, Nv::Blast::AuthoringResult* ar);
231
232
240 NVBLAST_API void NvBlastExtAuthoringUpdateGraphicsMesh(Nv::Blast::FractureTool& fTool, Nv::Blast::AuthoringResult& ares);
241
251 NVBLAST_API void NvBlastExtAuthoringBuildCollisionMeshes(Nv::Blast::AuthoringResult& ares,
252 Nv::Blast::ConvexMeshBuilder& collisionBuilder,
253 const Nv::Blast::ConvexDecompositionParams& collisionParam,
254 uint32_t chunksToProcessCount, uint32_t* chunksToProcess);
255
260 NVBLAST_API Nv::Blast::MeshCleaner* NvBlastExtAuthoringCreateMeshCleaner();
261
287 NVBLAST_API uint32_t NvBlastExtAuthoringFindAssetConnectingBonds(
288 const NvBlastAsset** components, const NvcVec3* scales, const NvcQuat* rotations, const NvcVec3* translations,
289 const uint32_t** convexHullOffsets, const Nv::Blast::CollisionHull*** chunkHulls, uint32_t componentCount,
290 NvBlastExtAssetUtilsBondDesc*& newBondDescs, float maxSeparation = 0.0f);
291
295 NVBLAST_API Nv::Blast::PatternGenerator* NvBlastExtAuthoringCreatePatternGenerator();
296
300 NVBLAST_API Nv::Blast::Grid* NvBlastExtAuthoringCreateGridAccelerator(uint32_t resolution, const Nv::Blast::Mesh* m);
301
305 NVBLAST_API Nv::Blast::GridWalker* NvBlastExtAuthoringCreateGridWalker(Nv::Blast::Grid* parent);
306
307 #endif // ifndef NVBLASTAUTHORING_H
NvBlastExtAuthoringCreateMeshFromFacets
Nv::Blast::Mesh * NvBlastExtAuthoringCreateMeshFromFacets(const void *vertices, const void *edges, const void *facets, uint32_t verticesCount, uint32_t edgesCount, uint32_t facetsCount)
Nv::Blast::ConvexMeshBuilder
Definition: NvBlastExtAuthoringConvexMeshBuilder.h:47
Nv::Blast::VoronoiSitesGenerator
Definition: NvBlastExtAuthoringFractureTool.h:179
Nv::Blast::MeshCleaner
Definition: NvBlastExtAuthoringMeshCleaner.h:52
NvBlastExtAuthoringCreateCutoutSet
Nv::Blast::CutoutSet * NvBlastExtAuthoringCreateCutoutSet()
Nv::Blast::CutoutSet
Definition: NvBlastExtAuthoringCutout.h:36
NvBlastExtAuthoringTypes.h
Nv::Blast::Mesh
Definition: NvBlastExtAuthoringMesh.h:42
Nv::Blast::FractureTool
Definition: NvBlastExtAuthoringFractureTool.h:264
NvBlastExtAuthoringReleaseAuthoringResultCollision
void NvBlastExtAuthoringReleaseAuthoringResultCollision(Nv::Blast::ConvexMeshBuilder &collisionBuilder, Nv::Blast::AuthoringResult *ar)
NvcVec2
Definition: NvCTypes.h:43
Nv::Blast::RandomGeneratorBase
Definition: NvBlastExtAuthoringFractureTool.h:66
Nv::Blast::BlastBondGenerator
Definition: NvBlastExtAuthoringBondGenerator.h:74
NvBlastExtAuthoringBuildMeshConvexDecomposition
int32_t NvBlastExtAuthoringBuildMeshConvexDecomposition(Nv::Blast::ConvexMeshBuilder *cmb, const Nv::Blast::Triangle *mesh, uint32_t triangleCount, const Nv::Blast::ConvexDecompositionParams &params, Nv::Blast::CollisionHull **&convexes)
NvBlastExtAuthoringProcessFracture
Nv::Blast::AuthoringResult * NvBlastExtAuthoringProcessFracture(Nv::Blast::FractureTool &fTool, Nv::Blast::BlastBondGenerator &bondGenerator, Nv::Blast::ConvexMeshBuilder &collisionBuilder, const Nv::Blast::ConvexDecompositionParams &collisionParam, int32_t defaultSupportDepth=-1)
NvBlastExtAuthoringTransformCollisionHull
Nv::Blast::CollisionHull * NvBlastExtAuthoringTransformCollisionHull(const Nv::Blast::CollisionHull *hull, const NvcVec3 *scaling, const NvcQuat *rotation, const NvcVec3 *translation)
Nv::Blast::CollisionHull
Definition: NvBlastExtAuthoringTypes.h:133
NvBlastExtAuthoringCreateGridWalker
Nv::Blast::GridWalker * NvBlastExtAuthoringCreateGridWalker(Nv::Blast::Grid *parent)
NvBlastExtAuthoringCreateMeshCleaner
Nv::Blast::MeshCleaner * NvBlastExtAuthoringCreateMeshCleaner()
NVBLAST_API
#define NVBLAST_API
Definition: NvBlastPreprocessor.h:37
Nv::Blast::Grid
Definition: NvBlastExtAuthoringAccelerator.h:124
NvBlastExtAuthoringBuildCutoutSet
void NvBlastExtAuthoringBuildCutoutSet(Nv::Blast::CutoutSet &cutoutSet, const uint8_t *pixelBuffer, uint32_t bufferWidth, uint32_t bufferHeight, float segmentationErrorThreshold, float snapThreshold, bool periodic, bool expandGaps)
Nv::Blast::PatternGenerator
Definition: NvBlastExtAuthoringPatternGenerator.h:108
NvBlastExtAuthoringCreateGridAccelerator
Nv::Blast::Grid * NvBlastExtAuthoringCreateGridAccelerator(uint32_t resolution, const Nv::Blast::Mesh *m)
Nv::Blast::ConvexDecompositionParams
Definition: NvBlastExtAuthoringTypes.h:195
NvBlastExtAssetUtilsBondDesc
Definition: NvBlastExtAssetUtils.h:66
Nv::Blast::AuthoringResult
Definition: NvBlastExtAuthoringTypes.h:148
NvBlastExtAuthoringCreateMesh
Nv::Blast::Mesh * NvBlastExtAuthoringCreateMesh(const NvcVec3 *positions, const NvcVec3 *normals, const NvcVec2 *uv, uint32_t verticesCount, const uint32_t *indices, uint32_t indicesCount)
NvBlastExtAuthoringCreateMeshOnlyTriangles
Nv::Blast::Mesh * NvBlastExtAuthoringCreateMeshOnlyTriangles(const void *vertices, uint32_t verticesCount, uint32_t *indices, uint32_t indexCount, void *materials=nullptr, uint32_t materialStride=4)
Nv::Blast::Triangle
Definition: NvBlastExtAuthoringTypes.h:79
NvBlastExtAuthoringCreateFractureTool
Nv::Blast::FractureTool * NvBlastExtAuthoringCreateFractureTool()
NvBlastExtAuthoringCreateBondGenerator
Nv::Blast::BlastBondGenerator * NvBlastExtAuthoringCreateBondGenerator(Nv::Blast::ConvexMeshBuilder *builder)
NvBlastAsset
Definition: NvBlastTypes.h:286
NvBlastExtAuthoringReleaseAuthoringResult
void NvBlastExtAuthoringReleaseAuthoringResult(Nv::Blast::ConvexMeshBuilder &collisionBuilder, Nv::Blast::AuthoringResult *ar)
NvBlastExtAuthoringTransformCollisionHullInPlace
void NvBlastExtAuthoringTransformCollisionHullInPlace(Nv::Blast::CollisionHull *hull, const NvcVec3 *scaling, const NvcQuat *rotation, const NvcVec3 *translation)
NvBlastExtAuthoringCreateVoronoiSitesGenerator
Nv::Blast::VoronoiSitesGenerator * NvBlastExtAuthoringCreateVoronoiSitesGenerator(Nv::Blast::Mesh *mesh, Nv::Blast::RandomGeneratorBase *rng)
Nv::Blast::GridWalker
Definition: NvBlastExtAuthoringAccelerator.h:143
NvBlastExtAuthoringUpdateGraphicsMesh
void NvBlastExtAuthoringUpdateGraphicsMesh(Nv::Blast::FractureTool &fTool, Nv::Blast::AuthoringResult &ares)
NvBlastExtAuthoringBuildCollisionMeshes
void NvBlastExtAuthoringBuildCollisionMeshes(Nv::Blast::AuthoringResult &ares, Nv::Blast::ConvexMeshBuilder &collisionBuilder, const Nv::Blast::ConvexDecompositionParams &collisionParam, uint32_t chunksToProcessCount, uint32_t *chunksToProcess)
Nv
Definition: NvBlastExtAuthoring.h:34
NvcVec3
Definition: NvCTypes.h:49
NvBlastExtAuthoringFindAssetConnectingBonds
uint32_t NvBlastExtAuthoringFindAssetConnectingBonds(const NvBlastAsset **components, const NvcVec3 *scales, const NvcQuat *rotations, const NvcVec3 *translations, const uint32_t **convexHullOffsets, const Nv::Blast::CollisionHull ***chunkHulls, uint32_t componentCount, NvBlastExtAssetUtilsBondDesc *&newBondDescs, float maxSeparation=0.0f)
NvcQuat
Definition: NvCTypes.h:61
NvBlastExtAuthoringTrimCollisionGeometry
void NvBlastExtAuthoringTrimCollisionGeometry(Nv::Blast::ConvexMeshBuilder *cmb, uint32_t chunksCount, Nv::Blast::CollisionHull **in, const uint32_t *chunkDepth)
NvBlastExtAuthoringCreatePatternGenerator
Nv::Blast::PatternGenerator * NvBlastExtAuthoringCreatePatternGenerator()