From d9bdbd6020285b81adf98e23c205993e71af6e3f Mon Sep 17 00:00:00 2001 From: Bryan Galdrikian Date: Mon, 10 Jun 2019 14:37:48 -0700 Subject: Hierarchy optimization bugfixes and improvements Takes a selection set and only merges those chunks --- ...last_ext_authoring_fracture_tool_8h-source.html | 25 +++--- ...last_ext_authoring_fracture_tool_8h_source.html | 2 +- ...ext_authoring_fracture_tool_impl_8h-source.html | 94 +++++++++++----------- ...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 | 29 +++++-- .../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 | 29 +++++-- .../class_nv_1_1_blast_1_1_fracture_tool_impl.js | 2 +- docs/source_docs/files/functions_0x75.html | 4 +- docs/source_docs/files/functions_func_0x75.html | 4 +- docs/source_docs/files/functions_func_u.html | 4 +- docs/source_docs/files/functions_u.html | 4 +- docs/source_docs/files/navtreeindex7.js | 4 +- 15 files changed, 127 insertions(+), 98 deletions(-) (limited to 'docs/source_docs') 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 69c4330..267bbfa 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 @@ -257,19 +257,20 @@ 00488 00494 virtual bool deleteAllChildrenOfChunk(int32_t chunkId) = 0; 00495 -00507 virtual void uniteChunks(uint32_t maxAtLevel, uint32_t maxGroupSize, -00508 const NvcVec2i* adjChunks, uint32_t adjChunksSize, -00509 bool removeOriginalChunks = false) = 0; -00510 -00516 virtual void fitUvToRect(float side, uint32_t chunkId) = 0; -00517 -00522 virtual void fitAllUvToRect(float side) = 0; -00523 }; -00524 -00525 } // namespace Blast -00526 } // namespace Nv +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 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H +00528 } // namespace Blast +00529 } // namespace Nv +00530 +00531 #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 
507  virtual void uniteChunks(uint32_t maxAtLevel, uint32_t maxGroupSize,
508  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
509  bool removeOriginalChunks = false) = 0;
510 
516  virtual void fitUvToRect(float side, uint32_t chunkId) = 0;
517 
522  virtual void fitAllUvToRect(float side) = 0;
523 };
524 
525 } // namespace Blast
526 } // namespace Nv
527 
528 #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 
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
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 f0708ad..44199dd 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 @@ -197,53 +197,55 @@ 00375 00376 bool deleteAllChildrenOfChunk(int32_t chunkId) override; 00377 -00378 void uniteChunks(uint32_t maxAtLevel, uint32_t maxGroupSize, const NvcVec2i* adjChunks, uint32_t adjChunksSize, -00379 bool removeOriginalChunks = false) override; -00380 -00381 -00387 void fitUvToRect(float side, uint32_t chunkId) override; -00388 -00393 void fitAllUvToRect(float side) override; -00394 -00395 +00378 void uniteChunks(uint32_t threshold, uint32_t targetClusterSize, +00379 const uint32_t* chunksToMerge, uint32_t mergeChunkCount, +00380 const NvcVec2i* adjChunks, uint32_t adjChunksSize, +00381 bool removeOriginalChunks = false) override; +00382 +00383 +00389 void fitUvToRect(float side, uint32_t chunkId) override; +00390 +00395 void fitAllUvToRect(float side) override; 00396 -00397 private: -00398 void eraseChunk(int32_t chunkId); -00399 bool isAncestorForChunk(int32_t ancestorId, int32_t chunkId); -00400 int32_t slicingNoisy(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd); -00401 uint32_t stretchGroup(const std::vector<uint32_t>& group, std::vector<std::vector<uint32_t>>& graph); -00402 void rebuildAdjGraph(const std::vector<uint32_t>& chunksToRebuild, const NvcVec2i* adjChunks, uint32_t adjChunksSize, -00403 std::vector<std::vector<uint32_t> >& chunkGraph); -00404 void fitAllUvToRect(float side, std::set<uint32_t>& mask); -00405 -00409 uint32_t createNewChunk(uint32_t parentId); -00410 -00411 -00412 protected: -00416 float mScaleFactor; -00417 NvcVec3 mOffset; -00418 -00419 /* Chunk mesh wrappers */ -00420 std::vector<Triangulator*> mChunkPostprocessors; -00421 -00422 -00423 -00424 int64_t mPlaneIndexerOffset; -00425 int32_t mChunkIdCounter; -00426 std::vector<ChunkInfo> mChunkData; -00427 -00428 bool mRemoveIslands; -00429 int32_t mInteriorMaterialId; -00430 }; -00431 -00432 void findCellBasePlanes(const std::vector<NvcVec3>& sites, std::vector<std::vector<int32_t> >& neighboors); -00433 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); -00434 -00435 } // namespace Blast -00436 } // namespace Nv -00437 -00438 -00439 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOLIMPL_H +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); +00412 +00413 +00414 protected: +00418 float mScaleFactor; +00419 NvcVec3 mOffset; +00420 +00421 /* Chunk mesh wrappers */ +00422 std::vector<Triangulator*> mChunkPostprocessors; +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 +00439 +00440 +00441 #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 maxAtLevel, uint32_t maxGroupSize, const NvcVec2i* adjChunks, uint32_t adjChunksSize,
379  bool removeOriginalChunks = false) override;
380 
381 
387  void fitUvToRect(float side, uint32_t chunkId) override;
388 
393  void fitAllUvToRect(float side) override;
394 
395 
396 
397 private:
398  void eraseChunk(int32_t chunkId);
399  bool isAncestorForChunk(int32_t ancestorId, int32_t chunkId);
400  int32_t slicingNoisy(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd);
401  uint32_t stretchGroup(const std::vector<uint32_t>& group, std::vector<std::vector<uint32_t>>& graph);
402  void rebuildAdjGraph(const std::vector<uint32_t>& chunksToRebuild, const NvcVec2i* adjChunks, uint32_t adjChunksSize,
403  std::vector<std::vector<uint32_t> >& chunkGraph);
404  void fitAllUvToRect(float side, std::set<uint32_t>& mask);
405 
409  uint32_t createNewChunk(uint32_t parentId);
410 
411 
412 protected:
418 
419  /* Chunk mesh wrappers */
420  std::vector<Triangulator*> mChunkPostprocessors;
421 
422 
423 
426  std::vector<ChunkInfo> mChunkData;
427 
430 };
431 
432 void findCellBasePlanes(const std::vector<NvcVec3>& sites, std::vector<std::vector<int32_t> >& neighboors);
433 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);
434 
435 } // namespace Blast
436 } // namespace Nv
437 
438 
439 #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 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
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:416
+
float mScaleFactor
Definition: NvBlastExtAuthoringFractureToolImpl.h:418
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:425
+
int32_t mChunkIdCounter
Definition: NvBlastExtAuthoringFractureToolImpl.h:427
Definition: NvCTypes.h:106
const uint32_t kMaterialInteriorId
Definition: NvBlastExtAuthoringTypes.h:42
-
std::vector< ChunkInfo > mChunkData
Definition: NvBlastExtAuthoringFractureToolImpl.h:426
-
std::vector< Triangulator * > mChunkPostprocessors
Definition: NvBlastExtAuthoringFractureToolImpl.h:420
-
NvcVec3 mOffset
Definition: NvBlastExtAuthoringFractureToolImpl.h:417
+
std::vector< ChunkInfo > mChunkData
Definition: NvBlastExtAuthoringFractureToolImpl.h:428
+
std::vector< Triangulator * > mChunkPostprocessors
Definition: NvBlastExtAuthoringFractureToolImpl.h:422
+
NvcVec3 mOffset
Definition: NvBlastExtAuthoringFractureToolImpl.h:419
Definition: NvBlastExtAuthoringFractureTool.h:133
Definition: NvBlastExtAuthoringTypes.h:79
-
int32_t mInteriorMaterialId
Definition: NvBlastExtAuthoringFractureToolImpl.h:429
+
int32_t mInteriorMaterialId
Definition: NvBlastExtAuthoringFractureToolImpl.h:431
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:424
+
int64_t mPlaneIndexerOffset
Definition: NvBlastExtAuthoringFractureToolImpl.h:426
Definition: NvCTypes.h:61
-
bool mRemoveIslands
Definition: NvBlastExtAuthoringFractureToolImpl.h:428
+
bool mRemoveIslands
Definition: NvBlastExtAuthoringFractureToolImpl.h:430
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 cf0f4d2..487ab3d 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 @@ -69,7 +69,7 @@ setRemoveIslands(bool isRemoveIslands)=0Nv::Blast::FractureTool [pure virtual] setSourceMesh(const Mesh *mesh)=0Nv::Blast::FractureTool [pure virtual] slicing(uint32_t chunkId, const SlicingConfiguration &conf, bool replaceChunk, RandomGeneratorBase *rnd)=0Nv::Blast::FractureTool [pure virtual] - uniteChunks(uint32_t maxAtLevel, uint32_t maxGroupSize, const NvcVec2i *adjChunks, uint32_t adjChunksSize, bool removeOriginalChunks=false)=0Nv::Blast::FractureTool [pure virtual] + uniteChunks(uint32_t threshold, uint32_t targetClusterSize, const uint32_t *chunksToMerge, uint32_t mergeChunkCount, const NvcVec2i *adjChunks, uint32_t adjChunksSize, bool removeOriginalChunks=false)=0Nv::Blast::FractureTool [pure virtual] updateBaseMesh(int32_t chunkIndex, Triangle *output)=0Nv::Blast::FractureTool [pure virtual] voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3 *cellPoints, bool replaceChunk)=0Nv::Blast::FractureTool [pure virtual] voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3 *cellPoints, const NvcVec3 &scale, const NvcQuat &rotation, bool replaceChunk)=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 a73a96a..f7a110a 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 @@ -114,7 +114,7 @@ Inheritance diagram for Nv::Blast::FractureTool: virtual int32_t slicing (uint32_t chunkId, const SlicingConfiguration &conf, bool replaceChunk, RandomGeneratorBase *rnd)=0 -virtual void uniteChunks (uint32_t maxAtLevel, uint32_t maxGroupSize, const NvcVec2i *adjChunks, uint32_t adjChunksSize, bool removeOriginalChunks=false)=0 +virtual void uniteChunks (uint32_t threshold, uint32_t targetClusterSize, const uint32_t *chunksToMerge, uint32_t mergeChunkCount, const NvcVec2i *adjChunks, uint32_t adjChunksSize, bool removeOriginalChunks=false)=0 virtual uint32_t updateBaseMesh (int32_t chunkIndex, Triangle *output)=0 @@ -1025,7 +1025,7 @@ Fractures specified chunk with slicing method.
Parameters:

