diff --git a/blast_tools_and_samples-windows.zip b/blast_tools_and_samples-windows.zip index 97086772..72f0ab1b 100755 Binary files a/blast_tools_and_samples-windows.zip and b/blast_tools_and_samples-windows.zip differ diff --git a/docs/api_docs/files/_nv_blast_8h.html b/docs/api_docs/files/_nv_blast_8h.html index bc68d84f..23523fb1 100755 --- a/docs/api_docs/files/_nv_blast_8h.html +++ b/docs/api_docs/files/_nv_blast_8h.html @@ -1749,7 +1749,7 @@

sdk/lowlevel/include/NvBlast.h File Reference

#include "[out] chunkReorderMap User-supplied map of size chunkCount to fill. For every chunk index this array will contain new chunk position (index). [in] chunkDescs Array of chunk descriptors of size chunkCount. [in] chunkCount The number of chunk descriptors. - [in] scratch User-supplied scratch storage, must point to 2 * chunkCount * sizeof(uint32_t) valid bytes of memory. + [in] scratch User-supplied scratch storage, must point to 3 * chunkCount * sizeof(uint32_t) valid bytes of memory. [in] logFn User-supplied message function (see NvBlastLog definition). May be NULL. diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_fracture_tool_8h-source.html b/docs/api_docs/files/_nv_blast_ext_authoring_fracture_tool_8h-source.html index bdf4c9b2..03e0eec2 100755 --- a/docs/api_docs/files/_nv_blast_ext_authoring_fracture_tool_8h-source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_fracture_tool_8h-source.html @@ -69,8 +69,8 @@

sdk/extensions/authoring/include/NvBlastExtAuthoringFractureTool.h

00048 { 00049 enum ChunkFlags 00050 { -00051 NO_FLAGS = 0, -00052 CREATED_BY_ISLAND_DETECTOR = 1 +00051 NO_FLAGS = 0, +00052 APPROXIMATE_BONDING = 1 // Created by island splitting or chunk merge, etc. and should check for inexact bonds 00053 }; 00054 00055 Mesh* meshData; @@ -245,15 +245,17 @@

sdk/extensions/authoring/include/NvBlastExtAuthoringFractureTool.h

00512 const NvcVec2i* adjChunks, uint32_t adjChunksSize, 00513 bool removeOriginalChunks = false) = 0; 00514 -00520 virtual void fitUvToRect(float side, uint32_t chunkId) = 0; -00521 -00526 virtual void fitAllUvToRect(float side) = 0; -00527 }; -00528 -00529 } // namespace Blast -00530 } // namespace Nv -00531 -00532 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H +00521 virtual bool setApproximateBonding(uint32_t chunkIndex, bool useApproximateBonding) = 0; +00522 +00528 virtual void fitUvToRect(float side, uint32_t chunkId) = 0; +00529 +00534 virtual void fitAllUvToRect(float side) = 0; +00535 }; +00536 +00537 } // namespace Blast +00538 } // namespace Nv +00539 +00540 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_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-2018 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTAUTHORINGFRACTURETOOL_H
30 #define NVBLASTAUTHORINGFRACTURETOOL_H
31 
33 
34 namespace Nv
35 {
36 namespace Blast
37 {
38 
39 class SpatialAccelerator;
40 class Triangulator;
41 class Mesh;
42 class CutoutSet;
43 
44 /*
45  Chunk data, chunk with chunkId == 0 is always source mesh.
46 */
47 struct ChunkInfo
48 {
50  {
51  NO_FLAGS = 0,
53  };
54 
56  int32_t parent;
57  int32_t chunkId;
58  uint32_t flags;
59  bool isLeaf;
60  bool isChanged;
61 };
62 
67 {
68  public:
69  // Generates uniformly distributed value in [0, 1] range.
70  virtual float getRandomValue() = 0;
71  // Seeds random value generator
72  virtual void seed(int32_t seed) = 0;
73  virtual ~RandomGeneratorBase(){};
74 };
75 
76 /*
77  Noise fracturing configuration for chunks's faces
78 */
80 {
86  float amplitude = 0.f;
87 
91  float frequency = 1.f;
92 
96  uint32_t octaveNumber = 1;
97 
101  NvcVec3 samplingInterval = { 1, 1, 1 };
102 };
103 
104 /*
105  Slicing fracturing configuration
106 */
108 {
112  int32_t x_slices = 1, y_slices = 1, z_slices = 1;
113 
117  float offset_variations = 0.f;
118 
122  float angle_variations = 0.f;
123 
124  /*
125  Noise parameters for faces between sliced chunks
126  */
128 };
129 
134 {
139  CutoutSet* cutoutSet = nullptr;
140 
145  NvcTransform transform = {{0, 0, 0, 1}, {0, 0, 0}};
146 
152  NvcVec2 scale = { -1, -1 };
153 
157  float aperture = 0.f;
158 
163  bool isRelativeTransform = true;
164 
168  bool useSmoothing = false;
169 
174 };
175 
180 {
181  public:
183 
187  virtual void release() = 0;
188 
192  virtual void setBaseMesh(const Mesh* mesh) = 0;
193 
199  virtual uint32_t getVoronoiSites(const NvcVec3*& sites) = 0;
200 
205  virtual void addSite(const NvcVec3& site) = 0;
210  virtual void uniformlyGenerateSitesInMesh(uint32_t numberOfSites) = 0;
211 
218  virtual void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) = 0;
219 
230  virtual void radialPattern(const NvcVec3& center, const NvcVec3& normal, float radius, int32_t angularSteps,
231  int32_t radialSteps, float angleOffset = 0.0f, float variability = 0.0f) = 0;
232 
239  virtual void generateInSphere(const uint32_t count, const float radius, const NvcVec3& center) = 0;
240 
245  virtual void setStencil(const Mesh* stencil) = 0;
246 
250  virtual void clearStencil() = 0;
251 
258  virtual void deleteInSphere(const float radius, const NvcVec3& center, const float eraserProbability = 1) = 0;
259 };
260 
265 {
266 
267  public:
268  virtual ~FractureTool() {}
269 
273  virtual void release() = 0;
274 
278  virtual void reset() = 0;
279 
280 
284  virtual void setSourceMesh(const Mesh* mesh) = 0;
285 
289  virtual int32_t setChunkMesh(const Mesh* mesh, int32_t parentId) = 0;
290 
294  virtual void setInteriorMaterialId(int32_t materialId) = 0;
295 
299  virtual int32_t getInteriorMaterialId() const = 0;
300 
304  virtual void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) = 0;
305 
309  virtual Mesh* createChunkMesh(int32_t chunkId) = 0;
310 
315  virtual void getTransformation(NvcVec3& offset, float& scale) = 0;
316 
317 
326  virtual int32_t
327  voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, bool replaceChunk) = 0;
328 
340  virtual int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints,
341  const NvcVec3& scale, const NvcQuat& rotation, bool replaceChunk) = 0;
342 
343 
355  virtual int32_t
356  slicing(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
357 
371  virtual int32_t cut(uint32_t chunkId, const NvcVec3& normal, const NvcVec3& position,
372  const NoiseConfiguration& noise, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
373 
385  virtual int32_t cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
386 
387 
391  virtual void finalizeFracturing() = 0;
392 
396  virtual uint32_t getChunkCount() const = 0;
397 
401  virtual const ChunkInfo& getChunkInfo(int32_t chunkIndex) = 0;
402 
410  virtual float getMeshOverlap(const Mesh& meshA, const Mesh& meshB) = 0;
411 
418  virtual uint32_t getBaseMesh(int32_t chunkIndex, Triangle*& output) = 0;
419 
427  virtual uint32_t updateBaseMesh(int32_t chunkIndex, Triangle* output) = 0;
428 
434  virtual int32_t getChunkIndex(int32_t chunkId) = 0;
435 
441  virtual int32_t getChunkId(int32_t chunkIndex) = 0;
442 
448  virtual int32_t getChunkDepth(int32_t chunkId) = 0;
449 
456  virtual uint32_t getChunksIdAtDepth(uint32_t depth, int32_t*& chunkIds) = 0;
457 
467  virtual uint32_t
468  getBufferedBaseMeshes(Vertex*& vertexBuffer, uint32_t*& indexBuffer, uint32_t*& indexBufferOffsets) = 0;
469 
474  virtual void setRemoveIslands(bool isRemoveIslands) = 0;
475 
481  virtual int32_t islandDetectionAndRemoving(int32_t chunkId, bool createAtNewDepth = false) = 0;
482 
487  virtual bool isMeshContainOpenEdges(const Mesh* input) = 0;
488 
495  virtual bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) = 0;
496 
510  virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
511  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
512  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
513  bool removeOriginalChunks = false) = 0;
514 
520  virtual void fitUvToRect(float side, uint32_t chunkId) = 0;
521 
526  virtual void fitAllUvToRect(float side) = 0;
527 };
528 
529 } // namespace Blast
530 } // namespace Nv
531 
532 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H
Definition: NvBlastExtAuthoringFractureTool.h:107
+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-2018 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTAUTHORINGFRACTURETOOL_H
30 #define NVBLASTAUTHORINGFRACTURETOOL_H
31 
33 
34 namespace Nv
35 {
36 namespace Blast
37 {
38 
39 class SpatialAccelerator;
40 class Triangulator;
41 class Mesh;
42 class CutoutSet;
43 
44 /*
45  Chunk data, chunk with chunkId == 0 is always source mesh.
46 */
47 struct ChunkInfo
48 {
50  {
51  NO_FLAGS = 0,
52  APPROXIMATE_BONDING = 1 // Created by island splitting or chunk merge, etc. and should check for inexact bonds
53  };
54 
56  int32_t parent;
57  int32_t chunkId;
58  uint32_t flags;
59  bool isLeaf;
60  bool isChanged;
61 };
62 
67 {
68  public:
69  // Generates uniformly distributed value in [0, 1] range.
70  virtual float getRandomValue() = 0;
71  // Seeds random value generator
72  virtual void seed(int32_t seed) = 0;
73  virtual ~RandomGeneratorBase(){};
74 };
75 
76 /*
77  Noise fracturing configuration for chunks's faces
78 */
80 {
86  float amplitude = 0.f;
87 
91  float frequency = 1.f;
92 
96  uint32_t octaveNumber = 1;
97 
101  NvcVec3 samplingInterval = { 1, 1, 1 };
102 };
103 
104 /*
105  Slicing fracturing configuration
106 */
108 {
112  int32_t x_slices = 1, y_slices = 1, z_slices = 1;
113 
117  float offset_variations = 0.f;
118 
122  float angle_variations = 0.f;
123 
124  /*
125  Noise parameters for faces between sliced chunks
126  */
128 };
129 
134 {
139  CutoutSet* cutoutSet = nullptr;
140 
145  NvcTransform transform = {{0, 0, 0, 1}, {0, 0, 0}};
146 
152  NvcVec2 scale = { -1, -1 };
153 
157  float aperture = 0.f;
158 
163  bool isRelativeTransform = true;
164 
168  bool useSmoothing = false;
169 
174 };
175 
180 {
181  public:
183 
187  virtual void release() = 0;
188 
192  virtual void setBaseMesh(const Mesh* mesh) = 0;
193 
199  virtual uint32_t getVoronoiSites(const NvcVec3*& sites) = 0;
200 
205  virtual void addSite(const NvcVec3& site) = 0;
210  virtual void uniformlyGenerateSitesInMesh(uint32_t numberOfSites) = 0;
211 
218  virtual void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) = 0;
219 
230  virtual void radialPattern(const NvcVec3& center, const NvcVec3& normal, float radius, int32_t angularSteps,
231  int32_t radialSteps, float angleOffset = 0.0f, float variability = 0.0f) = 0;
232 
239  virtual void generateInSphere(const uint32_t count, const float radius, const NvcVec3& center) = 0;
240 
245  virtual void setStencil(const Mesh* stencil) = 0;
246 
250  virtual void clearStencil() = 0;
251 
258  virtual void deleteInSphere(const float radius, const NvcVec3& center, const float eraserProbability = 1) = 0;
259 };
260 
265 {
266 
267  public:
268  virtual ~FractureTool() {}
269 
273  virtual void release() = 0;
274 
278  virtual void reset() = 0;
279 
280 
284  virtual void setSourceMesh(const Mesh* mesh) = 0;
285 
289  virtual int32_t setChunkMesh(const Mesh* mesh, int32_t parentId) = 0;
290 
294  virtual void setInteriorMaterialId(int32_t materialId) = 0;
295 
299  virtual int32_t getInteriorMaterialId() const = 0;
300 
304  virtual void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) = 0;
305 
309  virtual Mesh* createChunkMesh(int32_t chunkId) = 0;
310 
315  virtual void getTransformation(NvcVec3& offset, float& scale) = 0;
316 
317 
326  virtual int32_t
327  voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, bool replaceChunk) = 0;
328 
340  virtual int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints,
341  const NvcVec3& scale, const NvcQuat& rotation, bool replaceChunk) = 0;
342 
343 
355  virtual int32_t
356  slicing(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
357 
371  virtual int32_t cut(uint32_t chunkId, const NvcVec3& normal, const NvcVec3& position,
372  const NoiseConfiguration& noise, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
373 
385  virtual int32_t cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
386 
387 
391  virtual void finalizeFracturing() = 0;
392 
396  virtual uint32_t getChunkCount() const = 0;
397 
401  virtual const ChunkInfo& getChunkInfo(int32_t chunkIndex) = 0;
402 
410  virtual float getMeshOverlap(const Mesh& meshA, const Mesh& meshB) = 0;
411 
418  virtual uint32_t getBaseMesh(int32_t chunkIndex, Triangle*& output) = 0;
419 
427  virtual uint32_t updateBaseMesh(int32_t chunkIndex, Triangle* output) = 0;
428 
434  virtual int32_t getChunkIndex(int32_t chunkId) = 0;
435 
441  virtual int32_t getChunkId(int32_t chunkIndex) = 0;
442 
448  virtual int32_t getChunkDepth(int32_t chunkId) = 0;
449 
456  virtual uint32_t getChunksIdAtDepth(uint32_t depth, int32_t*& chunkIds) = 0;
457 
467  virtual uint32_t
468  getBufferedBaseMeshes(Vertex*& vertexBuffer, uint32_t*& indexBuffer, uint32_t*& indexBufferOffsets) = 0;
469 
474  virtual void setRemoveIslands(bool isRemoveIslands) = 0;
475 
481  virtual int32_t islandDetectionAndRemoving(int32_t chunkId, bool createAtNewDepth = false) = 0;
482 
487  virtual bool isMeshContainOpenEdges(const Mesh* input) = 0;
488 
495  virtual bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) = 0;
496 
510  virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
511  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
512  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
513  bool removeOriginalChunks = false) = 0;
514 
521  virtual bool setApproximateBonding(uint32_t chunkIndex, bool useApproximateBonding) = 0;
522 
528  virtual void fitUvToRect(float side, uint32_t chunkId) = 0;
529 
534  virtual void fitAllUvToRect(float side) = 0;
535 };
536 
537 } // namespace Blast
538 } // namespace Nv
539 
540 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H
Definition: NvBlastExtAuthoringFractureTool.h:107
Definition: NvBlastExtAuthoringFractureTool.h:47
Definition: NvBlastExtAuthoringFractureTool.h:179
-
Definition: NvBlastExtAuthoringFractureTool.h:52
Definition: NvBlastExtAuthoringCutout.h:36
+
Definition: NvBlastExtAuthoringFractureTool.h:52
Definition: NvBlastExtAuthoringFractureTool.h:79
Definition: NvBlastExtAuthoringMesh.h:42
diff --git a/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool-members.html b/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool-members.html index b426840b..f2ccf972 100755 --- a/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool-members.html +++ b/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool-members.html @@ -44,6 +44,7 @@

Nv::Blast::FractureTool Member List

This is the complete list of members release()=0Nv::Blast::FractureTool [pure virtual] replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId)=0Nv::Blast::FractureTool [pure virtual] reset()=0Nv::Blast::FractureTool [pure virtual] + setApproximateBonding(uint32_t chunkIndex, bool useApproximateBonding)=0Nv::Blast::FractureTool [pure virtual] setChunkMesh(const Mesh *mesh, int32_t parentId)=0Nv::Blast::FractureTool [pure virtual] setInteriorMaterialId(int32_t materialId)=0Nv::Blast::FractureTool [pure virtual] setRemoveIslands(bool isRemoveIslands)=0Nv::Blast::FractureTool [pure virtual] diff --git a/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool.html b/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool.html index e91b5258..d7b7fe19 100755 --- a/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool.html +++ b/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool.html @@ -75,6 +75,8 @@

Nv::Blast::FractureTool Class Reference

+
+
+ + + + + + + + + + + + + + + + + + +
virtual bool Nv::Blast::FractureTool::setApproximateBonding (uint32_t  chunkIndex,
bool  useApproximateBonding 
) [pure virtual]
+
+
+ +

+Set the APPROXIMATE_BONDING flag in the chunk's ChunkInfo

Parameters:
+ + + +
[in] chunkIndex chunk index - use getChunkIndex(ID)
[in] useApproximateBonding value of flag to set
+
+
Returns:
true if the chunk ID is found, false otherwise
+

diff --git a/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool.js b/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool.js index b4a1a8f1..a3f0bbec 100755 --- a/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool.js +++ b/docs/api_docs/files/class_nv_1_1_blast_1_1_fracture_tool.js @@ -24,6 +24,7 @@ var class_nv_1_1_blast_1_1_fracture_tool = [ "release", "class_nv_1_1_blast_1_1_fracture_tool.html#a78da4a0d726ec1b541166cd3c46df67e", null ], [ "replaceMaterialId", "class_nv_1_1_blast_1_1_fracture_tool.html#a78194aeece0c12c2035c79458ff49c9f", null ], [ "reset", "class_nv_1_1_blast_1_1_fracture_tool.html#ab462c92fa47a5359bf3d19cf44af80f4", null ], + [ "setApproximateBonding", "class_nv_1_1_blast_1_1_fracture_tool.html#a33c19de2bc8ea52394651d184076db5c", null ], [ "setChunkMesh", "class_nv_1_1_blast_1_1_fracture_tool.html#aecd9be996bba9329418fd91db8235ebe", null ], [ "setInteriorMaterialId", "class_nv_1_1_blast_1_1_fracture_tool.html#ac8c4f90133fdf32969cad6e4c520414f", null ], [ "setRemoveIslands", "class_nv_1_1_blast_1_1_fracture_tool.html#a251738022e498b819e88536577470735", null ], diff --git a/docs/api_docs/files/functions.html b/docs/api_docs/files/functions.html index c699600b..3ff7e75d 100755 --- a/docs/api_docs/files/functions.html +++ b/docs/api_docs/files/functions.html @@ -132,8 +132,8 @@

- a -

diff --git a/docs/api_docs/files/functions_func_s.html b/docs/api_docs/files/functions_func_s.html index b4c65cb5..00f0d796 100755 --- a/docs/api_docs/files/functions_func_s.html +++ b/docs/api_docs/files/functions_func_s.html @@ -61,6 +61,9 @@

