From 9c03a9fbef009c8e5ea406e6929907206d8d135c Mon Sep 17 00:00:00 2001 From: Bryan Galdrikian Date: Mon, 19 Aug 2019 02:18:16 -0700 Subject: Fixing chunk hierarchy optimization/merge bugs Exposing ability to remove chunks to fracture tool API --- blast_tools_and_samples-windows.zip | Bin 38469040 -> 38406881 bytes .../cmake_projects_linux_ue4_crosscompile.bat | 4 +- ...last_ext_authoring_fracture_tool_8h-source.html | 32 +++++----- ...last_ext_authoring_fracture_tool_8h_source.html | 2 +- ...ass_nv_1_1_blast_1_1_fracture_tool-members.html | 2 +- .../class_nv_1_1_blast_1_1_fracture_tool.html | 22 +++++-- .../files/class_nv_1_1_blast_1_1_fracture_tool.js | 2 +- docs/api_docs/files/functions_0x64.html | 4 +- docs/api_docs/files/functions_d.html | 4 +- docs/api_docs/files/functions_func_0x64.html | 4 +- docs/api_docs/files/functions_func_d.html | 4 +- docs/api_docs/files/navtreeindex2.js | 2 +- docs/api_docs/files/pagereleasenotes.html | 4 +- docs/release_notes.txt | 4 +- ...last_ext_authoring_fracture_tool_8h-source.html | 32 +++++----- ...last_ext_authoring_fracture_tool_8h_source.html | 2 +- ...ext_authoring_fracture_tool_impl_8h-source.html | 67 ++++++++++----------- ...ext_authoring_fracture_tool_impl_8h_source.html | 18 +++--- ...ass_nv_1_1_blast_1_1_fracture_tool-members.html | 2 +- .../class_nv_1_1_blast_1_1_fracture_tool.html | 24 +++++--- .../files/class_nv_1_1_blast_1_1_fracture_tool.js | 2 +- ...v_1_1_blast_1_1_fracture_tool_impl-members.html | 2 +- .../class_nv_1_1_blast_1_1_fracture_tool_impl.html | 24 +++++--- .../class_nv_1_1_blast_1_1_fracture_tool_impl.js | 2 +- docs/source_docs/files/functions_0x64.html | 6 +- docs/source_docs/files/functions_0x69.html | 4 +- docs/source_docs/files/functions_0x70.html | 26 ++++---- docs/source_docs/files/functions_0x72.html | 42 +++++++------ docs/source_docs/files/functions_0x73.html | 13 ++-- docs/source_docs/files/functions_0x74.html | 22 +++---- docs/source_docs/files/functions_0x75.html | 4 +- docs/source_docs/files/functions_0x78.html | 19 +++--- docs/source_docs/files/functions_0x79.html | 19 +++--- docs/source_docs/files/functions_0x7a.html | 15 +++-- docs/source_docs/files/functions_d.html | 6 +- docs/source_docs/files/functions_func_0x64.html | 6 +- docs/source_docs/files/functions_func_0x69.html | 4 +- docs/source_docs/files/functions_func_0x70.html | 14 ++--- docs/source_docs/files/functions_func_0x72.html | 61 +++++++++---------- docs/source_docs/files/functions_func_0x73.html | 5 +- docs/source_docs/files/functions_func_0x75.html | 4 +- docs/source_docs/files/functions_func_d.html | 6 +- docs/source_docs/files/functions_s.html | 8 +-- docs/source_docs/files/functions_type.html | 8 +-- docs/source_docs/files/functions_x.html | 4 +- docs/source_docs/files/functions_y.html | 4 +- docs/source_docs/files/navtreeindex15.js | 2 +- docs/source_docs/files/navtreeindex7.js | 4 +- .../include/NvBlastExtAuthoringFractureTool.h | 5 +- .../source/NvBlastExtAuthoringFractureToolImpl.cpp | 57 +++++++----------- .../source/NvBlastExtAuthoringFractureToolImpl.h | 3 +- 51 files changed, 330 insertions(+), 306 deletions(-) diff --git a/blast_tools_and_samples-windows.zip b/blast_tools_and_samples-windows.zip index ddc8ed3..9708677 100755 Binary files a/blast_tools_and_samples-windows.zip and b/blast_tools_and_samples-windows.zip differ diff --git a/buildtools/cmake_projects_linux_ue4_crosscompile.bat b/buildtools/cmake_projects_linux_ue4_crosscompile.bat index cefdcc7..6c94800 100755 --- a/buildtools/cmake_projects_linux_ue4_crosscompile.bat +++ b/buildtools/cmake_projects_linux_ue4_crosscompile.bat @@ -43,8 +43,8 @@ echo %CMAKE_CMD_LINE_PARAMS% if not exist %BLAST_ROOT_DIR%/bin/linux64-UE4 mkdir %BLAST_ROOT_DIR%/bin/linux64-UE4 ::Seems like there are no checked or profile Linux PhysX Libs -::FOR %%Z IN (debug, release, checked, profile) DO ( -FOR %%Z IN (debug, release) DO ( +FOR %%Z IN (debug, release, checked, profile) DO ( +::FOR %%Z IN (debug, release) DO ( SET CMAKE_OUTPUT_DIR=%BLAST_ROOT_DIR%\compiler\linux64-%%Z-UE4\ IF EXIST !CMAKE_OUTPUT_DIR! rmdir /S /Q !CMAKE_OUTPUT_DIR! mkdir !CMAKE_OUTPUT_DIR! 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 6b90b7b..bdf4c9b 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 @@ -238,22 +238,22 @@ 00482 00487 virtual bool isMeshContainOpenEdges(const Mesh* input) = 0; 00488 -00494 virtual bool deleteAllChildrenOfChunk(int32_t chunkId) = 0; -00495 -00509 virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize, -00510 const uint32_t* chunksToMerge, uint32_t mergeChunkCount, -00511 const NvcVec2i* adjChunks, uint32_t adjChunksSize, -00512 bool removeOriginalChunks = false) = 0; -00513 -00519 virtual void fitUvToRect(float side, uint32_t chunkId) = 0; -00520 -00525 virtual void fitAllUvToRect(float side) = 0; -00526 }; -00527 -00528 } // namespace Blast -00529 } // namespace Nv -00530 -00531 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H +00495 virtual bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) = 0; +00496 +00510 virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize, +00511 const uint32_t* chunksToMerge, uint32_t mergeChunkCount, +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
-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 
494  virtual bool deleteAllChildrenOfChunk(int32_t chunkId) = 0;
495 
509  virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
510  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
511  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
512  bool removeOriginalChunks = false) = 0;
513 
519  virtual void fitUvToRect(float side, uint32_t chunkId) = 0;
520 
525  virtual void fitAllUvToRect(float side) = 0;
526 };
527 
528 } // namespace Blast
529 } // namespace Nv
530 
531 #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,
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
Definition: NvBlastExtAuthoringFractureTool.h:47
Definition: NvBlastExtAuthoringFractureTool.h:179
Definition: NvBlastExtAuthoringFractureTool.h:52
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 102a682..b426840 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 @@ -24,7 +24,7 @@ createChunkMesh(int32_t chunkId)=0Nv::Blast::FractureTool [pure virtual] cut(uint32_t chunkId, const NvcVec3 &normal, const NvcVec3 &position, const NoiseConfiguration &noise, bool replaceChunk, RandomGeneratorBase *rnd)=0Nv::Blast::FractureTool [pure virtual] cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase *rnd)=0Nv::Blast::FractureTool [pure virtual] - deleteAllChildrenOfChunk(int32_t chunkId)=0Nv::Blast::FractureTool [pure virtual] + deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot=false)=0Nv::Blast::FractureTool [pure virtual] finalizeFracturing()=0Nv::Blast::FractureTool [pure virtual] fitAllUvToRect(float side)=0Nv::Blast::FractureTool [pure virtual] fitUvToRect(float side, uint32_t chunkId)=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 66965f2..e91b525 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 @@ -35,7 +35,7 @@ virtual int32_t cutout (uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase *rnd)=0 -virtual bool deleteAllChildrenOfChunk (int32_t chunkId)=0 +virtual bool deleteChunkSubhierarchy (int32_t chunkId, bool deleteRoot=false)=0 virtual void finalizeFracturing ()=0 @@ -252,17 +252,26 @@ Cutout fracture for specified chunk.
Parameters:

- +

- + - - - + + + + + + + + + + + +
virtual bool Nv::Blast::FractureTool::deleteAllChildrenOfChunk virtual bool Nv::Blast::FractureTool::deleteChunkSubhierarchy ( int32_t  chunkId  )  [pure virtual] chunkId,
bool  deleteRoot = false 
) [pure virtual]
@@ -272,6 +281,7 @@ Cutout fracture for specified chunk.
Parameters:
Delete all children for specified chunk (also recursively delete chidren of children).
Parameters:
+
[in] chunkId Chunk ID which children should be deleted
[in] deleteRoot (optional) If true, deletes the given chunk too
Returns:
true if one or more chunks were removed
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 8ade1d9..b4a1a8f 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 @@ -4,7 +4,7 @@ var class_nv_1_1_blast_1_1_fracture_tool = [ "createChunkMesh", "class_nv_1_1_blast_1_1_fracture_tool.html#a04bb5dd940274a9c8b097cc9f06d0708", null ], [ "cut", "class_nv_1_1_blast_1_1_fracture_tool.html#a559c822041e74f034613b3afa4ad8a17", null ], [ "cutout", "class_nv_1_1_blast_1_1_fracture_tool.html#a247f0e36c015237002dc87675562289b", null ], - [ "deleteAllChildrenOfChunk", "class_nv_1_1_blast_1_1_fracture_tool.html#aeaa46bf5fe4fe7035ac624f49ade64a8", null ], + [ "deleteChunkSubhierarchy", "class_nv_1_1_blast_1_1_fracture_tool.html#aec74731e5a147120f0536b6674fc0f42", null ], [ "finalizeFracturing", "class_nv_1_1_blast_1_1_fracture_tool.html#a8830959a8f7e4babc1983ea31c61ef5d", null ], [ "fitAllUvToRect", "class_nv_1_1_blast_1_1_fracture_tool.html#aa9a87637d6d190d71678f0fb9a100bfd", null ], [ "fitUvToRect", "class_nv_1_1_blast_1_1_fracture_tool.html#adb1c311cbb3d84c7bfbfd12abe01af0b", null ], diff --git a/docs/api_docs/files/functions_0x64.html b/docs/api_docs/files/functions_0x64.html index 94cd0b9..36e622e 100755 --- a/docs/api_docs/files/functions_0x64.html +++ b/docs/api_docs/files/functions_0x64.html @@ -105,8 +105,8 @@ Here is a list of all class members with links to the classes they belong to: , Nv::Blast::DebugLine
  • DebugRenderMode : Nv::Blast::ExtStressSolver -
  • deleteAllChildrenOfChunk() -: Nv::Blast::FractureTool +
  • deleteChunkSubhierarchy() +: Nv::Blast::FractureTool
  • deletedActor : NvBlastActorSplitEvent
  • deleteInSphere() diff --git a/docs/api_docs/files/functions_d.html b/docs/api_docs/files/functions_d.html index 32368a2..f7c3bb7 100755 --- a/docs/api_docs/files/functions_d.html +++ b/docs/api_docs/files/functions_d.html @@ -95,8 +95,8 @@ $(document).ready(function(){initNavTree('functions_d.html','');});
  • DebugRenderMode : Nv::Blast::ExtStressSolver
  • -
  • deleteAllChildrenOfChunk() -: Nv::Blast::FractureTool +
  • deleteChunkSubhierarchy() +: Nv::Blast::FractureTool
  • deletedActor : NvBlastActorSplitEvent diff --git a/docs/api_docs/files/functions_func_0x64.html b/docs/api_docs/files/functions_func_0x64.html index f17acc5..207918c 100755 --- a/docs/api_docs/files/functions_func_0x64.html +++ b/docs/api_docs/files/functions_func_0x64.html @@ -65,8 +65,8 @@
  • DebugLine() : Nv::Blast::ExtStressSolver::ExtStressSolver::DebugLine , Nv::Blast::DebugLine -
  • deleteAllChildrenOfChunk() -: Nv::Blast::FractureTool +
  • deleteChunkSubhierarchy() +: Nv::Blast::FractureTool
  • deleteInSphere() : Nv::Blast::VoronoiSitesGenerator
  • deserializeFromBuffer() diff --git a/docs/api_docs/files/functions_func_d.html b/docs/api_docs/files/functions_func_d.html index 4431286..b9a84a7 100755 --- a/docs/api_docs/files/functions_func_d.html +++ b/docs/api_docs/files/functions_func_d.html @@ -48,8 +48,8 @@ $(document).ready(function(){initNavTree('functions_func_d.html','');}); : Nv::Blast::DebugLine , Nv::Blast::ExtStressSolver::DebugLine
  • -
  • deleteAllChildrenOfChunk() -: Nv::Blast::FractureTool +
  • deleteChunkSubhierarchy() +: Nv::Blast::FractureTool
  • deleteInSphere() : Nv::Blast::VoronoiSitesGenerator diff --git a/docs/api_docs/files/navtreeindex2.js b/docs/api_docs/files/navtreeindex2.js index a216862..2dbb0a2 100755 --- a/docs/api_docs/files/navtreeindex2.js +++ b/docs/api_docs/files/navtreeindex2.js @@ -12,7 +12,7 @@ var NAVTREEINDEX2 = "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#aea8f1d386c70af0ea67bed2c353e57a1":[3,0,0,0,62,8], -"class_nv_1_1_blast_1_1_fracture_tool.html#aeaa46bf5fe4fe7035ac624f49ade64a8":[3,0,0,0,62,4], +"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#af07eb7960687cd912df496640bec8876":[3,0,0,0,62,10], "class_nv_1_1_blast_1_1_fracturer.html":[3,0,0,0,60], diff --git a/docs/api_docs/files/pagereleasenotes.html b/docs/api_docs/files/pagereleasenotes.html index 743d8d4..e5a5932 100755 --- a/docs/api_docs/files/pagereleasenotes.html +++ b/docs/api_docs/files/pagereleasenotes.html @@ -24,7 +24,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -Blast(tm) SDK 1.1.5 (02-May-2019) +Blast(tm) SDK 1.1.5 (18-Aug-2019) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Changes @@ -33,6 +33,7 @@ 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 New Features ------------ @@ -40,6 +41,7 @@ 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) Bug fixes --------- diff --git a/docs/release_notes.txt b/docs/release_notes.txt index 9bf9d91..d5c98b7 100755 --- a/docs/release_notes.txt +++ b/docs/release_notes.txt @@ -3,7 +3,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -Blast(tm) SDK 1.1.5 (02-May-2019) +Blast(tm) SDK 1.1.5 (18-Aug-2019) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Changes @@ -12,6 +12,7 @@ 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 New Features ------------ @@ -19,6 +20,7 @@ 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) Bug fixes --------- 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 267bbfa..b3703bc 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 @@ -255,22 +255,22 @@ 00482 00487 virtual bool isMeshContainOpenEdges(const Mesh* input) = 0; 00488 -00494 virtual bool deleteAllChildrenOfChunk(int32_t chunkId) = 0; -00495 -00509 virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize, -00510 const uint32_t* chunksToMerge, uint32_t mergeChunkCount, -00511 const NvcVec2i* adjChunks, uint32_t adjChunksSize, -00512 bool removeOriginalChunks = false) = 0; -00513 -00519 virtual void fitUvToRect(float side, uint32_t chunkId) = 0; -00520 -00525 virtual void fitAllUvToRect(float side) = 0; -00526 }; -00527 -00528 } // namespace Blast -00529 } // namespace Nv -00530 -00531 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H +00495 virtual bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) = 0; +00496 +00510 virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize, +00511 const uint32_t* chunksToMerge, uint32_t mergeChunkCount, +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
  • -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 
    494  virtual bool deleteAllChildrenOfChunk(int32_t chunkId) = 0;
    495 
    509  virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
    510  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
    511  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
    512  bool removeOriginalChunks = false) = 0;
    513 
    519  virtual void fitUvToRect(float side, uint32_t chunkId) = 0;
    520 
    525  virtual void fitAllUvToRect(float side) = 0;
    526 };
    527 
    528 } // namespace Blast
    529 } // namespace Nv
    530 
    531 #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,
    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
    Definition: NvBlastExtAuthoringFractureTool.h:47
    Definition: NvBlastExtAuthoringFractureTool.h:179
    Definition: NvBlastExtAuthoringFractureTool.h:52
    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 44199dd..4bb26eb 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 @@ -195,7 +195,7 @@ 00369 00374 bool isMeshContainOpenEdges(const Mesh* input) override; 00375 -00376 bool deleteAllChildrenOfChunk(int32_t chunkId) override; +00376 bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) override; 00377 00378 void uniteChunks(uint32_t threshold, uint32_t targetClusterSize, 00379 const uint32_t* chunksToMerge, uint32_t mergeChunkCount, @@ -210,42 +210,41 @@ 00397 00398 00399 private: -00400 void eraseChunk(int32_t chunkId); -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 -00411 uint32_t createNewChunk(uint32_t parentId); +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 -00414 protected: -00418 float mScaleFactor; -00419 NvcVec3 mOffset; -00420 -00421 /* Chunk mesh wrappers */ -00422 std::vector<Triangulator*> mChunkPostprocessors; +00413 protected: +00417 float mScaleFactor; +00418 NvcVec3 mOffset; +00419 +00420 /* Chunk mesh wrappers */ +00421 std::vector<Triangulator*> mChunkPostprocessors; +00422 00423 -00424 -00425 -00426 int64_t mPlaneIndexerOffset; -00427 int32_t mChunkIdCounter; -00428 std::vector<ChunkInfo> mChunkData; -00429 -00430 bool mRemoveIslands; -00431 int32_t mInteriorMaterialId; -00432 }; -00433 -00434 void findCellBasePlanes(const std::vector<NvcVec3>& sites, std::vector<std::vector<int32_t> >& neighboors); -00435 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); -00436 -00437 } // namespace Blast -00438 } // namespace Nv +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 -00441 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOLIMPL_H +00440 #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 deleteAllChildrenOfChunk(int32_t chunkId) 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  void eraseChunk(int32_t chunkId);
    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 
    411  uint32_t createNewChunk(uint32_t parentId);
    412 
    413 
    414 protected:
    420 
    421  /* Chunk mesh wrappers */
    422  std::vector<Triangulator*> mChunkPostprocessors;
    423 
    424 
    425 
    428  std::vector<ChunkInfo> mChunkData;
    429 
    432 };
    433 
    434 void findCellBasePlanes(const std::vector<NvcVec3>& sites, std::vector<std::vector<int32_t> >& neighboors);
    435 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);
    436 
    437 } // namespace Blast
    438 } // namespace Nv
    439 
    440 
    441 #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 
    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
    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 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_fracture_tool_
    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:418
    +
    float mScaleFactor
    Definition: NvBlastExtAuthoringFractureToolImpl.h:417
    Definition: NvBlastExtAuthoringAccelerator.h:47
    Definition: NvBlastExtAuthoringFractureTool.h:79
    @@ -69,15 +69,15 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_fracture_tool_
    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:427
    +
    int32_t mChunkIdCounter
    Definition: NvBlastExtAuthoringFractureToolImpl.h:426
    Definition: NvCTypes.h:106
    const uint32_t kMaterialInteriorId
    Definition: NvBlastExtAuthoringTypes.h:42
    -
    std::vector< ChunkInfo > mChunkData
    Definition: NvBlastExtAuthoringFractureToolImpl.h:428
    -
    std::vector< Triangulator * > mChunkPostprocessors
    Definition: NvBlastExtAuthoringFractureToolImpl.h:422
    -
    NvcVec3 mOffset
    Definition: NvBlastExtAuthoringFractureToolImpl.h:419
    +
    std::vector< ChunkInfo > mChunkData
    Definition: NvBlastExtAuthoringFractureToolImpl.h:427
    +
    std::vector< Triangulator * > mChunkPostprocessors
    Definition: NvBlastExtAuthoringFractureToolImpl.h:421
    +
    NvcVec3 mOffset
    Definition: NvBlastExtAuthoringFractureToolImpl.h:418
    Definition: NvBlastExtAuthoringFractureTool.h:133
    Definition: NvBlastExtAuthoringTypes.h:79
    -
    int32_t mInteriorMaterialId
    Definition: NvBlastExtAuthoringFractureToolImpl.h:431
    +
    int32_t mInteriorMaterialId
    Definition: NvBlastExtAuthoringFractureToolImpl.h:430
    Definition: NvBlastExtAuthoringFractureToolImpl.h:48
    Definition: NvBlastExtAuthoringFractureToolImpl.h:146
    @@ -90,9 +90,9 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_fracture_tool_
    Definition: NvCTypes.h:49
    void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) override
    -
    int64_t mPlaneIndexerOffset
    Definition: NvBlastExtAuthoringFractureToolImpl.h:426
    +
    int64_t mPlaneIndexerOffset
    Definition: NvBlastExtAuthoringFractureToolImpl.h:425
    Definition: NvCTypes.h:61
    -
    bool mRemoveIslands
    Definition: NvBlastExtAuthoringFractureToolImpl.h:430
    +
    bool mRemoveIslands
    Definition: NvBlastExtAuthoringFractureToolImpl.h:429
    diff --git a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool-members.html b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool-members.html index 487ab3d..52dcf12 100755 --- a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool-members.html +++ b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool-members.html @@ -44,7 +44,7 @@ createChunkMesh(int32_t chunkId)=0Nv::Blast::FractureTool [pure virtual] cut(uint32_t chunkId, const NvcVec3 &normal, const NvcVec3 &position, const NoiseConfiguration &noise, bool replaceChunk, RandomGeneratorBase *rnd)=0Nv::Blast::FractureTool [pure virtual] cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase *rnd)=0Nv::Blast::FractureTool [pure virtual] - deleteAllChildrenOfChunk(int32_t chunkId)=0Nv::Blast::FractureTool [pure virtual] + deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot=false)=0Nv::Blast::FractureTool [pure virtual] finalizeFracturing()=0Nv::Blast::FractureTool [pure virtual] fitAllUvToRect(float side)=0Nv::Blast::FractureTool [pure virtual] fitUvToRect(float side, uint32_t chunkId)=0Nv::Blast::FractureTool [pure virtual] diff --git a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool.html b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool.html index f7a110a..6dc496c 100755 --- a/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool.html +++ b/docs/source_docs/files/class_nv_1_1_blast_1_1_fracture_tool.html @@ -64,7 +64,7 @@ Inheritance diagram for Nv::Blast::FractureTool: virtual int32_t cutout (uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase *rnd)=0 -virtual bool deleteAllChildrenOfChunk (int32_t chunkId)=0 +virtual bool deleteChunkSubhierarchy (int32_t chunkId, bool deleteRoot=false)=0 virtual void finalizeFracturing ()=0 @@ -287,17 +287,26 @@ Cut chunk with plane.
    Parameters:

    - +

    - + - - - + + + + + + + + + + + +
    virtual bool Nv::Blast::FractureTool::deleteAllChildrenOfChunk virtual bool Nv::Blast::FractureTool::deleteChunkSubhierarchy ( int32_t  chunkId  )  [pure virtual] chunkId,
    bool  deleteRoot = false 
    ) [pure virtual]
    @@ -307,11 +316,12 @@ Cut chunk with plane.
    Parameters:
    Delete all children for specified chunk (also recursively delete chidren of children).
    Parameters:
    +
    [in] chunkId Chunk ID which children should be deleted
    [in] deleteRoot (optional) If true, deletes the given chunk too
    Returns:
    true if one or more chunks were removed
    -

    Implemented in Nv::Blast::FractureToolImpl.

    +

    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 8ade1d9..b4a1a8f 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 @@ -4,7 +4,7 @@ var class_nv_1_1_blast_1_1_fracture_tool = [ "createChunkMesh", "class_nv_1_1_blast_1_1_fracture_tool.html#a04bb5dd940274a9c8b097cc9f06d0708", null ], [ "cut", "class_nv_1_1_blast_1_1_fracture_tool.html#a559c822041e74f034613b3afa4ad8a17", null ], [ "cutout", "class_nv_1_1_blast_1_1_fracture_tool.html#a247f0e36c015237002dc87675562289b", null ], - [ "deleteAllChildrenOfChunk", "class_nv_1_1_blast_1_1_fracture_tool.html#aeaa46bf5fe4fe7035ac624f49ade64a8", null ], + [ "deleteChunkSubhierarchy", "class_nv_1_1_blast_1_1_fracture_tool.html#aec74731e5a147120f0536b6674fc0f42", null ], [ "finalizeFracturing", "class_nv_1_1_blast_1_1_fracture_tool.html#a8830959a8f7e4babc1983ea31c61ef5d", null ], [ "fitAllUvToRect", "class_nv_1_1_blast_1_1_fracture_tool.html#aa9a87637d6d190d71678f0fb9a100bfd", null ], [ "fitUvToRect", "class_nv_1_1_blast_1_1_fracture_tool.html#adb1c311cbb3d84c7bfbfd12abe01af0b", 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 7caf780..5834f88 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 @@ -44,7 +44,7 @@ createChunkMesh(int32_t chunkId) overrideNv::Blast::FractureToolImpl [virtual] cut(uint32_t chunkId, const NvcVec3 &normal, const NvcVec3 &position, const NoiseConfiguration &noise, bool replaceChunk, RandomGeneratorBase *rnd) overrideNv::Blast::FractureToolImpl [virtual] cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase *rnd) overrideNv::Blast::FractureToolImpl [virtual] - deleteAllChildrenOfChunk(int32_t chunkId) overrideNv::Blast::FractureToolImpl [virtual] + deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot=false) overrideNv::Blast::FractureToolImpl [virtual] finalizeFracturing() overrideNv::Blast::FractureToolImpl [virtual] fitAllUvToRect(float side) overrideNv::Blast::FractureToolImpl [virtual] fitUvToRect(float side, uint32_t chunkId) 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 d94a2f0..4ca24b9 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 @@ -64,7 +64,7 @@ Inheritance diagram for Nv::Blast::FractureToolImpl: int32_t cutout (uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase *rnd) override -bool deleteAllChildrenOfChunk (int32_t chunkId) override +bool deleteChunkSubhierarchy (int32_t chunkId, bool deleteRoot=false) override void finalizeFracturing () override @@ -325,17 +325,26 @@ Cut chunk with plane.

    Parameters:

    - +

    - + - - - + + + + + + + + + + + +
    bool Nv::Blast::FractureToolImpl::deleteAllChildrenOfChunk bool Nv::Blast::FractureToolImpl::deleteChunkSubhierarchy ( int32_t  chunkId  )  [override, virtual] chunkId,
    bool  deleteRoot = false 
    ) [override, virtual]
    @@ -345,11 +354,12 @@ Cut chunk with plane.
    Parameters:
    Delete all children for specified chunk (also recursively delete chidren of children).
    Parameters:
    +
    [in] chunkId Chunk ID which children should be deleted
    [in] deleteRoot (optional) If true, deletes the given chunk too
    Returns:
    true if one or more chunks were removed
    -

    Implements Nv::Blast::FractureTool.

    +

    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 1144221..3bba54a 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 @@ -5,7 +5,7 @@ var class_nv_1_1_blast_1_1_fracture_tool_impl = [ "createChunkMesh", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a7ffacc77ed102a8cd52c080055a08c3f", null ], [ "cut", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a4a1ab63d90ed2514038f299606583527", null ], [ "cutout", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a6c74f2ddd8b73705675767149c2ce69e", null ], - [ "deleteAllChildrenOfChunk", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#afe1100c6aa5907b10ae574d18152c5ac", null ], + [ "deleteChunkSubhierarchy", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a507e1b343d2d0fc38396ef5643f729f6", null ], [ "finalizeFracturing", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a9a93aab1c2f46963ae406964b639cb82", null ], [ "fitAllUvToRect", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a21dee486b1499f135740cac4a4d85af0", null ], [ "fitUvToRect", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a6cab6022e3cfb8bfc287428c507a9459", null ], diff --git a/docs/source_docs/files/functions_0x64.html b/docs/source_docs/files/functions_0x64.html index fdd4148..e439cce 100755 --- a/docs/source_docs/files/functions_0x64.html +++ b/docs/source_docs/files/functions_0x64.html @@ -139,9 +139,9 @@ Here is a list of all class members with links to the classes they belong to: : Nv::Blast::ExtStressSolver

  • Delete() : VHACD::CircularList< T > -
  • deleteAllChildrenOfChunk() -: Nv::Blast::FractureTool -, Nv::Blast::FractureToolImpl +
  • deleteChunkSubhierarchy() +: Nv::Blast::FractureTool +, Nv::Blast::FractureToolImpl
  • deletedActor : NvBlastActorSplitEvent
  • deleteInSphere() diff --git a/docs/source_docs/files/functions_0x69.html b/docs/source_docs/files/functions_0x69.html index 85e4bcd..d75f6f7 100755 --- a/docs/source_docs/files/functions_0x69.html +++ b/docs/source_docs/files/functions_0x69.html @@ -229,10 +229,10 @@ Here is a list of all class members with links to the classes they belong to: : Nv::Blast::ExtTaskSync
  • isDouble() : FLOAT_MATH::fm_VertexIndex -
  • isEmpty() -: Nv::Blast::DList
  • IsEmpty() : VHACD::CircularList< T > +
  • isEmpty() +: Nv::Blast::DList
  • IsFlat() : VHACD::ICHull
  • IsInside() diff --git a/docs/source_docs/files/functions_0x70.html b/docs/source_docs/files/functions_0x70.html index ab2bfec..eff21f9 100755 --- a/docs/source_docs/files/functions_0x70.html +++ b/docs/source_docs/files/functions_0x70.html @@ -91,11 +91,11 @@ Here is a list of all class members with links to the classes they belong to: , NvcTransform
  • Parameters() : VHACD::IVHACD::IVHACD::Parameters -
  • Parent -: Nv::Blast::Asset::Asset::ChunkAnnotation
  • parent : Nv::Blast::ChunkInfo , Nv::Blast::EdgeWithParent +
  • Parent +: Nv::Blast::Asset::Asset::ChunkAnnotation
  • parentChunkIndex : NvBlastChunkDesc , NvBlastChunk @@ -174,10 +174,10 @@ Here is a list of all class members with links to the classes they belong to: : Nv::Blast::Separation , Nv::Blast::PlaneChunkIndexer , Nv::Blast::HullPolygon -
  • point -: Nv::Blast::TriangulatorV2::TriangulatorV2::LinkedListElement
  • Point : Nv::Blast::DamagePattern +
  • point +: Nv::Blast::TriangulatorV2::TriangulatorV2::LinkedListElement
  • POINT2D() : Nv::Blast::POINT2D
  • pointer @@ -238,18 +238,19 @@ Here is a list of all class members with links to the classes they belong to: : Nv::Blast::TriangulatorV2::TriangulatorV2::LinkedListElement
  • Print() : VHACD::TMMesh +
  • process() +: Nv::Blast::final
  • Process() : VHACD::ICHull
  • process() -: Nv::Blast::ExtGroupTaskManager -, Nv::Blast::final +: Nv::Blast::TkGroupWorker +, Nv::Blast::final +, Nv::Blast::ExtGroupTaskManager +, Nv::Blast::ExtGroupTaskManagerImpl
  • Process() : VHACD::ICHull
  • process() -: Nv::Blast::TkGroupWorker -, Nv::Blast::TkGroup -, Nv::Blast::ExtGroupTaskManagerImpl -, Nv::Blast::final +: Nv::Blast::TkGroup
  • processedActorsCount : Nv::Blast::TkGroupStats
  • processMesh() @@ -266,11 +267,10 @@ Here is a list of all class members with links to the classes they belong to:
  • push_back() : btAlignedObjectArray< T >
  • pushBack() -: Nv::Blast::FixedQueue< T > +: Nv::Blast::FixedArray< T > +, Nv::Blast::FixedQueue< T >
  • PushBack() : VHACD::SArray< T, N > -
  • pushBack() -: Nv::Blast::FixedArray< T >
  • pxAsset : Nv::Blast::ExtPxFamilyDesc
  • pxChunks diff --git a/docs/source_docs/files/functions_0x72.html b/docs/source_docs/files/functions_0x72.html index 93e6f8a..60db7b8 100755 --- a/docs/source_docs/files/functions_0x72.html +++ b/docs/source_docs/files/functions_0x72.html @@ -176,11 +176,10 @@ Here is a list of all class members with links to the classes they belong to: : Nv::Blast::ExtSerializationInternal
  • reinitialize() : Nv::Blast::TkFamily +
  • Release() +: VHACD::VHACD
  • release() -: Nv::Blast::SharedBuffer< T > -, Nv::Blast::ExtSerializer -, NvBlastExtDamageAccelerator -, Nv::Blast::final +: Nv::Blast::final , Nv::Blast::ExtStressSolver , Nv::Blast::Actor , Nv::Blast::TkFramework @@ -189,35 +188,35 @@ Here is a list of all class members with links to the classes they belong to: , Nv::Blast::TkFrameworkImpl , Nv::Blast::TkJointImpl , Nv::Blast::SharedBlock< T > -, Nv::Blast::ExtSerialization +, Nv::Blast::SharedBuffer< T > , Nv::Blast::SharedMemory +, NvBlastExtDamageAccelerator
  • Release() -: VHACD::VHACD -, VHACD::IVHACD +: VHACD::IVHACD
  • release() -: Nv::Blast::TriangulatorV2 -, Nv::Blast::BlastBondGenerator +: Nv::Blast::BlastBondGenerator , Nv::Blast::CutoutSet +, Nv::Blast::FractureRTImpl , Nv::Blast::VoronoiSitesGenerator -, Nv::Blast::MeshGenerator , Nv::Blast::FractureTool , Nv::Blast::MeshCleaner +, Nv::Blast::ChunkGraph , Nv::Blast::BlastBondGeneratorImpl , Nv::Blast::CutoutSetImpl , Nv::Blast::VoronoiSitesGeneratorImpl , Nv::Blast::FractureToolImpl , Nv::Blast::MeshCleanerImpl -, Nv::Blast::ExtPxCollisionBuilderImpl , Nv::Blast::PatternGeneratorImpl , VHACD::RaycastMesh +, Nv::Blast::final , Nv::Blast::ConvexMeshBuilder -, Nv::Blast::ExtSyncEvent , Nv::Blast::Mesh , Nv::Blast::DamagePattern +, Nv::Blast::final , Nv::Blast::PatternGenerator -, Nv::Blast::ExtPxFamily , Nv::Blast::MeshImpl , Nv::Blast::IMeshFileReader +, Nv::Blast::ExtPxStressSolver , Nv::Blast::IMeshFileWriter , Nv::Blast::IJsonCollisionExporter , Nv::Blast::FbxFileReader @@ -226,21 +225,26 @@ Here is a list of all class members with links to the classes they belong to: , Nv::Blast::ObjFileWriter , Nv::Blast::ExtImpactDamageManager , Nv::Blast::ExtPxAsset +, Nv::Blast::ExtPxFamily , Nv::Blast::ExtPxManager -, Nv::Blast::ExtPxStressSolver , Nv::Blast::ExtGroupTaskManager +, Nv::Blast::ExtSyncEvent , Nv::Blast::ExtSync -, Nv::Blast::final +, Nv::Blast::final +, Nv::Blast::ExtPxCollisionBuilderImpl +, Nv::Blast::final , Nv::Blast::ExtGroupWorkerTask , Nv::Blast::ExtGroupTaskManagerImpl , Nv::Blast::BooleanToolOutputData , Nv::Blast::Fracturer +, Nv::Blast::MeshGenerator , Nv::Blast::FractureRT -, Nv::Blast::ChunkGraph , Nv::Blast::BooleanToolV2 +, Nv::Blast::TriangulatorV2 , Nv::Blast::BooleanToolOutputDataImpl -, Nv::Blast::FractureRTImpl , Nv::Blast::FractureRTMultithreadedImpl +, Nv::Blast::ExtSerialization +, Nv::Blast::ExtSerializer
  • releaseCollisionHull() : Nv::Blast::ConvexMeshBuilder , Nv::Blast::ExtPxCollisionBuilderImpl @@ -320,10 +324,10 @@ Here is a list of all class members with links to the classes they belong to:
  • resetEdges() : Nv::Blast::BooleanToolOutputDataImpl , Nv::Blast::BooleanToolOutputData -
  • Resize() -: VHACD::SArray< T, N >
  • resize() : btAlignedObjectArray< T > +
  • Resize() +: VHACD::SArray< T, N >
  • ResizePoints() : VHACD::Mesh
  • ResizeTriangles() diff --git a/docs/source_docs/files/functions_0x73.html b/docs/source_docs/files/functions_0x73.html index caa0e60..89fac2d 100755 --- a/docs/source_docs/files/functions_0x73.html +++ b/docs/source_docs/files/functions_0x73.html @@ -333,14 +333,15 @@ Here is a list of all class members with links to the classes they belong to: : Nv::Blast::SimplexNoise
  • simulationFilterData : Nv::Blast::ExtPxShapeDescTemplate +
  • size +: NvBlastDataBlock +, Nv::Blast::FixedPriorityQueue< Element, Comparator >
  • Size() : VHACD::SArray< T, N >
  • size() -: Nv::Blast::FixedArray< T > +: Nv::Blast::FixedQueue< T > +, Nv::Blast::FixedArray< T > , btAlignedObjectArray< T > -, Nv::Blast::FixedPriorityQueue< Element, Comparator > -, NvBlastDataBlock -, Nv::Blast::FixedQueue< T >
  • skipObject() : Nv::Blast::ExtSerialization
  • slicing() @@ -398,10 +399,10 @@ Here is a list of all class members with links to the classes they belong to: , Nv::Blast::ExtPxFamily , Nv::Blast::ExtPxManager , Nv::Blast::final -
  • Subtype -: Nv::Blast::TkJointUpdateEvent
  • subtype : Nv::Blast::TkJointUpdateEvent +
  • Subtype +: Nv::Blast::TkJointUpdateEvent
  • SuperSupport : Nv::Blast::Asset::Asset::ChunkAnnotation
  • Support diff --git a/docs/source_docs/files/functions_0x74.html b/docs/source_docs/files/functions_0x74.html index 2abbf57..b3fc989 100755 --- a/docs/source_docs/files/functions_0x74.html +++ b/docs/source_docs/files/functions_0x74.html @@ -271,24 +271,24 @@ Here is a list of all class members with links to the classes they belong to: : VHACD::Mutex
  • tryRead() : Nv::Blast::ExtInputStream -
  • type -: Nv::Blast::ExtSyncEvent
  • Type -: NvBlastDataBlock -, Nv::Blast::TkEvent -, Nv::Blast::Serialization::NvBlastDataBlock +: Nv::Blast::Serialization::PxConvexMeshGeometry
  • type -: Nv::Blast::Array< T > +: Nv::Blast::HashMap< Key, Value, HashFn > +, Nv::Blast::HashSet< Key, HashFn > +, Nv::Blast::ExtSyncEvent
  • Type : NvBlastMessage
  • type -: Nv::Blast::TkEvent -, Nv::Blast::InlineArray< T, N > -, Nv::Blast::HashSet< Key, HashFn > +: Nv::Blast::InlineArray< T, N > +, Nv::Blast::Array< T >
  • Type -: Nv::Blast::Serialization::PxConvexMeshGeometry +: NvBlastDataBlock +, Nv::Blast::Serialization::NvBlastDataBlock
  • type -: Nv::Blast::HashMap< Key, Value, HashFn > +: Nv::Blast::TkEvent +
  • Type +: Nv::Blast::TkEvent
  • TypeCount : Nv::Blast::TkTypeIndex , Nv::Blast::TkEvent diff --git a/docs/source_docs/files/functions_0x75.html b/docs/source_docs/files/functions_0x75.html index e626215..2fd99e2 100755 --- a/docs/source_docs/files/functions_0x75.html +++ b/docs/source_docs/files/functions_0x75.html @@ -113,12 +113,12 @@ Here is a list of all class members with links to the classes they belong to: , Nv::Blast::ExtPxFamily , Nv::Blast::ExtPxManager , Nv::Blast::final +
  • Update() +: VHACD::IVHACD::IVHACD::IUserCallback
  • update() : Nv::Blast::ExtPxStressSolver , Nv::Blast::final , Nv::Blast::ExtStressSolver -
  • Update() -: VHACD::IVHACD::IVHACD::IUserCallback
  • updateBaseMesh() : Nv::Blast::FractureTool , Nv::Blast::FractureToolImpl diff --git a/docs/source_docs/files/functions_0x78.html b/docs/source_docs/files/functions_0x78.html index 79e4b15..4d317da 100755 --- a/docs/source_docs/files/functions_0x78.html +++ b/docs/source_docs/files/functions_0x78.html @@ -86,20 +86,23 @@ Here is a list of all class members with links to the classes they belong to:

    - x -

    diff --git a/docs/source_docs/files/functions_0x79.html b/docs/source_docs/files/functions_0x79.html index 5e86a8d..71e2468 100755 --- a/docs/source_docs/files/functions_0x79.html +++ b/docs/source_docs/files/functions_0x79.html @@ -86,23 +86,20 @@ Here is a list of all class members with links to the classes they belong to:

    - y -

    diff --git a/docs/source_docs/files/functions_0x7a.html b/docs/source_docs/files/functions_0x7a.html index b2c6ac5..1790977 100755 --- a/docs/source_docs/files/functions_0x7a.html +++ b/docs/source_docs/files/functions_0x7a.html @@ -86,15 +86,18 @@ Here is a list of all class members with links to the classes they belong to:

    - z -

    diff --git a/docs/source_docs/files/functions_type.html b/docs/source_docs/files/functions_type.html index 49393de..7559434 100755 --- a/docs/source_docs/files/functions_type.html +++ b/docs/source_docs/files/functions_type.html @@ -141,15 +141,15 @@ : btAlignedAllocator< T, Alignment >

    - t -

    - v -

    • value_type diff --git a/docs/source_docs/files/functions_x.html b/docs/source_docs/files/functions_x.html index 81f757b..5f0f4f4 100755 --- a/docs/source_docs/files/functions_x.html +++ b/docs/source_docs/files/functions_x.html @@ -57,8 +57,8 @@ $(document).ready(function(){initNavTree('functions_x.html','');}); , NvcVec4i
    • X() -: VHACD::Vec2< T > -, VHACD::Vec3< T > +: VHACD::Vec2< T > +, VHACD::Vec3< T >
    • x_slices : Nv::Blast::SlicingConfiguration diff --git a/docs/source_docs/files/functions_y.html b/docs/source_docs/files/functions_y.html index 648150e..43c97ae 100755 --- a/docs/source_docs/files/functions_y.html +++ b/docs/source_docs/files/functions_y.html @@ -57,8 +57,8 @@ $(document).ready(function(){initNavTree('functions_y.html','');}); , NvcVec4i
    • Y() -: VHACD::Vec2< T > -, VHACD::Vec3< T > +: VHACD::Vec2< T > +, VHACD::Vec3< T >
    • y_slices : Nv::Blast::SlicingConfiguration diff --git a/docs/source_docs/files/navtreeindex15.js b/docs/source_docs/files/navtreeindex15.js index 3b876c7..91b8048 100755 --- a/docs/source_docs/files/navtreeindex15.js +++ b/docs/source_docs/files/navtreeindex15.js @@ -150,8 +150,8 @@ var NAVTREEINDEX15 = "group__foundation.html#ga4986f9a9ce04c5584456e72fd08b954d":[4,0,0,3,0,4,70], "group__foundation.html#ga4c0c4cd5144f3366fc6e6a2c30a68c37":[4,0,0,3,0,4,52], "group__foundation.html#ga4c0c4cd5144f3366fc6e6a2c30a68c37":[1,0,53], -"group__foundation.html#ga5186e106b0627ce43b3ed7c6bea75252":[1,0,20], "group__foundation.html#ga5186e106b0627ce43b3ed7c6bea75252":[4,0,0,3,0,4,19], +"group__foundation.html#ga5186e106b0627ce43b3ed7c6bea75252":[1,0,20], "group__foundation.html#ga57eadff0b64e7b4886a481d0539d6096":[4,0,0,3,0,4,34], "group__foundation.html#ga57eadff0b64e7b4886a481d0539d6096":[1,0,35], "group__foundation.html#ga581f7937204f23d8f9603643bd847caa":[4,0,0,3,0,4,68], diff --git a/docs/source_docs/files/navtreeindex7.js b/docs/source_docs/files/navtreeindex7.js index 003e76a..d6dd15b 100755 --- a/docs/source_docs/files/navtreeindex7.js +++ b/docs/source_docs/files/navtreeindex7.js @@ -78,7 +78,7 @@ var NAVTREEINDEX7 = "class_nv_1_1_blast_1_1_fracture_tool.html#adc4037818bdb9424fe0543b59c1e2eac":[3,0,2,0,119,17], "class_nv_1_1_blast_1_1_fracture_tool.html#ae4bd5dab498f9e894c648d570c5b60ba":[3,0,2,0,119,29], "class_nv_1_1_blast_1_1_fracture_tool.html#aea8f1d386c70af0ea67bed2c353e57a1":[3,0,2,0,119,8], -"class_nv_1_1_blast_1_1_fracture_tool.html#aeaa46bf5fe4fe7035ac624f49ade64a8":[3,0,2,0,119,4], +"class_nv_1_1_blast_1_1_fracture_tool.html#aec74731e5a147120f0536b6674fc0f42":[3,0,2,0,119,4], "class_nv_1_1_blast_1_1_fracture_tool.html#aecd9be996bba9329418fd91db8235ebe":[3,0,2,0,119,24], "class_nv_1_1_blast_1_1_fracture_tool.html#af07eb7960687cd912df496640bec8876":[3,0,2,0,119,10], "class_nv_1_1_blast_1_1_fracture_tool_impl.html":[3,0,2,0,120], @@ -99,6 +99,7 @@ var NAVTREEINDEX7 = "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a4ae30e1bda20f7f0a8b21d6dbd13a771":[3,0,2,0,120,17], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a4cf6af831497dbaf9db34ba4529f418d":[3,0,2,0,120,1], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a4e51dd47edda8a9e7de8df2354b451e3":[3,0,2,0,120,18], +"class_nv_1_1_blast_1_1_fracture_tool_impl.html#a507e1b343d2d0fc38396ef5643f729f6":[3,0,2,0,120,5], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a516359070dc5bf6cd0770d3e33b8c8d1":[3,0,2,0,120,34], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a5904628e466fa8cbb5016b08fb7708b8":[3,0,2,0,120,12], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a5e5a23242da3d034f64335dd1739e551":[3,0,2,0,120,9], @@ -123,7 +124,6 @@ var NAVTREEINDEX7 = "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ac9c8e18748b18fa6dd29a328eaf63026":[3,0,2,0,120,26], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ae9fdc3a9dd7eefe632a24c7abb6c4962":[3,0,2,0,120,37], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#af0d34972494741fc4c4b2bfe1eb801ad":[3,0,2,0,120,32], -"class_nv_1_1_blast_1_1_fracture_tool_impl.html#afe1100c6aa5907b10ae574d18152c5ac":[3,0,2,0,120,5], "class_nv_1_1_blast_1_1_fracturer.html":[3,0,2,0,115], "class_nv_1_1_blast_1_1_fracturer.html#a42fb6822d70b337eaef4470165db1ddb":[3,0,2,0,115,0], "class_nv_1_1_blast_1_1_grid.html":[3,0,2,0,121], diff --git a/sdk/extensions/authoring/include/NvBlastExtAuthoringFractureTool.h b/sdk/extensions/authoring/include/NvBlastExtAuthoringFractureTool.h index 8f9e3bb..55b15f5 100755 --- a/sdk/extensions/authoring/include/NvBlastExtAuthoringFractureTool.h +++ b/sdk/extensions/authoring/include/NvBlastExtAuthoringFractureTool.h @@ -486,12 +486,13 @@ class FractureTool */ virtual bool isMeshContainOpenEdges(const Mesh* input) = 0; - /** + /** Delete all children for specified chunk (also recursively delete chidren of children). \param[in] chunkId Chunk ID which children should be deleted + \param[in] deleteRoot (optional) If true, deletes the given chunk too \return true if one or more chunks were removed */ - virtual bool deleteAllChildrenOfChunk(int32_t chunkId) = 0; + virtual bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) = 0; /** Optimize chunk hierarhy for better runtime performance. diff --git a/sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.cpp b/sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.cpp index 54d83a7..e4cc86f 100755 --- a/sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.cpp +++ b/sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.cpp @@ -423,7 +423,7 @@ FractureToolImpl::voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const } if (!mChunkData[chunkIndex].isLeaf) { - deleteAllChildrenOfChunk(chunkId); + deleteChunkSubhierarchy(chunkId); } chunkIndex = getChunkIndex(chunkId); @@ -476,7 +476,7 @@ FractureToolImpl::voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const mChunkData[chunkIndex].isLeaf = false; if (replaceChunk) { - eraseChunk(chunkId); + deleteChunkSubhierarchy(chunkId, true); } mPlaneIndexerOffset += static_cast(cellPoints.size() * cellPoints.size()); @@ -585,7 +585,7 @@ int32_t FractureToolImpl::voronoiFracturing(uint32_t chunkId, uint32_t cellCount } if (!mChunkData[chunkIndex].isLeaf) { - deleteAllChildrenOfChunk(chunkId); + deleteChunkSubhierarchy(chunkId); } chunkIndex = getChunkIndex(chunkId); @@ -654,7 +654,7 @@ int32_t FractureToolImpl::voronoiFracturing(uint32_t chunkId, uint32_t cellCount mChunkData[chunkIndex].isLeaf = false; if (replaceChunk) { - eraseChunk(chunkId); + deleteChunkSubhierarchy(chunkId, true); } mPlaneIndexerOffset += static_cast(cellPoints.size() * cellPoints.size()); @@ -689,7 +689,7 @@ int32_t FractureToolImpl::slicing(uint32_t chunkId, const SlicingConfiguration& } if (!mChunkData[chunkIndex].isLeaf) { - deleteAllChildrenOfChunk(chunkId); + deleteChunkSubhierarchy(chunkId); } chunkIndex = getChunkIndex(chunkId); @@ -850,7 +850,7 @@ int32_t FractureToolImpl::slicing(uint32_t chunkId, const SlicingConfiguration& mChunkData[chunkIndex].isLeaf = false; if (replaceChunk) { - eraseChunk(chunkId); + deleteChunkSubhierarchy(chunkId, true); } if (mRemoveIslands) @@ -879,7 +879,7 @@ int32_t FractureToolImpl::slicingNoisy(uint32_t chunkId, const SlicingConfigurat } if (!mChunkData[chunkIndex].isLeaf) { - deleteAllChildrenOfChunk(chunkId); + deleteChunkSubhierarchy(chunkId); } chunkIndex = getChunkIndex(chunkId); @@ -1061,7 +1061,7 @@ int32_t FractureToolImpl::slicingNoisy(uint32_t chunkId, const SlicingConfigurat mChunkData[chunkIndex].isLeaf = false; if (replaceChunk) { - eraseChunk(chunkId); + deleteChunkSubhierarchy(chunkId, true); } if (mRemoveIslands) @@ -1089,7 +1089,7 @@ int32_t FractureToolImpl::cut(uint32_t chunkId, const NvcVec3& normal, const Nvc } if (!mChunkData[chunkIndex].isLeaf) { - deleteAllChildrenOfChunk(chunkId); + deleteChunkSubhierarchy(chunkId); } chunkIndex = getChunkIndex(chunkId); @@ -1130,7 +1130,7 @@ int32_t FractureToolImpl::cut(uint32_t chunkId, const NvcVec3& normal, const Nvc if (!mChunkData[chunkIndex].isLeaf) { - deleteAllChildrenOfChunk(chunkId); + deleteChunkSubhierarchy(chunkId); } chunkIndex = getChunkIndex(chunkId); @@ -1151,7 +1151,7 @@ int32_t FractureToolImpl::cut(uint32_t chunkId, const NvcVec3& normal, const Nvc mChunkData[chunkIndex].isLeaf = false; if (replaceChunk) { - eraseChunk(chunkId); + deleteChunkSubhierarchy(chunkId, true); } if (mRemoveIslands && firstChunkId >= 0) @@ -1196,7 +1196,7 @@ int32_t FractureToolImpl::cutout(uint32_t chunkId, CutoutConfiguration conf, boo } if (!mChunkData[chunkIndex].isLeaf) { - deleteAllChildrenOfChunk(chunkId); + deleteChunkSubhierarchy(chunkId); } chunkIndex = getChunkIndex(chunkId); Nv::Blast::CutoutSet& cutoutSet = *conf.cutoutSet; @@ -1391,7 +1391,7 @@ int32_t FractureToolImpl::cutout(uint32_t chunkId, CutoutConfiguration conf, boo mChunkData[chunkIndex].isLeaf = false; if (replaceChunk) { - eraseChunk(chunkId); + deleteChunkSubhierarchy(chunkId, true); } if (mRemoveIslands) @@ -1611,25 +1611,12 @@ bool FractureToolImpl::isAncestorForChunk(int32_t ancestorId, int32_t chunkId) return false; } -void FractureToolImpl::eraseChunk(int32_t chunkId) -{ - deleteAllChildrenOfChunk(chunkId); - int32_t index = getChunkIndex(chunkId); - if (index != -1) - { - delete mChunkData[index].meshData; - std::swap(mChunkData.back(), mChunkData[index]); - mChunkData.pop_back(); - } -} - - -bool FractureToolImpl::deleteAllChildrenOfChunk(int32_t chunkId) +bool FractureToolImpl::deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot /*= false*/) { std::vector chunkToDelete; for (uint32_t i = 0; i < mChunkData.size(); ++i) { - if (isAncestorForChunk(chunkId, mChunkData[i].chunkId)) + if (isAncestorForChunk(chunkId, mChunkData[i].chunkId) || (deleteRoot && chunkId == mChunkData[i].chunkId)) { chunkToDelete.push_back(i); } @@ -2002,7 +1989,7 @@ int32_t FractureToolImpl::islandDetectionAndRemoving(int32_t chunkId, bool creat else { mChunkData[chunkIndex].isLeaf = false; - deleteAllChildrenOfChunk(chunkId); + deleteChunkSubhierarchy(chunkId); for (int32_t i = 0; i < cComp; ++i) { uint32_t nc = createNewChunk(chunkId); @@ -2449,7 +2436,7 @@ void FractureToolImpl::uniteChunks(uint32_t threshold, uint32_t targetClusterSiz break; } treeWalk.push_back(walkIndex); - } while ((walkIndex = mChunkData[walkIndex].parent) >= 0); + } while ((walkIndex = getChunkIndex(mChunkData[walkIndex].parent)) >= 0); } } @@ -2571,13 +2558,13 @@ void FractureToolImpl::uniteChunks(uint32_t threshold, uint32_t targetClusterSiz mChunkData.resize(chunkWriteIndex); for (ChunkInfo& chunkInfo : mChunkData) { - if (chunkInfo.parent > 0) + if (chunkInfo.parent >= 0) { - const uint32_t mappedParent = remap[chunkInfo.parent]; - NVBLAST_ASSERT(mappedParent < mChunkData.size()); - if (mappedParent < mChunkData.size()) + const uint32_t mappedParentIndex = remap[getChunkIndex(chunkInfo.parent)]; + NVBLAST_ASSERT(mappedParentIndex < mChunkData.size()); + if (mappedParentIndex < mChunkData.size()) { - chunkInfo.parent = mappedParent; + chunkInfo.parent = mChunkData[mappedParentIndex].chunkId; } } } diff --git a/sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.h b/sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.h index a8c59dc..9e4d41e 100755 --- a/sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.h +++ b/sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.h @@ -373,7 +373,7 @@ public: */ bool isMeshContainOpenEdges(const Mesh* input) override; - bool deleteAllChildrenOfChunk(int32_t chunkId) override; + bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) override; void uniteChunks(uint32_t threshold, uint32_t targetClusterSize, const uint32_t* chunksToMerge, uint32_t mergeChunkCount, @@ -397,7 +397,6 @@ public: private: - void eraseChunk(int32_t chunkId); bool isAncestorForChunk(int32_t ancestorId, int32_t chunkId); int32_t slicingNoisy(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd); uint32_t stretchGroup(const std::vector& group, std::vector>& graph); -- cgit v1.2.3