From d61c455a4775f966b44cc47804b9e0f160d3d332 Mon Sep 17 00:00:00 2001 From: bgaldrikian Date: Tue, 10 Nov 2020 20:53:31 -0800 Subject: Merge request #17 PhysX4 compatibility Other changes for linux and UE4CrossCompileLinux, and all packaging to work --- docs/api_docs/files/_nv_blast_8h_source.html | 2 +- .../files/_nv_blast_allocator_8h_source.html | 2 +- .../files/_nv_blast_debug_render_8h_source.html | 2 +- .../_nv_blast_ext_apex_import_tool_8h_source.html | 2 +- .../files/_nv_blast_ext_asset_utils_8h_source.html | 2 +- .../files/_nv_blast_ext_authoring_8h_source.html | 2 +- ..._blast_ext_authoring_accelerator_8h_source.html | 2 +- ...ast_ext_authoring_bond_generator_8h_source.html | 2 +- ...xt_authoring_convex_mesh_builder_8h_source.html | 2 +- .../_nv_blast_ext_authoring_cutout_8h_source.html | 2 +- ...last_ext_authoring_fracture_tool_8h_source.html | 2 +- .../_nv_blast_ext_authoring_mesh_8h_source.html | 2 +- ...blast_ext_authoring_mesh_cleaner_8h_source.html | 2 +- ..._ext_authoring_pattern_generator_8h_source.html | 2 +- .../_nv_blast_ext_authoring_types_8h_source.html | 2 +- .../_nv_blast_ext_custom_profiler_8h-source.html | 223 +++++++++++---------- .../files/_nv_blast_ext_custom_profiler_8h.html | 1 + .../_nv_blast_ext_custom_profiler_8h_source.html | 20 +- .../_nv_blast_ext_damage_shaders_8h_source.html | 2 +- .../files/_nv_blast_ext_exporter_8h_source.html | 2 +- ...last_ext_exporter_json_collision_8h_source.html | 2 +- ..._blast_ext_impact_damage_manager_8h_source.html | 2 +- .../_nv_blast_ext_ll_serialization_8h_source.html | 2 +- .../api_docs/files/_nv_blast_ext_px_8h_source.html | 2 +- .../files/_nv_blast_ext_px_actor_8h_source.html | 2 +- .../files/_nv_blast_ext_px_asset_8h_source.html | 2 +- ...v_blast_ext_px_collision_builder_8h_source.html | 2 +- .../files/_nv_blast_ext_px_family_8h_source.html | 2 +- .../files/_nv_blast_ext_px_listener_8h_source.html | 2 +- .../files/_nv_blast_ext_px_manager_8h_source.html | 2 +- .../_nv_blast_ext_px_serialization_8h_source.html | 2 +- .../_nv_blast_ext_px_stress_solver_8h_source.html | 2 +- .../files/_nv_blast_ext_px_task_8h_source.html | 2 +- .../files/_nv_blast_ext_r_t_8h_source.html | 2 +- .../_nv_blast_ext_serialization_8h_source.html | 2 +- .../_nv_blast_ext_stress_solver_8h_source.html | 2 +- .../files/_nv_blast_ext_sync_8h_source.html | 2 +- .../_nv_blast_ext_tk_serialization_8h_source.html | 2 +- .../files/_nv_blast_globals_8h_source.html | 2 +- .../files/_nv_blast_preprocessor_8h_source.html | 2 +- .../files/_nv_blast_profiler_8h_source.html | 2 +- .../files/_nv_blast_px_callbacks_8h_source.html | 2 +- docs/api_docs/files/_nv_blast_tk_8h_source.html | 2 +- .../files/_nv_blast_tk_actor_8h_source.html | 2 +- .../files/_nv_blast_tk_asset_8h_source.html | 2 +- .../files/_nv_blast_tk_event_8h_source.html | 2 +- .../files/_nv_blast_tk_family_8h_source.html | 2 +- .../files/_nv_blast_tk_framework_8h_source.html | 2 +- .../files/_nv_blast_tk_group_8h_source.html | 2 +- .../files/_nv_blast_tk_identifiable_8h_source.html | 2 +- .../files/_nv_blast_tk_joint_8h_source.html | 2 +- .../files/_nv_blast_tk_object_8h_source.html | 2 +- .../files/_nv_blast_tk_type_8h_source.html | 2 +- docs/api_docs/files/_nv_blast_types_8h_source.html | 2 +- docs/api_docs/files/_nv_c_types_8h_source.html | 2 +- docs/api_docs/files/pagereleasenotes.html | 9 + 56 files changed, 184 insertions(+), 173 deletions(-) (limited to 'docs/api_docs') diff --git a/docs/api_docs/files/_nv_blast_8h_source.html b/docs/api_docs/files/_nv_blast_8h_source.html index 215bfe2..a8cc669 100755 --- a/docs/api_docs/files/_nv_blast_8h_source.html +++ b/docs/api_docs/files/_nv_blast_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_8h_source.html','');});
NvBlast.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 NVBLAST_H
30 #define NVBLAST_H
31 
32 
33 #include "NvBlastTypes.h"
34 
35 
37 // NvBlastAsset functions
40 
51 
52 
63 
64 
89 NVBLAST_API NvBlastAsset* NvBlastCreateAsset(void* mem, const NvBlastAssetDesc* desc, void* scratch, NvBlastLog logFn);
90 
91 
102 
103 
117 
118 
128 
129 
139 NVBLAST_API bool NvBlastAssetSetID(NvBlastAsset* asset, const NvBlastID* id, NvBlastLog logFn);
140 
141 
151 
152 
161 NVBLAST_API uint32_t NvBlastAssetGetSize(const NvBlastAsset* asset, NvBlastLog logFn);
162 
163 
172 NVBLAST_API uint32_t NvBlastAssetGetChunkCount(const NvBlastAsset* asset, NvBlastLog logFn);
173 
174 
188 
189 
199 
200 
212 
213 
222 NVBLAST_API uint32_t NvBlastAssetGetBondCount(const NvBlastAsset* asset, NvBlastLog logFn);
223 
224 
234 
235 
246 NVBLAST_API const uint32_t* NvBlastAssetGetChunkToGraphNodeMap(const NvBlastAsset* asset, NvBlastLog logFn);
247 
248 
258 
259 
269 
270 
282 
284 
285 
287 // NvBlastAsset helper functions
290 
307 NVBLAST_API bool NvBlastEnsureAssetExactSupportCoverage(NvBlastChunkDesc* chunkDescs, uint32_t chunkCount, void* scratch, NvBlastLog logFn);
308 
309 
333 NVBLAST_API bool NvBlastBuildAssetDescChunkReorderMap(uint32_t* chunkReorderMap, const NvBlastChunkDesc* chunkDescs, uint32_t chunkCount, void* scratch, NvBlastLog logFn);
334 
335 
354 (
355  NvBlastChunkDesc* reorderedChunkDescs,
356  const NvBlastChunkDesc* chunkDescs,
357  uint32_t chunkCount,
358  NvBlastBondDesc* bondDescs,
359  uint32_t bondCount,
360  const uint32_t* chunkReorderMap,
361  bool keepBondNormalChunkOrder,
362  NvBlastLog logFn
363 );
364 
365 
386 (
387  NvBlastChunkDesc* chunkDescs,
388  uint32_t chunkCount,
389  NvBlastBondDesc* bondDescs,
390  uint32_t bondCount,
391  const uint32_t* chunkReorderMap,
392  bool keepBondNormalChunkOrder,
393  void* scratch,
394  NvBlastLog logFn
395 );
396 
397 
415 (
416  NvBlastChunkDesc* chunkDescs,
417  uint32_t chunkCount,
418  NvBlastBondDesc* bondDescs,
419  uint32_t bondCount,
420  uint32_t* chunkReorderMap,
421  bool keepBondNormalChunkOrder,
422  void* scratch,
423  NvBlastLog logFn
424 );
425 
427 
428 
430 // NvBlastFamily functions
433 
443 
444 
454 
455 
463 NVBLAST_API void NvBlastFamilySetAsset(NvBlastFamily* family, const NvBlastAsset* asset, NvBlastLog logFn);
464 
465 
474 NVBLAST_API uint32_t NvBlastFamilyGetSize(const NvBlastFamily* family, NvBlastLog logFn);
475 
476 
486 
487 
497 
498 
510 
511 
520 NVBLAST_API uint32_t NvBlastFamilyGetActorCount(const NvBlastFamily* family, NvBlastLog logFn);
521 
522 
535 
536 
547 NVBLAST_API uint32_t NvBlastFamilyGetActors(NvBlastActor** actors, uint32_t actorsSize, const NvBlastFamily* family, NvBlastLog logFn);
548 
549 
559 NVBLAST_API NvBlastActor* NvBlastFamilyGetChunkActor(const NvBlastFamily* family, uint32_t chunkIndex, NvBlastLog logFn);
560 
561 
571 
573 
574 
576 // NvBlastActor accessor, serialization, and deactivation functions
579 
589 
590 
601 NVBLAST_API uint32_t NvBlastActorGetVisibleChunkIndices(uint32_t* visibleChunkIndices, uint32_t visibleChunkIndicesSize, const NvBlastActor* actor, NvBlastLog logFn);
602 
603 
613 
614 
625 NVBLAST_API uint32_t NvBlastActorGetGraphNodeIndices(uint32_t* graphNodeIndices, uint32_t graphNodeIndicesSize, const NvBlastActor* actor, NvBlastLog logFn);
626 
627 
648 NVBLAST_API const float* NvBlastActorGetBondHealths(const NvBlastActor* actor, NvBlastLog logFn);
649 
650 
661 
662 
673 NVBLAST_API uint32_t NvBlastActorSerialize(void* buffer, uint32_t bufferSize, const NvBlastActor* actor, NvBlastLog logFn);
674 
675 
685 
686 
695 NVBLAST_API uint32_t NvBlastActorGetIndex(const NvBlastActor* actor, NvBlastLog logFn);
696 
697 
707 
709 
710 
712 // NvBlastActor damage and fracturing functions
715 
739 (
740  NvBlastFractureBuffers* commandBuffers,
741  const NvBlastActor* actor,
742  const NvBlastDamageProgram program,
743  const void* programParams,
744  NvBlastLog logFn,
745  NvBlastTimers* timers
746 );
747 
748 
780 (
781  NvBlastFractureBuffers* eventBuffers,
782  NvBlastActor* actor,
783  const NvBlastFractureBuffers* commands,
784  NvBlastLog logFn,
785  NvBlastTimers* timers
786 );
787 
788 
803 (
804  NvBlastActorSplitEvent* result,
805  NvBlastActor* actor,
806  uint32_t newActorsMaxCount,
807  void* scratch,
808  NvBlastLog logFn,
809  NvBlastTimers* timers
810 );
811 
812 
823 
824 
835 
836 
846 
847 
858 
859 
864 
866 
867 
869 // NvBlastTimers functions and helpers
872 
879 
880 
888 NVBLAST_API double NvBlastTicksToSeconds(int64_t ticks);
889 
891 
892 
893 #endif // ifndef NVBLAST_H
uint32_t NvBlastAssetGetFormatVersion(const NvBlastAsset *asset, NvBlastLog logFn)
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLAST_H
30 #define NVBLAST_H
31 
32 
33 #include "NvBlastTypes.h"
34 
35 
37 // NvBlastAsset functions
40 
51 
52 
63 
64 
89 NVBLAST_API NvBlastAsset* NvBlastCreateAsset(void* mem, const NvBlastAssetDesc* desc, void* scratch, NvBlastLog logFn);
90 
91 
102 
103 
117 
118 
128 
129 
139 NVBLAST_API bool NvBlastAssetSetID(NvBlastAsset* asset, const NvBlastID* id, NvBlastLog logFn);
140 
141 
151 
152 
161 NVBLAST_API uint32_t NvBlastAssetGetSize(const NvBlastAsset* asset, NvBlastLog logFn);
162 
163 
172 NVBLAST_API uint32_t NvBlastAssetGetChunkCount(const NvBlastAsset* asset, NvBlastLog logFn);
173 
174 
188 
189 
199 
200 
212 
213 
222 NVBLAST_API uint32_t NvBlastAssetGetBondCount(const NvBlastAsset* asset, NvBlastLog logFn);
223 
224 
234 
235 
246 NVBLAST_API const uint32_t* NvBlastAssetGetChunkToGraphNodeMap(const NvBlastAsset* asset, NvBlastLog logFn);
247 
248 
258 
259 
269 
270 
282 
284 
285 
287 // NvBlastAsset helper functions
290 
307 NVBLAST_API bool NvBlastEnsureAssetExactSupportCoverage(NvBlastChunkDesc* chunkDescs, uint32_t chunkCount, void* scratch, NvBlastLog logFn);
308 
309 
333 NVBLAST_API bool NvBlastBuildAssetDescChunkReorderMap(uint32_t* chunkReorderMap, const NvBlastChunkDesc* chunkDescs, uint32_t chunkCount, void* scratch, NvBlastLog logFn);
334 
335 
354 (
355  NvBlastChunkDesc* reorderedChunkDescs,
356  const NvBlastChunkDesc* chunkDescs,
357  uint32_t chunkCount,
358  NvBlastBondDesc* bondDescs,
359  uint32_t bondCount,
360  const uint32_t* chunkReorderMap,
361  bool keepBondNormalChunkOrder,
362  NvBlastLog logFn
363 );
364 
365 
386 (
387  NvBlastChunkDesc* chunkDescs,
388  uint32_t chunkCount,
389  NvBlastBondDesc* bondDescs,
390  uint32_t bondCount,
391  const uint32_t* chunkReorderMap,
392  bool keepBondNormalChunkOrder,
393  void* scratch,
394  NvBlastLog logFn
395 );
396 
397 
415 (
416  NvBlastChunkDesc* chunkDescs,
417  uint32_t chunkCount,
418  NvBlastBondDesc* bondDescs,
419  uint32_t bondCount,
420  uint32_t* chunkReorderMap,
421  bool keepBondNormalChunkOrder,
422  void* scratch,
423  NvBlastLog logFn
424 );
425 
427 
428 
430 // NvBlastFamily functions
433 
443 
444 
454 
455 
463 NVBLAST_API void NvBlastFamilySetAsset(NvBlastFamily* family, const NvBlastAsset* asset, NvBlastLog logFn);
464 
465 
474 NVBLAST_API uint32_t NvBlastFamilyGetSize(const NvBlastFamily* family, NvBlastLog logFn);
475 
476 
486 
487 
497 
498 
510 
511 
520 NVBLAST_API uint32_t NvBlastFamilyGetActorCount(const NvBlastFamily* family, NvBlastLog logFn);
521 
522 
535 
536 
547 NVBLAST_API uint32_t NvBlastFamilyGetActors(NvBlastActor** actors, uint32_t actorsSize, const NvBlastFamily* family, NvBlastLog logFn);
548 
549 
559 NVBLAST_API NvBlastActor* NvBlastFamilyGetChunkActor(const NvBlastFamily* family, uint32_t chunkIndex, NvBlastLog logFn);
560 
561 
571 
573 
574 
576 // NvBlastActor accessor, serialization, and deactivation functions
579 
589 
590 
601 NVBLAST_API uint32_t NvBlastActorGetVisibleChunkIndices(uint32_t* visibleChunkIndices, uint32_t visibleChunkIndicesSize, const NvBlastActor* actor, NvBlastLog logFn);
602 
603 
613 
614 
625 NVBLAST_API uint32_t NvBlastActorGetGraphNodeIndices(uint32_t* graphNodeIndices, uint32_t graphNodeIndicesSize, const NvBlastActor* actor, NvBlastLog logFn);
626 
627 
648 NVBLAST_API const float* NvBlastActorGetBondHealths(const NvBlastActor* actor, NvBlastLog logFn);
649 
650 
661 
662 
673 NVBLAST_API uint32_t NvBlastActorSerialize(void* buffer, uint32_t bufferSize, const NvBlastActor* actor, NvBlastLog logFn);
674 
675 
685 
686 
695 NVBLAST_API uint32_t NvBlastActorGetIndex(const NvBlastActor* actor, NvBlastLog logFn);
696 
697 
707 
709 
710 
712 // NvBlastActor damage and fracturing functions
715 
739 (
740  NvBlastFractureBuffers* commandBuffers,
741  const NvBlastActor* actor,
742  const NvBlastDamageProgram program,
743  const void* programParams,
744  NvBlastLog logFn,
745  NvBlastTimers* timers
746 );
747 
748 
780 (
781  NvBlastFractureBuffers* eventBuffers,
782  NvBlastActor* actor,
783  const NvBlastFractureBuffers* commands,
784  NvBlastLog logFn,
785  NvBlastTimers* timers
786 );
787 
788 
803 (
804  NvBlastActorSplitEvent* result,
805  NvBlastActor* actor,
806  uint32_t newActorsMaxCount,
807  void* scratch,
808  NvBlastLog logFn,
809  NvBlastTimers* timers
810 );
811 
812 
823 
824 
835 
836 
846 
847 
858 
859 
864 
866 
867 
869 // NvBlastTimers functions and helpers
872 
879 
880 
888 NVBLAST_API double NvBlastTicksToSeconds(int64_t ticks);
889 
891 
892 
893 #endif // ifndef NVBLAST_H
uint32_t NvBlastAssetGetFormatVersion(const NvBlastAsset *asset, NvBlastLog logFn)
NvBlastFamily * NvBlastAssetCreateFamily(void *mem, const NvBlastAsset *asset, NvBlastLog logFn)
bool NvBlastActorDeactivate(NvBlastActor *actor, NvBlastLog logFn)
Definition: NvBlastTypes.h:244
diff --git a/docs/api_docs/files/_nv_blast_allocator_8h_source.html b/docs/api_docs/files/_nv_blast_allocator_8h_source.html index 6e770b9..f4da8f7 100755 --- a/docs/api_docs/files/_nv_blast_allocator_8h_source.html +++ b/docs/api_docs/files/_nv_blast_allocator_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_allocator_8h_source.html',''
NvBlastAllocator.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 NVBLASTALLOCATOR_H
30 #define NVBLASTALLOCATOR_H
31 
32 #include "NvBlastGlobals.h"
33 
38 namespace Nv
39 {
40 namespace Blast
41 {
42 
46 class Allocator
47 {
48 public:
49  Allocator(const char* = 0)
50  {
51  }
52 
53  void* allocate(size_t size, const char* filename, int line)
54  {
55  return NvBlastGlobalGetAllocatorCallback()->allocate(size, nullptr, filename, line);
56  }
57 
58  void deallocate(void* ptr)
59  {
61  }
62 };
63 
64 
65 } // namespace Blast
66 } // namespace Nv
67 
68 
69 #endif // #ifndef NVBLASTALLOCATOR_H
virtual void deallocate(void *ptr)=0
Frees memory previously allocated by allocate().
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTALLOCATOR_H
30 #define NVBLASTALLOCATOR_H
31 
32 #include "NvBlastGlobals.h"
33 
38 namespace Nv
39 {
40 namespace Blast
41 {
42 
46 class Allocator
47 {
48 public:
49  Allocator(const char* = 0)
50  {
51  }
52 
53  void* allocate(size_t size, const char* filename, int line)
54  {
55  return NvBlastGlobalGetAllocatorCallback()->allocate(size, nullptr, filename, line);
56  }
57 
58  void deallocate(void* ptr)
59  {
61  }
62 };
63 
64 
65 } // namespace Blast
66 } // namespace Nv
67 
68 
69 #endif // #ifndef NVBLASTALLOCATOR_H
virtual void deallocate(void *ptr)=0
Frees memory previously allocated by allocate().
virtual void * allocate(size_t size, const char *typeName, const char *filename, int line)=0
Allocates size bytes of memory, which must be 16-byte aligned.
Allocator(const char *=0)
Definition: NvBlastAllocator.h:49
diff --git a/docs/api_docs/files/_nv_blast_debug_render_8h_source.html b/docs/api_docs/files/_nv_blast_debug_render_8h_source.html index 322acb5..32cd0cd 100755 --- a/docs/api_docs/files/_nv_blast_debug_render_8h_source.html +++ b/docs/api_docs/files/_nv_blast_debug_render_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_debug_render_8h_source.html'
NvBlastDebugRender.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 #pragma once
29 
30 #include <NvCTypes.h>
31 
32 namespace Nv
33 {
34 namespace Blast
35 {
36 
37 
41 struct DebugLine
42 {
43  DebugLine(const NvcVec3& p0, const NvcVec3& p1, uint32_t c)
44  : pos0(p0), color0(c), pos1(p1), color1(c) {}
45 
47  uint32_t color0;
49  uint32_t color1;
50 };
51 
52 
57 {
58  const DebugLine* lines;
59  uint32_t lineCount;
60 };
61 
62 
63 } // namespace Blast
64 } // namespace Nv
DebugLine(const NvcVec3 &p0, const NvcVec3 &p1, uint32_t c)
Definition: NvBlastDebugRender.h:43
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 #pragma once
29 
30 #include <NvCTypes.h>
31 
32 namespace Nv
33 {
34 namespace Blast
35 {
36 
37 
41 struct DebugLine
42 {
43  DebugLine(const NvcVec3& p0, const NvcVec3& p1, uint32_t c)
44  : pos0(p0), color0(c), pos1(p1), color1(c) {}
45 
47  uint32_t color0;
49  uint32_t color1;
50 };
51 
52 
57 {
58  const DebugLine* lines;
59  uint32_t lineCount;
60 };
61 
62 
63 } // namespace Blast
64 } // namespace Nv
DebugLine(const NvcVec3 &p0, const NvcVec3 &p1, uint32_t c)
Definition: NvBlastDebugRender.h:43
uint32_t lineCount
Definition: NvBlastDebugRender.h:59
Definition: NvBlastDebugRender.h:56
Definition: NvBlastDebugRender.h:41
diff --git a/docs/api_docs/files/_nv_blast_ext_apex_import_tool_8h_source.html b/docs/api_docs/files/_nv_blast_ext_apex_import_tool_8h_source.html index c8b9027..d008836 100755 --- a/docs/api_docs/files/_nv_blast_ext_apex_import_tool_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_apex_import_tool_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_apex_import_tool_8h_sour
NvBlastExtApexImportTool.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 NVBLASTEXTAPEXIMPORTTOOL_H
30 #define NVBLASTEXTAPEXIMPORTTOOL_H
31 
32 #include "NvBlast.h"
33 #include <vector>
34 #include <string>
35 #include "NvBlastExtPxAsset.h"
37 #include <nvparameterized\NvSerializer.h>
38 #include <NvBlastExtExporter.h>
39 
40 namespace physx
41 {
42  class PxFoundation;
43  class PxPhysics;
44  class PxCooking;
45 
46 namespace general_PxIOStream2
47 {
48 class PxFileBuf;
49 }
50 }
51 
52 namespace NvParameterized
53 {
54  class Interface;
55 }
56 
57 namespace nvidia
58 {
59 namespace apex
60 {
61 class ApexSDK;
62 class ModuleDestructible;
63 class DestructibleAsset;
64 }
65 using namespace physx::general_PxIOStream2;
66 }
67 
68 
69 namespace Nv
70 {
71 namespace Blast
72 {
73 
74 struct CollisionHull;
75 class TkFramework;
76 
77 namespace ApexImporter
78 {
79 
81 {
91  enum InterfaceSearchMode { EXACT, FORCED, MODE_COUNT };
92 
94  {
95  setDefaults();
96  }
97 
98  void setDefaults()
99  {
100  infSearchMode = EXACT;
101  }
103 };
104 
105 
106 class ApexDestruction;
107 
108 
113 {
114 public:
115  ApexImportTool();
116  ~ApexImportTool();
117 
123  bool loadAssetFromFile(nvidia::PxFileBuf* stream, NvParameterized::Serializer::DeserializedData& data);
124 
125 
136  bool importApexAsset(std::vector<uint32_t>& chunkReorderInvMap, NvParameterized::Interface* assetNvIfc,
137  std::vector<NvBlastChunkDesc>& chunkDescriptors, std::vector<NvBlastBondDesc>& bondDescriptors, std::vector<uint32_t>& flags);
138 
150  bool importApexAsset(std::vector<uint32_t>& chunkReorderInvMap, NvParameterized::Interface* assetNvIfc,
151  std::vector<NvBlastChunkDesc>& chunkDescriptors, std::vector<NvBlastBondDesc>& bondDescriptors, std::vector<uint32_t>& flags,
152  const ApexImporterConfig& config);
153 
157  bool importRendermesh(const std::vector<uint32_t>& chunkReorderInvMap, const NvParameterized::Interface* assetNvIfc, Nv::Blast::ExporterMeshData* outputData, const char* materialsDir);
158 
159 
166  bool saveAsset(const NvBlastAsset* asset, nvidia::PxFileBuf* stream);
167 
179  bool getCollisionGeometry(const NvParameterized::Interface* assetPrm, uint32_t chunkCount, std::vector<uint32_t>& chunkReorderInvMap,
180  const std::vector<uint32_t>& apexChunkFlags, std::vector<ExtPxAssetDesc::ChunkDesc>& physicsChunks,
181  std::vector<ExtPxAssetDesc::SubchunkDesc>& physicsSubchunks, std::vector<std::vector<CollisionHull*> >& hullsDesc);
182 
184  {
185  return m_collisionBuilder;
186  }
187 
189 
190  bool isValid();
191 
192  physx::PxPhysics* getPxSdk() { return m_PhysxSDK; }
193  physx::PxCooking* getCooking() { return m_Cooking; };
194 
195 private:
196  bool importApexAssetInternal(std::vector<uint32_t>& chunkReorderInvMap, NvParameterized::Interface* assetNvIfc,
197  std::vector<NvBlastChunkDesc>& chunkDescriptors, std::vector<NvBlastBondDesc>& bondDesc, std::vector<uint32_t>& flags,
198  const ApexImporterConfig& configDesc);
199 
200 protected:
202  ApexImportTool& operator=(const ApexImportTool&);
203 
204  physx::PxFoundation* m_Foundation;
205  physx::PxPhysics* m_PhysxSDK;
206  physx::PxCooking* m_Cooking;
207 
209 };
210 
211 } // namespace ApexImporter
212 
213 } // namespace Blast
214 } // namespace Nv
215 
216 #endif // NVBLASTEXTAPEXIMPORTTOOL_H
Definition: NvBlastExtApexImportTool.h:40
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTAPEXIMPORTTOOL_H
30 #define NVBLASTEXTAPEXIMPORTTOOL_H
31 
32 #include "NvBlast.h"
33 #include <vector>
34 #include <string>
35 #include "NvBlastExtPxAsset.h"
37 #include <nvparameterized\NvSerializer.h>
38 #include <NvBlastExtExporter.h>
39 
40 namespace physx
41 {
42  class PxFoundation;
43  class PxPhysics;
44  class PxCooking;
45 
46 namespace general_PxIOStream2
47 {
48 class PxFileBuf;
49 }
50 }
51 
52 namespace NvParameterized
53 {
54  class Interface;
55 }
56 
57 namespace nvidia
58 {
59 namespace apex
60 {
61 class ApexSDK;
62 class ModuleDestructible;
63 class DestructibleAsset;
64 }
65 using namespace physx::general_PxIOStream2;
66 }
67 
68 
69 namespace Nv
70 {
71 namespace Blast
72 {
73 
74 struct CollisionHull;
75 class TkFramework;
76 
77 namespace ApexImporter
78 {
79 
81 {
91  enum InterfaceSearchMode { EXACT, FORCED, MODE_COUNT };
92 
94  {
95  setDefaults();
96  }
97 
98  void setDefaults()
99  {
100  infSearchMode = EXACT;
101  }
103 };
104 
105 
106 class ApexDestruction;
107 
108 
113 {
114 public:
115  ApexImportTool();
116  ~ApexImportTool();
117 
123  bool loadAssetFromFile(nvidia::PxFileBuf* stream, NvParameterized::Serializer::DeserializedData& data);
124 
125 
136  bool importApexAsset(std::vector<uint32_t>& chunkReorderInvMap, NvParameterized::Interface* assetNvIfc,
137  std::vector<NvBlastChunkDesc>& chunkDescriptors, std::vector<NvBlastBondDesc>& bondDescriptors, std::vector<uint32_t>& flags);
138 
150  bool importApexAsset(std::vector<uint32_t>& chunkReorderInvMap, NvParameterized::Interface* assetNvIfc,
151  std::vector<NvBlastChunkDesc>& chunkDescriptors, std::vector<NvBlastBondDesc>& bondDescriptors, std::vector<uint32_t>& flags,
152  const ApexImporterConfig& config);
153 
157  bool importRendermesh(const std::vector<uint32_t>& chunkReorderInvMap, const NvParameterized::Interface* assetNvIfc, Nv::Blast::ExporterMeshData* outputData, const char* materialsDir);
158 
159 
166  bool saveAsset(const NvBlastAsset* asset, nvidia::PxFileBuf* stream);
167 
179  bool getCollisionGeometry(const NvParameterized::Interface* assetPrm, uint32_t chunkCount, std::vector<uint32_t>& chunkReorderInvMap,
180  const std::vector<uint32_t>& apexChunkFlags, std::vector<ExtPxAssetDesc::ChunkDesc>& physicsChunks,
181  std::vector<ExtPxAssetDesc::SubchunkDesc>& physicsSubchunks, std::vector<std::vector<CollisionHull*> >& hullsDesc);
182 
184  {
185  return m_collisionBuilder;
186  }
187 
189 
190  bool isValid();
191 
192  physx::PxPhysics* getPxSdk() { return m_PhysxSDK; }
193  physx::PxCooking* getCooking() { return m_Cooking; };
194 
195 private:
196  bool importApexAssetInternal(std::vector<uint32_t>& chunkReorderInvMap, NvParameterized::Interface* assetNvIfc,
197  std::vector<NvBlastChunkDesc>& chunkDescriptors, std::vector<NvBlastBondDesc>& bondDesc, std::vector<uint32_t>& flags,
198  const ApexImporterConfig& configDesc);
199 
200 protected:
202  ApexImportTool& operator=(const ApexImportTool&);
203 
204  physx::PxFoundation* m_Foundation;
205  physx::PxPhysics* m_PhysxSDK;
206  physx::PxCooking* m_Cooking;
207 
209 };
210 
211 } // namespace ApexImporter
212 
213 } // namespace Blast
214 } // namespace Nv
215 
216 #endif // NVBLASTEXTAPEXIMPORTTOOL_H
Definition: NvBlastExtApexImportTool.h:40
ApexImporterConfig()
Definition: NvBlastExtApexImportTool.h:93
InterfaceSearchMode infSearchMode
Definition: NvBlastExtApexImportTool.h:102
diff --git a/docs/api_docs/files/_nv_blast_ext_asset_utils_8h_source.html b/docs/api_docs/files/_nv_blast_ext_asset_utils_8h_source.html index 045c381..668aa7f 100755 --- a/docs/api_docs/files/_nv_blast_ext_asset_utils_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_asset_utils_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_asset_utils_8h_source.ht
NvBlastExtAssetUtils.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 NVBLASTEXTASSETUTILS_H
30 #define NVBLASTEXTASSETUTILS_H
31 
32 
33 #include "NvBlastTypes.h"
34 #include "NvCTypes.h"
35 #include <stdint.h>
36 
37 
50 (
51  const NvBlastAsset* asset,
52  const uint32_t* worldBoundChunks,
53  uint32_t worldBoundChunkCount,
54  const NvcVec3* bondDirections,
55  const uint32_t* bondUserData
56 );
57 
58 
67 {
68  uint32_t componentIndices[2];
69 };
70 
71 
111 (
112  const NvBlastAsset** components,
113  const NvcVec3* scales,
114  const NvcQuat* rotations,
115  const NvcVec3* translations,
116  uint32_t componentCount,
117  const NvBlastExtAssetUtilsBondDesc* newBondDescs,
118  uint32_t newBondCount,
119  uint32_t* chunkIndexOffsets,
120  uint32_t* chunkReorderMap,
121  uint32_t chunkReorderMapSize
122 );
123 
124 
136 (
137  NvBlastAsset* asset,
138  const NvcVec3* scale,
139  const NvcQuat* rotation,
140  const NvcVec3* translation
141 );
142 
143 #endif // ifndef NVBLASTEXTASSETUTILS_H
uint32_t componentIndices[2]
The asset component for the corresponding chunkIndices[2] value.
Definition: NvBlastExtAssetUtils.h:68
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTASSETUTILS_H
30 #define NVBLASTEXTASSETUTILS_H
31 
32 
33 #include "NvBlastTypes.h"
34 #include "NvCTypes.h"
35 #include <stdint.h>
36 
37 
50 (
51  const NvBlastAsset* asset,
52  const uint32_t* worldBoundChunks,
53  uint32_t worldBoundChunkCount,
54  const NvcVec3* bondDirections,
55  const uint32_t* bondUserData
56 );
57 
58 
67 {
68  uint32_t componentIndices[2];
69 };
70 
71 
111 (
112  const NvBlastAsset** components,
113  const NvcVec3* scales,
114  const NvcQuat* rotations,
115  const NvcVec3* translations,
116  uint32_t componentCount,
117  const NvBlastExtAssetUtilsBondDesc* newBondDescs,
118  uint32_t newBondCount,
119  uint32_t* chunkIndexOffsets,
120  uint32_t* chunkReorderMap,
121  uint32_t chunkReorderMapSize
122 );
123 
124 
136 (
137  NvBlastAsset* asset,
138  const NvcVec3* scale,
139  const NvcQuat* rotation,
140  const NvcVec3* translation
141 );
142 
143 #endif // ifndef NVBLASTEXTASSETUTILS_H
uint32_t componentIndices[2]
The asset component for the corresponding chunkIndices[2] value.
Definition: NvBlastExtAssetUtils.h:68
void NvBlastExtAssetTransformInPlace(NvBlastAsset *asset, const NvcVec3 *scale, const NvcQuat *rotation, const NvcVec3 *translation)
Definition: NvBlastTypes.h:345
diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_8h_source.html b/docs/api_docs/files/_nv_blast_ext_authoring_8h_source.html index ff4dbbb..528c274 100755 --- a/docs/api_docs/files/_nv_blast_ext_authoring_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_8h_source.html
NvBlastExtAuthoring.h
-Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTAUTHORING_H
30 #define NVBLASTAUTHORING_H
31 
33 
34 namespace Nv
35 {
36 namespace Blast
37 {
38 class Mesh;
40 class CutoutSet;
42 class FractureTool;
43 class ConvexMeshBuilder;
44 class BlastBondGenerator;
45 class MeshCleaner;
46 class PatternGenerator;
47 class Grid;
48 class GridWalker;
49 } // namespace Blast
50 } // namespace Nv
51 
53 
68 NvBlastExtAuthoringCreateMesh(const NvcVec3* positions, const NvcVec3* normals, const NvcVec2* uv,
69  uint32_t verticesCount, const uint32_t* indices, uint32_t indicesCount);
70 
85 NvBlastExtAuthoringCreateMeshOnlyTriangles(const void* vertices, uint32_t verticesCount, uint32_t* indices,
86  uint32_t indexCount, void* materials = nullptr, uint32_t materialStride = 4);
87 
102 NvBlastExtAuthoringCreateMeshFromFacets(const void* vertices, const void* edges, const void* facets,
103  uint32_t verticesCount, uint32_t edgesCount, uint32_t facetsCount);
104 
114 
117 
134 NVBLAST_API void
135 NvBlastExtAuthoringBuildCutoutSet(Nv::Blast::CutoutSet& cutoutSet, const uint8_t* pixelBuffer, uint32_t bufferWidth,
136  uint32_t bufferHeight, float segmentationErrorThreshold, float snapThreshold,
137  bool periodic, bool expandGaps);
138 
144 
150 
161  const Nv::Blast::Triangle* mesh,
162  uint32_t triangleCount,
164  Nv::Blast::CollisionHull**& convexes);
165 
166 
180  Nv::Blast::CollisionHull** in, const uint32_t* chunkDepth);
181 
182 
191  const NvcQuat* rotation, const NvcVec3* translation);
192 
202  const NvcQuat* rotation, const NvcVec3* translation);
203 
217  Nv::Blast::ConvexMeshBuilder& collisionBuilder,
218  const Nv::Blast::ConvexDecompositionParams& collisionParam,
219  int32_t defaultSupportDepth = -1);
220 
221 
226 
231 
232 
241 
252  Nv::Blast::ConvexMeshBuilder& collisionBuilder,
253  const Nv::Blast::ConvexDecompositionParams& collisionParam,
254  uint32_t chunksToProcessCount, uint32_t* chunksToProcess);
255 
261 
288  const NvBlastAsset** components, const NvcVec3* scales, const NvcQuat* rotations, const NvcVec3* translations,
289  const uint32_t** convexHullOffsets, const Nv::Blast::CollisionHull*** chunkHulls, uint32_t componentCount,
290  NvBlastExtAssetUtilsBondDesc*& newBondDescs, float maxSeparation = 0.0f);
291 
296 
301 
306 
307 #endif // ifndef NVBLASTAUTHORING_H
Nv::Blast::Mesh * NvBlastExtAuthoringCreateMeshFromFacets(const void *vertices, const void *edges, const void *facets, uint32_t verticesCount, uint32_t edgesCount, uint32_t facetsCount)
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTAUTHORING_H
30 #define NVBLASTAUTHORING_H
31 
33 
34 namespace Nv
35 {
36 namespace Blast
37 {
38 class Mesh;
40 class CutoutSet;
42 class FractureTool;
43 class ConvexMeshBuilder;
44 class BlastBondGenerator;
45 class MeshCleaner;
46 class PatternGenerator;
47 class Grid;
48 class GridWalker;
49 } // namespace Blast
50 } // namespace Nv
51 
53 
68 NvBlastExtAuthoringCreateMesh(const NvcVec3* positions, const NvcVec3* normals, const NvcVec2* uv,
69  uint32_t verticesCount, const uint32_t* indices, uint32_t indicesCount);
70 
85 NvBlastExtAuthoringCreateMeshOnlyTriangles(const void* vertices, uint32_t verticesCount, uint32_t* indices,
86  uint32_t indexCount, void* materials = nullptr, uint32_t materialStride = 4);
87 
102 NvBlastExtAuthoringCreateMeshFromFacets(const void* vertices, const void* edges, const void* facets,
103  uint32_t verticesCount, uint32_t edgesCount, uint32_t facetsCount);
104 
114 
117 
134 NVBLAST_API void
135 NvBlastExtAuthoringBuildCutoutSet(Nv::Blast::CutoutSet& cutoutSet, const uint8_t* pixelBuffer, uint32_t bufferWidth,
136  uint32_t bufferHeight, float segmentationErrorThreshold, float snapThreshold,
137  bool periodic, bool expandGaps);
138 
144 
150 
161  const Nv::Blast::Triangle* mesh,
162  uint32_t triangleCount,
164  Nv::Blast::CollisionHull**& convexes);
165 
166 
180  Nv::Blast::CollisionHull** in, const uint32_t* chunkDepth);
181 
182 
191  const NvcQuat* rotation, const NvcVec3* translation);
192 
202  const NvcQuat* rotation, const NvcVec3* translation);
203 
217  Nv::Blast::ConvexMeshBuilder& collisionBuilder,
218  const Nv::Blast::ConvexDecompositionParams& collisionParam,
219  int32_t defaultSupportDepth = -1);
220 
221 
226 
231 
232 
241 
252  Nv::Blast::ConvexMeshBuilder& collisionBuilder,
253  const Nv::Blast::ConvexDecompositionParams& collisionParam,
254  uint32_t chunksToProcessCount, uint32_t* chunksToProcess);
255 
261 
288  const NvBlastAsset** components, const NvcVec3* scales, const NvcQuat* rotations, const NvcVec3* translations,
289  const uint32_t** convexHullOffsets, const Nv::Blast::CollisionHull*** chunkHulls, uint32_t componentCount,
290  NvBlastExtAssetUtilsBondDesc*& newBondDescs, float maxSeparation = 0.0f);
291 
296 
301 
306 
307 #endif // ifndef NVBLASTAUTHORING_H
Nv::Blast::Mesh * NvBlastExtAuthoringCreateMeshFromFacets(const void *vertices, const void *edges, const void *facets, uint32_t verticesCount, uint32_t edgesCount, uint32_t facetsCount)
Definition: NvBlastExtAuthoringConvexMeshBuilder.h:47
Definition: NvBlastExtAuthoringFractureTool.h:179
Definition: NvBlastExtAuthoringMeshCleaner.h:52
diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_accelerator_8h_source.html b/docs/api_docs/files/_nv_blast_ext_authoring_accelerator_8h_source.html index 5d8e3ab..e7d78ed 100644 --- a/docs/api_docs/files/_nv_blast_ext_authoring_accelerator_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_accelerator_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_accelerator_8h
NvBlastExtAuthoringAccelerator.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 NVBLASTEXTAUTHORINGACCELERATOR_H
30 #define NVBLASTEXTAUTHORINGACCELERATOR_H
31 
32 #include <set>
33 #include <vector>
35 
36 
37 namespace Nv
38 {
39  namespace Blast
40  {
41 
42  class Mesh;
43 
48  {
49  public:
50 
57  virtual void setState(const NvcBounds3* bounds) = 0;
58 
65  virtual void setState(const Vertex* pos, const Edge* ed, const Facet& fc) = 0;
70  virtual void setState(const NvcVec3& point) = 0;
75  virtual int32_t getNextFacet() = 0;
76 
77 
78  virtual void setPointCmpDirection(int32_t dir) = 0;
79 
80 
81  virtual ~SpatialAccelerator() {};
82  };
83 
84 
89  {
90  public:
94  DummyAccelerator(int32_t count);
95  virtual void setState(const NvcBounds3* bounds) override;
96  virtual void setState(const Vertex* pos, const Edge* ed, const Facet& fc) override;
97  virtual void setState(const NvcVec3& point) override;
98  virtual int32_t getNextFacet() override;
99 
100  virtual void setPointCmpDirection(int32_t dir) override {};
101  private:
102  int32_t m_count;
103  int32_t m_current;
104  };
105 
107  {
108  float coord;
109  uint32_t index;
110  bool end;
111 
112  SegmentToIndex(float c, uint32_t i, bool end) : coord(c), index(i), end(end) {};
113 
114  bool operator<(const SegmentToIndex& in) const
115  {
116  if (coord < in.coord) return true;
117  if (coord > in.coord) return false;
118  return end < in.end;
119  }
120  };
121 
122 
123 
124  class Grid
125  {
126 
127  public:
128 
129  friend class GridWalker;
130 
131  Grid(int32_t resolution);
132  void setMesh(const Nv::Blast::Mesh* m);
133 
134  private:
135  int32_t m_resolution;
136  int32_t m_r3;
137  int32_t m_mappedFacetCount;
138  NvcVec3 m_spos;
139  NvcVec3 m_deltas;
140  std::vector< std::vector<int32_t> > m_spatialMap;
141  };
142 
143  class GridWalker : public SpatialAccelerator // Iterator to traverse the grid
144  {
145  public:
146  GridWalker(Grid* grd);
147 
148  virtual void setState(const NvcBounds3* bounds) override;
149  virtual void setState(const Vertex* pos, const Edge* ed, const Facet& fc) override;
150  virtual void setState(const NvcVec3& point) override;
151  virtual int32_t getNextFacet() override;
152  virtual void setPointCmpDirection(int32_t dir) override;
153  private:
154  Grid* m_grid;
155 
156  // Iterator data
157  std::vector<uint32_t> m_alreadyGotFlag;
158  uint32_t m_alreadyGotValue;
159  std::vector<int32_t> m_cellList;
160  int32_t m_gotCells;
161  int32_t m_iteratorCell;
162  int32_t m_iteratorFacet;
163  int32_t m_pointCmdDir;
164  };
165 
166 
168  {
169  public:
174  virtual void setState(const Vertex* pos, const Edge* ed, const Facet& fc) override;
175  virtual void setState(const NvcBounds3* bounds) override;
176  virtual void setState(const NvcVec3& point) override;
177  virtual int32_t getNextFacet() override;
178  virtual void setPointCmpDirection(int32_t dir) override {};
179  private:
180 
181 
182  /*
183  For fast point test.
184  */
185  std::vector<std::vector<uint32_t> > m_xSegm;
186  std::vector<std::vector<uint32_t> > m_ySegm;
187  std::vector<std::vector<uint32_t> > m_zSegm;
188  std::vector<uint32_t> m_indices;
189  std::vector<uint32_t> m_foundx;
190  std::vector<uint32_t> m_foundy;
191 
192  uint32_t m_iterId;
193  int32_t m_current;
194  uint32_t m_facetCount;
195 
196  NvcVec3 m_minimal;
197  NvcVec3 m_maximal;
198 
199  NvcVec3 m_rescale;
200 
201 
202  };
203 
204 
211  {
212  public:
217  BBoxBasedAccelerator(const Mesh* mesh, int32_t resolution);
218  virtual ~BBoxBasedAccelerator();
219  int32_t getNextFacet() override;
220  void setState(const Vertex* pos, const Edge* ed, const Facet& fc) override;
221  void setState(const NvcBounds3* bounds) override;
222  void setState(const NvcVec3& p) override;
223  void setPointCmpDirection(int32_t dir) override {};
224  private:
225 
226  void buildAccelStructure(const Vertex* pos, const Edge* edges, const Facet* fc, int32_t facetCount);
227 
228  int32_t m_resolution;
229  NvcBounds3 m_bounds;
230  std::vector< std::vector<int32_t> > m_spatialMap;
231  std::vector<NvcBounds3> m_cells;
232 
233 
234  // Iterator data
235  std::vector<uint32_t> m_alreadyGotFlag;
236  uint32_t m_alreadyGotValue;
237  std::vector<int32_t> m_cellList;
238  int32_t m_gotCells;
239  int32_t m_iteratorCell;
240  int32_t m_iteratorFacet;
241  };
242 
243  } // namespace Blast
244 } // namsepace Nv
245 
246 
247 #endif // ifndef NVBLASTEXTAUTHORINGACCELERATOR_H
virtual void setPointCmpDirection(int32_t dir) override
Definition: NvBlastExtAuthoringAccelerator.h:178
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTAUTHORINGACCELERATOR_H
30 #define NVBLASTEXTAUTHORINGACCELERATOR_H
31 
32 #include <set>
33 #include <vector>
35 
36 
37 namespace Nv
38 {
39  namespace Blast
40  {
41 
42  class Mesh;
43 
48  {
49  public:
50 
57  virtual void setState(const NvcBounds3* bounds) = 0;
58 
65  virtual void setState(const Vertex* pos, const Edge* ed, const Facet& fc) = 0;
70  virtual void setState(const NvcVec3& point) = 0;
75  virtual int32_t getNextFacet() = 0;
76 
77 
78  virtual void setPointCmpDirection(int32_t dir) = 0;
79 
80 
81  virtual ~SpatialAccelerator() {};
82  };
83 
84 
89  {
90  public:
94  DummyAccelerator(int32_t count);
95  virtual void setState(const NvcBounds3* bounds) override;
96  virtual void setState(const Vertex* pos, const Edge* ed, const Facet& fc) override;
97  virtual void setState(const NvcVec3& point) override;
98  virtual int32_t getNextFacet() override;
99 
100  virtual void setPointCmpDirection(int32_t dir) override {};
101  private:
102  int32_t m_count;
103  int32_t m_current;
104  };
105 
107  {
108  float coord;
109  uint32_t index;
110  bool end;
111 
112  SegmentToIndex(float c, uint32_t i, bool end) : coord(c), index(i), end(end) {};
113 
114  bool operator<(const SegmentToIndex& in) const
115  {
116  if (coord < in.coord) return true;
117  if (coord > in.coord) return false;
118  return end < in.end;
119  }
120  };
121 
122 
123 
124  class Grid
125  {
126 
127  public:
128 
129  friend class GridWalker;
130 
131  Grid(int32_t resolution);
132  void setMesh(const Nv::Blast::Mesh* m);
133 
134  private:
135  int32_t m_resolution;
136  int32_t m_r3;
137  int32_t m_mappedFacetCount;
138  NvcVec3 m_spos;
139  NvcVec3 m_deltas;
140  std::vector< std::vector<int32_t> > m_spatialMap;
141  };
142 
143  class GridWalker : public SpatialAccelerator // Iterator to traverse the grid
144  {
145  public:
146  GridWalker(Grid* grd);
147 
148  virtual void setState(const NvcBounds3* bounds) override;
149  virtual void setState(const Vertex* pos, const Edge* ed, const Facet& fc) override;
150  virtual void setState(const NvcVec3& point) override;
151  virtual int32_t getNextFacet() override;
152  virtual void setPointCmpDirection(int32_t dir) override;
153  private:
154  Grid* m_grid;
155 
156  // Iterator data
157  std::vector<uint32_t> m_alreadyGotFlag;
158  uint32_t m_alreadyGotValue;
159  std::vector<int32_t> m_cellList;
160  int32_t m_gotCells;
161  int32_t m_iteratorCell;
162  int32_t m_iteratorFacet;
163  int32_t m_pointCmdDir;
164  };
165 
166 
168  {
169  public:
174  virtual void setState(const Vertex* pos, const Edge* ed, const Facet& fc) override;
175  virtual void setState(const NvcBounds3* bounds) override;
176  virtual void setState(const NvcVec3& point) override;
177  virtual int32_t getNextFacet() override;
178  virtual void setPointCmpDirection(int32_t dir) override {};
179  private:
180 
181 
182  /*
183  For fast point test.
184  */
185  std::vector<std::vector<uint32_t> > m_xSegm;
186  std::vector<std::vector<uint32_t> > m_ySegm;
187  std::vector<std::vector<uint32_t> > m_zSegm;
188  std::vector<uint32_t> m_indices;
189  std::vector<uint32_t> m_foundx;
190  std::vector<uint32_t> m_foundy;
191 
192  uint32_t m_iterId;
193  int32_t m_current;
194  uint32_t m_facetCount;
195 
196  NvcVec3 m_minimal;
197  NvcVec3 m_maximal;
198 
199  NvcVec3 m_rescale;
200 
201 
202  };
203 
204 
211  {
212  public:
217  BBoxBasedAccelerator(const Mesh* mesh, int32_t resolution);
218  virtual ~BBoxBasedAccelerator();
219  int32_t getNextFacet() override;
220  void setState(const Vertex* pos, const Edge* ed, const Facet& fc) override;
221  void setState(const NvcBounds3* bounds) override;
222  void setState(const NvcVec3& p) override;
223  void setPointCmpDirection(int32_t dir) override {};
224  private:
225 
226  void buildAccelStructure(const Vertex* pos, const Edge* edges, const Facet* fc, int32_t facetCount);
227 
228  int32_t m_resolution;
229  NvcBounds3 m_bounds;
230  std::vector< std::vector<int32_t> > m_spatialMap;
231  std::vector<NvcBounds3> m_cells;
232 
233 
234  // Iterator data
235  std::vector<uint32_t> m_alreadyGotFlag;
236  uint32_t m_alreadyGotValue;
237  std::vector<int32_t> m_cellList;
238  int32_t m_gotCells;
239  int32_t m_iteratorCell;
240  int32_t m_iteratorFacet;
241  };
242 
243  } // namespace Blast
244 } // namsepace Nv
245 
246 
247 #endif // ifndef NVBLASTEXTAUTHORINGACCELERATOR_H
virtual void setPointCmpDirection(int32_t dir) override
Definition: NvBlastExtAuthoringAccelerator.h:178
Definition: NvBlastExtAuthoringAccelerator.h:210
Definition: NvBlastExtAuthoringAccelerator.h:47
diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_bond_generator_8h_source.html b/docs/api_docs/files/_nv_blast_ext_authoring_bond_generator_8h_source.html index f9e48f6..af3d332 100755 --- a/docs/api_docs/files/_nv_blast_ext_authoring_bond_generator_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_bond_generator_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_bond_generator
NvBlastExtAuthoringBondGenerator.h
-Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTAUTHORINGBONDGENERATOR_H
30 #define NVBLASTEXTAUTHORINGBONDGENERATOR_H
31 
33 
34 struct NvBlastBondDesc;
35 struct NvBlastChunkDesc;
36 struct NvBlastBond;
37 
38 namespace Nv
39 {
40 namespace Blast
41 {
42 
43 // Forward declarations
44 class FractureTool;
45 class TriangleProcessor;
46 struct PlaneChunkIndexer;
47 
55 {
59 };
60 
61 
63 {
64  int32_t chunkId;
65  int32_t trId;
67 };
68 
69 
75 {
76 public:
77  virtual ~BlastBondGenerator() {}
78 
82  virtual void release() = 0;
83 
93  virtual int32_t buildDescFromInternalFracture(FractureTool* tool, const bool* chunkIsSupport,
94  NvBlastBondDesc*& resultBondDescs, NvBlastChunkDesc*& resultChunkDescriptors) = 0;
95 
96 
107  virtual int32_t createBondBetweenMeshes(uint32_t meshACount, const Triangle* meshA, uint32_t meshBCount, const Triangle* meshB,
108  NvBlastBond& resultBond, BondGenerationConfig conf) = 0;
109 
124  virtual int32_t createBondBetweenMeshes(uint32_t meshCount, const uint32_t* geometryOffset, const Triangle* geometry,
125  uint32_t overlapsCount, const uint32_t* overlapsA, const uint32_t* overlapsB,
126  NvBlastBondDesc*& resultBond, BondGenerationConfig cfg) = 0;
127 
128 
142  virtual int32_t bondsFromPrefractured(uint32_t meshCount, const uint32_t* geometryOffset, const Triangle* geometry,
143  const bool* chunkIsSupport, NvBlastBondDesc*& resultBondDescs,
144  BondGenerationConfig conf) = 0;
145 
160  virtual int32_t bondsFromPrefractured(uint32_t meshCount, const uint32_t* convexHullOffset, const CollisionHull** chunkHulls,
161  const bool* chunkIsSupport, const uint32_t* meshGroups, NvBlastBondDesc*& resultBondDescs, float maxSeparation) = 0;
162 
163 
164 
165 };
166 
167 } // namespace Blast
168 } // namespace Nv
169 
170 #endif // NVBLASTEXTAUTHORINGBONDGENERATOR_H
NvcPlane plane
Definition: NvBlastExtAuthoringBondGenerator.h:66
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTAUTHORINGBONDGENERATOR_H
30 #define NVBLASTEXTAUTHORINGBONDGENERATOR_H
31 
33 
34 struct NvBlastBondDesc;
35 struct NvBlastChunkDesc;
36 struct NvBlastBond;
37 
38 namespace Nv
39 {
40 namespace Blast
41 {
42 
43 // Forward declarations
44 class FractureTool;
45 class TriangleProcessor;
46 struct PlaneChunkIndexer;
47 
55 {
59 };
60 
61 
63 {
64  int32_t chunkId;
65  int32_t trId;
67 };
68 
69 
75 {
76 public:
77  virtual ~BlastBondGenerator() {}
78 
82  virtual void release() = 0;
83 
93  virtual int32_t buildDescFromInternalFracture(FractureTool* tool, const bool* chunkIsSupport,
94  NvBlastBondDesc*& resultBondDescs, NvBlastChunkDesc*& resultChunkDescriptors) = 0;
95 
96 
107  virtual int32_t createBondBetweenMeshes(uint32_t meshACount, const Triangle* meshA, uint32_t meshBCount, const Triangle* meshB,
108  NvBlastBond& resultBond, BondGenerationConfig conf) = 0;
109 
124  virtual int32_t createBondBetweenMeshes(uint32_t meshCount, const uint32_t* geometryOffset, const Triangle* geometry,
125  uint32_t overlapsCount, const uint32_t* overlapsA, const uint32_t* overlapsB,
126  NvBlastBondDesc*& resultBond, BondGenerationConfig cfg) = 0;
127 
128 
142  virtual int32_t bondsFromPrefractured(uint32_t meshCount, const uint32_t* geometryOffset, const Triangle* geometry,
143  const bool* chunkIsSupport, NvBlastBondDesc*& resultBondDescs,
144  BondGenerationConfig conf) = 0;
145 
160  virtual int32_t bondsFromPrefractured(uint32_t meshCount, const uint32_t* convexHullOffset, const CollisionHull** chunkHulls,
161  const bool* chunkIsSupport, const uint32_t* meshGroups, NvBlastBondDesc*& resultBondDescs, float maxSeparation) = 0;
162 
163 
164 
165 };
166 
167 } // namespace Blast
168 } // namespace Nv
169 
170 #endif // NVBLASTEXTAUTHORINGBONDGENERATOR_H
NvcPlane plane
Definition: NvBlastExtAuthoringBondGenerator.h:66
int32_t trId
Definition: NvBlastExtAuthoringBondGenerator.h:65
BondGenMode
Definition: NvBlastExtAuthoringBondGenerator.h:56
Definition: NvBlastTypes.h:189
diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_convex_mesh_builder_8h_source.html b/docs/api_docs/files/_nv_blast_ext_authoring_convex_mesh_builder_8h_source.html index b587842..333620d 100644 --- a/docs/api_docs/files/_nv_blast_ext_authoring_convex_mesh_builder_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_convex_mesh_builder_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_convex_mesh_bu
NvBlastExtAuthoringConvexMeshBuilder.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 NVBLASTEXTAUTHORINGCONVEXMESHBUILDER_H
30 #define NVBLASTEXTAUTHORINGCONVEXMESHBUILDER_H
31 
32 #include "NvCTypes.h"
33 
34 namespace Nv
35 {
36 namespace Blast
37 {
38 
39 struct CollisionHull;
40 
48 {
49 public:
50 
54  virtual void release() = 0;
55 
62  virtual CollisionHull* buildCollisionGeometry(uint32_t verticesCount, const NvcVec3* vertexData) = 0;
63 
67  virtual void releaseCollisionHull(CollisionHull* hull) const = 0;
68 };
69 
70 } // namespace Blast
71 } // namespace Nv
72 
73 
74 #endif // ifndef NVBLASTEXTAUTHORINGCONVEXMESHBUILDER_H
Definition: NvBlastExtAuthoringConvexMeshBuilder.h:47
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTAUTHORINGCONVEXMESHBUILDER_H
30 #define NVBLASTEXTAUTHORINGCONVEXMESHBUILDER_H
31 
32 #include "NvCTypes.h"
33 
34 namespace Nv
35 {
36 namespace Blast
37 {
38 
39 struct CollisionHull;
40 
48 {
49 public:
50 
54  virtual void release() = 0;
55 
62  virtual CollisionHull* buildCollisionGeometry(uint32_t verticesCount, const NvcVec3* vertexData) = 0;
63 
67  virtual void releaseCollisionHull(CollisionHull* hull) const = 0;
68 };
69 
70 } // namespace Blast
71 } // namespace Nv
72 
73 
74 #endif // ifndef NVBLASTEXTAUTHORINGCONVEXMESHBUILDER_H
Definition: NvBlastExtAuthoringConvexMeshBuilder.h:47
virtual CollisionHull * buildCollisionGeometry(uint32_t verticesCount, const NvcVec3 *vertexData)=0
Definition: NvBlastExtAuthoringTypes.h:133
diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_cutout_8h_source.html b/docs/api_docs/files/_nv_blast_ext_authoring_cutout_8h_source.html index 0be7477..f0f019a 100755 --- a/docs/api_docs/files/_nv_blast_ext_authoring_cutout_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_cutout_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_cutout_8h_sour
NvBlastExtAuthoringCutout.h
-Go to the documentation of this file.
1 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
2 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
3 //
4 // Information and code furnished is believed to be accurate and reliable.
5 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
6 // information or for any infringement of patents or other rights of third parties that may
7 // result from its use. No license is granted by implication or otherwise under any patent
8 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
9 // This code supersedes and replaces all information previously supplied.
10 // NVIDIA Corporation products are not authorized for use as critical
11 // components in life support devices or systems without express written approval of
12 // NVIDIA Corporation.
13 //
14 // Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
15 
16 #ifndef NVBLASTAUTHORINGCUTOUT_H
17 #define NVBLASTAUTHORINGCUTOUT_H
18 
20 
21 
22 namespace Nv
23 {
24 namespace Blast
25 {
26 
36 class CutoutSet
37 {
38 public:
40  virtual uint32_t getCutoutCount() const = 0;
41 
46  virtual uint32_t getCutoutVertexCount(uint32_t cutoutIndex, uint32_t loopIndex) const = 0;
47 
52  virtual uint32_t getCutoutLoopCount(uint32_t cutoutIndex) const = 0;
53 
58  virtual const NvcVec3& getCutoutVertex(uint32_t cutoutIndex, uint32_t loopIndex, uint32_t vertexIndex) const = 0;
59 
63  virtual bool isCutoutVertexToggleSmoothingGroup(uint32_t cutoutIndex, uint32_t loopIndex, uint32_t vertexIndex) const = 0;
64 
68  virtual bool isPeriodic() const = 0;
69 
73  virtual const NvcVec2& getDimensions() const = 0;
74 
76  virtual void release() = 0;
77 
78 protected:
80  virtual ~CutoutSet() {}
81 };
82 
83 } // namespace Blast
84 } // namespace Nv
85 
86 
87 #endif // idndef NVBLASTAUTHORINGCUTOUT_H
virtual const NvcVec3 & getCutoutVertex(uint32_t cutoutIndex, uint32_t loopIndex, uint32_t vertexIndex) const =0
+Go to the documentation of this file.
1 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
2 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
3 //
4 // Information and code furnished is believed to be accurate and reliable.
5 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
6 // information or for any infringement of patents or other rights of third parties that may
7 // result from its use. No license is granted by implication or otherwise under any patent
8 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
9 // This code supersedes and replaces all information previously supplied.
10 // NVIDIA Corporation products are not authorized for use as critical
11 // components in life support devices or systems without express written approval of
12 // NVIDIA Corporation.
13 //
14 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
15 
16 #ifndef NVBLASTAUTHORINGCUTOUT_H
17 #define NVBLASTAUTHORINGCUTOUT_H
18 
20 
21 
22 namespace Nv
23 {
24 namespace Blast
25 {
26 
36 class CutoutSet
37 {
38 public:
40  virtual uint32_t getCutoutCount() const = 0;
41 
46  virtual uint32_t getCutoutVertexCount(uint32_t cutoutIndex, uint32_t loopIndex) const = 0;
47 
52  virtual uint32_t getCutoutLoopCount(uint32_t cutoutIndex) const = 0;
53 
58  virtual const NvcVec3& getCutoutVertex(uint32_t cutoutIndex, uint32_t loopIndex, uint32_t vertexIndex) const = 0;
59 
63  virtual bool isCutoutVertexToggleSmoothingGroup(uint32_t cutoutIndex, uint32_t loopIndex, uint32_t vertexIndex) const = 0;
64 
68  virtual bool isPeriodic() const = 0;
69 
73  virtual const NvcVec2& getDimensions() const = 0;
74 
76  virtual void release() = 0;
77 
78 protected:
80  virtual ~CutoutSet() {}
81 };
82 
83 } // namespace Blast
84 } // namespace Nv
85 
86 
87 #endif // idndef NVBLASTAUTHORINGCUTOUT_H
virtual const NvcVec3 & getCutoutVertex(uint32_t cutoutIndex, uint32_t loopIndex, uint32_t vertexIndex) const =0
virtual ~CutoutSet()
Definition: NvBlastExtAuthoringCutout.h:80
Definition: NvBlastExtAuthoringCutout.h:36
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 8c9f366..5b813ff 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 @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_fracture_tool_
NvBlastExtAuthoringFractureTool.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,
52  APPROXIMATE_BONDING = 1 // Created by island splitting or chunk merge, etc. and should check for inexact bonds
53  };
54 
56  int32_t parent;
57  int32_t chunkId;
58  uint32_t flags;
59  bool isLeaf;
60  bool isChanged;
61 };
62 
67 {
68  public:
69  // Generates uniformly distributed value in [0, 1] range.
70  virtual float getRandomValue() = 0;
71  // Seeds random value generator
72  virtual void seed(int32_t seed) = 0;
73  virtual ~RandomGeneratorBase(){};
74 };
75 
76 /*
77  Noise fracturing configuration for chunks's faces
78 */
80 {
86  float amplitude = 0.f;
87 
91  float frequency = 1.f;
92 
96  uint32_t octaveNumber = 1;
97 
101  NvcVec3 samplingInterval = { 1, 1, 1 };
102 };
103 
104 /*
105  Slicing fracturing configuration
106 */
108 {
112  int32_t x_slices = 1, y_slices = 1, z_slices = 1;
113 
117  float offset_variations = 0.f;
118 
122  float angle_variations = 0.f;
123 
124  /*
125  Noise parameters for faces between sliced chunks
126  */
128 };
129 
134 {
139  CutoutSet* cutoutSet = nullptr;
140 
145  NvcTransform transform = {{0, 0, 0, 1}, {0, 0, 0}};
146 
152  NvcVec2 scale = { -1, -1 };
153 
157  float aperture = 0.f;
158 
163  bool isRelativeTransform = true;
164 
168  bool useSmoothing = false;
169 
174 };
175 
180 {
181  public:
183 
187  virtual void release() = 0;
188 
192  virtual void setBaseMesh(const Mesh* mesh) = 0;
193 
199  virtual uint32_t getVoronoiSites(const NvcVec3*& sites) = 0;
200 
205  virtual void addSite(const NvcVec3& site) = 0;
210  virtual void uniformlyGenerateSitesInMesh(uint32_t numberOfSites) = 0;
211 
218  virtual void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) = 0;
219 
230  virtual void radialPattern(const NvcVec3& center, const NvcVec3& normal, float radius, int32_t angularSteps,
231  int32_t radialSteps, float angleOffset = 0.0f, float variability = 0.0f) = 0;
232 
239  virtual void generateInSphere(const uint32_t count, const float radius, const NvcVec3& center) = 0;
240 
245  virtual void setStencil(const Mesh* stencil) = 0;
246 
250  virtual void clearStencil() = 0;
251 
258  virtual void deleteInSphere(const float radius, const NvcVec3& center, const float eraserProbability = 1) = 0;
259 };
260 
265 {
266 
267  public:
268  virtual ~FractureTool() {}
269 
273  virtual void release() = 0;
274 
278  virtual void reset() = 0;
279 
280 
284  virtual void setSourceMesh(const Mesh* mesh) = 0;
285 
289  virtual int32_t setChunkMesh(const Mesh* mesh, int32_t parentId) = 0;
290 
294  virtual void setInteriorMaterialId(int32_t materialId) = 0;
295 
299  virtual int32_t getInteriorMaterialId() const = 0;
300 
304  virtual void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) = 0;
305 
309  virtual Mesh* createChunkMesh(int32_t chunkId) = 0;
310 
315  virtual void getTransformation(NvcVec3& offset, float& scale) = 0;
316 
317 
326  virtual int32_t
327  voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, bool replaceChunk) = 0;
328 
340  virtual int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints,
341  const NvcVec3& scale, const NvcQuat& rotation, bool replaceChunk) = 0;
342 
343 
355  virtual int32_t
356  slicing(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
357 
371  virtual int32_t cut(uint32_t chunkId, const NvcVec3& normal, const NvcVec3& position,
372  const NoiseConfiguration& noise, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
373 
385  virtual int32_t cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
386 
387 
391  virtual void finalizeFracturing() = 0;
392 
396  virtual uint32_t getChunkCount() const = 0;
397 
401  virtual const ChunkInfo& getChunkInfo(int32_t chunkIndex) = 0;
402 
410  virtual float getMeshOverlap(const Mesh& meshA, const Mesh& meshB) = 0;
411 
418  virtual uint32_t getBaseMesh(int32_t chunkIndex, Triangle*& output) = 0;
419 
427  virtual uint32_t updateBaseMesh(int32_t chunkIndex, Triangle* output) = 0;
428 
434  virtual int32_t getChunkIndex(int32_t chunkId) = 0;
435 
441  virtual int32_t getChunkId(int32_t chunkIndex) = 0;
442 
448  virtual int32_t getChunkDepth(int32_t chunkId) = 0;
449 
456  virtual uint32_t getChunksIdAtDepth(uint32_t depth, int32_t*& chunkIds) = 0;
457 
467  virtual uint32_t
468  getBufferedBaseMeshes(Vertex*& vertexBuffer, uint32_t*& indexBuffer, uint32_t*& indexBufferOffsets) = 0;
469 
474  virtual void setRemoveIslands(bool isRemoveIslands) = 0;
475 
481  virtual int32_t islandDetectionAndRemoving(int32_t chunkId, bool createAtNewDepth = false) = 0;
482 
487  virtual bool isMeshContainOpenEdges(const Mesh* input) = 0;
488 
495  virtual bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) = 0;
496 
510  virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
511  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
512  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
513  bool removeOriginalChunks = false) = 0;
514 
521  virtual bool setApproximateBonding(uint32_t chunkIndex, bool useApproximateBonding) = 0;
522 
528  virtual void fitUvToRect(float side, uint32_t chunkId) = 0;
529 
534  virtual void fitAllUvToRect(float side) = 0;
535 };
536 
537 } // namespace Blast
538 } // namespace Nv
539 
540 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H
Definition: NvBlastExtAuthoringFractureTool.h:107
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTAUTHORINGFRACTURETOOL_H
30 #define NVBLASTAUTHORINGFRACTURETOOL_H
31 
33 
34 namespace Nv
35 {
36 namespace Blast
37 {
38 
39 class SpatialAccelerator;
40 class Triangulator;
41 class Mesh;
42 class CutoutSet;
43 
44 /*
45  Chunk data, chunk with chunkId == 0 is always source mesh.
46 */
47 struct ChunkInfo
48 {
50  {
51  NO_FLAGS = 0,
52  APPROXIMATE_BONDING = 1 // Created by island splitting or chunk merge, etc. and should check for inexact bonds
53  };
54 
56  int32_t parent;
57  int32_t chunkId;
58  uint32_t flags;
59  bool isLeaf;
60  bool isChanged;
61 };
62 
67 {
68  public:
69  // Generates uniformly distributed value in [0, 1] range.
70  virtual float getRandomValue() = 0;
71  // Seeds random value generator
72  virtual void seed(int32_t seed) = 0;
73  virtual ~RandomGeneratorBase(){};
74 };
75 
76 /*
77  Noise fracturing configuration for chunks's faces
78 */
80 {
86  float amplitude = 0.f;
87 
91  float frequency = 1.f;
92 
96  uint32_t octaveNumber = 1;
97 
101  NvcVec3 samplingInterval = { 1, 1, 1 };
102 };
103 
104 /*
105  Slicing fracturing configuration
106 */
108 {
112  int32_t x_slices = 1, y_slices = 1, z_slices = 1;
113 
117  float offset_variations = 0.f;
118 
122  float angle_variations = 0.f;
123 
124  /*
125  Noise parameters for faces between sliced chunks
126  */
128 };
129 
134 {
139  CutoutSet* cutoutSet = nullptr;
140 
145  NvcTransform transform = {{0, 0, 0, 1}, {0, 0, 0}};
146 
152  NvcVec2 scale = { -1, -1 };
153 
157  float aperture = 0.f;
158 
163  bool isRelativeTransform = true;
164 
168  bool useSmoothing = false;
169 
174 };
175 
180 {
181  public:
183 
187  virtual void release() = 0;
188 
192  virtual void setBaseMesh(const Mesh* mesh) = 0;
193 
199  virtual uint32_t getVoronoiSites(const NvcVec3*& sites) = 0;
200 
205  virtual void addSite(const NvcVec3& site) = 0;
210  virtual void uniformlyGenerateSitesInMesh(uint32_t numberOfSites) = 0;
211 
218  virtual void clusteredSitesGeneration(uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) = 0;
219 
230  virtual void radialPattern(const NvcVec3& center, const NvcVec3& normal, float radius, int32_t angularSteps,
231  int32_t radialSteps, float angleOffset = 0.0f, float variability = 0.0f) = 0;
232 
239  virtual void generateInSphere(const uint32_t count, const float radius, const NvcVec3& center) = 0;
240 
245  virtual void setStencil(const Mesh* stencil) = 0;
246 
250  virtual void clearStencil() = 0;
251 
258  virtual void deleteInSphere(const float radius, const NvcVec3& center, const float eraserProbability = 1) = 0;
259 };
260 
265 {
266 
267  public:
268  virtual ~FractureTool() {}
269 
273  virtual void release() = 0;
274 
278  virtual void reset() = 0;
279 
280 
284  virtual void setSourceMesh(const Mesh* mesh) = 0;
285 
289  virtual int32_t setChunkMesh(const Mesh* mesh, int32_t parentId) = 0;
290 
294  virtual void setInteriorMaterialId(int32_t materialId) = 0;
295 
299  virtual int32_t getInteriorMaterialId() const = 0;
300 
304  virtual void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) = 0;
305 
309  virtual Mesh* createChunkMesh(int32_t chunkId) = 0;
310 
315  virtual void getTransformation(NvcVec3& offset, float& scale) = 0;
316 
317 
326  virtual int32_t
327  voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints, bool replaceChunk) = 0;
328 
340  virtual int32_t voronoiFracturing(uint32_t chunkId, uint32_t cellCount, const NvcVec3* cellPoints,
341  const NvcVec3& scale, const NvcQuat& rotation, bool replaceChunk) = 0;
342 
343 
355  virtual int32_t
356  slicing(uint32_t chunkId, const SlicingConfiguration& conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
357 
371  virtual int32_t cut(uint32_t chunkId, const NvcVec3& normal, const NvcVec3& position,
372  const NoiseConfiguration& noise, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
373 
385  virtual int32_t cutout(uint32_t chunkId, CutoutConfiguration conf, bool replaceChunk, RandomGeneratorBase* rnd) = 0;
386 
387 
391  virtual void finalizeFracturing() = 0;
392 
396  virtual uint32_t getChunkCount() const = 0;
397 
401  virtual const ChunkInfo& getChunkInfo(int32_t chunkIndex) = 0;
402 
410  virtual float getMeshOverlap(const Mesh& meshA, const Mesh& meshB) = 0;
411 
418  virtual uint32_t getBaseMesh(int32_t chunkIndex, Triangle*& output) = 0;
419 
427  virtual uint32_t updateBaseMesh(int32_t chunkIndex, Triangle* output) = 0;
428 
434  virtual int32_t getChunkIndex(int32_t chunkId) = 0;
435 
441  virtual int32_t getChunkId(int32_t chunkIndex) = 0;
442 
448  virtual int32_t getChunkDepth(int32_t chunkId) = 0;
449 
456  virtual uint32_t getChunksIdAtDepth(uint32_t depth, int32_t*& chunkIds) = 0;
457 
467  virtual uint32_t
468  getBufferedBaseMeshes(Vertex*& vertexBuffer, uint32_t*& indexBuffer, uint32_t*& indexBufferOffsets) = 0;
469 
474  virtual void setRemoveIslands(bool isRemoveIslands) = 0;
475 
481  virtual int32_t islandDetectionAndRemoving(int32_t chunkId, bool createAtNewDepth = false) = 0;
482 
487  virtual bool isMeshContainOpenEdges(const Mesh* input) = 0;
488 
495  virtual bool deleteChunkSubhierarchy(int32_t chunkId, bool deleteRoot = false) = 0;
496 
510  virtual void uniteChunks(uint32_t threshold, uint32_t targetClusterSize,
511  const uint32_t* chunksToMerge, uint32_t mergeChunkCount,
512  const NvcVec2i* adjChunks, uint32_t adjChunksSize,
513  bool removeOriginalChunks = false) = 0;
514 
521  virtual bool setApproximateBonding(uint32_t chunkIndex, bool useApproximateBonding) = 0;
522 
528  virtual void fitUvToRect(float side, uint32_t chunkId) = 0;
529 
534  virtual void fitAllUvToRect(float side) = 0;
535 };
536 
537 } // namespace Blast
538 } // namespace Nv
539 
540 #endif // ifndef NVBLASTAUTHORINGFRACTURETOOL_H
Definition: NvBlastExtAuthoringFractureTool.h:107
Definition: NvBlastExtAuthoringFractureTool.h:47
Definition: NvBlastExtAuthoringFractureTool.h:179
Definition: NvBlastExtAuthoringCutout.h:36
diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_mesh_8h_source.html b/docs/api_docs/files/_nv_blast_ext_authoring_mesh_8h_source.html index 0b588c6..b99b160 100755 --- a/docs/api_docs/files/_nv_blast_ext_authoring_mesh_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_mesh_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_mesh_8h_source
NvBlastExtAuthoringMesh.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 NVBLASTAUTHORINGMESH_H
30 #define NVBLASTAUTHORINGMESH_H
31 
33 
34 namespace Nv
35 {
36 namespace Blast
37 {
38 
42 class Mesh
43 {
44 public:
45 
46  virtual ~Mesh() {}
47 
51  virtual void release() = 0;
52 
56  virtual bool isValid() const = 0;
57 
61  virtual Vertex* getVerticesWritable() = 0;
62 
66  virtual const Vertex* getVertices() const = 0;
67 
68 
72  virtual Edge* getEdgesWritable() = 0;
73 
77  virtual const Edge* getEdges() const = 0;
78 
82  virtual Facet* getFacetsBufferWritable() = 0;
83 
87  virtual const Facet* getFacetsBuffer() const = 0;
88 
92  virtual Facet* getFacetWritable(int32_t facet) = 0;
96  virtual const Facet* getFacet(int32_t facet) const = 0;
97 
101  virtual uint32_t getEdgesCount() const = 0;
102 
106  virtual uint32_t getVerticesCount() const = 0;
107 
111  virtual uint32_t getFacetCount() const = 0;
112 
116  virtual const NvcBounds3& getBoundingBox() const = 0;
117 
121  virtual NvcBounds3& getBoundingBoxWritable() = 0;
122 
123 
127  virtual void setMaterialId(const int32_t* materialIds) = 0;
128 
132  virtual void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) = 0;
133 
137  virtual void setSmoothingGroup(const int32_t* smoothingGroups) = 0;
138 
142  virtual void recalculateBoundingBox() = 0;
143 
148  virtual float getMeshVolume() = 0;
149 
150 
154  virtual void calcPerFacetBounds() = 0;
155 
159  virtual const NvcBounds3* getFacetBound(uint32_t index) const = 0;
160 
161 };
162 
163 } // namespace Blast
164 } // namespace Nv
165 
166 
167 #endif // ifndef NVBLASTAUTHORINGMESH_H
virtual Edge * getEdgesWritable()=0
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTAUTHORINGMESH_H
30 #define NVBLASTAUTHORINGMESH_H
31 
33 
34 namespace Nv
35 {
36 namespace Blast
37 {
38 
42 class Mesh
43 {
44 public:
45 
46  virtual ~Mesh() {}
47 
51  virtual void release() = 0;
52 
56  virtual bool isValid() const = 0;
57 
61  virtual Vertex* getVerticesWritable() = 0;
62 
66  virtual const Vertex* getVertices() const = 0;
67 
68 
72  virtual Edge* getEdgesWritable() = 0;
73 
77  virtual const Edge* getEdges() const = 0;
78 
82  virtual Facet* getFacetsBufferWritable() = 0;
83 
87  virtual const Facet* getFacetsBuffer() const = 0;
88 
92  virtual Facet* getFacetWritable(int32_t facet) = 0;
96  virtual const Facet* getFacet(int32_t facet) const = 0;
97 
101  virtual uint32_t getEdgesCount() const = 0;
102 
106  virtual uint32_t getVerticesCount() const = 0;
107 
111  virtual uint32_t getFacetCount() const = 0;
112 
116  virtual const NvcBounds3& getBoundingBox() const = 0;
117 
121  virtual NvcBounds3& getBoundingBoxWritable() = 0;
122 
123 
127  virtual void setMaterialId(const int32_t* materialIds) = 0;
128 
132  virtual void replaceMaterialId(int32_t oldMaterialId, int32_t newMaterialId) = 0;
133 
137  virtual void setSmoothingGroup(const int32_t* smoothingGroups) = 0;
138 
142  virtual void recalculateBoundingBox() = 0;
143 
148  virtual float getMeshVolume() = 0;
149 
150 
154  virtual void calcPerFacetBounds() = 0;
155 
159  virtual const NvcBounds3* getFacetBound(uint32_t index) const = 0;
160 
161 };
162 
163 } // namespace Blast
164 } // namespace Nv
165 
166 
167 #endif // ifndef NVBLASTAUTHORINGMESH_H
virtual Edge * getEdgesWritable()=0
virtual Facet * getFacetWritable(int32_t facet)=0
virtual void setSmoothingGroup(const int32_t *smoothingGroups)=0
virtual Facet * getFacetsBufferWritable()=0
diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_mesh_cleaner_8h_source.html b/docs/api_docs/files/_nv_blast_ext_authoring_mesh_cleaner_8h_source.html index 39c01f3..db22219 100755 --- a/docs/api_docs/files/_nv_blast_ext_authoring_mesh_cleaner_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_mesh_cleaner_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_mesh_cleaner_8
NvBlastExtAuthoringMeshCleaner.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 NVBLASTEXTAUTHORINGMESHCLEANER_H
30 #define NVBLASTEXTAUTHORINGMESHCLEANER_H
31 
33 
45 namespace Nv
46 {
47 namespace Blast
48 {
49 
50 class Mesh;
51 
53 {
54 public:
55  virtual ~MeshCleaner() {}
56 
62  virtual Mesh* cleanMesh(const Mesh* mesh) = 0;
63 
64  virtual void release() = 0;
65 };
66 
67 
68 } // namespace Blast
69 } // namespace Nv
70 
71 #endif // ifndef NVBLASTEXTAUTHORINGMESHCLEANER_H
virtual ~MeshCleaner()
Definition: NvBlastExtAuthoringMeshCleaner.h:55
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTAUTHORINGMESHCLEANER_H
30 #define NVBLASTEXTAUTHORINGMESHCLEANER_H
31 
33 
45 namespace Nv
46 {
47 namespace Blast
48 {
49 
50 class Mesh;
51 
53 {
54 public:
55  virtual ~MeshCleaner() {}
56 
62  virtual Mesh* cleanMesh(const Mesh* mesh) = 0;
63 
64  virtual void release() = 0;
65 };
66 
67 
68 } // namespace Blast
69 } // namespace Nv
70 
71 #endif // ifndef NVBLASTEXTAUTHORINGMESHCLEANER_H
virtual ~MeshCleaner()
Definition: NvBlastExtAuthoringMeshCleaner.h:55
Definition: NvBlastExtAuthoringMeshCleaner.h:52
Definition: NvBlastExtAuthoringMesh.h:42
diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_pattern_generator_8h_source.html b/docs/api_docs/files/_nv_blast_ext_authoring_pattern_generator_8h_source.html index ccf7d55..7da7ead 100644 --- a/docs/api_docs/files/_nv_blast_ext_authoring_pattern_generator_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_pattern_generator_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_pattern_genera
NvBlastExtAuthoringPatternGenerator.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 NVBLASTEXTAUTHORINGPATTERNGENERATOR_H
30 #define NVBLASTEXTAUTHORINGPATTERNGENERATOR_H
31 
32 #include "NvBlastGlobals.h"
33 
34 namespace Nv
35 {
36  namespace Blast
37  {
38  typedef float (*RNG_CALLBACK)(void);
39 
41  {
42  RNG_CALLBACK RNG = nullptr;
43 
44  uint32_t interiorMaterialId = 1000;
45  };
46 
48  {
49  uint32_t cellsCount = 2;
50 
51  float radiusMin = 0.0f;
52  float radiusMax = 1.0f;
53  float radiusDistr = 1.0f;
54 
55  float debrisRadiusMult = 1.0f;
56  };
57 
59  {
60  uint32_t cellsCount;
61 
62  float radiusMin;
63  float radiusMax;
64  };
65 
67  {
68  float radiusMin = 0.0f;
69  float radiusMax = 1.0f;
70 
71  uint32_t radialSteps = 3;
72  uint32_t angularSteps = 8;
73 
74  float aperture = .0f;
75 
76  float angularNoiseAmplitude = 0.0f;
77 
78  float radialNoiseAmplitude = 0.0f;
79  float radialNoiseFrequency = 0.0f;
80 
81  float debrisRadiusMult = 1.0f;
82  };
83 
84 
86  {
91  float angle; // For cone shape activation
93  {
94  Point = 0,
96  Cone
97  };
98  ActivationDistanceType activationType = Point;
99  // ----------------------------------------------
100 
101 
102  uint32_t cellsCount;
103  class Mesh** cellsMeshes = nullptr;
104 
105  virtual void release() = 0;
106  };
107 
109  {
110  public:
111  virtual DamagePattern* generateUniformPattern(const UniformPatternDesc* desc) = 0;
112  virtual DamagePattern* generateBeamPattern(const BeamPatternDesc* desc) = 0;
113  virtual DamagePattern* generateRegularRadialPattern(const RegularRadialPatternDesc* desc) = 0;
114 
115 
116  virtual DamagePattern* generateVoronoiPattern(uint32_t pointCount, const NvcVec3* points, int32_t interiorMaterialId) = 0;
117  virtual void release() = 0;
118  };
119 
121 
122  } // namespace Blast
123 } // namespace Nv
124 
125 
126 #endif // ifndef NVBLASTEXTAUTHORINGMESHCLEANER_H
float radiusMax
Definition: NvBlastExtAuthoringPatternGenerator.h:63
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTEXTAUTHORINGPATTERNGENERATOR_H
30 #define NVBLASTEXTAUTHORINGPATTERNGENERATOR_H
31 
32 #include "NvBlastGlobals.h"
33 
34 namespace Nv
35 {
36  namespace Blast
37  {
38  typedef float (*RNG_CALLBACK)(void);
39 
41  {
42  RNG_CALLBACK RNG = nullptr;
43 
44  uint32_t interiorMaterialId = 1000;
45  };
46 
48  {
49  uint32_t cellsCount = 2;
50 
51  float radiusMin = 0.0f;
52  float radiusMax = 1.0f;
53  float radiusDistr = 1.0f;
54 
55  float debrisRadiusMult = 1.0f;
56  };
57 
59  {
60  uint32_t cellsCount;
61 
62  float radiusMin;
63  float radiusMax;
64  };
65 
67  {
68  float radiusMin = 0.0f;
69  float radiusMax = 1.0f;
70 
71  uint32_t radialSteps = 3;
72  uint32_t angularSteps = 8;
73 
74  float aperture = .0f;
75 
76  float angularNoiseAmplitude = 0.0f;
77 
78  float radialNoiseAmplitude = 0.0f;
79  float radialNoiseFrequency = 0.0f;
80 
81  float debrisRadiusMult = 1.0f;
82  };
83 
84 
86  {
91  float angle; // For cone shape activation
93  {
94  Point = 0,
96  Cone
97  };
98  ActivationDistanceType activationType = Point;
99  // ----------------------------------------------
100 
101 
102  uint32_t cellsCount;
103  class Mesh** cellsMeshes = nullptr;
104 
105  virtual void release() = 0;
106  };
107 
109  {
110  public:
111  virtual DamagePattern* generateUniformPattern(const UniformPatternDesc* desc) = 0;
112  virtual DamagePattern* generateBeamPattern(const BeamPatternDesc* desc) = 0;
113  virtual DamagePattern* generateRegularRadialPattern(const RegularRadialPatternDesc* desc) = 0;
114 
115 
116  virtual DamagePattern* generateVoronoiPattern(uint32_t pointCount, const NvcVec3* points, int32_t interiorMaterialId) = 0;
117  virtual void release() = 0;
118  };
119 
121 
122  } // namespace Blast
123 } // namespace Nv
124 
125 
126 #endif // ifndef NVBLASTEXTAUTHORINGMESHCLEANER_H
float radiusMax
Definition: NvBlastExtAuthoringPatternGenerator.h:63
Definition: NvBlastExtAuthoringPatternGenerator.h:47
float radiusMin
Definition: NvBlastExtAuthoringPatternGenerator.h:62
uint32_t cellsCount
Definition: NvBlastExtAuthoringPatternGenerator.h:60
diff --git a/docs/api_docs/files/_nv_blast_ext_authoring_types_8h_source.html b/docs/api_docs/files/_nv_blast_ext_authoring_types_8h_source.html index 1f8244a..8f59665 100755 --- a/docs/api_docs/files/_nv_blast_ext_authoring_types_8h_source.html +++ b/docs/api_docs/files/_nv_blast_ext_authoring_types_8h_source.html @@ -38,7 +38,7 @@ $(document).ready(function(){initNavTree('_nv_blast_ext_authoring_types_8h_sourc
NvBlastExtAuthoringTypes.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 NVBLASTAUTHORINGTYPES_H
30 #define NVBLASTAUTHORINGTYPES_H
31 
32 #include "NvBlastTypes.h"
33 #include "NvCTypes.h"
34 
35 namespace Nv
36 {
37 namespace Blast
38 {
42 const uint32_t kMaterialInteriorId = 1000;
43 
47 const uint32_t kSmoothingGroupInteriorId = 1000;
48 
52 const uint32_t kNotValidVertexIndex = UINT32_MAX;
53 
57 struct Edge
58 {
59  Edge(uint32_t s = kNotValidVertexIndex, uint32_t e = kNotValidVertexIndex) : s(s), e(e) {}
60  uint32_t s;
61  uint32_t e;
62 };
63 
67 struct Vertex
68 {
69  Vertex() {};
70  Vertex(const NvcVec3& p, const NvcVec3& n, const NvcVec2& _uv) : p(p), n(n) { uv[0] = _uv; }
71  NvcVec3 p; // Position
72  NvcVec3 n; // Normal
73  NvcVec2 uv[1]; // UV-coordinates array, currently supported only one UV coordinate.
74 };
75 
79 struct Triangle
80 {
81  Triangle() {};
82  Triangle(const Vertex& a, const Vertex& b, const Vertex& c, int32_t ud = 0, int32_t mid = 0, int32_t sid = 0)
83  : a(a), b(b), c(c), userData(ud), materialId(mid), smoothingGroup(sid) {}
84  Vertex a, b, c;
85  int32_t userData;
86  int32_t materialId;
87  int32_t smoothingGroup;
88 };
89 
94 {
95  TriangleIndexed(uint32_t ea, uint32_t eb, uint32_t ec, int32_t mid = 0, int32_t sid = 0, int32_t ud = 0)
96  : ea(ea), eb(eb), ec(ec), materialId(mid), smoothingGroup(sid), userData(ud) {}
97  uint32_t ea, eb, ec;
98  int32_t materialId;
99  int32_t smoothingGroup;
100  int32_t userData;
101 };
102 
106 struct Facet
107 {
108  Facet(int32_t fen = 0, uint32_t ec = 0, int64_t ud = 0, int32_t mid = 0, int32_t sid = 0)
109  : firstEdgeNumber(fen), edgesCount(ec), userData(ud), materialId(mid), smoothingGroup(sid) {}
111  uint32_t edgesCount;
112  int64_t userData;
113  int32_t materialId;
114  int32_t smoothingGroup;
115 };
116 
121 {
122  // Polygon base plane
123  float plane[4];
124  // Number vertices in polygon
125  uint16_t vertexCount;
126  // First index in CollisionHull.indices array for this polygon
127  uint16_t indexBase;
128 };
129 
134 {
135  uint32_t pointsCount;
136  uint32_t indicesCount;
139  uint32_t* indices;
141 };
142 
149 {
150  uint32_t chunkCount; // Number of chunks in Blast asset
151 
152  uint32_t bondCount; // Number of bonds in Blast asset
153 
154  NvBlastAsset* asset; // Blast asset
155 
161 
167  uint32_t* geometryOffset;
168 
169  Triangle* geometry; // Raw array of Triangle for all chunks
170 
171  NvBlastChunkDesc* chunkDescs; // Array of chunk descriptors. Contains chunkCount elements
172 
173  NvBlastBondDesc* bondDescs; // Array of bond descriptors. Contains bondCount elements
174 
181 
182  CollisionHull** collisionHull; // Raw array of pointers to collision hull for all chunks.
183 
187  const char** materialNames;
192  uint32_t materialCount;
193 };
194 
196 {
197  uint32_t maximumNumberOfHulls = 8; // Maximum number of convex hull generated for one chunk. If equal to 1 convex
198  // decomposition is disabled.
199  uint32_t maximumNumberOfVerticesPerHull = 64; // Controls the maximum number of triangles per convex-hull
200  // (default=64, range=4-1024)
201  uint32_t voxelGridResolution = 1000000; // Voxel grid resolution used for chunk convex decomposition
202  // (default=1,000,000, range=10,000-16,000,000).
203  float concavity = 0.0025f; // Value between 0 and 1, controls how accurate hull generation is
204 };
205 
206 } // namespace Blast
207 } // namespace Nv
208 
209 
210 #endif // ifndef NVBLASTAUTHORINGTYPES_H
uint32_t indicesCount
Definition: NvBlastExtAuthoringTypes.h:136
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27 
28 
29 #ifndef NVBLASTAUTHORINGTYPES_H
30 #define NVBLASTAUTHORINGTYPES_H
31 
32 #include "NvBlastTypes.h"
33 #include "NvCTypes.h"
34 
35 namespace Nv
36 {
37 namespace Blast
38 {
42 const uint32_t kMaterialInteriorId = 1000;
43 
47 const uint32_t kSmoothingGroupInteriorId = 1000;
48 
52 const uint32_t kNotValidVertexIndex = UINT32_MAX;
53 
57 struct Edge
58 {
59  Edge(uint32_t s = kNotValidVertexIndex, uint32_t e = kNotValidVertexIndex) : s(s), e(e) {}
60  uint32_t s;
61  uint32_t e;
62 };
63 
67 struct Vertex
68 {
69  Vertex() {};
70  Vertex(const NvcVec3& p, const NvcVec3& n, const NvcVec2& _uv) : p(p), n(n) { uv[0] = _uv; }
71  NvcVec3 p; // Position
72  NvcVec3 n; // Normal
73  NvcVec2 uv[1]; // UV-coordinates array, currently supported only one UV coordinate.
74 };
75 
79 struct Triangle
80 {
81  Triangle() {};
82  Triangle(const Vertex& a, const Vertex& b, const Vertex& c, int32_t ud = 0, int32_t mid = 0, int32_t sid = 0)
83  : a(a), b(b), c(c), userData(ud), materialId(mid), smoothingGroup(sid) {}
84  Vertex a, b, c;
85  int32_t userData;
86  int32_t materialId;
87  int32_t smoothingGroup;
88 };
89 
94 {
95  TriangleIndexed(uint32_t ea, uint32_t eb, uint32_t ec, int32_t mid = 0, int32_t sid = 0, int32_t ud = 0)
96  : ea(ea), eb(eb), ec(ec), materialId(mid), smoothingGroup(sid), userData(ud) {}
97  uint32_t ea, eb, ec;
98  int32_t materialId;
99  int32_t smoothingGroup;
100  int32_t userData;
101 };
102 
106 struct Facet
107 {
108  Facet(int32_t fen = 0, uint32_t ec = 0, int64_t ud = 0, int32_t mid = 0, int32_t sid = 0)
109  : firstEdgeNumber(fen), edgesCount(ec), userData(ud), materialId(mid), smoothingGroup(sid) {}
111  uint32_t edgesCount;
112  int64_t userData;
113  int32_t materialId;
114  int32_t smoothingGroup;
115 };
116 
121 {
122  // Polygon base plane
123  float plane[4];
124  // Number vertices in polygon
125  uint16_t vertexCount;
126  // First index in CollisionHull.indices array for this polygon
127  uint16_t indexBase;
128 };
129 
134 {
135  uint32_t pointsCount;
136  uint32_t indicesCount;
139  uint32_t* indices;
141 };
142 
149 {
150  uint32_t chunkCount; // Number of chunks in Blast asset
151 
152  uint32_t bondCount; // Number of bonds in Blast asset
153 
154  NvBlastAsset* asset; // Blast asset
155 
161 
167  uint32_t* geometryOffset;
168 
169  Triangle* geometry; // Raw array of Triangle for all chunks
170 
171  NvBlastChunkDesc* chunkDescs; // Array of chunk descriptors. Contains chunkCount elements
172 
173  NvBlastBondDesc* bondDescs; // Array of bond descriptors. Contains bondCount elements
174 
181 
182  CollisionHull** collisionHull; // Raw array of pointers to collision hull for all chunks.
183 
187  const char** materialNames;
192  uint32_t materialCount;
193 };
194 
196 {
197  uint32_t maximumNumberOfHulls = 8; // Maximum number of convex hull generated for one chunk. If equal to 1 convex
198  // decomposition is disabled.
199  uint32_t maximumNumberOfVerticesPerHull = 64; // Controls the maximum number of triangles per convex-hull
200  // (default=64, range=4-1024)
201  uint32_t voxelGridResolution = 1000000; // Voxel grid resolution used for chunk convex decomposition
202  // (default=1,000,000, range=10,000-16,000,000).
203  float concavity = 0.0025f; // Value between 0 and 1, controls how accurate hull generation is
204 };
205 
206 } // namespace Blast
207 } // namespace Nv
208 
209 
210 #endif // ifndef NVBLASTAUTHORINGTYPES_H
uint32_t indicesCount
Definition: NvBlastExtAuthoringTypes.h:136
uint32_t e
Definition: NvBlastExtAuthoringTypes.h:61
NvBlastBondDesc * bondDescs
Definition: NvBlastExtAuthoringTypes.h:173
int32_t userData
Definition: NvBlastExtAuthoringTypes.h:85
diff --git a/docs/api_docs/files/_nv_blast_ext_custom_profiler_8h-source.html b/docs/api_docs/files/_nv_blast_ext_custom_profiler_8h-source.html index ba148ce..a266001 100755 --- a/docs/api_docs/files/_nv_blast_ext_custom_profiler_8h-source.html +++ b/docs/api_docs/files/_nv_blast_ext_custom_profiler_8h-source.html @@ -52,120 +52,121 @@ 00031 00032 #include "NvBlastProfiler.h" 00033 #include "PxProfiler.h" -00034 -00035 #if NV_NVTX -00036 #include "nvToolsExt.h" -00037 NV_INLINE void platformZoneStart(const char* name) { nvtxRangePushA(name); } -00038 NV_INLINE void platformZoneEnd() { nvtxRangePop(); } -00039 -00040 #elif NV_XBOXONE -00041 #include "xboxone/NvBlastProfilerXB1.h" -00042 -00043 #elif NV_PS4 -00044 #include "ps4/NvBlastProfilerPS4.h" -00045 -00046 #else -00047 NV_INLINE void platformZoneStart(const char*) { } -00048 NV_INLINE void platformZoneEnd() { } -00049 -00050 #endif -00051 -00052 #define SUPPORTS_THREAD_LOCAL (!NV_VC || NV_VC > 12) -00053 -00054 namespace Nv -00055 { -00056 namespace Blast -00057 { -00058 -00059 struct ExtProfileData -00060 { -00061 const char* name; -00062 void* data; -00063 }; -00064 -00065 #if SUPPORTS_THREAD_LOCAL -00066 static const int32_t PROFILER_MAX_NESTED_DEPTH = 64; -00067 static thread_local ExtProfileData th_ProfileData[PROFILER_MAX_NESTED_DEPTH]; -00068 static thread_local int32_t th_depth = 0; -00069 #endif -00070 -00071 -00076 class ExtCustomProfiler : public ProfilerCallback -00077 { -00078 public: -00082 ExtCustomProfiler() : m_platformEnabled(false) {} -00083 +00034 #include <PxFoundation.h> +00035 +00036 #if NV_NVTX +00037 #include "nvToolsExt.h" +00038 NV_INLINE void platformZoneStart(const char* name) { nvtxRangePushA(name); } +00039 NV_INLINE void platformZoneEnd() { nvtxRangePop(); } +00040 +00041 #elif NV_XBOXONE +00042 #include "xboxone/NvBlastProfilerXB1.h" +00043 +00044 #elif NV_PS4 +00045 #include "ps4/NvBlastProfilerPS4.h" +00046 +00047 #else +00048 NV_INLINE void platformZoneStart(const char*) { } +00049 NV_INLINE void platformZoneEnd() { } +00050 +00051 #endif +00052 +00053 #define SUPPORTS_THREAD_LOCAL (!NV_VC || NV_VC > 12) +00054 +00055 namespace Nv +00056 { +00057 namespace Blast +00058 { +00059 +00060 struct ExtProfileData +00061 { +00062 const char* name; +00063 void* data; +00064 }; +00065 +00066 #if SUPPORTS_THREAD_LOCAL +00067 static const int32_t PROFILER_MAX_NESTED_DEPTH = 64; +00068 static thread_local ExtProfileData th_ProfileData[PROFILER_MAX_NESTED_DEPTH]; +00069 static thread_local int32_t th_depth = 0; +00070 #endif +00071 +00072 +00077 class ExtCustomProfiler : public ProfilerCallback +00078 { +00079 public: +00083 ExtCustomProfiler() : m_platformEnabled(false) {} 00084 -00086 -00087 virtual void zoneStart(const char* name) override -00088 { -00089 -00090 #if SUPPORTS_THREAD_LOCAL -00091 if (PxGetProfilerCallback()) -00092 { -00093 void* data = PxGetProfilerCallback()->zoneStart(name, false, 0xb1a57); -00094 -00095 if (th_depth < PROFILER_MAX_NESTED_DEPTH && th_depth >= 0) -00096 { -00097 th_ProfileData[th_depth].name = name; -00098 th_ProfileData[th_depth].data = data; -00099 th_depth++; -00100 } -00101 else -00102 { -00103 assert(th_depth < PROFILER_MAX_NESTED_DEPTH && th_depth >= 0); -00104 } -00105 } -00106 #endif -00107 -00108 if (m_platformEnabled) -00109 { -00110 platformZoneStart(name); -00111 } -00112 } -00113 -00114 virtual void zoneEnd() override -00115 { -00116 -00117 #if SUPPORTS_THREAD_LOCAL -00118 if (PxGetProfilerCallback()) -00119 { -00120 th_depth--; -00121 -00122 if (th_depth >= 0) -00123 { -00124 ExtProfileData& pd = th_ProfileData[th_depth]; -00125 PxGetProfilerCallback()->zoneEnd(pd.data, pd.name, false, 0xb1a57); -00126 } -00127 else -00128 { -00129 assert(th_depth >= 0); -00130 } -00131 } -00132 #endif -00133 -00134 if (m_platformEnabled) -00135 { -00136 platformZoneEnd(); -00137 } -00138 } -00139 +00085 +00087 +00088 virtual void zoneStart(const char* name) override +00089 { +00090 +00091 #if SUPPORTS_THREAD_LOCAL +00092 if (PxGetProfilerCallback()) +00093 { +00094 void* data = PxGetProfilerCallback()->zoneStart(name, false, 0xb1a57); +00095 +00096 if (th_depth < PROFILER_MAX_NESTED_DEPTH && th_depth >= 0) +00097 { +00098 th_ProfileData[th_depth].name = name; +00099 th_ProfileData[th_depth].data = data; +00100 th_depth++; +00101 } +00102 else +00103 { +00104 assert(th_depth < PROFILER_MAX_NESTED_DEPTH && th_depth >= 0); +00105 } +00106 } +00107 #endif +00108 +00109 if (m_platformEnabled) +00110 { +00111 platformZoneStart(name); +00112 } +00113 } +00114 +00115 virtual void zoneEnd() override +00116 { +00117 +00118 #if SUPPORTS_THREAD_LOCAL +00119 if (PxGetProfilerCallback()) +00120 { +00121 th_depth--; +00122 +00123 if (th_depth >= 0) +00124 { +00125 ExtProfileData& pd = th_ProfileData[th_depth]; +00126 PxGetProfilerCallback()->zoneEnd(pd.data, pd.name, false, 0xb1a57); +00127 } +00128 else +00129 { +00130 assert(th_depth >= 0); +00131 } +00132 } +00133 #endif +00134 +00135 if (m_platformEnabled) +00136 { +00137 platformZoneEnd(); +00138 } +00139 } 00140 -00142 -00148 void setPlatformEnabled(bool enabled) -00149 { -00150 m_platformEnabled = enabled; -00151 } -00152 -00153 private: -00154 bool m_platformEnabled; -00155 }; -00156 -00157 } // namespace Blast -00158 } // namespace Nv -00159 +00141 +00143 +00149 void setPlatformEnabled(bool enabled) +00150 { +00151 m_platformEnabled = enabled; +00152 } +00153 +00154 private: +00155 bool m_platformEnabled; +00156 }; +00157 +00158 } // namespace Blast +00159 } // namespace Nv 00160 -00161 #endif // NVBLASTDEFAULTPROFILER_H +00161 +00162 #endif // NVBLASTDEFAULTPROFILER_H