- s -

  • setAllNodesInfoFromLL() : Nv::Blast::ExtStressSolver
  • +
  • setApproximateBonding() +: Nv::Blast::FractureTool +
  • setBaseMesh() : Nv::Blast::VoronoiSitesGenerator
  • diff --git a/docs/api_docs/files/functions_s.html b/docs/api_docs/files/functions_s.html index c1861a9f..40f8dc0c 100755 --- a/docs/api_docs/files/functions_s.html +++ b/docs/api_docs/files/functions_s.html @@ -73,6 +73,9 @@

    - s -

    • setAllNodesInfoFromLL() : Nv::Blast::ExtStressSolver
    • +
    • setApproximateBonding() +: Nv::Blast::FractureTool +
    • setBaseMesh() : Nv::Blast::VoronoiSitesGenerator
    • @@ -234,12 +237,12 @@

      - s -

        : Nv::Blast::ExtPxFamily , Nv::Blast::ExtPxManager -
      • Subtype -: Nv::Blast::TkJointUpdateEvent -
      • subtype : Nv::Blast::TkJointUpdateEvent
      • +
      • Subtype +: Nv::Blast::TkJointUpdateEvent +
      • supportChunkHealths : NvBlastGraphShaderActor
      • diff --git a/docs/api_docs/files/functions_t.html b/docs/api_docs/files/functions_t.html index 350fe59c..21fbe479 100755 --- a/docs/api_docs/files/functions_t.html +++ b/docs/api_docs/files/functions_t.html @@ -79,11 +79,15 @@

        - t -

        • type : Nv::Blast::ExtSyncEvent -, Nv::Blast::TkEvent
        • Type : Nv::Blast::TkEvent -, NvBlastDataBlock +
        • +
        • type +: Nv::Blast::TkEvent +
        • +
        • Type +: NvBlastDataBlock , NvBlastMessage
        • TypeCount diff --git a/docs/api_docs/files/navtreedata.js b/docs/api_docs/files/navtreedata.js index 2d955bb4..745164e0 100755 --- a/docs/api_docs/files/navtreedata.js +++ b/docs/api_docs/files/navtreedata.js @@ -33,11 +33,11 @@ var NAVTREEINDEX = [ "_nv_blast_8h.html", "_nv_blast_tk_framework_8h.html#ac9ef4ab9d817890d7a0f456cc6f07907", -"class_nv_1_1_blast_1_1_fracture_tool.html#a820000e618005f6de1cbcb56d3e54de5", -"functions_d.html", -"struct_nv_1_1_blast_1_1_chunk_graph_link.html#ad3027428a05b7319f8b01c690df1918a", -"struct_nv_1_1_blast_1_1_profiler_detail.html#a06be79d41391dfde43f6aa02866a3c1faa045a667a2428770e974158ff5c3f721", -"struct_nv_blast_message.html" +"class_nv_1_1_blast_1_1_fracture_tool.html#a7f12ca1a0b1aa04875e46402a2a840f9", +"functions_c.html", +"struct_nv_1_1_blast_1_1_chunk_graph_link.html#ac06fdaba0bc2097db58c1ec408d0776d", +"struct_nv_1_1_blast_1_1_profiler_detail.html#a06be79d41391dfde43f6aa02866a3c1fa39c81d6175ee0aa27db53d0cd7e944e3", +"struct_nv_blast_i_d.html#ae7f7abc9562d83d9537f6c876f4c04e8" ]; var SYNCONMSG = 'click to disable panel synchronisation'; diff --git a/docs/api_docs/files/navtreeindex1.js b/docs/api_docs/files/navtreeindex1.js index b8fe24ff..a2990dd5 100755 --- a/docs/api_docs/files/navtreeindex1.js +++ b/docs/api_docs/files/navtreeindex1.js @@ -236,18 +236,18 @@ var NAVTREEINDEX1 = "class_nv_1_1_blast_1_1_fracture_tool.html#a04bb5dd940274a9c8b097cc9f06d0708":[3,0,0,0,62,1], "class_nv_1_1_blast_1_1_fracture_tool.html#a1d2f1ce4db5aab0ac6a075db607c6b2f":[3,0,0,0,62,12], "class_nv_1_1_blast_1_1_fracture_tool.html#a247f0e36c015237002dc87675562289b":[3,0,0,0,62,3], -"class_nv_1_1_blast_1_1_fracture_tool.html#a251738022e498b819e88536577470735":[3,0,0,0,62,26], -"class_nv_1_1_blast_1_1_fracture_tool.html#a2d38fb6aac3c36d51d60dad428a43074":[3,0,0,0,62,32], -"class_nv_1_1_blast_1_1_fracture_tool.html#a384be45a1310ee0652d315127e62da22":[3,0,0,0,62,30], +"class_nv_1_1_blast_1_1_fracture_tool.html#a251738022e498b819e88536577470735":[3,0,0,0,62,27], +"class_nv_1_1_blast_1_1_fracture_tool.html#a2d38fb6aac3c36d51d60dad428a43074":[3,0,0,0,62,33], +"class_nv_1_1_blast_1_1_fracture_tool.html#a33c19de2bc8ea52394651d184076db5c":[3,0,0,0,62,24], +"class_nv_1_1_blast_1_1_fracture_tool.html#a384be45a1310ee0652d315127e62da22":[3,0,0,0,62,31], "class_nv_1_1_blast_1_1_fracture_tool.html#a44ad67ac96b11e7dad87b5ed7a788f21":[3,0,0,0,62,19], -"class_nv_1_1_blast_1_1_fracture_tool.html#a45e8a5d3b6d98da1b44b6888a5054cce":[3,0,0,0,62,28], -"class_nv_1_1_blast_1_1_fracture_tool.html#a4c3308b909153982aded9366f9d3ee7c":[3,0,0,0,62,31], +"class_nv_1_1_blast_1_1_fracture_tool.html#a45e8a5d3b6d98da1b44b6888a5054cce":[3,0,0,0,62,29], +"class_nv_1_1_blast_1_1_fracture_tool.html#a4c3308b909153982aded9366f9d3ee7c":[3,0,0,0,62,32], "class_nv_1_1_blast_1_1_fracture_tool.html#a4d00c3d53ba51d966de58ff533435cc2":[3,0,0,0,62,0], "class_nv_1_1_blast_1_1_fracture_tool.html#a559c822041e74f034613b3afa4ad8a17":[3,0,0,0,62,2], "class_nv_1_1_blast_1_1_fracture_tool.html#a5710c73457bcceba3f20d130e231a028":[3,0,0,0,62,20], "class_nv_1_1_blast_1_1_fracture_tool.html#a78194aeece0c12c2035c79458ff49c9f":[3,0,0,0,62,22], "class_nv_1_1_blast_1_1_fracture_tool.html#a78da4a0d726ec1b541166cd3c46df67e":[3,0,0,0,62,21], "class_nv_1_1_blast_1_1_fracture_tool.html#a7959339df1bf17419cde2428c257af1d":[3,0,0,0,62,9], -"class_nv_1_1_blast_1_1_fracture_tool.html#a7bcaeda929fdcc29a7db12676cf0984a":[3,0,0,0,62,15], -"class_nv_1_1_blast_1_1_fracture_tool.html#a7f12ca1a0b1aa04875e46402a2a840f9":[3,0,0,0,62,18] +"class_nv_1_1_blast_1_1_fracture_tool.html#a7bcaeda929fdcc29a7db12676cf0984a":[3,0,0,0,62,15] }; diff --git a/docs/api_docs/files/navtreeindex2.js b/docs/api_docs/files/navtreeindex2.js index 2dbb0a27..2ec25a10 100755 --- a/docs/api_docs/files/navtreeindex2.js +++ b/docs/api_docs/files/navtreeindex2.js @@ -1,19 +1,20 @@ var NAVTREEINDEX2 = { +"class_nv_1_1_blast_1_1_fracture_tool.html#a7f12ca1a0b1aa04875e46402a2a840f9":[3,0,0,0,62,18], "class_nv_1_1_blast_1_1_fracture_tool.html#a820000e618005f6de1cbcb56d3e54de5":[3,0,0,0,62,16], "class_nv_1_1_blast_1_1_fracture_tool.html#a8830959a8f7e4babc1983ea31c61ef5d":[3,0,0,0,62,5], "class_nv_1_1_blast_1_1_fracture_tool.html#a9a113cc771fac30fd14a9c7b5b073e99":[3,0,0,0,62,14], "class_nv_1_1_blast_1_1_fracture_tool.html#aa9a87637d6d190d71678f0fb9a100bfd":[3,0,0,0,62,6], "class_nv_1_1_blast_1_1_fracture_tool.html#ab462c92fa47a5359bf3d19cf44af80f4":[3,0,0,0,62,23], -"class_nv_1_1_blast_1_1_fracture_tool.html#ac14c1ff1d50756694be24c34476af965":[3,0,0,0,62,27], -"class_nv_1_1_blast_1_1_fracture_tool.html#ac8c4f90133fdf32969cad6e4c520414f":[3,0,0,0,62,25], +"class_nv_1_1_blast_1_1_fracture_tool.html#ac14c1ff1d50756694be24c34476af965":[3,0,0,0,62,28], +"class_nv_1_1_blast_1_1_fracture_tool.html#ac8c4f90133fdf32969cad6e4c520414f":[3,0,0,0,62,26], "class_nv_1_1_blast_1_1_fracture_tool.html#ac99cb91a13255929a52d9a2623ac207b":[3,0,0,0,62,11], "class_nv_1_1_blast_1_1_fracture_tool.html#adb1c311cbb3d84c7bfbfd12abe01af0b":[3,0,0,0,62,7], "class_nv_1_1_blast_1_1_fracture_tool.html#adc4037818bdb9424fe0543b59c1e2eac":[3,0,0,0,62,17], -"class_nv_1_1_blast_1_1_fracture_tool.html#ae4bd5dab498f9e894c648d570c5b60ba":[3,0,0,0,62,29], +"class_nv_1_1_blast_1_1_fracture_tool.html#ae4bd5dab498f9e894c648d570c5b60ba":[3,0,0,0,62,30], "class_nv_1_1_blast_1_1_fracture_tool.html#aea8f1d386c70af0ea67bed2c353e57a1":[3,0,0,0,62,8], "class_nv_1_1_blast_1_1_fracture_tool.html#aec74731e5a147120f0536b6674fc0f42":[3,0,0,0,62,4], -"class_nv_1_1_blast_1_1_fracture_tool.html#aecd9be996bba9329418fd91db8235ebe":[3,0,0,0,62,24], +"class_nv_1_1_blast_1_1_fracture_tool.html#aecd9be996bba9329418fd91db8235ebe":[3,0,0,0,62,25], "class_nv_1_1_blast_1_1_fracture_tool.html#af07eb7960687cd912df496640bec8876":[3,0,0,0,62,10], "class_nv_1_1_blast_1_1_fracturer.html":[3,0,0,0,60], "class_nv_1_1_blast_1_1_fracturer.html#a42fb6822d70b337eaef4470165db1ddb":[3,0,0,0,60,0], @@ -248,6 +249,5 @@ var NAVTREEINDEX2 = "functions.html":[3,3,0], "functions.html":[3,3,0,0], "functions_0x7e.html":[3,3,0,25], -"functions_b.html":[3,3,0,1], -"functions_c.html":[3,3,0,2] +"functions_b.html":[3,3,0,1] }; diff --git a/docs/api_docs/files/navtreeindex3.js b/docs/api_docs/files/navtreeindex3.js index 4b8f69e3..62cb6553 100755 --- a/docs/api_docs/files/navtreeindex3.js +++ b/docs/api_docs/files/navtreeindex3.js @@ -1,12 +1,13 @@ var NAVTREEINDEX3 = { +"functions_c.html":[3,3,0,2], "functions_d.html":[3,3,0,3], "functions_e.html":[3,3,0,4], "functions_enum.html":[3,3,3], "functions_eval.html":[3,3,4], "functions_f.html":[3,3,0,5], -"functions_func.html":[3,3,1], "functions_func.html":[3,3,1,0], +"functions_func.html":[3,3,1], "functions_func_0x7e.html":[3,3,1,19], "functions_func_b.html":[3,3,1,1], "functions_func_c.html":[3,3,1,2], @@ -42,8 +43,8 @@ var NAVTREEINDEX3 = "functions_t.html":[3,3,0,18], "functions_u.html":[3,3,0,19], "functions_v.html":[3,3,0,20], -"functions_vars.html":[3,3,2], "functions_vars.html":[3,3,2,0], +"functions_vars.html":[3,3,2], "functions_vars_b.html":[3,3,2,1], "functions_vars_c.html":[3,3,2,2], "functions_vars_d.html":[3,3,2,3], @@ -248,6 +249,5 @@ var NAVTREEINDEX3 = "struct_nv_1_1_blast_1_1_chunk_graph_link.html#a34f96313325afedc1031f0fffdb0f180":[3,0,0,0,11,0], "struct_nv_1_1_blast_1_1_chunk_graph_link.html#a559b28f8649cc1b6bfabbc36836d313b":[3,0,0,0,11,5], "struct_nv_1_1_blast_1_1_chunk_graph_link.html#aa70fc086e910c9459cb80e4dd3bc6dcf":[3,0,0,0,11,2], -"struct_nv_1_1_blast_1_1_chunk_graph_link.html#ab7a24ff58d89fbca8e22a5f3307cac0c":[3,0,0,0,11,3], -"struct_nv_1_1_blast_1_1_chunk_graph_link.html#ac06fdaba0bc2097db58c1ec408d0776d":[3,0,0,0,11,4] +"struct_nv_1_1_blast_1_1_chunk_graph_link.html#ab7a24ff58d89fbca8e22a5f3307cac0c":[3,0,0,0,11,3] }; diff --git a/docs/api_docs/files/navtreeindex4.js b/docs/api_docs/files/navtreeindex4.js index 887fc63b..c96b6234 100755 --- a/docs/api_docs/files/navtreeindex4.js +++ b/docs/api_docs/files/navtreeindex4.js @@ -1,5 +1,6 @@ var NAVTREEINDEX4 = { +"struct_nv_1_1_blast_1_1_chunk_graph_link.html#ac06fdaba0bc2097db58c1ec408d0776d":[3,0,0,0,11,4], "struct_nv_1_1_blast_1_1_chunk_graph_link.html#ad3027428a05b7319f8b01c690df1918a":[3,0,0,0,11,1], "struct_nv_1_1_blast_1_1_chunk_info.html":[3,0,0,0,12], "struct_nv_1_1_blast_1_1_chunk_info.html#a2e9936bba91f2ec13692860dfa9a3c71":[3,0,0,0,12,2], @@ -9,8 +10,8 @@ var NAVTREEINDEX4 = "struct_nv_1_1_blast_1_1_chunk_info.html#a7e5b05c30d6a4deceb2da1e840fa442c":[3,0,0,0,12,6], "struct_nv_1_1_blast_1_1_chunk_info.html#a864945bf41b9ab726c8df191e9acae35":[3,0,0,0,12,5], "struct_nv_1_1_blast_1_1_chunk_info.html#ac1ebabf88ad2eb905b6482519530824c":[3,0,0,0,12,0], -"struct_nv_1_1_blast_1_1_chunk_info.html#ac1ebabf88ad2eb905b6482519530824ca083e487cf5083f1063904b52be3982de":[3,0,0,0,12,0,1], "struct_nv_1_1_blast_1_1_chunk_info.html#ac1ebabf88ad2eb905b6482519530824ca10ffae1afc03f59373bf48244a58dd47":[3,0,0,0,12,0,0], +"struct_nv_1_1_blast_1_1_chunk_info.html#ac1ebabf88ad2eb905b6482519530824ca673ab883edb6ff4c69fe85deed5ba3ff":[3,0,0,0,12,0,1], "struct_nv_1_1_blast_1_1_collision_hull.html":[3,0,0,0,13], "struct_nv_1_1_blast_1_1_collision_hull.html#a21b8e1cfff28fee14678e944df1db2c1":[3,0,0,0,13,0], "struct_nv_1_1_blast_1_1_collision_hull.html#a3840aa67c32d7e6ef8c8fc1d65e7e6da":[3,0,0,0,13,4], @@ -248,6 +249,5 @@ var NAVTREEINDEX4 = "struct_nv_1_1_blast_1_1_plane_chunk_indexer.html#ad7fc6cfbd651eef3d621e14df664fc4c":[3,0,0,0,80,1], "struct_nv_1_1_blast_1_1_profiler_detail.html":[3,0,0,0,82], "struct_nv_1_1_blast_1_1_profiler_detail.html#a06be79d41391dfde43f6aa02866a3c1f":[3,0,0,0,82,0], -"struct_nv_1_1_blast_1_1_profiler_detail.html#a06be79d41391dfde43f6aa02866a3c1fa26c8a44b1b01cd578f4121e60acf62bc":[3,0,0,0,82,0,0], -"struct_nv_1_1_blast_1_1_profiler_detail.html#a06be79d41391dfde43f6aa02866a3c1fa39c81d6175ee0aa27db53d0cd7e944e3":[3,0,0,0,82,0,2] +"struct_nv_1_1_blast_1_1_profiler_detail.html#a06be79d41391dfde43f6aa02866a3c1fa26c8a44b1b01cd578f4121e60acf62bc":[3,0,0,0,82,0,0] }; diff --git a/docs/api_docs/files/navtreeindex5.js b/docs/api_docs/files/navtreeindex5.js index 1be728f5..093b2936 100755 --- a/docs/api_docs/files/navtreeindex5.js +++ b/docs/api_docs/files/navtreeindex5.js @@ -1,5 +1,6 @@ var NAVTREEINDEX5 = { +"struct_nv_1_1_blast_1_1_profiler_detail.html#a06be79d41391dfde43f6aa02866a3c1fa39c81d6175ee0aa27db53d0cd7e944e3":[3,0,0,0,82,0,2], "struct_nv_1_1_blast_1_1_profiler_detail.html#a06be79d41391dfde43f6aa02866a3c1faa045a667a2428770e974158ff5c3f721":[3,0,0,0,82,0,1], "struct_nv_1_1_blast_1_1_regular_radial_pattern_desc.html":[3,0,0,0,84], "struct_nv_1_1_blast_1_1_regular_radial_pattern_desc.html#a05be2d62a3e6c523f4fefd38eb051ac3":[3,0,0,0,84,1], @@ -248,6 +249,5 @@ var NAVTREEINDEX5 = "struct_nv_blast_graph_shader_actor.html#ae890e417040d5998f4b6a0bc7a317aec":[3,0,27,12], "struct_nv_blast_graph_shader_actor.html#aeb7929bcf27fd95c49fdd5bd8909a9b9":[3,0,27,6], "struct_nv_blast_graph_shader_actor.html#aebb7e8d55ddf8cb2ef71326632952cfe":[3,0,27,4], -"struct_nv_blast_i_d.html":[3,0,28], -"struct_nv_blast_i_d.html#ae7f7abc9562d83d9537f6c876f4c04e8":[3,0,28,0] +"struct_nv_blast_i_d.html":[3,0,28] }; diff --git a/docs/api_docs/files/navtreeindex6.js b/docs/api_docs/files/navtreeindex6.js index 3cb880ed..1ee8b5b2 100644 --- a/docs/api_docs/files/navtreeindex6.js +++ b/docs/api_docs/files/navtreeindex6.js @@ -1,5 +1,6 @@ var NAVTREEINDEX6 = { +"struct_nv_blast_i_d.html#ae7f7abc9562d83d9537f6c876f4c04e8":[3,0,28,0], "struct_nv_blast_message.html":[3,0,29], "struct_nv_blast_message.html#aa131d1cdff39661ffe961fa4c24742ce":[3,0,29,0], "struct_nv_blast_message.html#aa131d1cdff39661ffe961fa4c24742cea1ea5042557bdaca500e32f93c538695a":[3,0,29,0,3], diff --git a/docs/api_docs/files/pagereleasenotes.html b/docs/api_docs/files/pagereleasenotes.html index e5a59324..859f9c22 100755 --- a/docs/api_docs/files/pagereleasenotes.html +++ b/docs/api_docs/files/pagereleasenotes.html @@ -24,7 +24,7 @@

          Release Notes

          Release Notes
          Release Notes

          Nv::Blast::ChunkInfo Member List

          This is the complete list of members for Nv::Blast::ChunkInfo, including all inherited members.

          + - diff --git a/docs/api_docs/files/struct_nv_1_1_blast_1_1_chunk_info.html b/docs/api_docs/files/struct_nv_1_1_blast_1_1_chunk_info.html index de248827..2b22a033 100755 --- a/docs/api_docs/files/struct_nv_1_1_blast_1_1_chunk_info.html +++ b/docs/api_docs/files/struct_nv_1_1_blast_1_1_chunk_info.html @@ -29,10 +29,6 @@

          Nv::Blast::ChunkInfo Struct Reference

          NO_FLAGS  -
          APPROXIMATE_BONDING enum valueNv::Blast::ChunkInfo
          ChunkFlags enum nameNv::Blast::ChunkInfo
          chunkIdNv::Blast::ChunkInfo
          CREATED_BY_ISLAND_DETECTOR enum valueNv::Blast::ChunkInfo
          flagsNv::Blast::ChunkInfo
          isChangedNv::Blast::ChunkInfo
          isLeafNv::Blast::ChunkInfo
          CREATED_BY_ISLAND_DETECTOR  +
          APPROXIMATE_BONDING 
          diff --git a/docs/api_docs/files/struct_nv_1_1_blast_1_1_chunk_info.js b/docs/api_docs/files/struct_nv_1_1_blast_1_1_chunk_info.js index e193c315..1ca26a4f 100755 --- a/docs/api_docs/files/struct_nv_1_1_blast_1_1_chunk_info.js +++ b/docs/api_docs/files/struct_nv_1_1_blast_1_1_chunk_info.js @@ -2,7 +2,7 @@ var struct_nv_1_1_blast_1_1_chunk_info = [ [ "ChunkFlags", "struct_nv_1_1_blast_1_1_chunk_info.html#ac1ebabf88ad2eb905b6482519530824c", [ [ "NO_FLAGS", "struct_nv_1_1_blast_1_1_chunk_info.html#ac1ebabf88ad2eb905b6482519530824ca10ffae1afc03f59373bf48244a58dd47", null ], - [ "CREATED_BY_ISLAND_DETECTOR", "struct_nv_1_1_blast_1_1_chunk_info.html#ac1ebabf88ad2eb905b6482519530824ca083e487cf5083f1063904b52be3982de", null ] + [ "APPROXIMATE_BONDING", "struct_nv_1_1_blast_1_1_chunk_info.html#ac1ebabf88ad2eb905b6482519530824ca673ab883edb6ff4c69fe85deed5ba3ff", null ] ] ], [ "chunkId", "struct_nv_1_1_blast_1_1_chunk_info.html#a55d13d994d704a8550474da493b60c67", null ], [ "flags", "struct_nv_1_1_blast_1_1_chunk_info.html#a2e9936bba91f2ec13692860dfa9a3c71", null ], diff --git a/docs/release_notes.txt b/docs/release_notes.txt index d5c98b7d..4f7ddd6b 100755 --- a/docs/release_notes.txt +++ b/docs/release_notes.txt @@ -3,7 +3,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -Blast(tm) SDK 1.1.5 (18-Aug-2019) +Blast(tm) SDK 1.1.5 (16-Sep-2019) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Changes @@ -12,7 +12,8 @@ Changes * Numerous API changes to meet new coding conventions. * Packman package manager updated to v. 5.7.2, cleaned up dependency files. * Chunks created from islands use padded bounds to determine connectivity. -* FractureTool::deleteAllChildrenOfChunk renamed FractureTool::deleteChunkSubhierarchy, added ability to delete chunks +* FractureTool::deleteAllChildrenOfChunk renamed FractureTool::deleteChunkSubhierarchy, added ability to delete chunks. +* NvBlastAsset::testForValidChunkOrder (used when creating an NvBlastAsset) is now more strict, requiring parent chunk descriptors to come before their children. It is still less strict than the order created by NvBlastBuildAssetDescChunkReorderMap. New Features ------------ @@ -20,12 +21,16 @@ New Features * Ability to pass chunk connectivity info to uniteChunks function, enabling chunks split by island detection to be united. * Option to remove original merged chunks in uniteChunks function. * The function uniteChunks allows the user to specify a chunk set to merge. Chunks from that set, and all descendants, are considered for merging. - * Ability to delete chunks (see note about FractureTool::deleteChunkSubhierarchy in Changes section, above) + * Ability to delete chunks (see note about FractureTool::deleteChunkSubhierarchy in Changes section, above). + * Added FractureTool::setApproximateBonding function. Signals the tool to create bonds by proximity instead of just using cut plane data. Bug fixes --------- * Authoring tools: * Fixed chunk reordering bug in BlastTool. + * Chunks which have been merged using the uniteChunks function may be merged again + * Restored chunk volume calculation +* NvBlastBuildAssetDescChunkReorderMap failure cases fixed. Known Issues ------------ diff --git a/docs/source_docs/files/_nv_blast_8h.html b/docs/source_docs/files/_nv_blast_8h.html index b70d4322..ae5675bc 100755 --- a/docs/source_docs/files/_nv_blast_8h.html +++ b/docs/source_docs/files/_nv_blast_8h.html @@ -1768,7 +1768,7 @@

          sdk/lowlevel/include/NvBlast.h File Reference

          #include "[out] chunkReorderMap User-supplied map of size chunkCount to fill. For every chunk index this array will contain new chunk position (index). [in] chunkDescs Array of chunk descriptors of size chunkCount. [in] chunkCount The number of chunk descriptors. - [in] scratch User-supplied scratch storage, must point to 2 * chunkCount * sizeof(uint32_t) valid bytes of memory. + [in] scratch User-supplied scratch storage, must point to 3 * chunkCount * sizeof(uint32_t) valid bytes of memory. [in] logFn User-supplied message function (see NvBlastLog definition). May be NULL. diff --git a/docs/source_docs/files/_nv_blast_actor_8h_source.html b/docs/source_docs/files/_nv_blast_actor_8h_source.html index b600574d..339d3a7f 100755 --- a/docs/source_docs/files/_nv_blast_actor_8h_source.html +++ b/docs/source_docs/files/_nv_blast_actor_8h_source.html @@ -92,13 +92,13 @@
          bool isBoundToWorld() const
          Definition: NvBlastActor.h:675
          Definition: NvBlastTypes.h:481
          uint32_t childIndexStop
          Definition: NvBlastTypes.h:177
          -
          uint32_t m_firstSubsupportChunkIndex
          Definition: NvBlastAsset.h:206
          +
          uint32_t m_firstSubsupportChunkIndex
          Definition: NvBlastAsset.h:207
          const Asset * m_asset
          Definition: NvBlastFamily.h:148
          uint32_t bondFractureCount
          available elements in bondFractures
          Definition: NvBlastTypes.h:470
          const SupportGraph * getGraph() const
          Definition: NvBlastActor.h:575
          float * getSubsupportChunkHealths() const
          Definition: NvBlastActor.h:600
          -
          Definition: NvBlastAsset.h:252
          +
          Definition: NvBlastAsset.h:253
          uint32_t findIslands(void *scratch)
          Definition: NvBlastActor.h:233
          uint32_t serializationRequiredStorage(NvBlastLog logFn) const
          @@ -113,7 +113,7 @@
          float * getSubsupportChunkHealths() const
          Definition: NvBlastFamily.h:113
          -
          SupportGraph m_graph
          Definition: NvBlastAsset.h:196
          +
          SupportGraph m_graph
          Definition: NvBlastAsset.h:197
          Definition: NvBlastIteratorBase.h:88
          Definition: NvBlastTypes.h:468
          Definition: NvBlastActor.h:58
          diff --git a/docs/source_docs/files/_nv_blast_asset_8h-source.html b/docs/source_docs/files/_nv_blast_asset_8h-source.html index 607e77ac..e597ad4b 100755 --- a/docs/source_docs/files/_nv_blast_asset_8h-source.html +++ b/docs/source_docs/files/_nv_blast_asset_8h-source.html @@ -120,93 +120,93 @@

          sdk/lowlevel/source/NvBlastAsset.h

          Go 00136 00156 static bool ensureExactSupportCoverage(uint32_t& supportChunkCount, uint32_t& leafChunkCount, char* chunkAnnotation, uint32_t chunkCount, NvBlastChunkDesc* chunkDescs, bool testOnly, NvBlastLog logFn); 00157 -00173 static bool testForValidChunkOrder(uint32_t chunkCount, const NvBlastChunkDesc* chunkDescs, const char* chunkAnnotation, void* scratch); -00174 +00174 static bool testForValidChunkOrder(uint32_t chunkCount, const NvBlastChunkDesc* chunkDescs, const char* chunkAnnotation, void* scratch); 00175 -00177 -00181 NvBlastDataBlock m_header; -00182 -00186 NvBlastID m_ID; -00187 -00191 uint32_t m_chunkCount; -00192 -00196 SupportGraph m_graph; -00197 -00201 uint32_t m_leafChunkCount; -00202 -00206 uint32_t m_firstSubsupportChunkIndex; -00207 -00211 uint32_t m_bondCount; -00212 -00218 NvBlastBlockArrayData(NvBlastChunk, m_chunksOffset, getChunks, m_chunkCount); -00219 -00228 NvBlastBlockArrayData(NvBlastBond, m_bondsOffset, getBonds, m_bondCount); -00229 -00236 NvBlastBlockArrayData(uint32_t, m_subtreeLeafChunkCountsOffset, getSubtreeLeafChunkCounts, m_chunkCount); -00237 -00243 NvBlastBlockArrayData(uint32_t, m_chunkToGraphNodeMapOffset, getChunkToGraphNodeMap, m_chunkCount); -00244 +00176 +00178 +00182 NvBlastDataBlock m_header; +00183 +00187 NvBlastID m_ID; +00188 +00192 uint32_t m_chunkCount; +00193 +00197 SupportGraph m_graph; +00198 +00202 uint32_t m_leafChunkCount; +00203 +00207 uint32_t m_firstSubsupportChunkIndex; +00208 +00212 uint32_t m_bondCount; +00213 +00219 NvBlastBlockArrayData(NvBlastChunk, m_chunksOffset, getChunks, m_chunkCount); +00220 +00229 NvBlastBlockArrayData(NvBlastBond, m_bondsOffset, getBonds, m_bondCount); +00230 +00237 NvBlastBlockArrayData(uint32_t, m_subtreeLeafChunkCountsOffset, getSubtreeLeafChunkCounts, m_chunkCount); +00238 +00244 NvBlastBlockArrayData(uint32_t, m_chunkToGraphNodeMapOffset, getChunkToGraphNodeMap, m_chunkCount); 00245 -00247 -00252 class DepthFirstIt : public ChunkDepthFirstIt -00253 { -00254 public: -00256 DepthFirstIt(const Asset& asset, uint32_t startChunkIndex, bool upperSupportOnly = false) : -00257 ChunkDepthFirstIt(asset.getChunks(), startChunkIndex, upperSupportOnly ? asset.getUpperSupportChunkCount() : asset.m_chunkCount) {} -00258 }; -00259 }; -00260 +00246 +00248 +00253 class DepthFirstIt : public ChunkDepthFirstIt +00254 { +00255 public: +00257 DepthFirstIt(const Asset& asset, uint32_t startChunkIndex, bool upperSupportOnly = false) : +00258 ChunkDepthFirstIt(asset.getChunks(), startChunkIndex, upperSupportOnly ? asset.getUpperSupportChunkCount() : asset.m_chunkCount) {} +00259 }; +00260 }; 00261 -00263 -00264 NV_INLINE uint32_t Asset::getUpperSupportChunkCount() const -00265 { -00266 return m_firstSubsupportChunkIndex; -00267 } -00268 +00262 +00264 +00265 NV_INLINE uint32_t Asset::getUpperSupportChunkCount() const +00266 { +00267 return m_firstSubsupportChunkIndex; +00268 } 00269 -00270 NV_INLINE uint32_t Asset::getLowerSupportChunkCount() const -00271 { -00272 return m_graph.m_nodeCount + (m_chunkCount - m_firstSubsupportChunkIndex); -00273 } -00274 +00270 +00271 NV_INLINE uint32_t Asset::getLowerSupportChunkCount() const +00272 { +00273 return m_graph.m_nodeCount + (m_chunkCount - m_firstSubsupportChunkIndex); +00274 } 00275 -00276 NV_INLINE uint32_t Asset::getBondCount() const -00277 { -00278 NVBLAST_ASSERT((m_graph.getAdjacencyPartition()[m_graph.m_nodeCount] & 1) == 0); // The bidirectional graph data should have an even number of edges -00279 return m_graph.getAdjacencyPartition()[m_graph.m_nodeCount] / 2; // Directional bonds, divide by two -00280 } -00281 +00276 +00277 NV_INLINE uint32_t Asset::getBondCount() const +00278 { +00279 NVBLAST_ASSERT((m_graph.getAdjacencyPartition()[m_graph.m_nodeCount] & 1) == 0); // The bidirectional graph data should have an even number of edges +00280 return m_graph.getAdjacencyPartition()[m_graph.m_nodeCount] / 2; // Directional bonds, divide by two +00281 } 00282 -00283 NV_INLINE uint32_t Asset::getHierarchyCount() const -00284 { -00285 const NvBlastChunk* chunks = getChunks(); -00286 for (uint32_t i = 0; i < m_chunkCount; ++i) -00287 { -00288 if (!isInvalidIndex(chunks[i].parentChunkIndex)) -00289 { -00290 return i; -00291 } -00292 } -00293 return m_chunkCount; -00294 } -00295 +00283 +00284 NV_INLINE uint32_t Asset::getHierarchyCount() const +00285 { +00286 const NvBlastChunk* chunks = getChunks(); +00287 for (uint32_t i = 0; i < m_chunkCount; ++i) +00288 { +00289 if (!isInvalidIndex(chunks[i].parentChunkIndex)) +00290 { +00291 return i; +00292 } +00293 } +00294 return m_chunkCount; +00295 } 00296 -00297 NV_INLINE uint32_t Asset::getContiguousLowerSupportIndex(uint32_t chunkIndex) const -00298 { -00299 NVBLAST_ASSERT(chunkIndex < m_chunkCount); -00300 -00301 return chunkIndex < m_firstSubsupportChunkIndex ? getChunkToGraphNodeMap()[chunkIndex] : (chunkIndex - m_firstSubsupportChunkIndex + m_graph.m_nodeCount); -00302 } -00303 +00297 +00298 NV_INLINE uint32_t Asset::getContiguousLowerSupportIndex(uint32_t chunkIndex) const +00299 { +00300 NVBLAST_ASSERT(chunkIndex < m_chunkCount); +00301 +00302 return chunkIndex < m_firstSubsupportChunkIndex ? getChunkToGraphNodeMap()[chunkIndex] : (chunkIndex - m_firstSubsupportChunkIndex + m_graph.m_nodeCount); +00303 } 00304 -00305 //JDM: Expose this so serialization layer can use it. -00306 NVBLAST_API Asset* initializeAsset(void* mem, NvBlastID id, uint32_t chunkCount, uint32_t graphNodeCount, uint32_t leafChunkCount, uint32_t firstSubsupportChunkIndex, uint32_t bondCount, NvBlastLog logFn); -00307 -00308 } // namespace Blast -00309 } // namespace Nv -00310 +00305 +00306 //JDM: Expose this so serialization layer can use it. +00307 NVBLAST_API Asset* initializeAsset(void* mem, NvBlastID id, uint32_t chunkCount, uint32_t graphNodeCount, uint32_t leafChunkCount, uint32_t firstSubsupportChunkIndex, uint32_t bondCount, NvBlastLog logFn); +00308 +00309 } // namespace Blast +00310 } // namespace Nv 00311 -00312 #endif // ifndef NVBLASTASSET_H +00312 +00313 #endif // ifndef NVBLASTASSET_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-2018 NVIDIA Corporation. All rights reserved.
          27 
          28 
          29 #ifndef NVBLASTASSET_H
          30 #define NVBLASTASSET_H
          31 
          32 
          33 #include "NvBlastSupportGraph.h"
          34 #include "NvBlast.h"
          35 #include "NvBlastAssert.h"
          36 #include "NvBlastIndexFns.h"
          37 #include "NvBlastChunkHierarchy.h"
          38 
          39 
          40 namespace Nv
          41 {
          42 namespace Blast
          43 {
          44 
          45 class Asset : public NvBlastAsset
          46 {
          47 public:
          48 
          53  {
          54  enum Enum
          55  {
          56  Parent = (1 << 0),
          57  Support = (1 << 1),
          58  SuperSupport = (1 << 2),
          59 
          60  // Combinations
          62  };
          63  };
          64 
          65 
          76  static Asset* create(void* mem, const NvBlastAssetDesc* desc, void* scratch, NvBlastLog logFn);
          77 
          84  static size_t getMemorySize(const NvBlastAssetDesc* desc);
          85 
          94  static size_t createRequiredScratch(const NvBlastAssetDesc* desc);
          95 
          96 
          102  uint32_t getUpperSupportChunkCount() const;
          103 
          109  uint32_t getLowerSupportChunkCount() const;
          110 
          116  uint32_t getBondCount() const;
          117 
          123  uint32_t getHierarchyCount() const;
          124 
          132  uint32_t getContiguousLowerSupportIndex(uint32_t chunkIndex) const;
          133 
          134 
          135  // Static functions
          136 
          156  static bool ensureExactSupportCoverage(uint32_t& supportChunkCount, uint32_t& leafChunkCount, char* chunkAnnotation, uint32_t chunkCount, NvBlastChunkDesc* chunkDescs, bool testOnly, NvBlastLog logFn);
          157 
          173  static bool testForValidChunkOrder(uint32_t chunkCount, const NvBlastChunkDesc* chunkDescs, const char* chunkAnnotation, void* scratch);
          174 
          175 
          177 
          182 
          187 
          191  uint32_t m_chunkCount;
          192 
          197 
          202 
          207 
          211  uint32_t m_bondCount;
          212 
          218  NvBlastBlockArrayData(NvBlastChunk, m_chunksOffset, getChunks, m_chunkCount);
          219 
          228  NvBlastBlockArrayData(NvBlastBond, m_bondsOffset, getBonds, m_bondCount);
          229 
          236  NvBlastBlockArrayData(uint32_t, m_subtreeLeafChunkCountsOffset, getSubtreeLeafChunkCounts, m_chunkCount);
          237 
          243  NvBlastBlockArrayData(uint32_t, m_chunkToGraphNodeMapOffset, getChunkToGraphNodeMap, m_chunkCount);
          244 
          245 
          247 
          253  {
          254  public:
          256  DepthFirstIt(const Asset& asset, uint32_t startChunkIndex, bool upperSupportOnly = false) :
          257  ChunkDepthFirstIt(asset.getChunks(), startChunkIndex, upperSupportOnly ? asset.getUpperSupportChunkCount() : asset.m_chunkCount) {}
          258  };
          259 };
          260 
          261 
          263 
          265 {
          267 }
          268 
          269 
          271 {
          273 }
          274 
          275 
          277 {
          278  NVBLAST_ASSERT((m_graph.getAdjacencyPartition()[m_graph.m_nodeCount] & 1) == 0); // The bidirectional graph data should have an even number of edges
          279  return m_graph.getAdjacencyPartition()[m_graph.m_nodeCount] / 2; // Directional bonds, divide by two
          280 }
          281 
          282 
          284 {
          285  const NvBlastChunk* chunks = getChunks();
          286  for (uint32_t i = 0; i < m_chunkCount; ++i)
          287  {
          288  if (!isInvalidIndex(chunks[i].parentChunkIndex))
          289  {
          290  return i;
          291  }
          292  }
          293  return m_chunkCount;
          294 }
          295 
          296 
          297 NV_INLINE uint32_t Asset::getContiguousLowerSupportIndex(uint32_t chunkIndex) const
          298 {
          299  NVBLAST_ASSERT(chunkIndex < m_chunkCount);
          300 
          301  return chunkIndex < m_firstSubsupportChunkIndex ? getChunkToGraphNodeMap()[chunkIndex] : (chunkIndex - m_firstSubsupportChunkIndex + m_graph.m_nodeCount);
          302 }
          303 
          304 
          305 //JDM: Expose this so serialization layer can use it.
          306 NVBLAST_API Asset* initializeAsset(void* mem, NvBlastID id, uint32_t chunkCount, uint32_t graphNodeCount, uint32_t leafChunkCount, uint32_t firstSubsupportChunkIndex, uint32_t bondCount, NvBlastLog logFn);
          307 
          308 } // namespace Blast
          309 } // namespace Nv
          310 
          311 
          312 #endif // ifndef NVBLASTASSET_H
          uint32_t m_bondCount
          Definition: NvBlastAsset.h:211
          +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-2018 NVIDIA Corporation. All rights reserved.
          27 
          28 
          29 #ifndef NVBLASTASSET_H
          30 #define NVBLASTASSET_H
          31 
          32 
          33 #include "NvBlastSupportGraph.h"
          34 #include "NvBlast.h"
          35 #include "NvBlastAssert.h"
          36 #include "NvBlastIndexFns.h"
          37 #include "NvBlastChunkHierarchy.h"
          38 
          39 
          40 namespace Nv
          41 {
          42 namespace Blast
          43 {
          44 
          45 class Asset : public NvBlastAsset
          46 {
          47 public:
          48 
          53  {
          54  enum Enum
          55  {
          56  Parent = (1 << 0),
          57  Support = (1 << 1),
          58  SuperSupport = (1 << 2),
          59 
          60  // Combinations
          62  };
          63  };
          64 
          65 
          76  static Asset* create(void* mem, const NvBlastAssetDesc* desc, void* scratch, NvBlastLog logFn);
          77 
          84  static size_t getMemorySize(const NvBlastAssetDesc* desc);
          85 
          94  static size_t createRequiredScratch(const NvBlastAssetDesc* desc);
          95 
          96 
          102  uint32_t getUpperSupportChunkCount() const;
          103 
          109  uint32_t getLowerSupportChunkCount() const;
          110 
          116  uint32_t getBondCount() const;
          117 
          123  uint32_t getHierarchyCount() const;
          124 
          132  uint32_t getContiguousLowerSupportIndex(uint32_t chunkIndex) const;
          133 
          134 
          135  // Static functions
          136 
          156  static bool ensureExactSupportCoverage(uint32_t& supportChunkCount, uint32_t& leafChunkCount, char* chunkAnnotation, uint32_t chunkCount, NvBlastChunkDesc* chunkDescs, bool testOnly, NvBlastLog logFn);
          157 
          174  static bool testForValidChunkOrder(uint32_t chunkCount, const NvBlastChunkDesc* chunkDescs, const char* chunkAnnotation, void* scratch);
          175 
          176 
          178 
          183 
          188 
          192  uint32_t m_chunkCount;
          193 
          198 
          203 
          208 
          212  uint32_t m_bondCount;
          213 
          219  NvBlastBlockArrayData(NvBlastChunk, m_chunksOffset, getChunks, m_chunkCount);
          220 
          229  NvBlastBlockArrayData(NvBlastBond, m_bondsOffset, getBonds, m_bondCount);
          230 
          237  NvBlastBlockArrayData(uint32_t, m_subtreeLeafChunkCountsOffset, getSubtreeLeafChunkCounts, m_chunkCount);
          238 
          244  NvBlastBlockArrayData(uint32_t, m_chunkToGraphNodeMapOffset, getChunkToGraphNodeMap, m_chunkCount);
          245 
          246 
          248 
          254  {
          255  public:
          257  DepthFirstIt(const Asset& asset, uint32_t startChunkIndex, bool upperSupportOnly = false) :
          258  ChunkDepthFirstIt(asset.getChunks(), startChunkIndex, upperSupportOnly ? asset.getUpperSupportChunkCount() : asset.m_chunkCount) {}
          259  };
          260 };
          261 
          262 
          264 
          266 {
          268 }
          269 
          270 
          272 {
          274 }
          275 
          276 
          278 {
          279  NVBLAST_ASSERT((m_graph.getAdjacencyPartition()[m_graph.m_nodeCount] & 1) == 0); // The bidirectional graph data should have an even number of edges
          280  return m_graph.getAdjacencyPartition()[m_graph.m_nodeCount] / 2; // Directional bonds, divide by two
          281 }
          282 
          283 
          285 {
          286  const NvBlastChunk* chunks = getChunks();
          287  for (uint32_t i = 0; i < m_chunkCount; ++i)
          288  {
          289  if (!isInvalidIndex(chunks[i].parentChunkIndex))
          290  {
          291  return i;
          292  }
          293  }
          294  return m_chunkCount;
          295 }
          296 
          297 
          298 NV_INLINE uint32_t Asset::getContiguousLowerSupportIndex(uint32_t chunkIndex) const
          299 {
          300  NVBLAST_ASSERT(chunkIndex < m_chunkCount);
          301 
          302  return chunkIndex < m_firstSubsupportChunkIndex ? getChunkToGraphNodeMap()[chunkIndex] : (chunkIndex - m_firstSubsupportChunkIndex + m_graph.m_nodeCount);
          303 }
          304 
          305 
          306 //JDM: Expose this so serialization layer can use it.
          307 NVBLAST_API Asset* initializeAsset(void* mem, NvBlastID id, uint32_t chunkCount, uint32_t graphNodeCount, uint32_t leafChunkCount, uint32_t firstSubsupportChunkIndex, uint32_t bondCount, NvBlastLog logFn);
          308 
          309 } // namespace Blast
          310 } // namespace Nv
          311 
          312 
          313 #endif // ifndef NVBLASTASSET_H
          uint32_t m_bondCount
          Definition: NvBlastAsset.h:212
          static size_t getMemorySize(const NvBlastAssetDesc *desc)
          Definition: NvBlastSupportGraph.h:76
          @@ -54,12 +54,12 @@
          Enum
          Definition: NvBlastAsset.h:54
          Definition: NvBlastChunkHierarchy.h:49
          Definition: NvBlastAsset.h:52
          -
          uint32_t getBondCount() const
          Definition: NvBlastAsset.h:276
          +
          uint32_t getBondCount() const
          Definition: NvBlastAsset.h:277
          Definition: NvBlastTypes.h:345
          static bool testForValidChunkOrder(uint32_t chunkCount, const NvBlastChunkDesc *chunkDescs, const char *chunkAnnotation, void *scratch)
          NV_INLINE bool isInvalidIndex(T index)
          Definition: NvBlastIndexFns.h:57
          -
          uint32_t m_leafChunkCount
          Definition: NvBlastAsset.h:201
          +
          uint32_t m_leafChunkCount
          Definition: NvBlastAsset.h:202
          Definition: NvBlastAsset.h:56
          void(* NvBlastLog)(int type, const char *msg, const char *file, int line)
          Definition: NvBlastTypes.h:63
          #define NVBLAST_ASSERT(exp)
          Definition: NvBlastAssert.h:37
          @@ -69,28 +69,28 @@
          Definition: NvBlastTypes.h:98
          #define NVBLAST_API
          Definition: NvBlastPreprocessor.h:37
          -
          uint32_t m_firstSubsupportChunkIndex
          Definition: NvBlastAsset.h:206
          -
          DepthFirstIt(const Asset &asset, uint32_t startChunkIndex, bool upperSupportOnly=false)
          Definition: NvBlastAsset.h:256
          -
          Definition: NvBlastAsset.h:252
          +
          uint32_t m_firstSubsupportChunkIndex
          Definition: NvBlastAsset.h:207
          +
          DepthFirstIt(const Asset &asset, uint32_t startChunkIndex, bool upperSupportOnly=false)
          Definition: NvBlastAsset.h:257
          +
          Definition: NvBlastAsset.h:253
          NVBLAST_API Asset * initializeAsset(void *mem, NvBlastID id, uint32_t chunkCount, uint32_t graphNodeCount, uint32_t leafChunkCount, uint32_t firstSubsupportChunkIndex, uint32_t bondCount, NvBlastLog logFn)
          #define NV_INLINE
          Definition: NvPreprocessor.h:350
          uint32_t m_nodeCount
          Definition: NvBlastSupportGraph.h:81
          Definition: NvBlastTypes.h:69
          -
          uint32_t getContiguousLowerSupportIndex(uint32_t chunkIndex) const
          Definition: NvBlastAsset.h:297
          -
          uint32_t getLowerSupportChunkCount() const
          Definition: NvBlastAsset.h:270
          -
          NvBlastDataBlock m_header
          Definition: NvBlastAsset.h:181
          +
          uint32_t getContiguousLowerSupportIndex(uint32_t chunkIndex) const
          Definition: NvBlastAsset.h:298
          +
          uint32_t getLowerSupportChunkCount() const
          Definition: NvBlastAsset.h:271
          +
          NvBlastDataBlock m_header
          Definition: NvBlastAsset.h:182
          Definition: NvBlastTypes.h:292
          Definition: NvBlastTypes.h:152
          -
          SupportGraph m_graph
          Definition: NvBlastAsset.h:196
          +
          SupportGraph m_graph
          Definition: NvBlastAsset.h:197
          Definition: NvBlastTypes.h:286
          static Asset * create(void *mem, const NvBlastAssetDesc *desc, void *scratch, NvBlastLog logFn)
          NvBlastBlockArrayData(NvBlastChunk, m_chunksOffset, getChunks, m_chunkCount)
          -
          NvBlastID m_ID
          Definition: NvBlastAsset.h:186
          -
          uint32_t getUpperSupportChunkCount() const
          Definition: NvBlastAsset.h:264
          -
          uint32_t getHierarchyCount() const
          Definition: NvBlastAsset.h:283
          -
          uint32_t m_chunkCount
          Definition: NvBlastAsset.h:191
          +
          NvBlastID m_ID
          Definition: NvBlastAsset.h:187
          +
          uint32_t getUpperSupportChunkCount() const
          Definition: NvBlastAsset.h:265
          +
          uint32_t getHierarchyCount() const
          Definition: NvBlastAsset.h:284
          +
          uint32_t m_chunkCount
          Definition: NvBlastAsset.h:192
          Definition: NvBlastAsset.h:57
          Definition: NvBlastArray.h:37
          diff --git a/docs/source_docs/files/_nv_blast_ext_authoring_boolean_tool_8h_source.html b/docs/source_docs/files/_nv_blast_ext_authoring_boolean_tool_8h_source.html index 6f944738..0b48ae98 100755 --- a/docs/source_docs/files/_nv_blast_ext_authoring_boolean_tool_8h_source.html +++ b/docs/source_docs/files/_nv_blast_ext_authoring_boolean_tool_8h_source.html @@ -49,7 +49,7 @@ 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-2018 NVIDIA Corporation. All rights reserved.
          27 
          28 
          29 #ifndef NVBLASTEXTAUTHORINGBOOLEANTOOL_H
          30 #define NVBLASTEXTAUTHORINGBOOLEANTOOL_H
          31 
          34 #include <vector>
          35 #include "NvBlastTypes.h"
          36 
          37 
          38 namespace Nv
          39 {
          40 namespace Blast
          41 {
          42 
          43 class Mesh;
          44 
          49 {
          50  int32_t ca, cb, ci;
          51  BooleanConf(int32_t a, int32_t b, int32_t c) : ca(a), cb(b), ci(c)
          52  {
          53  }
          54 };
          55 
          56 
          57 namespace BooleanConfigurations
          58 {
          63 {
          64  return BooleanConf(0, 0, 1);
          65 }
          66 
          71 {
          72  return BooleanConf(1, 1, -1);
          73 }
          78 {
          79  return BooleanConf(1, 0, -1);
          80 }
          81 }
          82 
          87 {
          88  int32_t edId;
          91  EdgeFacetIntersectionData(int32_t edId, int32_t intersType, Vertex& inters) : edId(edId), intersectionType(intersType), intersectionPoint(inters)
          92  { }
          93  EdgeFacetIntersectionData(int32_t edId) : edId(edId)
          94  { }
          95  bool operator<(const EdgeFacetIntersectionData& b) const
          96  {
          97  return edId < b.edId;
          98  }
          99 };
          100 
          101 
          102 class SpatialAccelerator;
          103 
          109 {
          110 
          111 public:
          113  ~BooleanEvaluator();
          114 
          123  void performBoolean(const Mesh* meshA, const Mesh* meshB, SpatialAccelerator* spAccelA, SpatialAccelerator* spAccelB, BooleanConf mode);
          124 
          131  void performBoolean(const Mesh* meshA, const Mesh* meshB, BooleanConf mode);
          132 
          142  void performFastCutting(const Mesh* meshA, const Mesh* meshB, SpatialAccelerator* spAccelA, SpatialAccelerator* spAccelB, BooleanConf mode);
          143 
          151  void performFastCutting(const Mesh* meshA, const Mesh* meshB, BooleanConf mode);
          152 
          159  int32_t isPointContainedInMesh(const Mesh* mesh, const NvcVec3& point);
          167  int32_t isPointContainedInMesh(const Mesh* mesh, SpatialAccelerator* spAccel, const NvcVec3& point);
          168 
          169 
          174  Mesh* createNewMesh();
          175 
          179  void reset();
          180 
          181 private:
          182 
          183  void buildFaceFaceIntersections(BooleanConf);
          184  void buildFastFaceFaceIntersection(BooleanConf);
          185  void collectRetainedPartsFromA(BooleanConf mode);
          186  void collectRetainedPartsFromB(BooleanConf mode);
          187 
          188  int32_t addIfNotExist(Vertex& p);
          189  void addEdgeIfValid(EdgeWithParent& ed);
          190 private:
          191 
          192  int32_t vertexMeshStatus03(const NvcVec3& p, const Mesh* mesh);
          193  int32_t vertexMeshStatus30(const NvcVec3& p, const Mesh* mesh);
          194 
          195  const Mesh* mMeshA;
          196  const Mesh* mMeshB;
          197 
          198  SpatialAccelerator* mAcceleratorA;
          199  SpatialAccelerator* mAcceleratorB;
          200 
          201  std::vector<EdgeWithParent> mEdgeAggregate;
          202  std::vector<Vertex> mVerticesAggregate;
          203 
          204  std::vector<std::vector<EdgeFacetIntersectionData> > mEdgeFacetIntersectionData12;
          205  std::vector<std::vector<EdgeFacetIntersectionData> > mEdgeFacetIntersectionData21;
          206 };
          207 
          208 } // namespace Blast
          209 } // namespace Nv
          210 
          211 
          212 #endif // ifndef NVBLASTEXTAUTHORINGBOOLEANTOOL_H
          Vertex intersectionPoint
          Definition: NvBlastExtAuthoringBooleanTool.h:90
          Definition: NvBlastExtAuthoringBooleanTool.h:108
          -
          Definition: NvBlastExtAuthoringInternalCommon.h:47
          +
          Definition: NvBlastExtAuthoringInternalCommon.h:48
          EdgeFacetIntersectionData(int32_t edId)
          Definition: NvBlastExtAuthoringBooleanTool.h:93
          Definition: NvBlastExtAuthoringAccelerator.h:47
          diff --git a/docs/source_docs/files/_nv_blast_ext_authoring_fracture_tool_8h-source.html b/docs/source_docs/files/_nv_blast_ext_authoring_fracture_tool_8h-source.html index b3703bc4..e8cc7dce 100755 --- a/docs/source_docs/files/_nv_blast_ext_authoring_fracture_tool_8h-source.html +++ b/docs/source_docs/files/_nv_blast_ext_authoring_fracture_tool_8h-source.html @@ -86,8 +86,8 @@

          sdk/extensions/authoring/include/NvBlastExtAuthoringFractureTool.h

          00048 { 00049 enum ChunkFlags 00050 { -00051 NO_FLAGS = 0, -00052 CREATED_BY_ISLAND_DETECTOR = 1 +00051 NO_FLAGS = 0, +00052 APPROXIMATE_BONDING = 1 // Created by island splitting or chunk merge, etc. and should check for inexact bonds 00053 }; 00054 00055 Mesh* meshData; @@ -262,15 +262,17 @@

          sdk/extensions/authoring/include/NvBlastExtAuthoringFractureTool.h

          00512 const NvcVec2i* adjChunks, uint32_t adjChunksSize, 00513 bool removeOriginalChunks = false) = 0; 00514 -00520 virtual void fitUvToRect(float side, uint32_t chunkId) = 0; -00521 -00526 virtual void fitAllUvToRect(float side) = 0; -00527 }; -00528 -00529 } // namespace Blast -00530 } // namespace Nv -00531 -00532 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H +00521 virtual bool setApproximateBonding(uint32_t chunkIndex, bool useApproximateBonding) = 0; +00522 +00528 virtual void fitUvToRect(float side, uint32_t chunkId) = 0; +00529 +00534 virtual void fitAllUvToRect(float side) = 0; +00535 }; +00536 +00537 } // namespace Blast +00538 } // namespace Nv +00539 +00540 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_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-2018 NVIDIA Corporation. All rights reserved.
          27 
          28 
          29 #ifndef NVBLASTAUTHORINGFRACTURETOOL_H
          30 #define NVBLASTAUTHORINGFRACTURETOOL_H
          31 
          33 
          34 namespace Nv
          35 {
          36 namespace Blast
          37 {
          38 
          39 class SpatialAccelerator;
          40 class Triangulator;
          41 class Mesh;
          42 class CutoutSet;
          43 
          44 /*
          45  Chunk data, chunk with chunkId == 0 is always source mesh.
          46 */
          47 struct ChunkInfo
          48 {
          50  {
          51  NO_FLAGS = 0,
          53  };
          54 
          56  int32_t parent;
          57  int32_t chunkId;
          58  uint32_t flags;
          59  bool isLeaf;
          60  bool isChanged;
          61 };
          62 
          67 {
          68  public:
          69  // Generates uniformly distributed value in [0, 1] range.
          70  virtual float getRandomValue() = 0;
          71  // Seeds random value generator
          72  virtual void seed(int32_t seed) = 0;
          73  virtual ~RandomGeneratorBase(){};
          74 };
          75 
          76 /*
          77  Noise fracturing configuration for chunks's faces
          78 */
          80 {
          86  float amplitude = 0.f;
          87 
          91  float frequency = 1.f;
          92 
          96  uint32_t octaveNumber = 1;
          97 
          101  NvcVec3 samplingInterval = { 1, 1, 1 };
          102 };
          103 
          104 /*
          105  Slicing fracturing configuration
          106 */
          108 {
          112  int32_t x_slices = 1, y_slices = 1, z_slices = 1;
          113 
          117  float offset_variations = 0.f;
          118 
          122  float angle_variations = 0.f;
          123 
          124  /*
          125  Noise parameters for faces between sliced chunks
          126  */
          128 };
          129 
          134 {
          139  CutoutSet* cutoutSet = nullptr;
          140 
          145  NvcTransform transform = {{0, 0, 0, 1}, {0, 0, 0}};
          146 
          152  NvcVec2 scale = { -1, -1 };
          153 
          157  float aperture = 0.f;
          158 
          163  bool isRelativeTransform = true;
          164 
          168  bool useSmoothing = false;
          169 
          174 };
          175 
          180 {
          181  public:
          183 
          187  virtual void release() = 0;
          188 
          192  virtual void setBaseMesh(const Mesh* mesh) = 0;
          193 
          199  virtual uint32_t getVoronoiSites(const NvcVec3*& sites) = 0;
          200 
          205  virtual void addSite(const NvcVec3& site) = 0;
          210  virtual void uniformlyGenerateSitesInMesh(uint32_t numberOfSites) = 0;
          211 
          218  virtual void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) = 0;
          219 
          230  virtual void radialPattern(const NvcVec3& center, const NvcVec3& normal, float radius, int32_t angularSteps,
          231  int32_t radialSteps, float angleOffset = 0.0f, float variability = 0.0f) = 0;
          232 
          239  virtual void generateInSphere(const uint32_t count, const float radius, const NvcVec3& center) = 0;
          240 
          245  virtual void setStencil(const Mesh* stencil) = 0;
          246 
          250  virtual void clearStencil() = 0;
          251 
          258  virtual void deleteInSphere(const float radius, const NvcVec3& center, const float eraserProbability = 1) = 0;
          259 };
          260 
          265 {
          266 
          267  public:
          268  virtual ~FractureTool() {}
          269 
          273  virtual void release() = 0;
          274 
          278  virtual void reset() = 0;
          279 
          280 
          284  virtual void setSourceMesh(const Mesh* mesh) = 0;
          285 
          289  virtual int32_t setChunkMesh(const Mesh* mesh, int32_t parentId) = 0;
          290 
          294  virtual void setInteriorMaterialId(int32_t materialId) = 0;
          295 
          299  virtual int32_t getInteriorMaterialId() const = 0;
          300 
          304  virtual void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) = 0;
          305 
          309  virtual Mesh* createChunkMesh(int32_t chunkId) = 0;
          310 
          315  virtual void getTransformation(NvcVec3& offset, float& scale) = 0;
          316 
          317 
          326  virtual int32_t
          327  voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, bool replaceChunk) = 0;
          328 
          340  virtual int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints,
          341  const NvcVec3& scale, const NvcQuat& rotation, bool replaceChunk) = 0;
          342 
          343 
          355  virtual int32_t
          356  slicing(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
          357 
          371  virtual int32_t cut(uint32_t chunkId, const NvcVec3& normal, const NvcVec3& position,
          372  const NoiseConfiguration& noise, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
          373 
          385  virtual int32_t cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
          386 
          387 
          391  virtual void finalizeFracturing() = 0;
          392 
          396  virtual uint32_t getChunkCount() const = 0;
          397 
          401  virtual const ChunkInfo& getChunkInfo(int32_t chunkIndex) = 0;
          402 
          410  virtual float getMeshOverlap(const Mesh& meshA, const Mesh& meshB) = 0;
          411 
          418  virtual uint32_t getBaseMesh(int32_t chunkIndex, Triangle*& output) = 0;
          419 
          427  virtual uint32_t updateBaseMesh(int32_t chunkIndex, Triangle* output) = 0;
          428 
          434  virtual int32_t getChunkIndex(int32_t chunkId) = 0;
          435 
          441  virtual int32_t getChunkId(int32_t chunkIndex) = 0;
          442 
          448  virtual int32_t getChunkDepth(int32_t chunkId) = 0;
          449 
          456  virtual uint32_t getChunksIdAtDepth(uint32_t depth, int32_t*& chunkIds) = 0;
          457 
          467  virtual uint32_t
          468  getBufferedBaseMeshes(Vertex*& vertexBuffer, uint32_t*& indexBuffer, uint32_t*& indexBufferOffsets) = 0;
          469 
          474  virtual void setRemoveIslands(bool isRemoveIslands) = 0;
          475 
          481  virtual int32_t islandDetectionAndRemoving(int32_t chunkId, bool createAtNewDepth = false) = 0;
          482 
          487  virtual bool isMeshContainOpenEdges(const Mesh* input) = 0;
          488 
          495  virtual bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) = 0;
          496 
          510  virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
          511  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
          512  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
          513  bool removeOriginalChunks = false) = 0;
          514 
          520  virtual void fitUvToRect(float side, uint32_t chunkId) = 0;
          521 
          526  virtual void fitAllUvToRect(float side) = 0;
          527 };
          528 
          529 } // namespace Blast
          530 } // namespace Nv
          531 
          532 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H
          Definition: NvBlastExtAuthoringFractureTool.h:107
          +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-2018 NVIDIA Corporation. All rights reserved.
          27 
          28 
          29 #ifndef NVBLASTAUTHORINGFRACTURETOOL_H
          30 #define NVBLASTAUTHORINGFRACTURETOOL_H
          31 
          33 
          34 namespace Nv
          35 {
          36 namespace Blast
          37 {
          38 
          39 class SpatialAccelerator;
          40 class Triangulator;
          41 class Mesh;
          42 class CutoutSet;
          43 
          44 /*
          45  Chunk data, chunk with chunkId == 0 is always source mesh.
          46 */
          47 struct ChunkInfo
          48 {
          50  {
          51  NO_FLAGS = 0,
          52  APPROXIMATE_BONDING = 1 // Created by island splitting or chunk merge, etc. and should check for inexact bonds
          53  };
          54 
          56  int32_t parent;
          57  int32_t chunkId;
          58  uint32_t flags;
          59  bool isLeaf;
          60  bool isChanged;
          61 };
          62 
          67 {
          68  public:
          69  // Generates uniformly distributed value in [0, 1] range.
          70  virtual float getRandomValue() = 0;
          71  // Seeds random value generator
          72  virtual void seed(int32_t seed) = 0;
          73  virtual ~RandomGeneratorBase(){};
          74 };
          75 
          76 /*
          77  Noise fracturing configuration for chunks's faces
          78 */
          80 {
          86  float amplitude = 0.f;
          87 
          91  float frequency = 1.f;
          92 
          96  uint32_t octaveNumber = 1;
          97 
          101  NvcVec3 samplingInterval = { 1, 1, 1 };
          102 };
          103 
          104 /*
          105  Slicing fracturing configuration
          106 */
          108 {
          112  int32_t x_slices = 1, y_slices = 1, z_slices = 1;
          113 
          117  float offset_variations = 0.f;
          118 
          122  float angle_variations = 0.f;
          123 
          124  /*
          125  Noise parameters for faces between sliced chunks
          126  */
          128 };
          129 
          134 {
          139  CutoutSet* cutoutSet = nullptr;
          140 
          145  NvcTransform transform = {{0, 0, 0, 1}, {0, 0, 0}};
          146 
          152  NvcVec2 scale = { -1, -1 };
          153 
          157  float aperture = 0.f;
          158 
          163  bool isRelativeTransform = true;
          164 
          168  bool useSmoothing = false;
          169 
          174 };
          175 
          180 {
          181  public:
          183 
          187  virtual void release() = 0;
          188 
          192  virtual void setBaseMesh(const Mesh* mesh) = 0;
          193 
          199  virtual uint32_t getVoronoiSites(const NvcVec3*& sites) = 0;
          200 
          205  virtual void addSite(const NvcVec3& site) = 0;
          210  virtual void uniformlyGenerateSitesInMesh(uint32_t numberOfSites) = 0;
          211 
          218  virtual void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) = 0;
          219 
          230  virtual void radialPattern(const NvcVec3& center, const NvcVec3& normal, float radius, int32_t angularSteps,
          231  int32_t radialSteps, float angleOffset = 0.0f, float variability = 0.0f) = 0;
          232 
          239  virtual void generateInSphere(const uint32_t count, const float radius, const NvcVec3& center) = 0;
          240 
          245  virtual void setStencil(const Mesh* stencil) = 0;
          246 
          250  virtual void clearStencil() = 0;
          251 
          258  virtual void deleteInSphere(const float radius, const NvcVec3& center, const float eraserProbability = 1) = 0;
          259 };
          260 
          265 {
          266 
          267  public:
          268  virtual ~FractureTool() {}
          269 
          273  virtual void release() = 0;
          274 
          278  virtual void reset() = 0;
          279 
          280 
          284  virtual void setSourceMesh(const Mesh* mesh) = 0;
          285 
          289  virtual int32_t setChunkMesh(const Mesh* mesh, int32_t parentId) = 0;
          290 
          294  virtual void setInteriorMaterialId(int32_t materialId) = 0;
          295 
          299  virtual int32_t getInteriorMaterialId() const = 0;
          300 
          304  virtual void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) = 0;
          305 
          309  virtual Mesh* createChunkMesh(int32_t chunkId) = 0;
          310 
          315  virtual void getTransformation(NvcVec3& offset, float& scale) = 0;
          316 
          317 
          326  virtual int32_t
          327  voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, bool replaceChunk) = 0;
          328 
          340  virtual int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints,
          341  const NvcVec3& scale, const NvcQuat& rotation, bool replaceChunk) = 0;
          342 
          343 
          355  virtual int32_t
          356  slicing(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
          357 
          371  virtual int32_t cut(uint32_t chunkId, const NvcVec3& normal, const NvcVec3& position,
          372  const NoiseConfiguration& noise, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
          373 
          385  virtual int32_t cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
          386 
          387 
          391  virtual void finalizeFracturing() = 0;
          392 
          396  virtual uint32_t getChunkCount() const = 0;
          397 
          401  virtual const ChunkInfo& getChunkInfo(int32_t chunkIndex) = 0;
          402 
          410  virtual float getMeshOverlap(const Mesh& meshA, const Mesh& meshB) = 0;
          411 
          418  virtual uint32_t getBaseMesh(int32_t chunkIndex, Triangle*& output) = 0;
          419 
          427  virtual uint32_t updateBaseMesh(int32_t chunkIndex, Triangle* output) = 0;
          428 
          434  virtual int32_t getChunkIndex(int32_t chunkId) = 0;
          435 
          441  virtual int32_t getChunkId(int32_t chunkIndex) = 0;
          442 
          448  virtual int32_t getChunkDepth(int32_t chunkId) = 0;
          449 
          456  virtual uint32_t getChunksIdAtDepth(uint32_t depth, int32_t*& chunkIds) = 0;
          457 
          467  virtual uint32_t
          468  getBufferedBaseMeshes(Vertex*& vertexBuffer, uint32_t*& indexBuffer, uint32_t*& indexBufferOffsets) = 0;
          469 
          474  virtual void setRemoveIslands(bool isRemoveIslands) = 0;
          475 
          481  virtual int32_t islandDetectionAndRemoving(int32_t chunkId, bool createAtNewDepth = false) = 0;
          482 
          487  virtual bool isMeshContainOpenEdges(const Mesh* input) = 0;
          488 
          495  virtual bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) = 0;
          496 
          510  virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
          511  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
          512  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
          513  bool removeOriginalChunks = false) = 0;
          514 
          521  virtual bool setApproximateBonding(uint32_t chunkIndex, bool useApproximateBonding) = 0;
          522 
          528  virtual void fitUvToRect(float side, uint32_t chunkId) = 0;
          529 
          534  virtual void fitAllUvToRect(float side) = 0;
          535 };
          536 
          537 } // namespace Blast
          538 } // namespace Nv
          539 
          540 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H
          Definition: NvBlastExtAuthoringFractureTool.h:107
          Definition: NvBlastExtAuthoringFractureTool.h:47
          Definition: NvBlastExtAuthoringFractureTool.h:179
          -
          Definition: NvBlastExtAuthoringFractureTool.h:52
          NV_INLINE float normal(const float a[3], float r[3])
          Definition: NvBlastMath.h:93
          Definition: NvBlastExtAuthoringCutout.h:36
          +
          Definition: NvBlastExtAuthoringFractureTool.h:52
          Definition: NvBlastExtAuthoringFractureTool.h:79
          Definition: NvBlastExtAuthoringMesh.h:42
          diff --git a/docs/source_docs/files/_nv_blast_ext_authoring_fracture_tool_impl_8h-source.html b/docs/source_docs/files/_nv_blast_ext_authoring_fracture_tool_impl_8h-source.html index 4bb26eb1..b413c20c 100755 --- a/docs/source_docs/files/_nv_blast_ext_authoring_fracture_tool_impl_8h-source.html +++ b/docs/source_docs/files/_nv_blast_ext_authoring_fracture_tool_impl_8h-source.html @@ -202,49 +202,51 @@

          sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.h

          00380 const NvcVec2i* adjChunks, uint32_t adjChunksSize, 00381 bool removeOriginalChunks = false) override; 00382 -00383 -00389 void fitUvToRect(float side, uint32_t chunkId) override; -00390 -00395 void fitAllUvToRect(float side) override; -00396 +00383 bool setApproximateBonding(uint32_t chunkId, bool useApproximateBonding) override; +00384 +00390 void fitUvToRect(float side, uint32_t chunkId) override; +00391 +00396 void fitAllUvToRect(float side) override; 00397 00398 -00399 private: -00400 bool isAncestorForChunk(int32_t ancestorId, int32_t chunkId); -00401 int32_t slicingNoisy(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd); -00402 uint32_t stretchGroup(const std::vector<uint32_t>& group, std::vector<std::vector<uint32_t>>& graph); -00403 void rebuildAdjGraph(const std::vector<uint32_t>& chunksToRebuild, const NvcVec2i* adjChunks, uint32_t adjChunksSize, -00404 std::vector<std::vector<uint32_t> >& chunkGraph); -00405 void fitAllUvToRect(float side, std::set<uint32_t>& mask); -00406 -00410 uint32_t createNewChunk(uint32_t parentId); -00411 -00412 -00413 protected: -00417 float mScaleFactor; -00418 NvcVec3 mOffset; -00419 -00420 /* Chunk mesh wrappers */ -00421 std::vector<Triangulator*> mChunkPostprocessors; -00422 -00423 -00424 -00425 int64_t mPlaneIndexerOffset; -00426 int32_t mChunkIdCounter; -00427 std::vector<ChunkInfo> mChunkData; -00428 -00429 bool mRemoveIslands; -00430 int32_t mInteriorMaterialId; -00431 }; -00432 -00433 void findCellBasePlanes(const std::vector<NvcVec3>& sites, std::vector<std::vector<int32_t> >& neighboors); -00434 Mesh* getCellMesh(class BooleanEvaluator& eval, int32_t planeIndexerOffset, int32_t cellId, const std::vector<NvcVec3>& sites, std::vector < std::vector<int32_t> >& neighboors, int32_t interiorMaterialId, NvcVec3 origin); -00435 -00436 } // namespace Blast -00437 } // namespace Nv -00438 -00439 -00440 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOLIMPL_H +00399 +00400 private: +00401 bool isAncestorForChunk(int32_t ancestorId, int32_t chunkId); +00402 int32_t slicingNoisy(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd); +00403 uint32_t stretchGroup(const std::vector<uint32_t>& group, std::vector<std::vector<uint32_t>>& graph); +00404 void rebuildAdjGraph(const std::vector<uint32_t>& chunksToRebuild, const NvcVec2i* adjChunks, uint32_t adjChunksSize, +00405 std::vector<std::vector<uint32_t> >& chunkGraph); +00406 void fitAllUvToRect(float side, std::set<uint32_t>& mask); +00407 void markLeaves(); +00408 +00412 uint32_t createNewChunk(uint32_t parentId); +00413 +00414 +00415 protected: +00419 float mScaleFactor; +00420 NvcVec3 mOffset; +00421 +00422 /* Chunk mesh wrappers */ +00423 std::vector<Triangulator*> mChunkPostprocessors; +00424 +00425 +00426 +00427 int64_t mPlaneIndexerOffset; +00428 int32_t mChunkIdCounter; +00429 std::vector<ChunkInfo> mChunkData; +00430 +00431 bool mRemoveIslands; +00432 int32_t mInteriorMaterialId; +00433 }; +00434 +00435 void findCellBasePlanes(const std::vector<NvcVec3>& sites, std::vector<std::vector<int32_t> >& neighboors); +00436 Mesh* getCellMesh(class BooleanEvaluator& eval, int32_t planeIndexerOffset, int32_t cellId, const std::vector<NvcVec3>& sites, std::vector < std::vector<int32_t> >& neighboors, int32_t interiorMaterialId, NvcVec3 origin); +00437 +00438 } // namespace Blast +00439 } // namespace Nv +00440 +00441 +00442 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOLIMPL_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-2018 NVIDIA Corporation. All rights reserved.
          27 
          28 #ifndef NVBLASTAUTHORINGFRACTURETOOLIMPL_H
          29 #define NVBLASTAUTHORINGFRACTURETOOLIMPL_H
          30 
          33 #include <vector>
          34 #include <set>
          35 
          36 namespace Nv
          37 {
          38 namespace Blast
          39 {
          40 
          41 class SpatialAccelerator;
          42 class Triangulator;
          43 
          44 
          49 {
          50 public:
          51 
          61 
          62  void release() override;
          63 
          67  void setBaseMesh(const Mesh* m) override;
          68 
          75  uint32_t getVoronoiSites(const NvcVec3*& sites) override;
          76 
          81  void addSite(const NvcVec3& site) override;
          86  void uniformlyGenerateSitesInMesh(uint32_t numberOfSites) override;
          87 
          94  void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) override;
          95 
          106  void radialPattern(const NvcVec3& center, const NvcVec3& normal, float radius, int32_t angularSteps, int32_t radialSteps, float angleOffset = 0.0f, float variability = 0.0f) override;
          107 
          114  void generateInSphere(const uint32_t count, const float radius, const NvcVec3& center) override;
          119  void setStencil(const Mesh* stencil) override;
          123  void clearStencil() override;
          124 
          131  void deleteInSphere(const float radius, const NvcVec3& center, const float eraserProbability = 1) override;
          132 
          133 private:
          134  std::vector <NvcVec3> mGeneratedSites;
          135  const Mesh* mMesh;
          136  const Mesh* mStencil;
          137  RandomGeneratorBase* mRnd;
          138  SpatialAccelerator* mAccelerator;
          139 };
          140 
          141 
          142 
          147 {
          148 
          149 public:
          150 
          155  {
          156  mPlaneIndexerOffset = 1;
          157  mChunkIdCounter = 0;
          158  mRemoveIslands = false;
          159  mInteriorMaterialId = kMaterialInteriorId;
          160  }
          161 
          163  {
          164  reset();
          165  }
          166 
          167  void release() override;
          168 
          172  void reset() override;
          173 
          177  void setInteriorMaterialId(int32_t materialId) override;
          178 
          182  int32_t getInteriorMaterialId() const override;
          183 
          187  void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) override;
          188 
          192  void setSourceMesh(const Mesh* mesh) override;
          193 
          197  int32_t setChunkMesh(const Mesh* mesh, int32_t parentId) override;
          198 
          202  Mesh* createChunkMesh(int32_t chunkId) override;
          203 
          208  void getTransformation(NvcVec3& offset, float& scale) override;
          209 
          210 
          219  int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, bool replaceChunk) override;
          220 
          232  int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, const NvcVec3& scale, const NvcQuat& rotation, bool replaceChunk) override;
          233 
          234 
          245  int32_t slicing(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd) override;
          246 
          247 
          260  int32_t cut(uint32_t chunkId, const NvcVec3& normal, const NvcVec3& position, const NoiseConfiguration& noise, bool replaceChunk, RandomGeneratorBase* rnd) override;
          261 
          272  int32_t cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase* rnd) override;
          273 
          274 
          278  void finalizeFracturing() override;
          279 
          280  uint32_t getChunkCount() const override;
          281 
          285  const ChunkInfo& getChunkInfo(int32_t chunkIndex) override;
          286 
          294  float getMeshOverlap(const Mesh& meshA, const Mesh& meshB) override;
          295 
          303  uint32_t getBaseMesh(int32_t chunkIndex, Triangle*& output) override;
          304 
          312  uint32_t updateBaseMesh(int32_t chunkIndex, Triangle* output) override;
          313 
          319  int32_t getChunkIndex(int32_t chunkId) override;
          320 
          326  int32_t getChunkId(int32_t chunkIndex) override;
          327 
          333  int32_t getChunkDepth(int32_t chunkId) override;
          334 
          342  uint32_t getChunksIdAtDepth(uint32_t depth, int32_t*& chunkIds) override;
          343 
          344 
          355  uint32_t getBufferedBaseMeshes(Vertex*& vertexBuffer, uint32_t*& indexBuffer, uint32_t*& indexBufferOffsets) override;
          356 
          361  void setRemoveIslands(bool isRemoveIslands) override;
          362 
          368  int32_t islandDetectionAndRemoving(int32_t chunkId, bool createAtNewDepth = false) override;
          369 
          374  bool isMeshContainOpenEdges(const Mesh* input) override;
          375 
          376  bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) override;
          377 
          378  void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
          379  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
          380  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
          381  bool removeOriginalChunks = false) override;
          382 
          383 
          389  void fitUvToRect(float side, uint32_t chunkId) override;
          390 
          395  void fitAllUvToRect(float side) override;
          396 
          397 
          398 
          399 private:
          400  bool isAncestorForChunk(int32_t ancestorId, int32_t chunkId);
          401  int32_t slicingNoisy(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd);
          402  uint32_t stretchGroup(const std::vector<uint32_t>& group, std::vector<std::vector<uint32_t>>& graph);
          403  void rebuildAdjGraph(const std::vector<uint32_t>& chunksToRebuild, const NvcVec2i* adjChunks, uint32_t adjChunksSize,
          404  std::vector<std::vector<uint32_t> >& chunkGraph);
          405  void fitAllUvToRect(float side, std::set<uint32_t>& mask);
          406 
          410  uint32_t createNewChunk(uint32_t parentId);
          411 
          412 
          413 protected:
          419 
          420  /* Chunk mesh wrappers */
          421  std::vector<Triangulator*> mChunkPostprocessors;
          422 
          423 
          424 
          427  std::vector<ChunkInfo> mChunkData;
          428 
          431 };
          432 
          433 void findCellBasePlanes(const std::vector<NvcVec3>& sites, std::vector<std::vector<int32_t> >& neighboors);
          434 Mesh* getCellMesh(class BooleanEvaluator& eval, int32_t planeIndexerOffset, int32_t cellId, const std::vector<NvcVec3>& sites, std::vector < std::vector<int32_t> >& neighboors, int32_t interiorMaterialId, NvcVec3 origin);
          435 
          436 } // namespace Blast
          437 } // namespace Nv
          438 
          439 
          440 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOLIMPL_H
          Definition: NvBlastExtAuthoringFractureTool.h:107
          +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-2018 NVIDIA Corporation. All rights reserved.
          27 
          28 #ifndef NVBLASTAUTHORINGFRACTURETOOLIMPL_H
          29 #define NVBLASTAUTHORINGFRACTURETOOLIMPL_H
          30 
          33 #include <vector>
          34 #include <set>
          35 
          36 namespace Nv
          37 {
          38 namespace Blast
          39 {
          40 
          41 class SpatialAccelerator;
          42 class Triangulator;
          43 
          44 
          49 {
          50 public:
          51 
          61 
          62  void release() override;
          63 
          67  void setBaseMesh(const Mesh* m) override;
          68 
          75  uint32_t getVoronoiSites(const NvcVec3*& sites) override;
          76 
          81  void addSite(const NvcVec3& site) override;
          86  void uniformlyGenerateSitesInMesh(uint32_t numberOfSites) override;
          87 
          94  void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) override;
          95 
          106  void radialPattern(const NvcVec3& center, const NvcVec3& normal, float radius, int32_t angularSteps, int32_t radialSteps, float angleOffset = 0.0f, float variability = 0.0f) override;
          107 
          114  void generateInSphere(const uint32_t count, const float radius, const NvcVec3& center) override;
          119  void setStencil(const Mesh* stencil) override;
          123  void clearStencil() override;
          124 
          131  void deleteInSphere(const float radius, const NvcVec3& center, const float eraserProbability = 1) override;
          132 
          133 private:
          134  std::vector <NvcVec3> mGeneratedSites;
          135  const Mesh* mMesh;
          136  const Mesh* mStencil;
          137  RandomGeneratorBase* mRnd;
          138  SpatialAccelerator* mAccelerator;
          139 };
          140 
          141 
          142 
          147 {
          148 
          149 public:
          150 
          155  {
          156  mPlaneIndexerOffset = 1;
          157  mChunkIdCounter = 0;
          158  mRemoveIslands = false;
          159  mInteriorMaterialId = kMaterialInteriorId;
          160  }
          161 
          163  {
          164  reset();
          165  }
          166 
          167  void release() override;
          168 
          172  void reset() override;
          173 
          177  void setInteriorMaterialId(int32_t materialId) override;
          178 
          182  int32_t getInteriorMaterialId() const override;
          183 
          187  void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) override;
          188 
          192  void setSourceMesh(const Mesh* mesh) override;
          193 
          197  int32_t setChunkMesh(const Mesh* mesh, int32_t parentId) override;
          198 
          202  Mesh* createChunkMesh(int32_t chunkId) override;
          203 
          208  void getTransformation(NvcVec3& offset, float& scale) override;
          209 
          210 
          219  int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, bool replaceChunk) override;
          220 
          232  int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, const NvcVec3& scale, const NvcQuat& rotation, bool replaceChunk) override;
          233 
          234 
          245  int32_t slicing(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd) override;
          246 
          247 
          260  int32_t cut(uint32_t chunkId, const NvcVec3& normal, const NvcVec3& position, const NoiseConfiguration& noise, bool replaceChunk, RandomGeneratorBase* rnd) override;
          261 
          272  int32_t cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase* rnd) override;
          273 
          274 
          278  void finalizeFracturing() override;
          279 
          280  uint32_t getChunkCount() const override;
          281 
          285  const ChunkInfo& getChunkInfo(int32_t chunkIndex) override;
          286 
          294  float getMeshOverlap(const Mesh& meshA, const Mesh& meshB) override;
          295 
          303  uint32_t getBaseMesh(int32_t chunkIndex, Triangle*& output) override;
          304 
          312  uint32_t updateBaseMesh(int32_t chunkIndex, Triangle* output) override;
          313 
          319  int32_t getChunkIndex(int32_t chunkId) override;
          320 
          326  int32_t getChunkId(int32_t chunkIndex) override;
          327 
          333  int32_t getChunkDepth(int32_t chunkId) override;
          334 
          342  uint32_t getChunksIdAtDepth(uint32_t depth, int32_t*& chunkIds) override;
          343 
          344 
          355  uint32_t getBufferedBaseMeshes(Vertex*& vertexBuffer, uint32_t*& indexBuffer, uint32_t*& indexBufferOffsets) override;
          356 
          361  void setRemoveIslands(bool isRemoveIslands) override;
          362 
          368  int32_t islandDetectionAndRemoving(int32_t chunkId, bool createAtNewDepth = false) override;
          369 
          374  bool isMeshContainOpenEdges(const Mesh* input) override;
          375 
          376  bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) override;
          377 
          378  void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
          379  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
          380  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
          381  bool removeOriginalChunks = false) override;
          382 
          383  bool setApproximateBonding(uint32_t chunkId, bool useApproximateBonding) override;
          384 
          390  void fitUvToRect(float side, uint32_t chunkId) override;
          391 
          396  void fitAllUvToRect(float side) override;
          397 
          398 
          399 
          400 private:
          401  bool isAncestorForChunk(int32_t ancestorId, int32_t chunkId);
          402  int32_t slicingNoisy(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd);
          403  uint32_t stretchGroup(const std::vector<uint32_t>& group, std::vector<std::vector<uint32_t>>& graph);
          404  void rebuildAdjGraph(const std::vector<uint32_t>& chunksToRebuild, const NvcVec2i* adjChunks, uint32_t adjChunksSize,
          405  std::vector<std::vector<uint32_t> >& chunkGraph);
          406  void fitAllUvToRect(float side, std::set<uint32_t>& mask);
          407  void markLeaves();
          408 
          412  uint32_t createNewChunk(uint32_t parentId);
          413 
          414 
          415 protected:
          421 
          422  /* Chunk mesh wrappers */
          423  std::vector<Triangulator*> mChunkPostprocessors;
          424 
          425 
          426 
          429  std::vector<ChunkInfo> mChunkData;
          430 
          433 };
          434 
          435 void findCellBasePlanes(const std::vector<NvcVec3>& sites, std::vector<std::vector<int32_t> >& neighboors);
          436 Mesh* getCellMesh(class BooleanEvaluator& eval, int32_t planeIndexerOffset, int32_t cellId, const std::vector<NvcVec3>& sites, std::vector < std::vector<int32_t> >& neighboors, int32_t interiorMaterialId, NvcVec3 origin);
          437 
          438 } // namespace Blast
          439 } // namespace Nv
          440 
          441 
          442 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOLIMPL_H
          Definition: NvBlastExtAuthoringFractureTool.h:107
          void generateInSphere(const uint32_t count, const float radius, const NvcVec3 &center) override
          Definition: NvBlastExtAuthoringFractureTool.h:47
          uint32_t getVoronoiSites(const NvcVec3 *&sites) override
          @@ -57,7 +57,7 @@
          Definition: NvBlastExtAuthoringBooleanTool.h:108
          NV_INLINE float normal(const float a[3], float r[3])
          Definition: NvBlastMath.h:93
          void setBaseMesh(const Mesh *m) override
          -
          float mScaleFactor
          Definition: NvBlastExtAuthoringFractureToolImpl.h:417
          +
          float mScaleFactor
          Definition: NvBlastExtAuthoringFractureToolImpl.h:419
          Definition: NvBlastExtAuthoringAccelerator.h:47
          Definition: NvBlastExtAuthoringFractureTool.h:79
          @@ -69,15 +69,15 @@
          void uniformlyGenerateSitesInMesh(uint32_t numberOfSites) override
          Mesh * getCellMesh(class BooleanEvaluator &eval, int32_t planeIndexerOffset, int32_t cellId, const std::vector< NvcVec3 > &sites, std::vector< std::vector< int32_t > > &neighboors, int32_t interiorMaterialId, NvcVec3 origin)
          -
          int32_t mChunkIdCounter
          Definition: NvBlastExtAuthoringFractureToolImpl.h:426
          +
          int32_t mChunkIdCounter
          Definition: NvBlastExtAuthoringFractureToolImpl.h:428
          Definition: NvCTypes.h:106
          const uint32_t kMaterialInteriorId
          Definition: NvBlastExtAuthoringTypes.h:42
          -
          std::vector< ChunkInfo > mChunkData
          Definition: NvBlastExtAuthoringFractureToolImpl.h:427
          -
          std::vector< Triangulator * > mChunkPostprocessors
          Definition: NvBlastExtAuthoringFractureToolImpl.h:421
          -
          NvcVec3 mOffset
          Definition: NvBlastExtAuthoringFractureToolImpl.h:418
          +
          std::vector< ChunkInfo > mChunkData
          Definition: NvBlastExtAuthoringFractureToolImpl.h:429
          +
          std::vector< Triangulator * > mChunkPostprocessors
          Definition: NvBlastExtAuthoringFractureToolImpl.h:423
          +
          NvcVec3 mOffset
          Definition: NvBlastExtAuthoringFractureToolImpl.h:420
          Definition: NvBlastExtAuthoringFractureTool.h:133
          Definition: NvBlastExtAuthoringTypes.h:79
          -
          int32_t mInteriorMaterialId
          Definition: NvBlastExtAuthoringFractureToolImpl.h:430
          +
          int32_t mInteriorMaterialId
          Definition: NvBlastExtAuthoringFractureToolImpl.h:432
          Definition: NvBlastExtAuthoringFractureToolImpl.h:48
          Definition: NvBlastExtAuthoringFractureToolImpl.h:146
          @@ -90,9 +90,9 @@
          Definition: NvCTypes.h:49
          void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) override
          -
          int64_t mPlaneIndexerOffset
          Definition: NvBlastExtAuthoringFractureToolImpl.h:425
          +
          int64_t mPlaneIndexerOffset
          Definition: NvBlastExtAuthoringFractureToolImpl.h:427
          Definition: NvCTypes.h:61
          -
          bool mRemoveIslands
          Definition: NvBlastExtAuthoringFractureToolImpl.h:429
          +
          bool mRemoveIslands
          Definition: NvBlastExtAuthoringFractureToolImpl.h:431
          diff --git a/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h-source.html b/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h-source.html index d75d734a..20d4de31 100755 --- a/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h-source.html +++ b/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h-source.html @@ -67,227 +67,269 @@

          sdk/extensions/authoringCommon/source/NvBlastExtAuthoringInternalCommon.h00029 #ifndef NVBLASTINTERNALCOMMON_H 00030 #define NVBLASTINTERNALCOMMON_H 00031 #include "NvBlastExtAuthoringTypes.h" -00032 #include <PxVec2.h> -00033 #include <PxVec3.h> -00034 #include <PxPlane.h> -00035 #include <PxBounds3.h> -00036 #include <PxMath.h> -00037 #include <algorithm> -00038 -00039 namespace Nv -00040 { -00041 namespace Blast -00042 { -00043 -00047 struct EdgeWithParent -00048 { -00049 uint32_t s, e; // Starting and ending vertices -00050 uint32_t parent; // Parent facet index -00051 EdgeWithParent() : s(0), e(0), parent(0) {} -00052 EdgeWithParent(uint32_t s, uint32_t e, uint32_t p) : s(s), e(e), parent(p) {} -00053 }; -00054 +00032 #include "NvBlastPxSharedHelpers.h" +00033 #include <PxVec2.h> +00034 #include <PxVec3.h> +00035 #include <PxPlane.h> +00036 #include <PxBounds3.h> +00037 #include <PxMath.h> +00038 #include <algorithm> +00039 +00040 namespace Nv +00041 { +00042 namespace Blast +00043 { +00044 +00048 struct EdgeWithParent +00049 { +00050 uint32_t s, e; // Starting and ending vertices +00051 uint32_t parent; // Parent facet index +00052 EdgeWithParent() : s(0), e(0), parent(0) {} +00053 EdgeWithParent(uint32_t s, uint32_t e, uint32_t p) : s(s), e(e), parent(p) {} +00054 }; 00055 -00059 struct EdgeComparator -00060 { -00061 bool operator()(const EdgeWithParent& a, const EdgeWithParent& b) const -00062 { -00063 if (a.parent == b.parent) -00064 { -00065 if (a.s == b.s) -00066 { -00067 return a.e < b.e; -00068 } -00069 else -00070 { -00071 return a.s < b.s; -00072 } -00073 } -00074 else -00075 { -00076 return a.parent < b.parent; -00077 } -00078 } -00079 }; -00080 -00081 inline bool operator<(const Edge& a, const Edge& b) -00082 { -00083 if (a.s == b.s) -00084 return a.e < b.e; -00085 else -00086 return a.s < b.s; -00087 } -00088 -00092 enum ProjectionDirections -00093 { -00094 YZ_PLANE = 1 << 1, -00095 XY_PLANE = 1 << 2, -00096 ZX_PLANE = 1 << 3, -00097 -00098 OPPOSITE_WINDING = 1 << 4 -00099 }; -00100 -00104 NV_FORCE_INLINE ProjectionDirections getProjectionDirection(const physx::PxVec3& normal) -00105 { -00106 float maxv = std::max(std::abs(normal.x), std::max(std::abs(normal.y), std::abs(normal.z))); -00107 ProjectionDirections retVal; -00108 if (maxv == std::abs(normal.x)) -00109 { -00110 retVal = YZ_PLANE; -00111 if (normal.x < 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING); -00112 return retVal; -00113 } -00114 if (maxv == std::abs(normal.y)) -00115 { -00116 retVal = ZX_PLANE; -00117 if (normal.y > 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING); -00118 return retVal; -00119 } -00120 retVal = XY_PLANE; -00121 if (normal.z < 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING); -00122 return retVal; -00123 } -00124 +00056 +00060 struct EdgeComparator +00061 { +00062 bool operator()(const EdgeWithParent& a, const EdgeWithParent& b) const +00063 { +00064 if (a.parent == b.parent) +00065 { +00066 if (a.s == b.s) +00067 { +00068 return a.e < b.e; +00069 } +00070 else +00071 { +00072 return a.s < b.s; +00073 } +00074 } +00075 else +00076 { +00077 return a.parent < b.parent; +00078 } +00079 } +00080 }; +00081 +00082 inline bool operator<(const Edge& a, const Edge& b) +00083 { +00084 if (a.s == b.s) +00085 return a.e < b.e; +00086 else +00087 return a.s < b.s; +00088 } +00089 +00093 enum ProjectionDirections +00094 { +00095 YZ_PLANE = 1 << 1, +00096 XY_PLANE = 1 << 2, +00097 ZX_PLANE = 1 << 3, +00098 +00099 OPPOSITE_WINDING = 1 << 4 +00100 }; +00101 +00105 NV_FORCE_INLINE ProjectionDirections getProjectionDirection(const physx::PxVec3& normal) +00106 { +00107 float maxv = std::max(std::abs(normal.x), std::max(std::abs(normal.y), std::abs(normal.z))); +00108 ProjectionDirections retVal; +00109 if (maxv == std::abs(normal.x)) +00110 { +00111 retVal = YZ_PLANE; +00112 if (normal.x < 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING); +00113 return retVal; +00114 } +00115 if (maxv == std::abs(normal.y)) +00116 { +00117 retVal = ZX_PLANE; +00118 if (normal.y > 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING); +00119 return retVal; +00120 } +00121 retVal = XY_PLANE; +00122 if (normal.z < 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING); +00123 return retVal; +00124 } 00125 -00129 NV_FORCE_INLINE physx::PxVec2 getProjectedPoint(const physx::PxVec3& point, ProjectionDirections dir) -00130 { -00131 if (dir & YZ_PLANE) -00132 { -00133 return physx::PxVec2(point.y, point.z); -00134 } -00135 if (dir & ZX_PLANE) -00136 { -00137 return physx::PxVec2(point.x, point.z); -00138 } -00139 return physx::PxVec2(point.x, point.y); -00140 } -00141 -00142 NV_FORCE_INLINE physx::PxVec2 getProjectedPoint(const NvcVec3& point, ProjectionDirections dir) -00143 { -00144 return getProjectedPoint((const physx::PxVec3&)point, dir); -00145 } -00146 -00150 NV_FORCE_INLINE physx::PxVec2 getProjectedPointWithWinding(const physx::PxVec3& point, ProjectionDirections dir) -00151 { -00152 if (dir & YZ_PLANE) -00153 { -00154 if (dir & OPPOSITE_WINDING) -00155 { -00156 return physx::PxVec2(point.z, point.y); -00157 } -00158 else -00159 return physx::PxVec2(point.y, point.z); -00160 } -00161 if (dir & ZX_PLANE) -00162 { -00163 if (dir & OPPOSITE_WINDING) -00164 { -00165 return physx::PxVec2(point.z, point.x); -00166 } -00167 return physx::PxVec2(point.x, point.z); -00168 } -00169 if (dir & OPPOSITE_WINDING) -00170 { -00171 return physx::PxVec2(point.y, point.x); -00172 } -00173 return physx::PxVec2(point.x, point.y); -00174 } -00175 +00126 +00130 NV_FORCE_INLINE physx::PxVec2 getProjectedPoint(const physx::PxVec3& point, ProjectionDirections dir) +00131 { +00132 if (dir & YZ_PLANE) +00133 { +00134 return physx::PxVec2(point.y, point.z); +00135 } +00136 if (dir & ZX_PLANE) +00137 { +00138 return physx::PxVec2(point.x, point.z); +00139 } +00140 return physx::PxVec2(point.x, point.y); +00141 } +00142 +00143 NV_FORCE_INLINE physx::PxVec2 getProjectedPoint(const NvcVec3& point, ProjectionDirections dir) +00144 { +00145 return getProjectedPoint((const physx::PxVec3&)point, dir); +00146 } +00147 +00151 NV_FORCE_INLINE physx::PxVec2 getProjectedPointWithWinding(const physx::PxVec3& point, ProjectionDirections dir) +00152 { +00153 if (dir & YZ_PLANE) +00154 { +00155 if (dir & OPPOSITE_WINDING) +00156 { +00157 return physx::PxVec2(point.z, point.y); +00158 } +00159 else +00160 return physx::PxVec2(point.y, point.z); +00161 } +00162 if (dir & ZX_PLANE) +00163 { +00164 if (dir & OPPOSITE_WINDING) +00165 { +00166 return physx::PxVec2(point.z, point.x); +00167 } +00168 return physx::PxVec2(point.x, point.z); +00169 } +00170 if (dir & OPPOSITE_WINDING) +00171 { +00172 return physx::PxVec2(point.y, point.x); +00173 } +00174 return physx::PxVec2(point.x, point.y); +00175 } 00176 00177 -00178 #define MAXIMUM_EXTENT 1000 * 1000 * 1000 -00179 #define BBOX_TEST_EPS 1e-5f -00180 -00184 NV_INLINE bool weakBoundingBoxIntersection(const physx::PxBounds3& aBox, const physx::PxBounds3& bBox) -00185 { -00186 if (std::max(aBox.minimum.x, bBox.minimum.x) > std::min(aBox.maximum.x, bBox.maximum.x) + BBOX_TEST_EPS) -00187 return false; -00188 if (std::max(aBox.minimum.y, bBox.minimum.y) > std::min(aBox.maximum.y, bBox.maximum.y) + BBOX_TEST_EPS) -00189 return false; -00190 if (std::max(aBox.minimum.z, bBox.minimum.z) > std::min(aBox.maximum.z, bBox.maximum.z) + BBOX_TEST_EPS) -00191 return false; -00192 return true; -00193 } -00194 +00178 +00179 #define MAXIMUM_EXTENT 1000 * 1000 * 1000 +00180 #define BBOX_TEST_EPS 1e-5f +00181 +00185 NV_INLINE bool weakBoundingBoxIntersection(const physx::PxBounds3& aBox, const physx::PxBounds3& bBox) +00186 { +00187 if (std::max(aBox.minimum.x, bBox.minimum.x) > std::min(aBox.maximum.x, bBox.maximum.x) + BBOX_TEST_EPS) +00188 return false; +00189 if (std::max(aBox.minimum.y, bBox.minimum.y) > std::min(aBox.maximum.y, bBox.maximum.y) + BBOX_TEST_EPS) +00190 return false; +00191 if (std::max(aBox.minimum.z, bBox.minimum.z) > std::min(aBox.maximum.z, bBox.maximum.z) + BBOX_TEST_EPS) +00192 return false; +00193 return true; +00194 } 00195 00196 -00200 NV_INLINE bool getPlaneSegmentIntersection(const physx::PxPlane& pl, const physx::PxVec3& a, const physx::PxVec3& b, -00201 physx::PxVec3& result) -00202 { -00203 float div = (b - a).dot(pl.n); -00204 if (physx::PxAbs(div) < 0.0001f) -00205 { -00206 if (pl.contains(a)) -00207 { -00208 result = a; -00209 return true; -00210 } -00211 else -00212 { -00213 return false; -00214 } -00215 } -00216 float t = (-a.dot(pl.n) - pl.d) / div; -00217 if (t < 0.0f || t > 1.0f) -00218 { -00219 return false; -00220 } -00221 result = (b - a) * t + a; -00222 return true; -00223 } -00224 +00197 +00201 NV_INLINE bool getPlaneSegmentIntersection(const physx::PxPlane& pl, const physx::PxVec3& a, const physx::PxVec3& b, +00202 physx::PxVec3& result) +00203 { +00204 float div = (b - a).dot(pl.n); +00205 if (physx::PxAbs(div) < 0.0001f) +00206 { +00207 if (pl.contains(a)) +00208 { +00209 result = a; +00210 return true; +00211 } +00212 else +00213 { +00214 return false; +00215 } +00216 } +00217 float t = (-a.dot(pl.n) - pl.d) / div; +00218 if (t < 0.0f || t > 1.0f) +00219 { +00220 return false; +00221 } +00222 result = (b - a) * t + a; +00223 return true; +00224 } 00225 -00226 #define POS_COMPARISON_OFFSET 1e-5f -00227 #define NORM_COMPARISON_OFFSET 1e-3f -00228 -00231 struct VrtComp -00232 { -00233 bool operator()(const Vertex& a, const Vertex& b) const -00234 { -00235 if (a.p.x + POS_COMPARISON_OFFSET < b.p.x) return true; -00236 if (a.p.x - POS_COMPARISON_OFFSET > b.p.x) return false; -00237 if (a.p.y + POS_COMPARISON_OFFSET < b.p.y) return true; -00238 if (a.p.y - POS_COMPARISON_OFFSET > b.p.y) return false; -00239 if (a.p.z + POS_COMPARISON_OFFSET < b.p.z) return true; -00240 if (a.p.z - POS_COMPARISON_OFFSET > b.p.z) return false; -00241 -00242 if (a.n.x + NORM_COMPARISON_OFFSET < b.n.x) return true; -00243 if (a.n.x - NORM_COMPARISON_OFFSET > b.n.x) return false; -00244 if (a.n.y + NORM_COMPARISON_OFFSET < b.n.y) return true; -00245 if (a.n.y - NORM_COMPARISON_OFFSET > b.n.y) return false; -00246 if (a.n.z + NORM_COMPARISON_OFFSET < b.n.z) return true; -00247 if (a.n.z - NORM_COMPARISON_OFFSET > b.n.z) return false; -00248 +00226 +00227 #define POS_COMPARISON_OFFSET 1e-5f +00228 #define NORM_COMPARISON_OFFSET 1e-3f +00229 +00232 struct VrtComp +00233 { +00234 bool operator()(const Vertex& a, const Vertex& b) const +00235 { +00236 if (a.p.x + POS_COMPARISON_OFFSET < b.p.x) return true; +00237 if (a.p.x - POS_COMPARISON_OFFSET > b.p.x) return false; +00238 if (a.p.y + POS_COMPARISON_OFFSET < b.p.y) return true; +00239 if (a.p.y - POS_COMPARISON_OFFSET > b.p.y) return false; +00240 if (a.p.z + POS_COMPARISON_OFFSET < b.p.z) return true; +00241 if (a.p.z - POS_COMPARISON_OFFSET > b.p.z) return false; +00242 +00243 if (a.n.x + NORM_COMPARISON_OFFSET < b.n.x) return true; +00244 if (a.n.x - NORM_COMPARISON_OFFSET > b.n.x) return false; +00245 if (a.n.y + NORM_COMPARISON_OFFSET < b.n.y) return true; +00246 if (a.n.y - NORM_COMPARISON_OFFSET > b.n.y) return false; +00247 if (a.n.z + NORM_COMPARISON_OFFSET < b.n.z) return true; +00248 if (a.n.z - NORM_COMPARISON_OFFSET > b.n.z) return false; 00249 -00250 if (a.uv[0].x + NORM_COMPARISON_OFFSET < b.uv[0].x) return true; -00251 if (a.uv[0].x - NORM_COMPARISON_OFFSET > b.uv[0].x) return false; -00252 if (a.uv[0].y + NORM_COMPARISON_OFFSET < b.uv[0].y) return true; -00253 return false; -00254 }; -00255 }; -00256 -00260 struct VrtPositionComparator -00261 { -00262 bool operator()(const NvcVec3& a, const NvcVec3& b) const -00263 { -00264 if (a.x + POS_COMPARISON_OFFSET < b.x) return true; -00265 if (a.x - POS_COMPARISON_OFFSET > b.x) return false; -00266 if (a.y + POS_COMPARISON_OFFSET < b.y) return true; -00267 if (a.y - POS_COMPARISON_OFFSET > b.y) return false; -00268 if (a.z + POS_COMPARISON_OFFSET < b.z) return true; -00269 if (a.z - POS_COMPARISON_OFFSET > b.z) return false; -00270 return false; -00271 }; -00272 bool operator()(const Vertex& a, const Vertex& b) const -00273 { -00274 return operator()(a.p, b.p); -00275 }; -00276 }; -00277 -00278 } // namespace Blast -00279 } // namespace Nv -00280 -00281 #endif +00250 +00251 if (a.uv[0].x + NORM_COMPARISON_OFFSET < b.uv[0].x) return true; +00252 if (a.uv[0].x - NORM_COMPARISON_OFFSET > b.uv[0].x) return false; +00253 if (a.uv[0].y + NORM_COMPARISON_OFFSET < b.uv[0].y) return true; +00254 return false; +00255 }; +00256 }; +00257 +00261 struct VrtPositionComparator +00262 { +00263 bool operator()(const NvcVec3& a, const NvcVec3& b) const +00264 { +00265 if (a.x + POS_COMPARISON_OFFSET < b.x) return true; +00266 if (a.x - POS_COMPARISON_OFFSET > b.x) return false; +00267 if (a.y + POS_COMPARISON_OFFSET < b.y) return true; +00268 if (a.y - POS_COMPARISON_OFFSET > b.y) return false; +00269 if (a.z + POS_COMPARISON_OFFSET < b.z) return true; +00270 if (a.z - POS_COMPARISON_OFFSET > b.z) return false; +00271 return false; +00272 }; +00273 bool operator()(const Vertex& a, const Vertex& b) const +00274 { +00275 return operator()(a.p, b.p); +00276 }; +00277 }; +00278 +00279 +00280 NV_INLINE float calculateCollisionHullVolume(const CollisionHull& hull) +00281 { +00282 if (hull.pointsCount == 0) +00283 { +00284 return 0.0f; +00285 } +00286 +00287 // Find an approximate centroid for a more accurate calculation +00288 NvcVec3 centroid = { 0.0f, 0.0f, 0.0f }; +00289 for (uint32_t i = 0; i < hull.pointsCount; ++i) +00290 { +00291 centroid = centroid + hull.points[i]; +00292 } +00293 centroid = centroid / hull.pointsCount; +00294 +00295 float volume = 0.0f; +00296 +00297 for (uint32_t i = 0; i < hull.polygonDataCount; ++i) +00298 { +00299 const HullPolygon& poly = hull.polygonData[i]; +00300 if (poly.vertexCount < 3) +00301 { +00302 continue; +00303 } +00304 const uint32_t i0 = hull.indices[poly.indexBase]; +00305 uint32_t i1 = hull.indices[poly.indexBase + 1]; +00306 for (uint32_t j = 2; j < poly.vertexCount; ++j) +00307 { +00308 const uint32_t i2 = hull.indices[poly.indexBase + j]; +00309 const NvcVec3 a = hull.points[i0] - centroid; +00310 const NvcVec3 b = hull.points[i1] - centroid; +00311 const NvcVec3 c = hull.points[i2] - centroid; +00312 volume += +00313 (a.x * b.y * c.z - a.x * b.z * c.y - a.y * b.x * c.z + a.y * b.z * c.x + a.z * b.x * c.y - a.z * b.y * c.x); +00314 i1 = i2; +00315 } +00316 } +00317 return (1.0f / 6.0f) * std::abs(volume); +00318 } +00319 +00320 } // namespace Blast +00321 } // namespace Nv +00322 +00323 #endif

          sdk/extensions/authoringCommon/source/NvBlastExtAuthoringInternalCommon.h File Reference

          #include "NvBlastExtAuthoringTypes.h"
          +#include "NvBlastPxSharedHelpers.h"
          #include <PxVec2.h>
          #include <PxVec3.h>
          #include <PxPlane.h>
          @@ -80,6 +81,8 @@

          sdk/extensions/authoringCommon/source/NvBlastExtAuthoringInternalCommon.h Fi }

          Functions

          +NV_INLINE float Nv::Blast::calculateCollisionHullVolume (const CollisionHull &hull) + NV_INLINE bool Nv::Blast::getPlaneSegmentIntersection (const physx::PxPlane &pl, const physx::PxVec3 &a, const physx::PxVec3 &b, physx::PxVec3 &result) NV_FORCE_INLINE physx::PxVec2 Nv::Blast::getProjectedPoint (const NvcVec3 &point, ProjectionDirections dir) diff --git a/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h.js b/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h.js index 6af0abf1..868c7526 100755 --- a/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h.js +++ b/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h.js @@ -14,6 +14,7 @@ var _nv_blast_ext_authoring_internal_common_8h = [ "ZX_PLANE", "_nv_blast_ext_authoring_internal_common_8h.html#a2dbf0cc037620db35223513e817444f7a34e384d7641d38d0e6f9e601f5d868ac", null ], [ "OPPOSITE_WINDING", "_nv_blast_ext_authoring_internal_common_8h.html#a2dbf0cc037620db35223513e817444f7af9063b45980bcdd587cd7b7be4444152", null ] ] ], + [ "calculateCollisionHullVolume", "_nv_blast_ext_authoring_internal_common_8h.html#ad7f758469903c6a753a827ee1525a1e8", null ], [ "getPlaneSegmentIntersection", "_nv_blast_ext_authoring_internal_common_8h.html#a7bba8d1f555e341010029032391276a6", null ], [ "getProjectedPoint", "_nv_blast_ext_authoring_internal_common_8h.html#a44d0b01b83d001724a34646ec96d17f0", null ], [ "getProjectedPoint", "_nv_blast_ext_authoring_internal_common_8h.html#a07798b57f728802d367a7efbea3ce3a7", null ], diff --git a/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h_source.html b/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h_source.html index 7e838699..d78bd769 100755 --- a/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h_source.html +++ b/docs/source_docs/files/_nv_blast_ext_authoring_internal_common_8h_source.html @@ -46,53 +46,64 @@
          NvBlastExtAuthoringInternalCommon.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) 2018 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTINTERNALCOMMON_H
