Main Page Class List Class Members

NvBlastExtAuthoringBondGenerator.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 NVBLASTEXTAUTHORINGBONDGENERATOR_H
30 #define NVBLASTEXTAUTHORINGBONDGENERATOR_H
31
32 #include "NvBlastExtAuthoringTypes.h"
33
34 struct NvBlastBondDesc;
35 struct NvBlastChunkDesc;
36 struct NvBlastBond;
37
38 namespace Nv
39 {
40 namespace Blast
41 {
42
43 // Forward declarations
44 class FractureTool;
45 class TriangleProcessor;
46 struct PlaneChunkIndexer;
47
54 struct BondGenerationConfig
55 {
56 enum BondGenMode { EXACT, AVERAGE };
57 float maxSeparation;
58 BondGenMode bondMode;
59 };
60
61
62 struct PlaneChunkIndexer
63 {
64 int32_t chunkId;
65 int32_t trId;
66 NvcPlane plane;
67 };
68
69
74 class BlastBondGenerator
75 {
76 public:
77 virtual ~BlastBondGenerator() {}
78
82 virtual void release() = 0;
83
93 virtual int32_t buildDescFromInternalFracture(FractureTool* tool, const bool* chunkIsSupport,
94 NvBlastBondDesc*& resultBondDescs, NvBlastChunkDesc*& resultChunkDescriptors) = 0;
95
96
107 virtual int32_t createBondBetweenMeshes(uint32_t meshACount, const Triangle* meshA, uint32_t meshBCount, const Triangle* meshB,
108 NvBlastBond& resultBond, BondGenerationConfig conf) = 0;
109
124 virtual int32_t createBondBetweenMeshes(uint32_t meshCount, const uint32_t* geometryOffset, const Triangle* geometry,
125 uint32_t overlapsCount, const uint32_t* overlapsA, const uint32_t* overlapsB,
126 NvBlastBondDesc*& resultBond, BondGenerationConfig cfg) = 0;
127
128
142 virtual int32_t bondsFromPrefractured(uint32_t meshCount, const uint32_t* geometryOffset, const Triangle* geometry,
143 const bool* chunkIsSupport, NvBlastBondDesc*& resultBondDescs,
144 BondGenerationConfig conf) = 0;
145
160 virtual int32_t bondsFromPrefractured(uint32_t meshCount, const uint32_t* convexHullOffset, const CollisionHull** chunkHulls,
161 const bool* chunkIsSupport, const uint32_t* meshGroups, NvBlastBondDesc*& resultBondDescs, float maxSeparation) = 0;
162
163
164
165 };
166
167 } // namespace Blast
168 } // namespace Nv
169
170 #endif // NVBLASTEXTAUTHORINGBONDGENERATOR_H
Nv::Blast::PlaneChunkIndexer::plane
NvcPlane plane
Definition: NvBlastExtAuthoringBondGenerator.h:66
Nv::Blast::PlaneChunkIndexer::trId
int32_t trId
Definition: NvBlastExtAuthoringBondGenerator.h:65
Nv::Blast::BondGenerationConfig::BondGenMode
BondGenMode
Definition: NvBlastExtAuthoringBondGenerator.h:56
NvBlastBond
Definition: NvBlastTypes.h:189
Nv::Blast::BondGenerationConfig::EXACT
Definition: NvBlastExtAuthoringBondGenerator.h:56
Nv::Blast::BondGenerationConfig::bondMode
BondGenMode bondMode
Definition: NvBlastExtAuthoringBondGenerator.h:58
NvBlastExtAuthoringTypes.h
NvcPlane
Definition: NvCTypes.h:99
NvBlastBondDesc
Definition: NvBlastTypes.h:322
Nv::Blast::FractureTool
Definition: NvBlastExtAuthoringFractureTool.h:264
Nv::Blast::BlastBondGenerator
Definition: NvBlastExtAuthoringBondGenerator.h:74
Nv::Blast::PlaneChunkIndexer::chunkId
int32_t chunkId
Definition: NvBlastExtAuthoringBondGenerator.h:64
Nv::Blast::CollisionHull
Definition: NvBlastExtAuthoringTypes.h:133
Nv::Blast::PlaneChunkIndexer
Definition: NvBlastExtAuthoringBondGenerator.h:62
Nv::Blast::Triangle
Definition: NvBlastExtAuthoringTypes.h:79
NvBlastChunkDesc
Definition: NvBlastTypes.h:292
Nv::Blast::BondGenerationConfig::AVERAGE
Definition: NvBlastExtAuthoringBondGenerator.h:56
Nv::Blast::BondGenerationConfig
Definition: NvBlastExtAuthoringBondGenerator.h:54
Nv::Blast::BondGenerationConfig::maxSeparation
float maxSeparation
Definition: NvBlastExtAuthoringBondGenerator.h:57
Nv
Definition: NvBlastExtAuthoring.h:34
Nv::Blast::BlastBondGenerator::~BlastBondGenerator
virtual ~BlastBondGenerator()
Definition: NvBlastExtAuthoringBondGenerator.h:77