- +

@@ -1033,13 +1033,25 @@ Fractures specified chunk with slicing method.
Parameters:virtual void Nv::Blast::FractureTool::uniteChunks
- + - + + + + + + + + + + + + + @@ -1071,16 +1083,17 @@ Fractures specified chunk with slicing method.
Parameters: Optimize chunk hierarhy for better runtime performance. It tries to unite chunks to groups of some size in order to transform flat hierarchy (all chunks are children of single root) to tree like hieracrhy with limited number of children for each chunk.
Parameters:
( uint32_t  maxAtLevel, threshold,
uint32_t  maxGroupSize, targetClusterSize,
const uint32_t *  chunksToMerge,
uint32_t  mergeChunkCount,
- - - + + + +
[in] maxAtLevel If number of children of some chunk less then maxAtLevel then it would be considered as already optimized and skipped.
[in] maxGroupSize Max number of children for processed chunks.
[in] removeOriginalChunks. 
[in] threshold If number of children of some chunk less then maxAtLevel then it would be considered as already optimized and skipped.
[in] targetClusterSize Target number of children for processed chunks.
[in] chunksToMerge Which chunks are merge candidate. If NULL, all chunks will be a merge candidate.
[in] mergeChunkCount size of chunksToMerge array, if chunksToMerge != NULL.
[in] adjChunks Optional index pairs to describe chunk adjacency. May be NULL.
[in] adjChunksSize If 'adjChunks' is not NULL, the number of index pairs in the adjChunks array.
[in] removeOriginalChunks If true, original chunks that are merged are 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 49ed0fd..8ade1d9 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 @@ -29,7 +29,7 @@ var class_nv_1_1_blast_1_1_fracture_tool = [ "setRemoveIslands", "class_nv_1_1_blast_1_1_fracture_tool.html#a251738022e498b819e88536577470735", null ], [ "setSourceMesh", "class_nv_1_1_blast_1_1_fracture_tool.html#ac14c1ff1d50756694be24c34476af965", null ], [ "slicing", "class_nv_1_1_blast_1_1_fracture_tool.html#a45e8a5d3b6d98da1b44b6888a5054cce", null ], - [ "uniteChunks", "class_nv_1_1_blast_1_1_fracture_tool.html#ac0c886a68b51652184c126e965dc6209", null ], + [ "uniteChunks", "class_nv_1_1_blast_1_1_fracture_tool.html#ae4bd5dab498f9e894c648d570c5b60ba", null ], [ "updateBaseMesh", "class_nv_1_1_blast_1_1_fracture_tool.html#a384be45a1310ee0652d315127e62da22", null ], [ "voronoiFracturing", "class_nv_1_1_blast_1_1_fracture_tool.html#a4c3308b909153982aded9366f9d3ee7c", null ], [ "voronoiFracturing", "class_nv_1_1_blast_1_1_fracture_tool.html#a2d38fb6aac3c36d51d60dad428a43074", 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 b74f567..7caf780 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 @@ -78,7 +78,7 @@ setRemoveIslands(bool isRemoveIslands) overrideNv::Blast::FractureToolImpl [virtual] setSourceMesh(const Mesh *mesh) overrideNv::Blast::FractureToolImpl [virtual] slicing(uint32_t chunkId, const SlicingConfiguration &conf, bool replaceChunk, RandomGeneratorBase *rnd) overrideNv::Blast::FractureToolImpl [virtual] - uniteChunks(uint32_t maxAtLevel, uint32_t maxGroupSize, const NvcVec2i *adjChunks, uint32_t adjChunksSize, bool removeOriginalChunks=false) overrideNv::Blast::FractureToolImpl [virtual] + uniteChunks(uint32_t threshold, uint32_t targetClusterSize, const uint32_t *chunksToMerge, uint32_t mergeChunkCount, const NvcVec2i *adjChunks, uint32_t adjChunksSize, bool removeOriginalChunks=false) overrideNv::Blast::FractureToolImpl [virtual] updateBaseMesh(int32_t chunkIndex, Triangle *output) overrideNv::Blast::FractureToolImpl [virtual] voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3 *cellPoints, bool replaceChunk) overrideNv::Blast::FractureToolImpl [virtual] voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3 *cellPoints, const NvcVec3 &scale, const NvcQuat &rotation, bool replaceChunk) 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 7d948ad..d94a2f0 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 @@ -116,7 +116,7 @@ Inheritance diagram for Nv::Blast::FractureToolImpl: int32_t slicing (uint32_t chunkId, const SlicingConfiguration &conf, bool replaceChunk, RandomGeneratorBase *rnd) override -void uniteChunks (uint32_t maxAtLevel, uint32_t maxGroupSize, const NvcVec2i *adjChunks, uint32_t adjChunksSize, bool removeOriginalChunks=false) override +void uniteChunks (uint32_t threshold, uint32_t targetClusterSize, const uint32_t *chunksToMerge, uint32_t mergeChunkCount, const NvcVec2i *adjChunks, uint32_t adjChunksSize, bool removeOriginalChunks=false) override uint32_t updateBaseMesh (int32_t chunkIndex, Triangle *output) override @@ -1066,7 +1066,7 @@ Fractures specified chunk with slicing method.