30 #define NVBLASTINTERNALCOMMON_H
32 #include <PxVec2.h>
33 #include <PxVec3.h>
34 #include <PxPlane.h>
35 #include <PxBounds3.h>
36 #include <PxMath.h>
37 #include <algorithm>
38 
39 namespace Nv
40 {
41 namespace Blast
42 {
43 
48 {
49  uint32_t s, e; // Starting and ending vertices
50  uint32_t parent; // Parent facet index
51  EdgeWithParent() : s(0), e(0), parent(0) {}
52  EdgeWithParent(uint32_t s, uint32_t e, uint32_t p) : s(s), e(e), parent(p) {}
53 };
54 
55 
60 {
61  bool operator()(const EdgeWithParent& a, const EdgeWithParent& b) const
62  {
63  if (a.parent == b.parent)
64  {
65  if (a.s == b.s)
66  {
67  return a.e < b.e;
68  }
69  else
70  {
71  return a.s < b.s;
72  }
73  }
74  else
75  {
76  return a.parent < b.parent;
77  }
78  }
79 };
80 
81 inline bool operator<(const Edge& a, const Edge& b)
82 {
83  if (a.s == b.s)
84  return a.e < b.e;
85  else
86  return a.s < b.s;
87 }
88 
93 {
94  YZ_PLANE = 1 << 1,
95  XY_PLANE = 1 << 2,
96  ZX_PLANE = 1 << 3,
97 
99 };
100 
105 {
106  float maxv = std::max(std::abs(normal.x), std::max(std::abs(normal.y), std::abs(normal.z)));
107  ProjectionDirections retVal;
108  if (maxv == std::abs(normal.x))
109  {
110  retVal = YZ_PLANE;
111  if (normal.x < 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING);
112  return retVal;
113  }
114  if (maxv == std::abs(normal.y))
115  {
116  retVal = ZX_PLANE;
117  if (normal.y > 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING);
118  return retVal;
119  }
120  retVal = XY_PLANE;
121  if (normal.z < 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING);
122  return retVal;
123 }
124 
125 
129 NV_FORCE_INLINE physx::PxVec2 getProjectedPoint(const physx::PxVec3& point, ProjectionDirections dir)
130 {
131  if (dir & YZ_PLANE)
132  {
133  return physx::PxVec2(point.y, point.z);
134  }
135  if (dir & ZX_PLANE)
136  {
137  return physx::PxVec2(point.x, point.z);
138  }
139  return physx::PxVec2(point.x, point.y);
140 }
141 
143 {
144  return getProjectedPoint((const physx::PxVec3&)point, dir);
145 }
146 
150 NV_FORCE_INLINE physx::PxVec2 getProjectedPointWithWinding(const physx::PxVec3& point, ProjectionDirections dir)
151 {
152  if (dir & YZ_PLANE)
153  {
154  if (dir & OPPOSITE_WINDING)
155  {
156  return physx::PxVec2(point.z, point.y);
157  }
158  else
159  return physx::PxVec2(point.y, point.z);
160  }
161  if (dir & ZX_PLANE)
162  {
163  if (dir & OPPOSITE_WINDING)
164  {
165  return physx::PxVec2(point.z, point.x);
166  }
167  return physx::PxVec2(point.x, point.z);
168  }
169  if (dir & OPPOSITE_WINDING)
170  {
171  return physx::PxVec2(point.y, point.x);
172  }
173  return physx::PxVec2(point.x, point.y);
174 }
175 
176 
177 
178 #define MAXIMUM_EXTENT 1000 * 1000 * 1000
179 #define BBOX_TEST_EPS 1e-5f
180 
184 NV_INLINE bool weakBoundingBoxIntersection(const physx::PxBounds3& aBox, const physx::PxBounds3& bBox)
185 {
186  if (std::max(aBox.minimum.x, bBox.minimum.x) > std::min(aBox.maximum.x, bBox.maximum.x) + BBOX_TEST_EPS)
187  return false;
188  if (std::max(aBox.minimum.y, bBox.minimum.y) > std::min(aBox.maximum.y, bBox.maximum.y) + BBOX_TEST_EPS)
189  return false;
190  if (std::max(aBox.minimum.z, bBox.minimum.z) > std::min(aBox.maximum.z, bBox.maximum.z) + BBOX_TEST_EPS)
191  return false;
192  return true;
193 }
194 
195 
196 
200 NV_INLINE bool getPlaneSegmentIntersection(const physx::PxPlane& pl, const physx::PxVec3& a, const physx::PxVec3& b,
201  physx::PxVec3& result)
202 {
203  float div = (b - a).dot(pl.n);
204  if (physx::PxAbs(div) < 0.0001f)
205  {
206  if (pl.contains(a))
207  {
208  result = a;
209  return true;
210  }
211  else
212  {
213  return false;
214  }
215  }
216  float t = (-a.dot(pl.n) - pl.d) / div;
217  if (t < 0.0f || t > 1.0f)
218  {
219  return false;
220  }
221  result = (b - a) * t + a;
222  return true;
223 }
224 
225 
226 #define POS_COMPARISON_OFFSET 1e-5f
227 #define NORM_COMPARISON_OFFSET 1e-3f
228 
231 struct VrtComp
232 {
233  bool operator()(const Vertex& a, const Vertex& b) const
234  {
235  if (a.p.x + POS_COMPARISON_OFFSET < b.p.x) return true;
236  if (a.p.x - POS_COMPARISON_OFFSET > b.p.x) return false;
237  if (a.p.y + POS_COMPARISON_OFFSET < b.p.y) return true;
238  if (a.p.y - POS_COMPARISON_OFFSET > b.p.y) return false;
239  if (a.p.z + POS_COMPARISON_OFFSET < b.p.z) return true;
240  if (a.p.z - POS_COMPARISON_OFFSET > b.p.z) return false;
241 
242  if (a.n.x + NORM_COMPARISON_OFFSET < b.n.x) return true;
243  if (a.n.x - NORM_COMPARISON_OFFSET > b.n.x) return false;
244  if (a.n.y + NORM_COMPARISON_OFFSET < b.n.y) return true;
245  if (a.n.y - NORM_COMPARISON_OFFSET > b.n.y) return false;
246  if (a.n.z + NORM_COMPARISON_OFFSET < b.n.z) return true;
247  if (a.n.z - NORM_COMPARISON_OFFSET > b.n.z) return false;
248 
249 
250  if (a.uv[0].x + NORM_COMPARISON_OFFSET < b.uv[0].x) return true;
251  if (a.uv[0].x - NORM_COMPARISON_OFFSET > b.uv[0].x) return false;
252  if (a.uv[0].y + NORM_COMPARISON_OFFSET < b.uv[0].y) return true;
253  return false;
254  };
255 };
256 
261 {
262  bool operator()(const NvcVec3& a, const NvcVec3& b) const
263  {
264  if (a.x + POS_COMPARISON_OFFSET < b.x) return true;
265  if (a.x - POS_COMPARISON_OFFSET > b.x) return false;
266  if (a.y + POS_COMPARISON_OFFSET < b.y) return true;
267  if (a.y - POS_COMPARISON_OFFSET > b.y) return false;
268  if (a.z + POS_COMPARISON_OFFSET < b.z) return true;
269  if (a.z - POS_COMPARISON_OFFSET > b.z) return false;
270  return false;
271  };
272  bool operator()(const Vertex& a, const Vertex& b) const
273  {
274  return operator()(a.p, b.p);
275  };
276 };
277 
278 } // namespace Blast
279 } // namespace Nv
280 
281 #endif
bool operator()(const Vertex &a, const Vertex &b) const
Definition: NvBlastExtAuthoringInternalCommon.h:272
-
ProjectionDirections
Definition: NvBlastExtAuthoringInternalCommon.h:92
+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) 2018 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTINTERNALCOMMON_H
30 #define NVBLASTINTERNALCOMMON_H
32 #include "NvBlastPxSharedHelpers.h"
33 #include <PxVec2.h>
34 #include <PxVec3.h>
35 #include <PxPlane.h>
36 #include <PxBounds3.h>
37 #include <PxMath.h>
38 #include <algorithm>
39 
40 namespace Nv
41 {
42 namespace Blast
43 {
44 
49 {
50  uint32_t s, e; // Starting and ending vertices
51  uint32_t parent; // Parent facet index
52  EdgeWithParent() : s(0), e(0), parent(0) {}
53  EdgeWithParent(uint32_t s, uint32_t e, uint32_t p) : s(s), e(e), parent(p) {}
54 };
55 
56 
61 {
62  bool operator()(const EdgeWithParent& a, const EdgeWithParent& b) const
63  {
64  if (a.parent == b.parent)
65  {
66  if (a.s == b.s)
67  {
68  return a.e < b.e;
69  }
70  else
71  {
72  return a.s < b.s;
73  }
74  }
75  else
76  {
77  return a.parent < b.parent;
78  }
79  }
80 };
81 
82 inline bool operator<(const Edge& a, const Edge& b)
83 {
84  if (a.s == b.s)
85  return a.e < b.e;
86  else
87  return a.s < b.s;
88 }
89 
94 {
95  YZ_PLANE = 1 << 1,
96  XY_PLANE = 1 << 2,
97  ZX_PLANE = 1 << 3,
98 
100 };
101 
106 {
107  float maxv = std::max(std::abs(normal.x), std::max(std::abs(normal.y), std::abs(normal.z)));
108  ProjectionDirections retVal;
109  if (maxv == std::abs(normal.x))
110  {
111  retVal = YZ_PLANE;
112  if (normal.x < 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING);
113  return retVal;
114  }
115  if (maxv == std::abs(normal.y))
116  {
117  retVal = ZX_PLANE;
118  if (normal.y > 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING);
119  return retVal;
120  }
121  retVal = XY_PLANE;
122  if (normal.z < 0) retVal = (ProjectionDirections)((int)retVal | (int)OPPOSITE_WINDING);
123  return retVal;
124 }
125 
126 
130 NV_FORCE_INLINE physx::PxVec2 getProjectedPoint(const physx::PxVec3& point, ProjectionDirections dir)
131 {
132  if (dir & YZ_PLANE)
133  {
134  return physx::PxVec2(point.y, point.z);
135  }
136  if (dir & ZX_PLANE)
137  {
138  return physx::PxVec2(point.x, point.z);
139  }
140  return physx::PxVec2(point.x, point.y);
141 }
142 
144 {
145  return getProjectedPoint((const physx::PxVec3&)point, dir);
146 }
147 
151 NV_FORCE_INLINE physx::PxVec2 getProjectedPointWithWinding(const physx::PxVec3& point, ProjectionDirections dir)
152 {
153  if (dir & YZ_PLANE)
154  {
155  if (dir & OPPOSITE_WINDING)
156  {
157  return physx::PxVec2(point.z, point.y);
158  }
159  else
160  return physx::PxVec2(point.y, point.z);
161  }
162  if (dir & ZX_PLANE)
163  {
164  if (dir & OPPOSITE_WINDING)
165  {
166  return physx::PxVec2(point.z, point.x);
167  }
168  return physx::PxVec2(point.x, point.z);
169  }
170  if (dir & OPPOSITE_WINDING)
171  {
172  return physx::PxVec2(point.y, point.x);
173  }
174  return physx::PxVec2(point.x, point.y);
175 }
176 
177 
178 
179 #define MAXIMUM_EXTENT 1000 * 1000 * 1000
180 #define BBOX_TEST_EPS 1e-5f
181 
185 NV_INLINE bool weakBoundingBoxIntersection(const physx::PxBounds3& aBox, const physx::PxBounds3& bBox)
186 {
187  if (std::max(aBox.minimum.x, bBox.minimum.x) > std::min(aBox.maximum.x, bBox.maximum.x) + BBOX_TEST_EPS)
188  return false;
189  if (std::max(aBox.minimum.y, bBox.minimum.y) > std::min(aBox.maximum.y, bBox.maximum.y) + BBOX_TEST_EPS)
190  return false;
191  if (std::max(aBox.minimum.z, bBox.minimum.z) > std::min(aBox.maximum.z, bBox.maximum.z) + BBOX_TEST_EPS)
192  return false;
193  return true;
194 }
195 
196 
197 
201 NV_INLINE bool getPlaneSegmentIntersection(const physx::PxPlane& pl, const physx::PxVec3& a, const physx::PxVec3& b,
202  physx::PxVec3& result)
203 {
204  float div = (b - a).dot(pl.n);
205  if (physx::PxAbs(div) < 0.0001f)
206  {
207  if (pl.contains(a))
208  {
209  result = a;
210  return true;
211  }
212  else
213  {
214  return false;
215  }
216  }
217  float t = (-a.dot(pl.n) - pl.d) / div;
218  if (t < 0.0f || t > 1.0f)
219  {
220  return false;
221  }
222  result = (b - a) * t + a;
223  return true;
224 }
225 
226 
227 #define POS_COMPARISON_OFFSET 1e-5f
228 #define NORM_COMPARISON_OFFSET 1e-3f
229 
232 struct VrtComp
233 {
234  bool operator()(const Vertex& a, const Vertex& b) const
235  {
236  if (a.p.x + POS_COMPARISON_OFFSET < b.p.x) return true;
237  if (a.p.x - POS_COMPARISON_OFFSET > b.p.x) return false;
238  if (a.p.y + POS_COMPARISON_OFFSET < b.p.y) return true;
239  if (a.p.y - POS_COMPARISON_OFFSET > b.p.y) return false;
240  if (a.p.z + POS_COMPARISON_OFFSET < b.p.z) return true;
241  if (a.p.z - POS_COMPARISON_OFFSET > b.p.z) return false;
242 
243  if (a.n.x + NORM_COMPARISON_OFFSET < b.n.x) return true;
244  if (a.n.x - NORM_COMPARISON_OFFSET > b.n.x) return false;
245  if (a.n.y + NORM_COMPARISON_OFFSET < b.n.y) return true;
246  if (a.n.y - NORM_COMPARISON_OFFSET > b.n.y) return false;
247  if (a.n.z + NORM_COMPARISON_OFFSET < b.n.z) return true;
248  if (a.n.z - NORM_COMPARISON_OFFSET > b.n.z) return false;
249 
250 
251  if (a.uv[0].x + NORM_COMPARISON_OFFSET < b.uv[0].x) return true;
252  if (a.uv[0].x - NORM_COMPARISON_OFFSET > b.uv[0].x) return false;
253  if (a.uv[0].y + NORM_COMPARISON_OFFSET < b.uv[0].y) return true;
254  return false;
255  };
256 };
257 
262 {
263  bool operator()(const NvcVec3& a, const NvcVec3& b) const
264  {
265  if (a.x + POS_COMPARISON_OFFSET < b.x) return true;
266  if (a.x - POS_COMPARISON_OFFSET > b.x) return false;
267  if (a.y + POS_COMPARISON_OFFSET < b.y) return true;
268  if (a.y - POS_COMPARISON_OFFSET > b.y) return false;
269  if (a.z + POS_COMPARISON_OFFSET < b.z) return true;
270  if (a.z - POS_COMPARISON_OFFSET > b.z) return false;
271  return false;
272  };
273  bool operator()(const Vertex& a, const Vertex& b) const
274  {
275  return operator()(a.p, b.p);
276  };
277 };
278 
279 
281 {
282  if (hull.pointsCount == 0)
283  {
284  return 0.0f;
285  }
286 
287  // Find an approximate centroid for a more accurate calculation
288  NvcVec3 centroid = { 0.0f, 0.0f, 0.0f };
289  for (uint32_t i = 0; i < hull.pointsCount; ++i)
290  {
291  centroid = centroid + hull.points[i];
292  }
293  centroid = centroid / hull.pointsCount;
294 
295  float volume = 0.0f;
296 
297  for (uint32_t i = 0; i < hull.polygonDataCount; ++i)
298  {
299  const HullPolygon& poly = hull.polygonData[i];
300  if (poly.vertexCount < 3)
301  {
302  continue;
303  }
304  const uint32_t i0 = hull.indices[poly.indexBase];
305  uint32_t i1 = hull.indices[poly.indexBase + 1];
306  for (uint32_t j = 2; j < poly.vertexCount; ++j)
307  {
308  const uint32_t i2 = hull.indices[poly.indexBase + j];
309  const NvcVec3 a = hull.points[i0] - centroid;
310  const NvcVec3 b = hull.points[i1] - centroid;
311  const NvcVec3 c = hull.points[i2] - centroid;
312  volume +=
313  (a.x * b.y * c.z - a.x * b.z * c.y - a.y * b.x * c.z + a.y * b.z * c.x + a.z * b.x * c.y - a.z * b.y * c.x);
314  i1 = i2;
315  }
316  }
317  return (1.0f / 6.0f) * std::abs(volume);
318 }
319 
320 } // namespace Blast
321 } // namespace Nv
322 
323 #endif
bool operator()(const Vertex &a, const Vertex &b) const
Definition: NvBlastExtAuthoringInternalCommon.h:273
+
ProjectionDirections
Definition: NvBlastExtAuthoringInternalCommon.h:93
uint32_t e
Definition: NvBlastExtAuthoringTypes.h:61
-
uint32_t s
Definition: NvBlastExtAuthoringInternalCommon.h:49
-
Definition: NvBlastExtAuthoringInternalCommon.h:94
-
Definition: NvBlastExtAuthoringInternalCommon.h:95
-
#define NORM_COMPARISON_OFFSET
Definition: NvBlastExtAuthoringInternalCommon.h:227
+
uint32_t s
Definition: NvBlastExtAuthoringInternalCommon.h:50
+
uint16_t indexBase
Definition: NvBlastExtAuthoringTypes.h:127
+
Definition: NvBlastExtAuthoringInternalCommon.h:95
+
Definition: NvBlastExtAuthoringInternalCommon.h:96
+
#define NORM_COMPARISON_OFFSET
Definition: NvBlastExtAuthoringInternalCommon.h:228
NV_INLINE float normal(const float a[3], float r[3])
Definition: NvBlastMath.h:93
-
Definition: NvBlastExtAuthoringInternalCommon.h:47
+
Definition: NvBlastExtAuthoringInternalCommon.h:48
float z
Definition: NvCTypes.h:51
-
Definition: NvBlastExtAuthoringInternalCommon.h:59
+
Definition: NvBlastExtAuthoringInternalCommon.h:60
+
uint16_t vertexCount
Definition: NvBlastExtAuthoringTypes.h:125
NvcVec3 n
Definition: NvBlastExtAuthoringTypes.h:72
-
#define BBOX_TEST_EPS
Definition: NvBlastExtAuthoringInternalCommon.h:179
-
bool operator<(const Edge &a, const Edge &b)
Definition: NvBlastExtAuthoringInternalCommon.h:81
-
uint32_t e
Definition: NvBlastExtAuthoringInternalCommon.h:49
+
uint32_t * indices
Definition: NvBlastExtAuthoringTypes.h:139
+
#define BBOX_TEST_EPS
Definition: NvBlastExtAuthoringInternalCommon.h:180
+
bool operator<(const Edge &a, const Edge &b)
Definition: NvBlastExtAuthoringInternalCommon.h:82
+
NV_INLINE float calculateCollisionHullVolume(const CollisionHull &hull)
Definition: NvBlastExtAuthoringInternalCommon.h:280
+
uint32_t e
Definition: NvBlastExtAuthoringInternalCommon.h:50
+
HullPolygon * polygonData
Definition: NvBlastExtAuthoringTypes.h:140
+
Definition: NvBlastExtAuthoringTypes.h:120
float x
Definition: NvCTypes.h:51
-
Definition: NvBlastExtAuthoringInternalCommon.h:98
+
Definition: NvBlastExtAuthoringInternalCommon.h:99
+
Definition: NvBlastExtAuthoringTypes.h:133
NV_INLINE void div(float a[3], float divisor)
Definition: NvBlastMath.h:43
float x
Definition: NvCTypes.h:45
-
bool operator()(const Vertex &a, const Vertex &b) const
Definition: NvBlastExtAuthoringInternalCommon.h:233
-
Definition: NvBlastExtAuthoringInternalCommon.h:96
+
bool operator()(const Vertex &a, const Vertex &b) const
Definition: NvBlastExtAuthoringInternalCommon.h:234
+
Definition: NvBlastExtAuthoringInternalCommon.h:97
#define NV_INLINE
Definition: NvPreprocessor.h:350
-
Definition: NvBlastExtAuthoringInternalCommon.h:231
+
Definition: NvBlastExtAuthoringInternalCommon.h:232
+
NvcVec3 * points
Definition: NvBlastExtAuthoringTypes.h:138
+
uint32_t pointsCount
Definition: NvBlastExtAuthoringTypes.h:135
NvcVec2 uv[1]
Definition: NvBlastExtAuthoringTypes.h:73
-
Definition: NvBlastExtAuthoringInternalCommon.h:260
-
NV_FORCE_INLINE physx::PxVec2 getProjectedPointWithWinding(const physx::PxVec3 &point, ProjectionDirections dir)
Definition: NvBlastExtAuthoringInternalCommon.h:150
-
uint32_t parent
Definition: NvBlastExtAuthoringInternalCommon.h:50
-
bool operator()(const NvcVec3 &a, const NvcVec3 &b) const
Definition: NvBlastExtAuthoringInternalCommon.h:262
+
Definition: NvBlastExtAuthoringInternalCommon.h:261
+
NV_FORCE_INLINE physx::PxVec2 getProjectedPointWithWinding(const physx::PxVec3 &point, ProjectionDirections dir)
Definition: NvBlastExtAuthoringInternalCommon.h:151
+
uint32_t parent
Definition: NvBlastExtAuthoringInternalCommon.h:51
+
bool operator()(const NvcVec3 &a, const NvcVec3 &b) const
Definition: NvBlastExtAuthoringInternalCommon.h:263
+
uint32_t polygonDataCount
Definition: NvBlastExtAuthoringTypes.h:137
NV_INLINE float dot(const float a[3], const float b[3])
Definition: NvBlastMath.h:73
-
EdgeWithParent(uint32_t s, uint32_t e, uint32_t p)
Definition: NvBlastExtAuthoringInternalCommon.h:52
-
NV_FORCE_INLINE ProjectionDirections getProjectionDirection(const physx::PxVec3 &normal)
Definition: NvBlastExtAuthoringInternalCommon.h:104
-
NV_INLINE bool weakBoundingBoxIntersection(const physx::PxBounds3 &aBox, const physx::PxBounds3 &bBox)
Definition: NvBlastExtAuthoringInternalCommon.h:184
-
#define POS_COMPARISON_OFFSET
Definition: NvBlastExtAuthoringInternalCommon.h:226
+
EdgeWithParent(uint32_t s, uint32_t e, uint32_t p)
Definition: NvBlastExtAuthoringInternalCommon.h:53
+
NV_FORCE_INLINE ProjectionDirections getProjectionDirection(const physx::PxVec3 &normal)
Definition: NvBlastExtAuthoringInternalCommon.h:105
+
NV_INLINE bool weakBoundingBoxIntersection(const physx::PxBounds3 &aBox, const physx::PxBounds3 &bBox)
Definition: NvBlastExtAuthoringInternalCommon.h:185
+
#define POS_COMPARISON_OFFSET
Definition: NvBlastExtAuthoringInternalCommon.h:227
Definition: NvBlastExtAuthoringTypes.h:57
-
NV_INLINE bool getPlaneSegmentIntersection(const physx::PxPlane &pl, const physx::PxVec3 &a, const physx::PxVec3 &b, physx::PxVec3 &result)
Definition: NvBlastExtAuthoringInternalCommon.h:200
+
NV_INLINE bool getPlaneSegmentIntersection(const physx::PxPlane &pl, const physx::PxVec3 &a, const physx::PxVec3 &b, physx::PxVec3 &result)
Definition: NvBlastExtAuthoringInternalCommon.h:201
Definition: NvBlastExtAuthoringTypes.h:67
NvcVec3 p
Definition: NvBlastExtAuthoringTypes.h:71
-
NV_FORCE_INLINE physx::PxVec2 getProjectedPoint(const physx::PxVec3 &point, ProjectionDirections dir)
Definition: NvBlastExtAuthoringInternalCommon.h:129
-
bool operator()(const EdgeWithParent &a, const EdgeWithParent &b) const
Definition: NvBlastExtAuthoringInternalCommon.h:61
+
NV_FORCE_INLINE physx::PxVec2 getProjectedPoint(const physx::PxVec3 &point, ProjectionDirections dir)
Definition: NvBlastExtAuthoringInternalCommon.h:130
+
bool operator()(const EdgeWithParent &a, const EdgeWithParent &b) const
Definition: NvBlastExtAuthoringInternalCommon.h:62
+
float y
Definition: NvCTypes.h:45
Definition: NvBlastArray.h:37
Definition: NvCTypes.h:49
#define NV_FORCE_INLINE
Definition: NvPreprocessor.h:365
uint32_t s
Definition: NvBlastExtAuthoringTypes.h:60
float y
Definition: NvCTypes.h:51
-
EdgeWithParent()
Definition: NvBlastExtAuthoringInternalCommon.h:51
+
EdgeWithParent()
Definition: NvBlastExtAuthoringInternalCommon.h:52
diff --git a/docs/source_docs/files/_nv_blast_ext_authoring_triangulator_8h_source.html b/docs/source_docs/files/_nv_blast_ext_authoring_triangulator_8h_source.html index 2cde922c..19783dc9 100755 --- a/docs/source_docs/files/_nv_blast_ext_authoring_triangulator_8h_source.html +++ b/docs/source_docs/files/_nv_blast_ext_authoring_triangulator_8h_source.html @@ -46,10 +46,10 @@
NvBlastExtAuthoringTriangulator.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-2018 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTAUTHORINGTRIANGULATOR_H
30 #define NVBLASTEXTAUTHORINGTRIANGULATOR_H
31 
32 
33 #include <vector>
34 #include <map>
38 
39 namespace Nv
40 {
41 namespace Blast
42 {
43 
44 
49 {
50 public:
55  void triangulate(const Mesh* mesh);
56 
60  std::vector<Triangle>& getBaseMesh()
61  {
62  return mBaseMeshUVFittedTriangles;
63  }
64 
65  std::vector<Triangle>& getBaseMeshNotFitted()
66  {
67  return mBaseMeshResultTriangles;
68  }
69 
70 
74  std::vector<TriangleIndexed>& getBaseMeshIndexed()
75  {
76  return mBaseMeshTriangles;
77  }
81  std::vector<uint32_t>& getBaseMapping()
82  {
83  return mBaseMapping;
84  };
88  std::vector<int32_t>& getPositionedMapping()
89  {
90  return mPositionMappedVrt;
91  };
96  {
97  return static_cast<uint32_t>(mVertices.size());
98  }
99 
103  void reset();
104 
105  int32_t& getParentChunkId() { return parentChunkId; };
106 
107 private:
108 
109  int32_t parentChunkId;
110 
111  int32_t addVerticeIfNotExist(const Vertex& p);
112  void addEdgeIfValid(EdgeWithParent& ed);
113 
114  /* Data used before triangulation to build polygon loops*/
115 
116  std::vector<Vertex> mVertices;
117  std::vector<EdgeWithParent> mBaseMeshEdges;
118  std::map<Vertex, int32_t, VrtComp> mVertMap;
119  std::map<EdgeWithParent, int32_t, EdgeComparator> mEdgeMap;
120  std::vector<uint32_t> mBaseMapping;
121  std::vector<int32_t> mPositionMappedVrt;
122  /* ------------------------------------------------------------ */
123 
124 
128  void prepare(const Mesh* mesh);
129 
130 
131 
132  void triangulatePolygonWithEarClipping(std::vector<uint32_t>& inputPolygon, Vertex* vert, ProjectionDirections dir);
133  void buildPolygonAndTriangulate(std::vector<Edge>& edges, Vertex* vertices, int32_t userData, int32_t materialId, int32_t smoothingGroup);
134  void computePositionedMapping();
135 
136  std::vector<TriangleIndexed> mBaseMeshTriangles;
140  std::vector<Triangle> mBaseMeshResultTriangles;
141  std::vector<Triangle> mBaseMeshUVFittedTriangles;
142 };
143 
144 } // namespace Blast
145 } // namespace Nv
146 
147 
148 #endif // ifndef NVBLASTEXTAUTHORINGTRIANGULATOR_H
ProjectionDirections
Definition: NvBlastExtAuthoringInternalCommon.h:92
+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-2018 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTAUTHORINGTRIANGULATOR_H
30 #define NVBLASTEXTAUTHORINGTRIANGULATOR_H
31 
32 
33 #include <vector>
34 #include <map>
38 
39 namespace Nv
40 {
41 namespace Blast
42 {
43 
44 
49 {
50 public:
55  void triangulate(const Mesh* mesh);
56 
60  std::vector<Triangle>& getBaseMesh()
61  {
62  return mBaseMeshUVFittedTriangles;
63  }
64 
65  std::vector<Triangle>& getBaseMeshNotFitted()
66  {
67  return mBaseMeshResultTriangles;
68  }
69 
70 
74  std::vector<TriangleIndexed>& getBaseMeshIndexed()
75  {
76  return mBaseMeshTriangles;
77  }
81  std::vector<uint32_t>& getBaseMapping()
82  {
83  return mBaseMapping;
84  };
88  std::vector<int32_t>& getPositionedMapping()
89  {
90  return mPositionMappedVrt;
91  };
96  {
97  return static_cast<uint32_t>(mVertices.size());
98  }
99 
103  void reset();
104 
105  int32_t& getParentChunkId() { return parentChunkId; };
106 
107 private:
108 
109  int32_t parentChunkId;
110 
111  int32_t addVerticeIfNotExist(const Vertex& p);
112  void addEdgeIfValid(EdgeWithParent& ed);
113 
114  /* Data used before triangulation to build polygon loops*/
115 
116  std::vector<Vertex> mVertices;
117  std::vector<EdgeWithParent> mBaseMeshEdges;
118  std::map<Vertex, int32_t, VrtComp> mVertMap;
119  std::map<EdgeWithParent, int32_t, EdgeComparator> mEdgeMap;
120  std::vector<uint32_t> mBaseMapping;
121  std::vector<int32_t> mPositionMappedVrt;
122  /* ------------------------------------------------------------ */
123 
124 
128  void prepare(const Mesh* mesh);
129 
130 
131 
132  void triangulatePolygonWithEarClipping(std::vector<uint32_t>& inputPolygon, Vertex* vert, ProjectionDirections dir);
133  void buildPolygonAndTriangulate(std::vector<Edge>& edges, Vertex* vertices, int32_t userData, int32_t materialId, int32_t smoothingGroup);
134  void computePositionedMapping();
135 
136  std::vector<TriangleIndexed> mBaseMeshTriangles;
140  std::vector<Triangle> mBaseMeshResultTriangles;
141  std::vector<Triangle> mBaseMeshUVFittedTriangles;
142 };
143 
144 } // namespace Blast
145 } // namespace Nv
146 
147 
148 #endif // ifndef NVBLASTEXTAUTHORINGTRIANGULATOR_H
ProjectionDirections
Definition: NvBlastExtAuthoringInternalCommon.h:93
std::vector< int32_t > & getPositionedMapping()
Definition: NvBlastExtAuthoringTriangulator.h:88
std::vector< Triangle > & getBaseMeshNotFitted()
Definition: NvBlastExtAuthoringTriangulator.h:65
-
Definition: NvBlastExtAuthoringInternalCommon.h:47
+
Definition: NvBlastExtAuthoringInternalCommon.h:48
std::vector< uint32_t > & getBaseMapping()
Definition: NvBlastExtAuthoringTriangulator.h:81
uint32_t getWeldedVerticesCount()
Definition: NvBlastExtAuthoringTriangulator.h:95
diff --git a/docs/source_docs/files/_nv_blast_ext_r_t_geometry_8h_source.html b/docs/source_docs/files/_nv_blast_ext_r_t_geometry_8h_source.html index dbb90b42..922e8d0b 100644 --- a/docs/source_docs/files/_nv_blast_ext_r_t_geometry_8h_source.html +++ b/docs/source_docs/files/_nv_blast_ext_r_t_geometry_8h_source.html @@ -47,7 +47,7 @@
Go to the documentation of this file.
1 #pragma once
5 #include "NvBlastExtRT.h"
6 #include <map>
7 
8 using physx::PxVec3;
9 using physx::PxVec2;
10 
11 
12 namespace Nv
13 {
14  namespace Blast
15  {
16  class Mesh;
17 
19  {
20  public:
21 
22  typedef int32_t (VertexWelding::*LOCATE_CALLBACK)(const Vertex& v, uint32_t bucket, bool& isAllDataTheSame);
23 
24  VertexWelding(uint32_t maxVertexCount, uint32_t maxBucketCount, float gridCellSize, float weldEpsilon, float auxEpsilon, LOCATE_CALLBACK clb);
25 
26  const Vertex* getVertices() const
27  {
28  return vertex.data();
29  }
30  uint32_t getVerticesCount() const
31  {
32  return vertex.size();
33  }
34  void reset();
35  int32_t WeldVertex(const Vertex *v);
36 
37  int32_t LocateVertexInBucket(const Vertex& v, uint32_t bucket, bool& isAllDataTheSame);
38 
39  int32_t LocateVertexInBucketOnlyPosition(const Vertex& v, uint32_t bucket, bool& isAllDataTheSame);
40 
41 
42  private:
43  // Computes hash bucket index in range [0, NUM_BUCKETS-1]
44  //int32_t ComputeHashBucketIndex(const Vertex& v)
45  int32_t ComputeHashBucketIndex(int32_t x, int32_t y, int32_t z);
46 
47  void AddVertexToBucket(const Vertex& v, uint32_t bucket);
48 
49  std::vector<int32_t> first; // start of linked list for each bucket
50  std::vector<int32_t> next; // links each vertex to next in linked list
51  std::vector<Vertex> vertex; // unique vertices within tolerance
52 
53  const uint32_t maxVertexCount; // max number of vertices that can be welded at once
54  const uint32_t maxBucketCount; // number of hash buckets to map grid cells into
55  const float gridCellSizeInv; // grid cell size; must be at least 2*WELD_EPSILON
56  const float weldEpsilon; // radius around vertex defining welding neighborhood
57  const float auxEpsilon; // epsilon for normal and uv of vertex
58 
59  LOCATE_CALLBACK locateCallback;
60  };
61 
62  class BooleanToolV2 : public Fracturer
63  {
64  public:
65 
66  struct Mode
67  {
68  int32_t ca, cb, ci;
69  Mode() { ca = 0; cb = 0; ci = -1; };
70  Mode(int32_t a, int32_t b, int32_t c) : ca(a), cb(b), ci(c)
71  {
72  }
73 
74  static Mode Intersection()
75  {
76  return Mode(0, 0, 1);
77  }
78 
82  static Mode Union()
83  {
84  return Mode(1, 1, -1);
85  }
89  static Mode Difference()
90  {
91  return Mode(1, 0, -1);
92  }
93  };
94 
95  BooleanToolV2();
96 
97  void release();
98 
103  const Mesh* mMeshA;
104  const Mesh* mMeshB;
107  //const PreparedMesh* mPreparedA;
108  //const PreparedMesh* mPreparedB;
109 
110 
114  void makeFacetFacetTests(BooleanToolOutputData* outputData, int32_t threadId, int32_t threadCount);
115  void retain(bool isA, BooleanToolOutputData* outputData, int32_t threadId, int32_t threadCount,
116  const DamagePattern* pattern = nullptr, int32_t chunk = -1);
117 
121  //Nv::Blast::Mesh* getMesh();
122 
123 
124  private:
125 
126  int32_t computeV03(const PxVec3& point);
127  int32_t computeV30(const PxVec3& point);
128 
129 
133  void computeRetained(const Mesh* mesh, const physx::PxBounds3& bMeshBoudning,
134  int32_t(BooleanToolV2::*computeV3)(const physx::PxVec3&), int32_t btC, int32_t btCI, int32_t parentFacetOffset,
135  BooleanToolOutputData* outputData, int32_t threadId, int32_t threadCount,
136  struct FaceOrientation* fo = nullptr, const std::vector<bool>* validAdjacentFacet = nullptr);
137 
138 
140 
143  float* sx1;
144  float* sy1;
145  float* ex1;
146  float* ey1;
147  float* px1;
148  float* py1;
149  float* pt1;
150  float* resy1;
151  int32_t* winding1;
152  int32_t* projectedWinding1;
153 
154 
155  float* sx2;
156  float* sy2;
157  float* ex2;
158  float* ey2;
159  float* px2;
160  float* py2;
161  float* pt2;
162  float* resy2;
163  int32_t* winding2;
164  int32_t* projectedWinding2;
165 
166  uint32_t* edgeFacetTestA;
167  uint32_t* edgeFacetTestB;
168 
169 
173  int32_t* edgeCrossCheckTest;
174  Vertex* edgeCrossA;
175  Vertex* edgeCrossB;
176 
177  Mode mToolMode;
178  };
179 
181  {
182  public:
183  TriangulatorV2();
184 
185  void release();
186 
187  uint32_t build(const BooleanResultEdge* edges, uint32_t inEdgeCount, const Vertex* inVertices, Vertex* outWeldedVrts, uint32_t& vcount, uint32_t* outTriangles, PerTriangleAdditionalData* adata, uint32_t maxTcount, const Mesh* ma, const Mesh* mb);
188 
190  {
191  uint32_t point;
192  uint32_t nextPoint;
193  uint32_t prevPoint;
194  };
195 
197  uint32_t weldedCount;
198  uint32_t* triangleIndices;
199  uint32_t triangleCount;
200 
201  private:
202 
203  void triangulatePolygonWithEarClipping(ProjectionDirections dir);
204 
205  LinkedListElement facetList[1024];
206  uint32_t facetListSize;
207  uint32_t pointIndicesList[1024];
208  uint32_t pointCount;
209 
210  physx::PxVec2 projectedPointList[1024];
211  uint32_t projectedPointCount;
212 
213  uint32_t visitedFlagValue[1024];
214  uint32_t currentFlagValue;
215 
216 
217 
218  Edge* weldedEdges;
219 
220 
221  const BooleanResultEdge* mInpEdges;
222  uint32_t mInpEdgeCount;
223  uint32_t maxTriangleCount;
224 
225  const Mesh* meshA;
226  const Mesh* meshB;
227 
228  VertexWelding wldg;
229  };
230 
231  }
232 }
233 
Definition: NvBlastExtRTGeometry.h:18
-
ProjectionDirections
Definition: NvBlastExtAuthoringInternalCommon.h:92
+
ProjectionDirections
Definition: NvBlastExtAuthoringInternalCommon.h:93
int32_t WeldVertex(const Vertex *v)
Definition: NvBlastExtRT.h:68
uint32_t * triangleIndices
Definition: NvBlastExtRTGeometry.h:198
diff --git a/docs/source_docs/files/_nv_blast_family_8h_source.html b/docs/source_docs/files/_nv_blast_family_8h_source.html index 34d40037..cd774178 100755 --- a/docs/source_docs/files/_nv_blast_family_8h_source.html +++ b/docs/source_docs/files/_nv_blast_family_8h_source.html @@ -54,7 +54,7 @@
void fractureNoEvents(uint32_t chunkFractureCount, const NvBlastChunkFractureData *chunkFractures, Actor *filterActor, NvBlastLog logFn)
bool isActorActive(uint32_t index) const
Definition: NvBlastFamily.h:367
uint32_t getGetNodeActorIndex(uint32_t nodeIndex) const
Definition: NvBlastFamily.h:397
-
uint32_t getBondCount() const
Definition: NvBlastAsset.h:276
+
uint32_t getBondCount() const
Definition: NvBlastAsset.h:277
NV_INLINE bool isInvalidIndex(T index)
Definition: NvBlastIndexFns.h:57
void(* NvBlastLog)(int type, const char *msg, const char *file, int line)
Definition: NvBlastTypes.h:63
@@ -70,7 +70,7 @@
Definition: NvBlastTypes.h:98
uint32_t getActorBufferSize() const
Definition: NvBlastFamily.h:360
-
uint32_t m_firstSubsupportChunkIndex
Definition: NvBlastAsset.h:206
+
uint32_t m_firstSubsupportChunkIndex
Definition: NvBlastAsset.h:207
const Asset * m_asset
Definition: NvBlastFamily.h:148
Actor * getActorByIndex(uint32_t index) const
Definition: NvBlastFamily.h:374
@@ -80,19 +80,19 @@
uint32_t m_nodeCount
Definition: NvBlastSupportGraph.h:81
NvBlastID m_assetID
Definition: NvBlastFamily.h:66
Definition: NvBlastTypes.h:69
-
uint32_t getLowerSupportChunkCount() const
Definition: NvBlastAsset.h:270
+
uint32_t getLowerSupportChunkCount() const
Definition: NvBlastAsset.h:271
Definition: NvBlastTypes.h:152
Definition: NvBlastTypes.h:439
NvBlastBlockData(FamilyGraph, m_familyGraphOffset, getFamilyGraph)
float * getSubsupportChunkHealths() const
Definition: NvBlastFamily.h:113
-
SupportGraph m_graph
Definition: NvBlastAsset.h:196
+
SupportGraph m_graph
Definition: NvBlastAsset.h:197
Definition: NvBlastTypes.h:286
Definition: NvBlastTypes.h:468
Definition: NvBlastActor.h:58
uint64_t m_runtimePlaceholder
Definition: NvBlastFamily.h:149
-
uint32_t getUpperSupportChunkCount() const
Definition: NvBlastAsset.h:264
+
uint32_t getUpperSupportChunkCount() const
Definition: NvBlastAsset.h:265
-
uint32_t m_chunkCount
Definition: NvBlastAsset.h:191
+
uint32_t m_chunkCount
Definition: NvBlastAsset.h:192
int32_t atomicDecrement(volatile int32_t *val)
void returnActor(Actor &actor)
Definition: NvBlastFamily.h:348
diff --git a/docs/source_docs/files/class_nv_1_1_blast_1_1_asset.html b/docs/source_docs/files/class_nv_1_1_blast_1_1_asset.html index 342205de..23e95173 100755 --- a/docs/source_docs/files/class_nv_1_1_blast_1_1_asset.html +++ b/docs/source_docs/files/class_nv_1_1_blast_1_1_asset.html @@ -605,7 +605,7 @@

Nv::Blast::Asset Class Reference

+
+
+ + + + + + + + + + + + + + + + + + +
virtual bool Nv::Blast::FractureTool::setApproximateBonding (uint32_t  chunkIndex,
bool  useApproximateBonding 
) [pure virtual]
+
+
+ +

+Set the APPROXIMATE_BONDING flag in the chunk's ChunkInfo

Parameters:
+ + + +
[in] chunkIndex chunk index - use getChunkIndex(ID)
[in] useApproximateBonding value of flag to set
+
+
Returns:
true if the chunk ID is found, false otherwise
+ +

Implemented in Nv::Blast::FractureToolImpl.

+

diff --git a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool.js b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool.js index b4a1a8f1..a3f0bbec 100755 --- a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool.js +++ b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool.js @@ -24,6 +24,7 @@ var class_nv_1_1_blast_1_1_fracture_tool = [ "release", "class_nv_1_1_blast_1_1_fracture_tool.html#a78da4a0d726ec1b541166cd3c46df67e", null ], [ "replaceMaterialId", "class_nv_1_1_blast_1_1_fracture_tool.html#a78194aeece0c12c2035c79458ff49c9f", null ], [ "reset", "class_nv_1_1_blast_1_1_fracture_tool.html#ab462c92fa47a5359bf3d19cf44af80f4", null ], + [ "setApproximateBonding", "class_nv_1_1_blast_1_1_fracture_tool.html#a33c19de2bc8ea52394651d184076db5c", null ], [ "setChunkMesh", "class_nv_1_1_blast_1_1_fracture_tool.html#aecd9be996bba9329418fd91db8235ebe", null ], [ "setInteriorMaterialId", "class_nv_1_1_blast_1_1_fracture_tool.html#ac8c4f90133fdf32969cad6e4c520414f", null ], [ "setRemoveIslands", "class_nv_1_1_blast_1_1_fracture_tool.html#a251738022e498b819e88536577470735", null ], diff --git a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl-members.html b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl-members.html index 5834f88f..62ca715f 100755 --- a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl-members.html +++ b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl-members.html @@ -73,6 +73,7 @@