Parameters:

- +

@@ -1074,13 +1074,25 @@ Fractures specified chunk with slicing method.
Parameters:void Nv::Blast::FractureToolImpl::uniteChunks
- + - + + + + + + + + + + + + + @@ -1112,16 +1124,17 @@ Fractures specified chunk with slicing method.
Parameters: Optimize chunk hierarhy for better runtime performance. It tries to unite chunks to groups of some size in order to transform flat hierarchy (all chunks are children of single root) to tree like hieracrhy with limited number of children for each chunk.
Parameters:
( uint32_t  maxAtLevel, threshold,
uint32_t  maxGroupSize, targetClusterSize,
const uint32_t *  chunksToMerge,
uint32_t  mergeChunkCount,
- - - + + + +
[in] maxAtLevel If number of children of some chunk less then maxAtLevel then it would be considered as already optimized and skipped.
[in] maxGroupSize Max number of children for processed chunks.
[in] removeOriginalChunks. 
[in] threshold If number of children of some chunk less then maxAtLevel then it would be considered as already optimized and skipped.
[in] targetClusterSize Target number of children for processed chunks.
[in] chunksToMerge Which chunks are merge candidate. If NULL, all chunks will be a merge candidate.
[in] mergeChunkCount size of chunksToMerge array, if chunksToMerge != NULL.
[in] adjChunks Optional index pairs to describe chunk adjacency. May be NULL.
[in] adjChunksSize If 'adjChunks' is not NULL, the number of index pairs in the adjChunks array.
[in] removeOriginalChunks If true, original chunks that are merged are 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 a7158fc..1144221 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 @@ -30,7 +30,7 @@ var class_nv_1_1_blast_1_1_fracture_tool_impl = [ "setRemoveIslands", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a92dec92822ab9e0807400a7d63bfc553", null ], [ "setSourceMesh", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a04d3620e1e76d15accb8a08039398680", null ], [ "slicing", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ac2b3addf8c9d4e4c81511c8b0071f031", null ], - [ "uniteChunks", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ac1c3a18e82a53972ea362acc1a0272f8", null ], + [ "uniteChunks", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a7be81de54f32a49d2f5885275c59bece", null ], [ "updateBaseMesh", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a0217eb658aa3890c3d1d2e030436b07b", null ], [ "voronoiFracturing", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#af0d34972494741fc4c4b2bfe1eb801ad", null ], [ "voronoiFracturing", "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ab0089baafc0bd7370c12602d7dd20440", null ], diff --git a/docs/source_docs/files/functions_0x75.html b/docs/source_docs/files/functions_0x75.html index 0eb6260..e626215 100755 --- a/docs/source_docs/files/functions_0x75.html +++ b/docs/source_docs/files/functions_0x75.html @@ -96,8 +96,8 @@ Here is a list of all class members with links to the classes they belong to:

  • Union() : Nv::Blast::BooleanToolV2::BooleanToolV2::Mode
  • uniteChunks() -: Nv::Blast::FractureTool -, Nv::Blast::FractureToolImpl +: Nv::Blast::FractureTool +, Nv::Blast::FractureToolImpl
  • Unlock() : VHACD::Mutex
  • Unreferenced diff --git a/docs/source_docs/files/functions_func_0x75.html b/docs/source_docs/files/functions_func_0x75.html index 0650d0b..6c1abe1 100755 --- a/docs/source_docs/files/functions_func_0x75.html +++ b/docs/source_docs/files/functions_func_0x75.html @@ -90,8 +90,8 @@
  • Union() : Nv::Blast::BooleanToolV2::BooleanToolV2::Mode
  • uniteChunks() -: Nv::Blast::FractureTool -, Nv::Blast::FractureToolImpl +: Nv::Blast::FractureTool +, Nv::Blast::FractureToolImpl
  • Unlock() : VHACD::Mutex
  • unregisterActor() diff --git a/docs/source_docs/files/functions_func_u.html b/docs/source_docs/files/functions_func_u.html index 29c52bc..cb1956d 100755 --- a/docs/source_docs/files/functions_func_u.html +++ b/docs/source_docs/files/functions_func_u.html @@ -53,8 +53,8 @@ $(document).ready(function(){initNavTree('functions_func_u.html','');}); : Nv::Blast::BooleanToolV2::Mode
  • uniteChunks() -: Nv::Blast::FractureTool -, Nv::Blast::FractureToolImpl +: Nv::Blast::FractureTool +, Nv::Blast::FractureToolImpl
  • Unlock() : VHACD::Mutex diff --git a/docs/source_docs/files/functions_u.html b/docs/source_docs/files/functions_u.html index f9d14e3..e9c071f 100755 --- a/docs/source_docs/files/functions_u.html +++ b/docs/source_docs/files/functions_u.html @@ -59,8 +59,8 @@ $(document).ready(function(){initNavTree('functions_u.html','');}); : Nv::Blast::BooleanToolV2::Mode
  • uniteChunks() -: Nv::Blast::FractureTool -, Nv::Blast::FractureToolImpl +: Nv::Blast::FractureTool +, Nv::Blast::FractureToolImpl
  • Unlock() : VHACD::Mutex diff --git a/docs/source_docs/files/navtreeindex7.js b/docs/source_docs/files/navtreeindex7.js index 196045f..003e76a 100755 --- a/docs/source_docs/files/navtreeindex7.js +++ b/docs/source_docs/files/navtreeindex7.js @@ -71,12 +71,12 @@ var NAVTREEINDEX7 = "class_nv_1_1_blast_1_1_fracture_tool.html#a9a113cc771fac30fd14a9c7b5b073e99":[3,0,2,0,119,14], "class_nv_1_1_blast_1_1_fracture_tool.html#aa9a87637d6d190d71678f0fb9a100bfd":[3,0,2,0,119,6], "class_nv_1_1_blast_1_1_fracture_tool.html#ab462c92fa47a5359bf3d19cf44af80f4":[3,0,2,0,119,23], -"class_nv_1_1_blast_1_1_fracture_tool.html#ac0c886a68b51652184c126e965dc6209":[3,0,2,0,119,29], "class_nv_1_1_blast_1_1_fracture_tool.html#ac14c1ff1d50756694be24c34476af965":[3,0,2,0,119,27], "class_nv_1_1_blast_1_1_fracture_tool.html#ac8c4f90133fdf32969cad6e4c520414f":[3,0,2,0,119,25], "class_nv_1_1_blast_1_1_fracture_tool.html#ac99cb91a13255929a52d9a2623ac207b":[3,0,2,0,119,11], "class_nv_1_1_blast_1_1_fracture_tool.html#adb1c311cbb3d84c7bfbfd12abe01af0b":[3,0,2,0,119,7], "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#aecd9be996bba9329418fd91db8235ebe":[3,0,2,0,119,24], @@ -107,6 +107,7 @@ var NAVTREEINDEX7 = "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a6cab6022e3cfb8bfc287428c507a9459":[3,0,2,0,120,8], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a7500f7cd8e670745e74ee83eed10c1ba":[3,0,2,0,120,13], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a77957e191451f94d3753e31695c37914":[3,0,2,0,120,35], +"class_nv_1_1_blast_1_1_fracture_tool_impl.html#a7be81de54f32a49d2f5885275c59bece":[3,0,2,0,120,30], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a7dcbf47203115afe634ca7b5af9bd56a":[3,0,2,0,120,19], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a7ffacc77ed102a8cd52c080055a08c3f":[3,0,2,0,120,2], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#a820e9829bb02425ae53e47eb6be0b1c3":[3,0,2,0,120,15], @@ -116,7 +117,6 @@ var NAVTREEINDEX7 = "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ab5cc06434628c2b5be10f755edcbe1da":[3,0,2,0,120,16], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#abcc6a73e16008d488bbf81623ec5a33e":[3,0,2,0,120,40], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#abe1f6bf365964825a2c939e22c85d96a":[3,0,2,0,120,23], -"class_nv_1_1_blast_1_1_fracture_tool_impl.html#ac1c3a18e82a53972ea362acc1a0272f8":[3,0,2,0,120,30], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ac2202d728cefb26446a60593b03dcbe1":[3,0,2,0,120,36], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ac2b3addf8c9d4e4c81511c8b0071f031":[3,0,2,0,120,29], "class_nv_1_1_blast_1_1_fracture_tool_impl.html#ac466495627ca99252433c7e1c702c7f9":[3,0,2,0,120,25], -- cgit v1.2.3