Nv::Blast::FractureToolImpl Member List

This is the complete list of mem release() overrideNv::Blast::FractureToolImpl [virtual] replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) overrideNv::Blast::FractureToolImpl [virtual] reset() overrideNv::Blast::FractureToolImpl [virtual] + setApproximateBonding(uint32_t chunkId, bool useApproximateBonding) overrideNv::Blast::FractureToolImpl [virtual] setChunkMesh(const Mesh *mesh, int32_t parentId) overrideNv::Blast::FractureToolImpl [virtual] setInteriorMaterialId(int32_t materialId) overrideNv::Blast::FractureToolImpl [virtual] setRemoveIslands(bool isRemoveIslands) overrideNv::Blast::FractureToolImpl [virtual] diff --git a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl.html b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl.html index 4ca24b9f..b3a36a2c 100755 --- a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl.html +++ b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl.html @@ -106,6 +106,8 @@

Nv::Blast::FractureToolImpl Class Reference

+
+
+ + + + + + + + + + + + + + + + + + +
bool Nv::Blast::FractureToolImpl::setApproximateBonding (uint32_t  chunkIndex,
bool  useApproximateBonding 
) [override, virtual]
+
+
+ +

+Set the APPROXIMATE_BONDING flag in the chunk's ChunkInfo

Parameters:
+ + + +
[in] chunkIndex chunk index - use getChunkIndex(ID)
[in] useApproximateBonding value of flag to set
+
+
Returns:
true if the chunk ID is found, false otherwise
+ +

Implements Nv::Blast::FractureTool.

+

diff --git a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl.js b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl.js index 3bba54a4..f32a47ed 100755 --- a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl.js +++ b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool_impl.js @@ -25,6 +25,7 @@ var class_nv_1_1_blast_1_1_fracture_tool_impl = [ "release", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a05d2e5fd981d54d55ee5dbc5bf454a50", null ], [ "replaceMaterialId", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#abe1f6bf365964825a2c939e22c85d96a", null ], [ "reset", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a1ccbcbfde4e58f8357a589ae56ff043f", null ], + [ "setApproximateBonding", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a3fdd1a0df69a82898a6ec8c0f51094fc", null ], [ "setChunkMesh", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ac466495627ca99252433c7e1c702c7f9", null ], [ "setInteriorMaterialId", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ac9c8e18748b18fa6dd29a328eaf63026", null ], [ "setRemoveIslands", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a92dec92822ab9e0807400a7d63bfc553", null ], diff --git a/docs/source_docs/files/functions_0x61.html b/docs/source_docs/files/functions_0x61.html index 65df3cde..71ef8471 100755 --- a/docs/source_docs/files/functions_0x61.html +++ b/docs/source_docs/files/functions_0x61.html @@ -254,52 +254,52 @@

- a -

diff --git a/docs/source_docs/files/functions_func_g.html b/docs/source_docs/files/functions_func_g.html index 777c68b9..d4f83a8b 100755 --- a/docs/source_docs/files/functions_func_g.html +++ b/docs/source_docs/files/functions_func_g.html @@ -1175,7 +1175,7 @@

- g -

diff --git a/docs/source_docs/files/functions_type.html b/docs/source_docs/files/functions_type.html index 75594347..49393de0 100755 --- a/docs/source_docs/files/functions_type.html +++ b/docs/source_docs/files/functions_type.html @@ -141,15 +141,15 @@

- r -

- t -

- v -

+
+ +

+

diff --git a/docs/source_docs/files/namespacemembers_0x63.html b/docs/source_docs/files/namespacemembers_0x63.html index 1ad5b396..63be79df 100755 --- a/docs/source_docs/files/namespacemembers_0x63.html +++ b/docs/source_docs/files/namespacemembers_0x63.html @@ -72,10 +72,12 @@ Here is a list of all namespace members with links to the namespace documentation for each member:

- c -