aboutsummaryrefslogtreecommitdiff
path: root/sdk/toolkit/include
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2018-05-31 11:36:08 -0700
committerBryan Galdrikian <[email protected]>2018-05-31 11:36:08 -0700
commit7115f60b91b5717d90f643fd692010905c7004db (patch)
treeeffd68c6978751c517d54c2f2bb5bb6e7dc93e18 /sdk/toolkit/include
parentUpdating BlastTool zip (diff)
downloadblast-1.1.3_rc1.tar.xz
blast-1.1.3_rc1.zip
Blast 1.1.3. See docs/release_notes.txt.v1.1.3_rc1
Diffstat (limited to 'sdk/toolkit/include')
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTk.h98
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkActor.h470
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkAsset.h308
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkEvent.h368
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkFamily.h256
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkFramework.h658
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkGroup.h420
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkIdentifiable.h168
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkJoint.h156
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkObject.h150
-rwxr-xr-x[-rw-r--r--]sdk/toolkit/include/NvBlastTkType.h166
11 files changed, 1609 insertions, 1609 deletions
diff --git a/sdk/toolkit/include/NvBlastTk.h b/sdk/toolkit/include/NvBlastTk.h
index 60827d3..1da0747 100644..100755
--- a/sdk/toolkit/include/NvBlastTk.h
+++ b/sdk/toolkit/include/NvBlastTk.h
@@ -1,49 +1,49 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTK_H
-#define NVBLASTTK_H
-
-
-/**
-This is the main include header for the BlastTk SDK, for users who
-want to use a single #include file.
-
-Alternatively, one can instead directly #include a subset of the below files.
-*/
-
-
-#include "NvBlastTkFramework.h"
-#include "NvBlastTkAsset.h"
-#include "NvBlastTkActor.h"
-#include "NvBlastTkJoint.h"
-#include "NvBlastTkFamily.h"
-#include "NvBlastTkGroup.h"
-
-
-#endif // ifndef NVBLASTTK_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTK_H
+#define NVBLASTTK_H
+
+
+/**
+This is the main include header for the BlastTk SDK, for users who
+want to use a single #include file.
+
+Alternatively, one can instead directly #include a subset of the below files.
+*/
+
+
+#include "NvBlastTkFramework.h"
+#include "NvBlastTkAsset.h"
+#include "NvBlastTkActor.h"
+#include "NvBlastTkJoint.h"
+#include "NvBlastTkFamily.h"
+#include "NvBlastTkGroup.h"
+
+
+#endif // ifndef NVBLASTTK_H
diff --git a/sdk/toolkit/include/NvBlastTkActor.h b/sdk/toolkit/include/NvBlastTkActor.h
index 56aca63..754344a 100644..100755
--- a/sdk/toolkit/include/NvBlastTkActor.h
+++ b/sdk/toolkit/include/NvBlastTkActor.h
@@ -1,235 +1,235 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKACTOR_H
-#define NVBLASTTKACTOR_H
-
-#include "NvBlastTkObject.h"
-#include "NvBlastTypes.h"
-
-// Forward declarations
-struct NvBlastActor;
-struct NvBlastFamily;
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-// Forward declarations
-class TkAsset;
-class TkFamily;
-class TkGroup;
-class TkJoint;
-
-
-/**
-The BlastTk entity which encapsulates an NvBlastActor. Every TkActor represents a group
-of chunks which may correspond to a single physical rigid body. TkActors are created
-using TkFramework::createActor.
-*/
-class TkActor : public TkObject
-{
-public:
- /**
- Access to underlying low-level actor.
-
- \return a pointer to the (const) low-level NvBlastActor object.
- */
- virtual const NvBlastActor* getActorLL() const = 0;
-
- /**
- Every actor is part of an actor family, even if that family contains a single actor.
- This function returns a reference to the actor's TkFamily.
-
- \return a pointer to the actor's TkFamily.
- */
- virtual TkFamily& getFamily() const = 0;
-
- /**
- Every actor has a unique index within a family. This function returns that index.
- */
- virtual uint32_t getIndex() const = 0;
-
- /**
- Actors may be part of (no more than) one group. See TkGroup for the functions to add and remove actors.
- This function returns a pointer to the actor's group, or NULL if it is not in a group.
- */
- virtual TkGroup* getGroup() const = 0;
-
- /**
- Remove this actor from its group, if it is in one.
-
- \return the actor's former group if successful, NULL otherwise.
- */
- virtual TkGroup* removeFromGroup() = 0;
-
- /**
- Every actor has an associated asset.
-
- \return a pointer to the (const) TkAsset object.
- */
- virtual const TkAsset* getAsset() const = 0;
-
- /**
- Get the number of visible chunks for this actor. May be used in conjunction with getVisibleChunkIndices.
-
- NOTE: Wrapper function over low-level function call, see NvBlastActorGetVisibleChunkCount for details.
-
- \return the number of visible chunk indices for the actor.
- */
- virtual uint32_t getVisibleChunkCount() const = 0;
-
- /**
- Retrieve a list of visible chunk indices for the actor into the given array.
-
- NOTE: Wrapper function over low-level function call, see NvBlastActorGetVisibleChunkIndices for details.
-
- \param[in] visibleChunkIndices User-supplied array to be filled in with indices of visible chunks for this actor.
- \param[in] visibleChunkIndicesSize The size of the visibleChunkIndices array. To receive all visible chunk indices, the size must be at least that given by getVisibleChunkCount().
-
- \return the number of indices written to visibleChunkIndices. This will not exceed visibleChunkIndicesSize.
- */
- virtual uint32_t getVisibleChunkIndices(uint32_t* visibleChunkIndices, uint32_t visibleChunkIndicesSize) const = 0;
-
- /**
- Get the number of graph nodes for this actor. May be used in conjunction with getGraphNodeIndices.
-
- NOTE: Wrapper function over low-level function call, see NvBlastActorGetGraphNodeCount for details.
-
- \return the number of graph node indices for the actor.
- */
- virtual uint32_t getGraphNodeCount() const = 0;
-
- /**
- Retrieve a list of graph node indices for the actor into the given array.
-
- NOTE: Wrapper function over low-level function call, see NvBlastActorGetGraphNodeIndices for details.
-
- \param[in] graphNodeIndices User-supplied array to be filled in with indices of graph nodes for this actor.
- \param[in] graphNodeIndicesSize The size of the graphNodeIndices array. To receive all graph node indices, the size must be at least that given by getGraphNodeCount().
-
- \return the number of indices written to graphNodeIndices. This will not exceed graphNodeIndicesSize.
- */
- virtual uint32_t getGraphNodeIndices(uint32_t* graphNodeIndices, uint32_t graphNodeIndicesSize) const = 0;
-
- /**
- Access the bond health data for an actor.
-
- NOTE: Wrapper function over low-level function call, see NvBlastActorGetBondHealths for details.
-
- \return the array of bond healths for the actor's family, or NULL if the actor is invalid.
- */
- virtual const float* getBondHealths() const = 0;
-
- /**
- Returns the upper-bound number of actors which can be created by splitting this actor.
-
- NOTE: Wrapper function over low-level function call, see NvBlastActorGetMaxActorCountForSplit for details.
-
- \return the upper-bound number of actors which can be created by splitting this actor.
- */
- virtual uint32_t getSplitMaxActorCount() const = 0;
-
- /**
- Report whether this actor is in 'pending' state. Being in 'pending' state leads to actor being processed by group.
-
- \return true iff actor is in 'pending' state.
- */
- virtual bool isPending() const = 0;
-
- /**
- Apply damage to this actor.
-
- Actual damage processing is deferred till the group worker process() call. Sets actor in 'pending' state.
-
- It's the user's responsibility to keep programParams pointer alive until the group endProcess() call.
-
- \param[in] program A NvBlastDamageProgram containing damage shaders.
- \param[in] programParams Parameters for the NvBlastDamageProgram.
- */
- virtual void damage(const NvBlastDamageProgram& program, const void* programParams) = 0;
-
- /**
- Creates fracture commands for the actor using an NvBlastMaterialFunction.
-
- Cannot be called during group processing, in that case a warning will be raised and function will do nothing.
-
- NOTE: Wrapper function over low-level function call, see NvBlastActorGenerateFracture for details.
-
- \param[in,out] commands Target buffers to hold generated commands.
- To avoid data loss, provide an entry for every support chunk and every bond in the original actor.
- \param[in] program A NvBlastDamageProgram containing damage shaders.
- \param[in] programParams Parameters for the NvBlastDamageProgram.
- */
- virtual void generateFracture(NvBlastFractureBuffers* commands, const NvBlastDamageProgram& program, const void* programParams) const = 0;
-
- /**
- Function applies the direct fracture and breaks graph bonds/edges as necessary. Sets actor in 'pending' state if any bonds or chunks were damaged. Dispatches FractureCommand events.
-
- NOTE: Calls NvBlastActorApplyFracture internally. see NvBlastActorApplyFracture for details.
-
- \param[in,out] eventBuffers Target buffers to hold applied fracture events. May be NULL, in which case events are not reported.
- To avoid data loss, provide an entry for every lower-support chunk and every bond in the original actor.
- \param[in] commands The fracture commands to process.
- */
- virtual void applyFracture(NvBlastFractureBuffers* eventBuffers, const NvBlastFractureBuffers* commands) = 0;
-
- /**
- The number of joints currently attached to this actor.
-
- \return the number of TkJoints that are currently attached to this actor.
- */
- virtual uint32_t getJointCount() const = 0;
-
- /**
- Retrieve an array of pointers (into the user-supplied buffer) to joints.
-
- \param[out] joints A user-supplied array of TkJoint pointers.
- \param[in] jointsSize The number of elements available to write into the joints array.
-
- \return the number of TkJoint pointers written to the joints array.
- */
- virtual uint32_t getJoints(TkJoint** joints, uint32_t jointsSize) const = 0;
-
- /**
- Whether or not this actor is bound to the world using a bond with an invalid chunk index to represent the NRF.
-
- NOTE: Wrapper function over low-level function call NvBlastActorIsBoundToWorld.
-
- \return true iff this actor contains the "world" support graph node, created when a bond contains the UINT32_MAX value for one of their chunkIndices.
- */
- virtual bool isBoundToWorld() const = 0;
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-#endif // ifndef NVBLASTTKACTOR_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKACTOR_H
+#define NVBLASTTKACTOR_H
+
+#include "NvBlastTkObject.h"
+#include "NvBlastTypes.h"
+
+// Forward declarations
+struct NvBlastActor;
+struct NvBlastFamily;
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+// Forward declarations
+class TkAsset;
+class TkFamily;
+class TkGroup;
+class TkJoint;
+
+
+/**
+The BlastTk entity which encapsulates an NvBlastActor. Every TkActor represents a group
+of chunks which may correspond to a single physical rigid body. TkActors are created
+using TkFramework::createActor.
+*/
+class TkActor : public TkObject
+{
+public:
+ /**
+ Access to underlying low-level actor.
+
+ \return a pointer to the (const) low-level NvBlastActor object.
+ */
+ virtual const NvBlastActor* getActorLL() const = 0;
+
+ /**
+ Every actor is part of an actor family, even if that family contains a single actor.
+ This function returns a reference to the actor's TkFamily.
+
+ \return a pointer to the actor's TkFamily.
+ */
+ virtual TkFamily& getFamily() const = 0;
+
+ /**
+ Every actor has a unique index within a family. This function returns that index.
+ */
+ virtual uint32_t getIndex() const = 0;
+
+ /**
+ Actors may be part of (no more than) one group. See TkGroup for the functions to add and remove actors.
+ This function returns a pointer to the actor's group, or NULL if it is not in a group.
+ */
+ virtual TkGroup* getGroup() const = 0;
+
+ /**
+ Remove this actor from its group, if it is in one.
+
+ \return the actor's former group if successful, NULL otherwise.
+ */
+ virtual TkGroup* removeFromGroup() = 0;
+
+ /**
+ Every actor has an associated asset.
+
+ \return a pointer to the (const) TkAsset object.
+ */
+ virtual const TkAsset* getAsset() const = 0;
+
+ /**
+ Get the number of visible chunks for this actor. May be used in conjunction with getVisibleChunkIndices.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastActorGetVisibleChunkCount for details.
+
+ \return the number of visible chunk indices for the actor.
+ */
+ virtual uint32_t getVisibleChunkCount() const = 0;
+
+ /**
+ Retrieve a list of visible chunk indices for the actor into the given array.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastActorGetVisibleChunkIndices for details.
+
+ \param[in] visibleChunkIndices User-supplied array to be filled in with indices of visible chunks for this actor.
+ \param[in] visibleChunkIndicesSize The size of the visibleChunkIndices array. To receive all visible chunk indices, the size must be at least that given by getVisibleChunkCount().
+
+ \return the number of indices written to visibleChunkIndices. This will not exceed visibleChunkIndicesSize.
+ */
+ virtual uint32_t getVisibleChunkIndices(uint32_t* visibleChunkIndices, uint32_t visibleChunkIndicesSize) const = 0;
+
+ /**
+ Get the number of graph nodes for this actor. May be used in conjunction with getGraphNodeIndices.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastActorGetGraphNodeCount for details.
+
+ \return the number of graph node indices for the actor.
+ */
+ virtual uint32_t getGraphNodeCount() const = 0;
+
+ /**
+ Retrieve a list of graph node indices for the actor into the given array.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastActorGetGraphNodeIndices for details.
+
+ \param[in] graphNodeIndices User-supplied array to be filled in with indices of graph nodes for this actor.
+ \param[in] graphNodeIndicesSize The size of the graphNodeIndices array. To receive all graph node indices, the size must be at least that given by getGraphNodeCount().
+
+ \return the number of indices written to graphNodeIndices. This will not exceed graphNodeIndicesSize.
+ */
+ virtual uint32_t getGraphNodeIndices(uint32_t* graphNodeIndices, uint32_t graphNodeIndicesSize) const = 0;
+
+ /**
+ Access the bond health data for an actor.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastActorGetBondHealths for details.
+
+ \return the array of bond healths for the actor's family, or NULL if the actor is invalid.
+ */
+ virtual const float* getBondHealths() const = 0;
+
+ /**
+ Returns the upper-bound number of actors which can be created by splitting this actor.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastActorGetMaxActorCountForSplit for details.
+
+ \return the upper-bound number of actors which can be created by splitting this actor.
+ */
+ virtual uint32_t getSplitMaxActorCount() const = 0;
+
+ /**
+ Report whether this actor is in 'pending' state. Being in 'pending' state leads to actor being processed by group.
+
+ \return true iff actor is in 'pending' state.
+ */
+ virtual bool isPending() const = 0;
+
+ /**
+ Apply damage to this actor.
+
+ Actual damage processing is deferred till the group worker process() call. Sets actor in 'pending' state.
+
+ It's the user's responsibility to keep programParams pointer alive until the group endProcess() call.
+
+ \param[in] program A NvBlastDamageProgram containing damage shaders.
+ \param[in] programParams Parameters for the NvBlastDamageProgram.
+ */
+ virtual void damage(const NvBlastDamageProgram& program, const void* programParams) = 0;
+
+ /**
+ Creates fracture commands for the actor using an NvBlastMaterialFunction.
+
+ Cannot be called during group processing, in that case a warning will be raised and function will do nothing.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastActorGenerateFracture for details.
+
+ \param[in,out] commands Target buffers to hold generated commands.
+ To avoid data loss, provide an entry for every support chunk and every bond in the original actor.
+ \param[in] program A NvBlastDamageProgram containing damage shaders.
+ \param[in] programParams Parameters for the NvBlastDamageProgram.
+ */
+ virtual void generateFracture(NvBlastFractureBuffers* commands, const NvBlastDamageProgram& program, const void* programParams) const = 0;
+
+ /**
+ Function applies the direct fracture and breaks graph bonds/edges as necessary. Sets actor in 'pending' state if any bonds or chunks were damaged. Dispatches FractureCommand events.
+
+ NOTE: Calls NvBlastActorApplyFracture internally. see NvBlastActorApplyFracture for details.
+
+ \param[in,out] eventBuffers Target buffers to hold applied fracture events. May be NULL, in which case events are not reported.
+ To avoid data loss, provide an entry for every lower-support chunk and every bond in the original actor.
+ \param[in] commands The fracture commands to process.
+ */
+ virtual void applyFracture(NvBlastFractureBuffers* eventBuffers, const NvBlastFractureBuffers* commands) = 0;
+
+ /**
+ The number of joints currently attached to this actor.
+
+ \return the number of TkJoints that are currently attached to this actor.
+ */
+ virtual uint32_t getJointCount() const = 0;
+
+ /**
+ Retrieve an array of pointers (into the user-supplied buffer) to joints.
+
+ \param[out] joints A user-supplied array of TkJoint pointers.
+ \param[in] jointsSize The number of elements available to write into the joints array.
+
+ \return the number of TkJoint pointers written to the joints array.
+ */
+ virtual uint32_t getJoints(TkJoint** joints, uint32_t jointsSize) const = 0;
+
+ /**
+ Whether or not this actor is bound to the world using a bond with an invalid chunk index to represent the NRF.
+
+ NOTE: Wrapper function over low-level function call NvBlastActorIsBoundToWorld.
+
+ \return true iff this actor contains the "world" support graph node, created when a bond contains the UINT32_MAX value for one of their chunkIndices.
+ */
+ virtual bool isBoundToWorld() const = 0;
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+#endif // ifndef NVBLASTTKACTOR_H
diff --git a/sdk/toolkit/include/NvBlastTkAsset.h b/sdk/toolkit/include/NvBlastTkAsset.h
index 4a4f5be..f965e09 100644..100755
--- a/sdk/toolkit/include/NvBlastTkAsset.h
+++ b/sdk/toolkit/include/NvBlastTkAsset.h
@@ -1,154 +1,154 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKASSET_H
-#define NVBLASTTKASSET_H
-
-#include "NvBlastTkIdentifiable.h"
-#include "NvBlastTypes.h"
-#include "PxVec3.h"
-
-// Forward declarations
-struct NvBlastAsset;
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-/**
-A descriptor stored by a TkAsset for an internal joint. Internal joints are created when a TkAsset is instanced into a TkActor.
-*/
-struct TkAssetJointDesc
-{
- uint32_t nodeIndices[2]; //!< The graph node indices corresponding to the support chunks joined by a joint
- physx::PxVec3 attachPositions[2]; //!< The joint's attachment positions in asset-local space
-};
-
-
-/**
-The static data associated with a destructible actor. TkAsset encapsulates an NvBlastAsset. In addition to the NvBlastAsset,
-the TkAsset stores joint descriptors (see TkAssetJointDesc).
-*/
-class TkAsset : public TkIdentifiable
-{
-public:
- /**
- Access to underlying low-level asset.
-
- \return a pointer to the (const) low-level NvBlastAsset object.
- */
- virtual const NvBlastAsset* getAssetLL() const = 0;
-
- /**
- Get the number of chunks in this asset.
-
- NOTE: Wrapper function over low-level function call, see NvBlastAssetGetChunkCount for details.
-
- \return the number of chunks in the asset.
- */
- virtual uint32_t getChunkCount() const = 0;
-
- /**
- Get the number of leaf chunks in the given asset.
-
- NOTE: Wrapper function over low-level function call, see NvBlastAssetGetLeafChunkCount for details.
-
- \return the number of leaf chunks in the asset.
- */
- virtual uint32_t getLeafChunkCount() const = 0;
-
- /**
- Get the number of bonds in the given asset.
-
- NOTE: Wrapper function over low-level function call, see NvBlastAssetGetBondCount for details.
-
- \return the number of bonds in the asset.
- */
- virtual uint32_t getBondCount() const = 0;
-
- /**
- Access an array of chunks of the given asset.
-
- NOTE: Wrapper function over low-level function call, see NvBlastAssetGetChunks for details.
-
- \return a pointer to an array of chunks of the asset.
- */
- virtual const NvBlastChunk* getChunks() const = 0;
-
- /**
- Access an array of bonds of the given asset.
-
- NOTE: Wrapper function over low-level function call, see NvBlastAssetGetBonds for details.
-
- \return a pointer to an array of bonds of the asset.
- */
- virtual const NvBlastBond* getBonds() const = 0;
-
- /**
- Access an support graph for the given asset.
-
- NOTE: Wrapper function over low-level function call, see NvBlastAssetGetSupportGraph for details.
-
- \return a struct of support graph for the given asset.
- */
- virtual const NvBlastSupportGraph getGraph() const = 0;
-
- /**
- Retrieve the size (in bytes) of the LL asset.
-
- NOTE: Wrapper function over low-level function call, see NvBlastAssetGetSize for details.
-
- \return the size of the data block (in bytes).
- */
- virtual uint32_t getDataSize() const = 0;
-
- /**
- The number of internal TkJoint objects that will be created when this asset is instanced into a TkActor
- (see TkFramework::createActor). These joints will not trigger TkJointUpdateEvent events
- until this actor is split into actors such that a joint connects two actors. At this time the actor's family
- will dispatch a TkJointUpdateEvent::External event during a call to TkGroup::endProcess() (see TkGroup).
-
- \return the number of descriptors for internal joints.
- */
- virtual uint32_t getJointDescCount() const = 0;
-
- /**
- The descriptors for the internal joints created when this asset is instanced. (See getJointDescCount.)
-
- \return a pointer to the array of descriptors for internal joints.
- */
- virtual const TkAssetJointDesc* getJointDescs() const = 0;
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-#endif // ifndef NVBLASTTKASSET_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKASSET_H
+#define NVBLASTTKASSET_H
+
+#include "NvBlastTkIdentifiable.h"
+#include "NvBlastTypes.h"
+#include "PxVec3.h"
+
+// Forward declarations
+struct NvBlastAsset;
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+/**
+A descriptor stored by a TkAsset for an internal joint. Internal joints are created when a TkAsset is instanced into a TkActor.
+*/
+struct TkAssetJointDesc
+{
+ uint32_t nodeIndices[2]; //!< The graph node indices corresponding to the support chunks joined by a joint
+ physx::PxVec3 attachPositions[2]; //!< The joint's attachment positions in asset-local space
+};
+
+
+/**
+The static data associated with a destructible actor. TkAsset encapsulates an NvBlastAsset. In addition to the NvBlastAsset,
+the TkAsset stores joint descriptors (see TkAssetJointDesc).
+*/
+class TkAsset : public TkIdentifiable
+{
+public:
+ /**
+ Access to underlying low-level asset.
+
+ \return a pointer to the (const) low-level NvBlastAsset object.
+ */
+ virtual const NvBlastAsset* getAssetLL() const = 0;
+
+ /**
+ Get the number of chunks in this asset.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastAssetGetChunkCount for details.
+
+ \return the number of chunks in the asset.
+ */
+ virtual uint32_t getChunkCount() const = 0;
+
+ /**
+ Get the number of leaf chunks in the given asset.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastAssetGetLeafChunkCount for details.
+
+ \return the number of leaf chunks in the asset.
+ */
+ virtual uint32_t getLeafChunkCount() const = 0;
+
+ /**
+ Get the number of bonds in the given asset.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastAssetGetBondCount for details.
+
+ \return the number of bonds in the asset.
+ */
+ virtual uint32_t getBondCount() const = 0;
+
+ /**
+ Access an array of chunks of the given asset.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastAssetGetChunks for details.
+
+ \return a pointer to an array of chunks of the asset.
+ */
+ virtual const NvBlastChunk* getChunks() const = 0;
+
+ /**
+ Access an array of bonds of the given asset.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastAssetGetBonds for details.
+
+ \return a pointer to an array of bonds of the asset.
+ */
+ virtual const NvBlastBond* getBonds() const = 0;
+
+ /**
+ Access an support graph for the given asset.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastAssetGetSupportGraph for details.
+
+ \return a struct of support graph for the given asset.
+ */
+ virtual const NvBlastSupportGraph getGraph() const = 0;
+
+ /**
+ Retrieve the size (in bytes) of the LL asset.
+
+ NOTE: Wrapper function over low-level function call, see NvBlastAssetGetSize for details.
+
+ \return the size of the data block (in bytes).
+ */
+ virtual uint32_t getDataSize() const = 0;
+
+ /**
+ The number of internal TkJoint objects that will be created when this asset is instanced into a TkActor
+ (see TkFramework::createActor). These joints will not trigger TkJointUpdateEvent events
+ until this actor is split into actors such that a joint connects two actors. At this time the actor's family
+ will dispatch a TkJointUpdateEvent::External event during a call to TkGroup::endProcess() (see TkGroup).
+
+ \return the number of descriptors for internal joints.
+ */
+ virtual uint32_t getJointDescCount() const = 0;
+
+ /**
+ The descriptors for the internal joints created when this asset is instanced. (See getJointDescCount.)
+
+ \return a pointer to the array of descriptors for internal joints.
+ */
+ virtual const TkAssetJointDesc* getJointDescs() const = 0;
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+#endif // ifndef NVBLASTTKASSET_H
diff --git a/sdk/toolkit/include/NvBlastTkEvent.h b/sdk/toolkit/include/NvBlastTkEvent.h
index ca2d5e9..8312741 100644..100755
--- a/sdk/toolkit/include/NvBlastTkEvent.h
+++ b/sdk/toolkit/include/NvBlastTkEvent.h
@@ -1,184 +1,184 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKEVENT_H
-#define NVBLASTTKEVENT_H
-
-#include <vector>
-
-#include "NvBlastTypes.h"
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-// Forward declarations
-class TkObject;
-class TkActor;
-class TkFamily;
-class TkJoint;
-
-
-/**
-By the time events are dispatched, a specific TkActor may have been split and became invalid.
-This structure caches the state before invalidation happened.
-*/
-struct TkActorData
-{
- TkFamily* family; //!< TkFamily of the originating TkActor
- void* userData; //!< TkActor.userData of the originating TkActor
- uint32_t index; //!< TkActor::getIndex() of the originating TkActor
-};
-
-
-/**
-Event data dispatched to TkEventListener objects. The user may implement the abstract TkEventListener interface
-and pass the listener object to a BlastTk object which dispatches events. (See for example TkFamily.)
-*/
-struct TkEvent
-{
- // Enums
- enum Type
- {
- Split, //!< Sent when a TkActor is split. See TkSplitEvent.
- FractureCommand, //!< Sent when a TkActor generated fracture commands using TkActor::generateFracture.
- FractureEvent, //!< Sent when a TkActor is fractured using TkActor::applyFracture.
- JointUpdate, //!< Sent when TkJoints change their attachment state. See TkJointUpdateEvent.
-
- TypeCount
- };
-
- // Data
- const void* payload; //!< Type-dependent payload data
- Type type; //!< See the Type enum, above
-
- /**
- Casts the payload data into its type-dependent format.
-
- \return the payload for an event of type T
- */
- template<typename T>
- const T* getPayload() const { return reinterpret_cast<const T*>(payload); }
-};
-
-
-/**
-Payload for TkEvent::Split events
-
-When this event is sent, the parent TkActor that was split is no longer valid. Therefore it is not referenced
-directly in the event data. Instead, its TkFamily, index within the TkFamily, and userData are stored. In addition,
-this event gives the child TkActors generated by the split.
-*/
-struct TkSplitEvent
-{
- enum { EVENT_TYPE = TkEvent::Split };
-
- TkActorData parentData; //!< The data of parent TkActor that was split
- uint32_t numChildren; //!< The number of children into which the parent TkActor was split
- TkActor** children; //!< An array of pointers to the children into which the TkActor was split
-};
-
-
-/**
-Payload for the TkEvent::FractureCommand events
-
-Fracture Commands used to apply fracture to a TkActor.
-*/
-struct TkFractureCommands
-{
- enum { EVENT_TYPE = TkEvent::FractureCommand };
-
- TkActorData tkActorData; //!< The data of TkActor that received the fracture command
- NvBlastFractureBuffers buffers; //!< The fracture commands used to modify the TkActor
-};
-
-
-/**
-Payload for the TkEvent::FractureEvent events
-
-Fracture Events resulting from applying fracture to a TkActor.
-*/
-struct TkFractureEvents
-{
- enum { EVENT_TYPE = TkEvent::FractureEvent };
-
- TkActorData tkActorData; //!< The data of TkActor that received the fracture command
- NvBlastFractureBuffers buffers; //!< The fracture result of the modified TkActor
- uint32_t bondsDamaged; //!< number of damaged bonds (health remains)
- uint32_t bondsBroken; //!< number of broken bonds (health exhausted)
- uint32_t chunksDamaged; //!< number of damaged chunks (health remains) including child chunks
- uint32_t chunksBroken; //!< number of broken chunks (health exhausted) including child chunks
-};
-
-
-/**
-Payload for the TkEvent::JointUpdate events
-
-Event type sent when a TkJoint's TkActor references change. This may indicate a joint becoming external,
-simply changing actors when split events occur on one or both of the actors, or when one or both of the actors
-are destroyed.
-*/
-struct TkJointUpdateEvent
-{
- enum { EVENT_TYPE = TkEvent::JointUpdate };
-
- enum Subtype
- {
- External, //!< A joint that used to be internal to a single TkActor now joins two different TkActors
- Changed, //!< One or both of the joint's attached TkActors has changed. The previous TkActors were distinct, however, differentiating this from the JointExternal case
- Unreferenced //!< The joint's actors have been set to NULL. The joint will not be used again, and the user may release the TkJoint at this time
- };
-
- TkJoint* joint; //!< The joint being updated
- Subtype subtype; //!< The type of update event this is (see Subtype)
-};
-
-
-/**
-Interface for a listener of TkEvent data. The user must implement this interface and pass it
-to the object which will dispatch the events.
-*/
-class TkEventListener
-{
-public:
- /**
- Interface to be implemented by the user. Events will be sent by BlastTk through a call to this function.
-
- \param[in] events The array of events being dispatched.
- \param[in] eventCount The number of events in the array.
- */
- virtual void receive(const TkEvent* events, uint32_t eventCount) = 0;
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-#endif // ifndef NVBLASTTKEVENT_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKEVENT_H
+#define NVBLASTTKEVENT_H
+
+#include <vector>
+
+#include "NvBlastTypes.h"
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+// Forward declarations
+class TkObject;
+class TkActor;
+class TkFamily;
+class TkJoint;
+
+
+/**
+By the time events are dispatched, a specific TkActor may have been split and became invalid.
+This structure caches the state before invalidation happened.
+*/
+struct TkActorData
+{
+ TkFamily* family; //!< TkFamily of the originating TkActor
+ void* userData; //!< TkActor.userData of the originating TkActor
+ uint32_t index; //!< TkActor::getIndex() of the originating TkActor
+};
+
+
+/**
+Event data dispatched to TkEventListener objects. The user may implement the abstract TkEventListener interface
+and pass the listener object to a BlastTk object which dispatches events. (See for example TkFamily.)
+*/
+struct TkEvent
+{
+ // Enums
+ enum Type
+ {
+ Split, //!< Sent when a TkActor is split. See TkSplitEvent.
+ FractureCommand, //!< Sent when a TkActor generated fracture commands using TkActor::generateFracture.
+ FractureEvent, //!< Sent when a TkActor is fractured using TkActor::applyFracture.
+ JointUpdate, //!< Sent when TkJoints change their attachment state. See TkJointUpdateEvent.
+
+ TypeCount
+ };
+
+ // Data
+ const void* payload; //!< Type-dependent payload data
+ Type type; //!< See the Type enum, above
+
+ /**
+ Casts the payload data into its type-dependent format.
+
+ \return the payload for an event of type T
+ */
+ template<typename T>
+ const T* getPayload() const { return reinterpret_cast<const T*>(payload); }
+};
+
+
+/**
+Payload for TkEvent::Split events
+
+When this event is sent, the parent TkActor that was split is no longer valid. Therefore it is not referenced
+directly in the event data. Instead, its TkFamily, index within the TkFamily, and userData are stored. In addition,
+this event gives the child TkActors generated by the split.
+*/
+struct TkSplitEvent
+{
+ enum { EVENT_TYPE = TkEvent::Split };
+
+ TkActorData parentData; //!< The data of parent TkActor that was split
+ uint32_t numChildren; //!< The number of children into which the parent TkActor was split
+ TkActor** children; //!< An array of pointers to the children into which the TkActor was split
+};
+
+
+/**
+Payload for the TkEvent::FractureCommand events
+
+Fracture Commands used to apply fracture to a TkActor.
+*/
+struct TkFractureCommands
+{
+ enum { EVENT_TYPE = TkEvent::FractureCommand };
+
+ TkActorData tkActorData; //!< The data of TkActor that received the fracture command
+ NvBlastFractureBuffers buffers; //!< The fracture commands used to modify the TkActor
+};
+
+
+/**
+Payload for the TkEvent::FractureEvent events
+
+Fracture Events resulting from applying fracture to a TkActor.
+*/
+struct TkFractureEvents
+{
+ enum { EVENT_TYPE = TkEvent::FractureEvent };
+
+ TkActorData tkActorData; //!< The data of TkActor that received the fracture command
+ NvBlastFractureBuffers buffers; //!< The fracture result of the modified TkActor
+ uint32_t bondsDamaged; //!< number of damaged bonds (health remains)
+ uint32_t bondsBroken; //!< number of broken bonds (health exhausted)
+ uint32_t chunksDamaged; //!< number of damaged chunks (health remains) including child chunks
+ uint32_t chunksBroken; //!< number of broken chunks (health exhausted) including child chunks
+};
+
+
+/**
+Payload for the TkEvent::JointUpdate events
+
+Event type sent when a TkJoint's TkActor references change. This may indicate a joint becoming external,
+simply changing actors when split events occur on one or both of the actors, or when one or both of the actors
+are destroyed.
+*/
+struct TkJointUpdateEvent
+{
+ enum { EVENT_TYPE = TkEvent::JointUpdate };
+
+ enum Subtype
+ {
+ External, //!< A joint that used to be internal to a single TkActor now joins two different TkActors
+ Changed, //!< One or both of the joint's attached TkActors has changed. The previous TkActors were distinct, however, differentiating this from the JointExternal case
+ Unreferenced //!< The joint's actors have been set to NULL. The joint will not be used again, and the user may release the TkJoint at this time
+ };
+
+ TkJoint* joint; //!< The joint being updated
+ Subtype subtype; //!< The type of update event this is (see Subtype)
+};
+
+
+/**
+Interface for a listener of TkEvent data. The user must implement this interface and pass it
+to the object which will dispatch the events.
+*/
+class TkEventListener
+{
+public:
+ /**
+ Interface to be implemented by the user. Events will be sent by BlastTk through a call to this function.
+
+ \param[in] events The array of events being dispatched.
+ \param[in] eventCount The number of events in the array.
+ */
+ virtual void receive(const TkEvent* events, uint32_t eventCount) = 0;
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+#endif // ifndef NVBLASTTKEVENT_H
diff --git a/sdk/toolkit/include/NvBlastTkFamily.h b/sdk/toolkit/include/NvBlastTkFamily.h
index 4fe0803..2d5bd5b 100644..100755
--- a/sdk/toolkit/include/NvBlastTkFamily.h
+++ b/sdk/toolkit/include/NvBlastTkFamily.h
@@ -1,128 +1,128 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKFAMILY_H
-#define NVBLASTTKFAMILY_H
-
-#include "NvBlastTkIdentifiable.h"
-
-
-// Forward declarations
-struct NvBlastFamily;
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-// Forward declarations
-class TkActor;
-class TkAsset;
-class TkEventListener;
-
-
-/**
-The TkFamily is associated with the TkActor that is instanced from a TkAsset, as well as all descendent TkActors generated
-by spliting TkActors within the family. It encapsulates an NvBlastFamily, and also holds a material which will be used
-by default on all TkActors during damage functions.
-*/
-class TkFamily : public TkIdentifiable
-{
-public:
- /**
- Access to underlying low-level family.
-
- \return a pointer to the (const) low-level NvBlastFamily object.
- */
- virtual const NvBlastFamily* getFamilyLL() const = 0;
-
- /**
- Every family has an associated asset (the TkAsset which was instanced to create the first member of the family).
-
- \return a pointer to the (const) TkAsset object.
- */
- virtual const TkAsset* getAsset() const = 0;
-
- /**
- The number of actors currently in this family.
-
- \return the number of TkActors that currently exist in this family.
- */
- virtual uint32_t getActorCount() const = 0;
-
- /**
- Retrieve an array of pointers (into the user-supplied buffer) to actors.
-
- \param[out] buffer A user-supplied array of TkActor pointers.
- \param[in] bufferSize The number of elements available to write into buffer.
- \param[in] indexStart The starting index of the actor.
-
- \return the number of TkActor pointers written to the buffer.
- */
- virtual uint32_t getActors(TkActor** buffer, uint32_t bufferSize, uint32_t indexStart = 0) const = 0;
-
- /**
- Add a user implementation of TkEventListener to this family's list of listeners. These listeners will receive
- all split and fracture events generated by TkActor objects in this family. They will also receive joint update events
- when TkJoint objects are updated that are (or were) associated with a TkActor in this family.
-
- \param[in] l The event listener to add.
- */
- virtual void addListener(TkEventListener& l) = 0;
-
- /**
- Remove a TkEventReciever from this family's list of listeners.
-
- \param[in] l The event listener to remove.
- */
- virtual void removeListener(TkEventListener& l) = 0;
-
- /**
- This function applies fracture buffers on relevant actors (actor which contains corresponding bond/chunk) in family.
-
- \param[in] commands The fracture commands to process.
- */
- virtual void applyFracture(const NvBlastFractureBuffers* commands) = 0;
-
- /**
- A function to reinitialize this family with new family. The Family must be created from the same low-level asset, but can be
- in any other state. As a result split events (TkEvent::Split) will be dispatched reflecting the resulting changes (created and removed actors)
- Afterwards the family will contain a copy of the new family and all actors' low-level actor pointers will be updated.
-
- \param[in] newFamily The NvBlastFamily to use to reinitialize this family.
- \param[in] group The group for new actors to be placed in.
- */
- virtual void reinitialize(const NvBlastFamily* newFamily, TkGroup* group = nullptr) = 0;
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-#endif // ifndef NVBLASTTKFAMILY_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKFAMILY_H
+#define NVBLASTTKFAMILY_H
+
+#include "NvBlastTkIdentifiable.h"
+
+
+// Forward declarations
+struct NvBlastFamily;
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+// Forward declarations
+class TkActor;
+class TkAsset;
+class TkEventListener;
+
+
+/**
+The TkFamily is associated with the TkActor that is instanced from a TkAsset, as well as all descendent TkActors generated
+by spliting TkActors within the family. It encapsulates an NvBlastFamily, and also holds a material which will be used
+by default on all TkActors during damage functions.
+*/
+class TkFamily : public TkIdentifiable
+{
+public:
+ /**
+ Access to underlying low-level family.
+
+ \return a pointer to the (const) low-level NvBlastFamily object.
+ */
+ virtual const NvBlastFamily* getFamilyLL() const = 0;
+
+ /**
+ Every family has an associated asset (the TkAsset which was instanced to create the first member of the family).
+
+ \return a pointer to the (const) TkAsset object.
+ */
+ virtual const TkAsset* getAsset() const = 0;
+
+ /**
+ The number of actors currently in this family.
+
+ \return the number of TkActors that currently exist in this family.
+ */
+ virtual uint32_t getActorCount() const = 0;
+
+ /**
+ Retrieve an array of pointers (into the user-supplied buffer) to actors.
+
+ \param[out] buffer A user-supplied array of TkActor pointers.
+ \param[in] bufferSize The number of elements available to write into buffer.
+ \param[in] indexStart The starting index of the actor.
+
+ \return the number of TkActor pointers written to the buffer.
+ */
+ virtual uint32_t getActors(TkActor** buffer, uint32_t bufferSize, uint32_t indexStart = 0) const = 0;
+
+ /**
+ Add a user implementation of TkEventListener to this family's list of listeners. These listeners will receive
+ all split and fracture events generated by TkActor objects in this family. They will also receive joint update events
+ when TkJoint objects are updated that are (or were) associated with a TkActor in this family.
+
+ \param[in] l The event listener to add.
+ */
+ virtual void addListener(TkEventListener& l) = 0;
+
+ /**
+ Remove a TkEventReciever from this family's list of listeners.
+
+ \param[in] l The event listener to remove.
+ */
+ virtual void removeListener(TkEventListener& l) = 0;
+
+ /**
+ This function applies fracture buffers on relevant actors (actor which contains corresponding bond/chunk) in family.
+
+ \param[in] commands The fracture commands to process.
+ */
+ virtual void applyFracture(const NvBlastFractureBuffers* commands) = 0;
+
+ /**
+ A function to reinitialize this family with new family. The Family must be created from the same low-level asset, but can be
+ in any other state. As a result split events (TkEvent::Split) will be dispatched reflecting the resulting changes (created and removed actors)
+ Afterwards the family will contain a copy of the new family and all actors' low-level actor pointers will be updated.
+
+ \param[in] newFamily The NvBlastFamily to use to reinitialize this family.
+ \param[in] group The group for new actors to be placed in.
+ */
+ virtual void reinitialize(const NvBlastFamily* newFamily, TkGroup* group = nullptr) = 0;
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+#endif // ifndef NVBLASTTKFAMILY_H
diff --git a/sdk/toolkit/include/NvBlastTkFramework.h b/sdk/toolkit/include/NvBlastTkFramework.h
index 91958fb..9daf9a4 100644..100755
--- a/sdk/toolkit/include/NvBlastTkFramework.h
+++ b/sdk/toolkit/include/NvBlastTkFramework.h
@@ -1,329 +1,329 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKFRAMEWORK_H
-#define NVBLASTTKFRAMEWORK_H
-
-
-#include "NvBlastTkType.h"
-#include "NvBlastTkEvent.h"
-
-#include "NvBlastPreprocessor.h"
-#include "NvBlastTypes.h"
-
-#include "PxVec3.h"
-
-
-// Forward declarations
-namespace physx
-{
-class PxTransform;
-}
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-// Forward declarations
-class TkObject;
-class TkEventDispatcher;
-class TkAsset;
-struct TkGroupDesc;
-class TkGroup;
-class TkActor;
-class TkJoint;
-class TkIdentifiable;
-struct TkAssetJointDesc;
-
-
-
-/**
-Descriptor for asset creation
-
-Used to create a TkAsset. This may be used by an authoring tool to describe the asset to be created.
-
-The TkAssetDesc is a simple extension of the low-level NvBlastAsset descriptor, NvBlastAssetDesc.
-*/
-struct TkAssetDesc : public NvBlastAssetDesc
-{
- /**
- Flags which may be associated with each bond described in the base NvBlastAssetDesc.
- */
- enum BondFlags
- {
- NoFlags = 0,
-
- /**
- If this flag is set then a TkJoint will be created joining the support chunks jointed by the bond.
-
- These joints will remain "quiet" until the actor is split in such a way that the joint joins two
- different actors. In that case, a TkJointUpdateEvent will be dispatched with subtype External.
- (See TkJointUpdateEvent.)
- */
- BondJointed = (1 << 0)
- };
-
- /**
- An array of size bondCount, see BondFlags.
- If NULL, all flags are assumed to be NoFlags.
- */
- const uint8_t* bondFlags;
-
- /** Constructor sets sane default values. The zero chunkCount will cause TkFramework::createAsset(...) to fail, though gracefully. */
- TkAssetDesc() : bondFlags(nullptr)
- {
- chunkCount = bondCount = 0;
- chunkDescs = nullptr;
- bondDescs = nullptr;
- }
-};
-
-
-/**
-Descriptor for actor creation.
-
-The TkActorDesc is a simple extension of the low-level NvBlastActor descriptor, NvBlastActorDesc.
-*/
-struct TkActorDesc : public NvBlastActorDesc
-{
- const TkAsset* asset; //!< The TkAsset to instance
-
- /** Constructor sets sane default values */
- TkActorDesc(const TkAsset* inAsset = nullptr) : asset(inAsset)
- {
- uniformInitialBondHealth = uniformInitialLowerSupportChunkHealth = 1.0f;
- initialBondHealths = initialSupportChunkHealths = nullptr;
- }
-};
-
-
-/**
-Descriptor for joint creation.
-*/
-struct TkJointDesc
-{
- TkFamily* families[2]; //!< The TkFamily objects containing the chunks joined by the joint
- uint32_t chunkIndices[2]; //!< The chunk indices within the corresponding TkFamily objects joined by the joint. The indexed chunks will be support chunks.
- physx::PxVec3 attachPositions[2]; //!< The position of the joint relative to each TkActor which owns the chunks jointed by this joint
-};
-
-
-/**
-Struct-enum to index object types handled by the framework
-*/
-struct TkTypeIndex
-{
- enum Enum
- {
- Asset = 0, //!< TkAsset object type
- Family, //!< TkFamily object type
- Group, //!< TkGroup object type
-
- TypeCount
- };
-};
-
-
-/**
-BlastTk Framework.
-
-The framework exists as a singleton and is used to create objects, deserialize object streams, and hold references
-to identified objects (TkAsset, TkFamily, and TkGroup) which may be recalled by their GUIDs.
-*/
-class TkFramework
-{
-public:
- /**
- Release this framework and all contained objects.
- Global singleton is set to NULL.
- */
- virtual void release() = 0;
-
- /**
- To find the type information for a given TkIdentifiable-derived class, use this funtion with the TkTypeIndex::Enum
- corresponding to the desired class name.
-
- \param[in] typeIndex Enumerated object type (see TkTypeIndex).
-
- \return type object associated with the object's class.
- */
- virtual const TkType* getType(TkTypeIndex::Enum typeIndex) const = 0;
-
- /**
- Look up an object derived from TkIdentifiable by its ID.
-
- \param[in] id The ID of the object to look up (see NvBlastID).
-
- \return pointer the object if it exists, NULL otherwise.
- */
- virtual TkIdentifiable* findObjectByID(const NvBlastID& id) const = 0;
-
- /**
- The number of TkIdentifiable-derived objects in the framework of the given type.
-
- \param[in] type The type object for the given type.
-
- \return the number of objects that currently exist of the given type.
- */
- virtual uint32_t getObjectCount(const TkType& type) const = 0;
-
- /**
- Retrieve an array of pointers (into the user-supplied buffer) to TkIdentifiable-derived objects of the given type.
-
- \param[out] buffer A user-supplied array of TkIdentifiable pointers.
- \param[in] bufferSize The number of elements available to write into buffer.
- \param[in] type The type object for the given type.
- \param[in] indexStart The starting index of the object.
-
- \return the number of TkIdentifiable pointers written to the buffer.
- */
- virtual uint32_t getObjects(TkIdentifiable** buffer, uint32_t bufferSize, const TkType& type, uint32_t indexStart = 0) const = 0;
-
- //////// Asset creation ////////
- /**
- Helper function to build and apply chunk reorder map, so that chunk descriptors are properly ordered for the createAsset function.
-
- This is a convenience wrapper for the low-level NvBlastReorderAssetDescChunks function.
-
- This function may modify both the chunkDescs and bondDescs array, since rearranging chunk descriptors requires re-indexing within the bond descriptors.
-
- \param[in] chunkDescs Array of chunk descriptors of size chunkCount. It will be updated accordingly.
- \param[in] chunkCount The number of chunk descriptors.
- \param[in] bondDescs Array of bond descriptors of size chunkCount. It will be updated accordingly.
- \param[in] bondCount The number of bond descriptors.
- \param[in] chunkReorderMap If not NULL, must be a pointer to a uint32_t array of size desc.chunkCount. Maps old chunk indices to the reordered chunk indices.
- \param[in] keepBondNormalChunkOrder If true, bond normals will be flipped if their chunk index order was reveresed by the reorder map.
-
- \return true iff the chunks did not require reordering (chunkReorderMap is the identity map).
- */
- virtual bool reorderAssetDescChunks(NvBlastChunkDesc* chunkDescs, uint32_t chunkCount, NvBlastBondDesc* bondDescs, uint32_t bondCount, uint32_t* chunkReorderMap = nullptr, bool keepBondNormalChunkOrder = false) const = 0;
-
- /**
- Helper function to ensure (check and update) support coverage of chunks, required for asset creation via the createAsset function.
-
- This is a convenience wrapper for the low-level NvBlastEnsureAssetExactSupportCoverage function.
-
- The chunk descriptors may have their support flags be modified to ensure exact coverage.
-
- \param[in] chunkDescs An array of chunk descriptors.
- \param[in] chunkCount The size of the chunkDescs array.
-
- \return true iff coverage was already exact.
- */
- virtual bool ensureAssetExactSupportCoverage(NvBlastChunkDesc* chunkDescs, uint32_t chunkCount) const = 0;
-
- /**
- Create an asset from the given descriptor.
-
- \param[in] desc The asset descriptor (see TkAssetDesc).
-
- \return the created asset, if the descriptor was valid and memory was available for the operation. Otherwise, returns NULL.
- */
- virtual TkAsset* createAsset(const TkAssetDesc& desc) = 0;
-
- /**
- Create an asset from a low-level NvBlastAsset.
-
- \param[in] assetLL The low-level NvBlastAsset to encapsulate.
- \param[in] jointDescs Optional joint descriptors to add to the new asset.
- \param[in] jointDescCount The number of joint descriptors in the jointDescs array. If non-zero, jointDescs cannot be NULL.
- \param[in] ownsAsset Does this TkAsset own the NvBlastAsset and thus is responsible for freeing it.
-
- \return the created asset, if memory was available for the operation. Otherwise, returns NULL.
- */
- virtual TkAsset* createAsset(const NvBlastAsset* assetLL, Nv::Blast::TkAssetJointDesc* jointDescs = nullptr, uint32_t jointDescCount = 0, bool ownsAsset = false) = 0;
-
- //////// Group creation ////////
- /**
- Create a group from the given descriptor. A group is a processing unit, to which the user may add TkActors. New actors generated
- from splitting a TkActor are automatically put into the same group. However, any actor may be removed from its group and optionally
- placed into another group, or left groupless.
-
- \param[in] desc The group descriptor (see TkGroupDesc).
-
- \return the created group, if the descriptor was valid and memory was available for the operation. Otherwise, returns NULL.
- */
- virtual TkGroup* createGroup(const TkGroupDesc& desc) = 0;
-
- //////// Actor creation ////////
- /**
- Create an actor from the given descriptor. The actor will be the first member of a new TkFamily.
-
- \param[in] desc The actor descriptor (see TkActorDesc).
-
- \return the created actor, if the descriptor was valid and memory was available for the operation. Otherwise, returns NULL.
- */
- virtual TkActor* createActor(const TkActorDesc& desc) = 0;
-
- //////// Joint creation ////////
- /**
- Create a joint from the given descriptor. The following restrictions apply:
-
- * Only one joint may be created between any two support chunks.
-
- * A joint cannot be created between chunks within the same actor using this method. See TkAssetDesc for a description of
- bond joint flags, which will create internal joints within an actor.
-
- \param[in] desc The joint descriptor (see TkJointDesc).
-
- \return the created joint, if the descriptor was valid and memory was available for the operation. Otherwise, returns NULL.
- */
- virtual TkJoint* createJoint(const TkJointDesc& desc) = 0;
-
-protected:
- /**
- Destructor is virtual and not public - use the release() method instead of explicitly deleting the TkFramework
- */
- virtual ~TkFramework() {}
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-//////// Global API to Create and Access Framework ////////
-
-/**
-Create a new TkFramework. This creates a global singleton, and will fail if a TkFramework object already exists.
-
-\return the new TkFramework if successful, NULL otherwise.
-*/
-NVBLAST_API Nv::Blast::TkFramework* NvBlastTkFrameworkCreate();
-
-
-/**
-Retrieve a pointer to the global TkFramework singleton (if it exists).
-
-\return the pointer to the global TkFramework (NULL if none exists).
-*/
-NVBLAST_API Nv::Blast::TkFramework* NvBlastTkFrameworkGet();
-
-
-#endif // ifndef NVBLASTTKFRAMEWORK_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKFRAMEWORK_H
+#define NVBLASTTKFRAMEWORK_H
+
+
+#include "NvBlastTkType.h"
+#include "NvBlastTkEvent.h"
+
+#include "NvBlastPreprocessor.h"
+#include "NvBlastTypes.h"
+
+#include "PxVec3.h"
+
+
+// Forward declarations
+namespace physx
+{
+class PxTransform;
+}
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+// Forward declarations
+class TkObject;
+class TkEventDispatcher;
+class TkAsset;
+struct TkGroupDesc;
+class TkGroup;
+class TkActor;
+class TkJoint;
+class TkIdentifiable;
+struct TkAssetJointDesc;
+
+
+
+/**
+Descriptor for asset creation
+
+Used to create a TkAsset. This may be used by an authoring tool to describe the asset to be created.
+
+The TkAssetDesc is a simple extension of the low-level NvBlastAsset descriptor, NvBlastAssetDesc.
+*/
+struct TkAssetDesc : public NvBlastAssetDesc
+{
+ /**
+ Flags which may be associated with each bond described in the base NvBlastAssetDesc.
+ */
+ enum BondFlags
+ {
+ NoFlags = 0,
+
+ /**
+ If this flag is set then a TkJoint will be created joining the support chunks jointed by the bond.
+
+ These joints will remain "quiet" until the actor is split in such a way that the joint joins two
+ different actors. In that case, a TkJointUpdateEvent will be dispatched with subtype External.
+ (See TkJointUpdateEvent.)
+ */
+ BondJointed = (1 << 0)
+ };
+
+ /**
+ An array of size bondCount, see BondFlags.
+ If NULL, all flags are assumed to be NoFlags.
+ */
+ const uint8_t* bondFlags;
+
+ /** Constructor sets sane default values. The zero chunkCount will cause TkFramework::createAsset(...) to fail, though gracefully. */
+ TkAssetDesc() : bondFlags(nullptr)
+ {
+ chunkCount = bondCount = 0;
+ chunkDescs = nullptr;
+ bondDescs = nullptr;
+ }
+};
+
+
+/**
+Descriptor for actor creation.
+
+The TkActorDesc is a simple extension of the low-level NvBlastActor descriptor, NvBlastActorDesc.
+*/
+struct TkActorDesc : public NvBlastActorDesc
+{
+ const TkAsset* asset; //!< The TkAsset to instance
+
+ /** Constructor sets sane default values */
+ TkActorDesc(const TkAsset* inAsset = nullptr) : asset(inAsset)
+ {
+ uniformInitialBondHealth = uniformInitialLowerSupportChunkHealth = 1.0f;
+ initialBondHealths = initialSupportChunkHealths = nullptr;
+ }
+};
+
+
+/**
+Descriptor for joint creation.
+*/
+struct TkJointDesc
+{
+ TkFamily* families[2]; //!< The TkFamily objects containing the chunks joined by the joint
+ uint32_t chunkIndices[2]; //!< The chunk indices within the corresponding TkFamily objects joined by the joint. The indexed chunks will be support chunks.
+ physx::PxVec3 attachPositions[2]; //!< The position of the joint relative to each TkActor which owns the chunks jointed by this joint
+};
+
+
+/**
+Struct-enum to index object types handled by the framework
+*/
+struct TkTypeIndex
+{
+ enum Enum
+ {
+ Asset = 0, //!< TkAsset object type
+ Family, //!< TkFamily object type
+ Group, //!< TkGroup object type
+
+ TypeCount
+ };
+};
+
+
+/**
+BlastTk Framework.
+
+The framework exists as a singleton and is used to create objects, deserialize object streams, and hold references
+to identified objects (TkAsset, TkFamily, and TkGroup) which may be recalled by their GUIDs.
+*/
+class TkFramework
+{
+public:
+ /**
+ Release this framework and all contained objects.
+ Global singleton is set to NULL.
+ */
+ virtual void release() = 0;
+
+ /**
+ To find the type information for a given TkIdentifiable-derived class, use this funtion with the TkTypeIndex::Enum
+ corresponding to the desired class name.
+
+ \param[in] typeIndex Enumerated object type (see TkTypeIndex).
+
+ \return type object associated with the object's class.
+ */
+ virtual const TkType* getType(TkTypeIndex::Enum typeIndex) const = 0;
+
+ /**
+ Look up an object derived from TkIdentifiable by its ID.
+
+ \param[in] id The ID of the object to look up (see NvBlastID).
+
+ \return pointer the object if it exists, NULL otherwise.
+ */
+ virtual TkIdentifiable* findObjectByID(const NvBlastID& id) const = 0;
+
+ /**
+ The number of TkIdentifiable-derived objects in the framework of the given type.
+
+ \param[in] type The type object for the given type.
+
+ \return the number of objects that currently exist of the given type.
+ */
+ virtual uint32_t getObjectCount(const TkType& type) const = 0;
+
+ /**
+ Retrieve an array of pointers (into the user-supplied buffer) to TkIdentifiable-derived objects of the given type.
+
+ \param[out] buffer A user-supplied array of TkIdentifiable pointers.
+ \param[in] bufferSize The number of elements available to write into buffer.
+ \param[in] type The type object for the given type.
+ \param[in] indexStart The starting index of the object.
+
+ \return the number of TkIdentifiable pointers written to the buffer.
+ */
+ virtual uint32_t getObjects(TkIdentifiable** buffer, uint32_t bufferSize, const TkType& type, uint32_t indexStart = 0) const = 0;
+
+ //////// Asset creation ////////
+ /**
+ Helper function to build and apply chunk reorder map, so that chunk descriptors are properly ordered for the createAsset function.
+
+ This is a convenience wrapper for the low-level NvBlastReorderAssetDescChunks function.
+
+ This function may modify both the chunkDescs and bondDescs array, since rearranging chunk descriptors requires re-indexing within the bond descriptors.
+
+ \param[in] chunkDescs Array of chunk descriptors of size chunkCount. It will be updated accordingly.
+ \param[in] chunkCount The number of chunk descriptors.
+ \param[in] bondDescs Array of bond descriptors of size chunkCount. It will be updated accordingly.
+ \param[in] bondCount The number of bond descriptors.
+ \param[in] chunkReorderMap If not NULL, must be a pointer to a uint32_t array of size desc.chunkCount. Maps old chunk indices to the reordered chunk indices.
+ \param[in] keepBondNormalChunkOrder If true, bond normals will be flipped if their chunk index order was reveresed by the reorder map.
+
+ \return true iff the chunks did not require reordering (chunkReorderMap is the identity map).
+ */
+ virtual bool reorderAssetDescChunks(NvBlastChunkDesc* chunkDescs, uint32_t chunkCount, NvBlastBondDesc* bondDescs, uint32_t bondCount, uint32_t* chunkReorderMap = nullptr, bool keepBondNormalChunkOrder = false) const = 0;
+
+ /**
+ Helper function to ensure (check and update) support coverage of chunks, required for asset creation via the createAsset function.
+
+ This is a convenience wrapper for the low-level NvBlastEnsureAssetExactSupportCoverage function.
+
+ The chunk descriptors may have their support flags be modified to ensure exact coverage.
+
+ \param[in] chunkDescs An array of chunk descriptors.
+ \param[in] chunkCount The size of the chunkDescs array.
+
+ \return true iff coverage was already exact.
+ */
+ virtual bool ensureAssetExactSupportCoverage(NvBlastChunkDesc* chunkDescs, uint32_t chunkCount) const = 0;
+
+ /**
+ Create an asset from the given descriptor.
+
+ \param[in] desc The asset descriptor (see TkAssetDesc).
+
+ \return the created asset, if the descriptor was valid and memory was available for the operation. Otherwise, returns NULL.
+ */
+ virtual TkAsset* createAsset(const TkAssetDesc& desc) = 0;
+
+ /**
+ Create an asset from a low-level NvBlastAsset.
+
+ \param[in] assetLL The low-level NvBlastAsset to encapsulate.
+ \param[in] jointDescs Optional joint descriptors to add to the new asset.
+ \param[in] jointDescCount The number of joint descriptors in the jointDescs array. If non-zero, jointDescs cannot be NULL.
+ \param[in] ownsAsset Does this TkAsset own the NvBlastAsset and thus is responsible for freeing it.
+
+ \return the created asset, if memory was available for the operation. Otherwise, returns NULL.
+ */
+ virtual TkAsset* createAsset(const NvBlastAsset* assetLL, Nv::Blast::TkAssetJointDesc* jointDescs = nullptr, uint32_t jointDescCount = 0, bool ownsAsset = false) = 0;
+
+ //////// Group creation ////////
+ /**
+ Create a group from the given descriptor. A group is a processing unit, to which the user may add TkActors. New actors generated
+ from splitting a TkActor are automatically put into the same group. However, any actor may be removed from its group and optionally
+ placed into another group, or left groupless.
+
+ \param[in] desc The group descriptor (see TkGroupDesc).
+
+ \return the created group, if the descriptor was valid and memory was available for the operation. Otherwise, returns NULL.
+ */
+ virtual TkGroup* createGroup(const TkGroupDesc& desc) = 0;
+
+ //////// Actor creation ////////
+ /**
+ Create an actor from the given descriptor. The actor will be the first member of a new TkFamily.
+
+ \param[in] desc The actor descriptor (see TkActorDesc).
+
+ \return the created actor, if the descriptor was valid and memory was available for the operation. Otherwise, returns NULL.
+ */
+ virtual TkActor* createActor(const TkActorDesc& desc) = 0;
+
+ //////// Joint creation ////////
+ /**
+ Create a joint from the given descriptor. The following restrictions apply:
+
+ * Only one joint may be created between any two support chunks.
+
+ * A joint cannot be created between chunks within the same actor using this method. See TkAssetDesc for a description of
+ bond joint flags, which will create internal joints within an actor.
+
+ \param[in] desc The joint descriptor (see TkJointDesc).
+
+ \return the created joint, if the descriptor was valid and memory was available for the operation. Otherwise, returns NULL.
+ */
+ virtual TkJoint* createJoint(const TkJointDesc& desc) = 0;
+
+protected:
+ /**
+ Destructor is virtual and not public - use the release() method instead of explicitly deleting the TkFramework
+ */
+ virtual ~TkFramework() {}
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+//////// Global API to Create and Access Framework ////////
+
+/**
+Create a new TkFramework. This creates a global singleton, and will fail if a TkFramework object already exists.
+
+\return the new TkFramework if successful, NULL otherwise.
+*/
+NVBLAST_API Nv::Blast::TkFramework* NvBlastTkFrameworkCreate();
+
+
+/**
+Retrieve a pointer to the global TkFramework singleton (if it exists).
+
+\return the pointer to the global TkFramework (NULL if none exists).
+*/
+NVBLAST_API Nv::Blast::TkFramework* NvBlastTkFrameworkGet();
+
+
+#endif // ifndef NVBLASTTKFRAMEWORK_H
diff --git a/sdk/toolkit/include/NvBlastTkGroup.h b/sdk/toolkit/include/NvBlastTkGroup.h
index e704b28..4a7a4a9 100644..100755
--- a/sdk/toolkit/include/NvBlastTkGroup.h
+++ b/sdk/toolkit/include/NvBlastTkGroup.h
@@ -1,210 +1,210 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKGROUP_H
-#define NVBLASTTKGROUP_H
-
-#include "NvBlastTkIdentifiable.h"
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-// Forward declarations
-class TkActor;
-
-
-/**
-Descriptor for a TkGroup. TkGroup uses a number of TkGroupWorker to process its actors.
-@see TkGroupWorker, TkGroup::setWorkerCount
-*/
-struct TkGroupDesc
-{
- uint32_t workerCount; //!< The number of expected TkWorkers to process the TkGroup concurrently.
-};
-
-
-/**
-Used to collect internal counters using TkGroup::getStats (for profile builds only)
-@see TkGroup::getStats()
-*/
-struct TkGroupStats
-{
- NvBlastTimers timers; //!< Accumulated time spent in blast low-level functions, see NvBlastTimers
- uint32_t processedActorsCount; //!< Accumulated number of processed actors in all TkWorker
- int64_t workerTime; //!< Accumulated time spent executing TkWorker::run. Unit is ticks, see NvBlastTimers.
-};
-
-
-/**
-A worker as provided by TkGroup::acquireWorker(). It manages the necessary memory for parallel processing.
-The group can be processed concurrently by calling process() from different threads using a different TkGroupWorker each.
-
-TkActors that have been damaged with applyFracture() such that they may be split into separate
-actors are split by this function. TkActors that have damage queued through the actor's damage() function
-will be fractured and split by this function.
-*/
-class TkGroupWorker
-{
-public:
- /**
- Process a job of this worker's TkGroup.
-
- /param[in] jobId a job id in the range (0, TkGroup::startProcess()]
- */
- virtual void process(uint32_t jobId) = 0;
-};
-
-
-/**
-A group is a processing unit, to which the user may add TkActors. New actors generated from splitting a TkActor
-are automatically put into the same group. However, any actor may be removed from its group and placed into
-another group (or no group) by the user's choice.
-
-When the group's process function is called, all actors' damage buffers will be processed and turned into fracture events
-and the actor is split if applicable.
-
-This work can be done in multiple threads with the help of TkGroupWorker:
-Instead of calling the process function, commence the procedure with startProcess which returns the number of jobs to process.
-Each concurrent thread uses an acquired TkGroupWorker to process the jobs.
-Over the whole procedure, each job must be processed once and only once.
-Jobs can be processed in any order. TkGroupWorkers can be returned and acquired later by another task.
-After processing every job and returning all the workers to the group, endProcess concludes the procedure.
-*/
-class TkGroup : public TkIdentifiable
-{
-public:
- /**
- Add the actor to this group, if the actor does not currently belong to a group.
-
- \param[in] actor The actor to add.
-
- \return true if successful, false otherwise.
- */
- virtual bool addActor(TkActor& actor) = 0;
-
- /**
- The number of actors currently in this group.
-
- \return the number of TkActors that currently exist in this group.
- */
- virtual uint32_t getActorCount() const = 0;
-
- /**
- Retrieve an array of pointers (into the user-supplied buffer) to actors.
-
- \param[out] buffer A user-supplied array of TkActor pointers.
- \param[in] bufferSize The number of elements available to write into buffer.
- \param[in] indexStart The starting index of the actor.
-
- \return the number of TkActor pointers written to the buffer.
- */
- virtual uint32_t getActors(TkActor** buffer, uint32_t bufferSize, uint32_t indexStart = 0) const = 0;
-
- /**
- Lock this group for processing concurrently with TkGroupWorker. The group is unlocked again with the endProcess() function.
-
- \return The number of jobs to process. TkGroupWorker::process must be called once for each jobID from 0 to this number-1.
- See TkGroup::process for a single threaded example.
- */
- virtual uint32_t startProcess() = 0;
-
- /**
- Unlock this group after all jobs were processed with TkGroupWorker. All workers must have been returned with returnWorker().
- This function gathers the results of the split operations on the actors in this group. Events will be dispatched
- to notify listeners of new and deleted actors.
-
- Note that groups concurrently dispatching events for the same TkFamily require synchronization in the TkFamily's Listener.
- However, concurrent use of endProcess is not recommended in this version. It should be called from the main thread.
-
- \return true if the group was processing
- */
- virtual bool endProcess() = 0;
-
- /**
- Set the expected number of concurrent worker threads that will process this group concurrently.
- */
- virtual void setWorkerCount(uint32_t workerCount) = 0;
-
- /**
- \return The total amount of workers allocated for this group.
- */
- virtual uint32_t getWorkerCount() const = 0;
-
- /**
- Acquire one worker to process the group concurrently on a thread.
- The worker must be returned with returnWorker() before endProcess() is called on its group.
-
- \return A worker for this group (at most getWorkerCount) or nullptr if none is available.
- */
- virtual TkGroupWorker* acquireWorker() = 0;
-
- /**
- Return a worker previously acquired with acquireWorker() to this TkGroup.
-
- \param[in] The TkGroupWorker previously acquired from this TkGroup.
- */
- virtual void returnWorker(TkGroupWorker*) = 0;
-
- /**
- Helper function to process the group synchronously on a single thread.
- */
- void process();
-
- /**
- For profile builds only, request stats of the last successful processing. Inactive in other builds.
- The times and counters reported account for all the TkWorker (accumulated) taking part in the processing.
-
- \param[in] stats The struct to be filled in.
- */
- virtual void getStats(TkGroupStats& stats) const = 0;
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-NV_INLINE void Nv::Blast::TkGroup::process()
-{
- uint32_t jobCount = startProcess();
- if (jobCount > 0)
- {
- TkGroupWorker* worker = acquireWorker();
- for (uint32_t i = 0; i < jobCount; i++)
- {
- worker->process(i);
- }
- returnWorker(worker);
- }
- endProcess();
-}
-
-
-#endif // ifndef NVBLASTTKGROUP_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKGROUP_H
+#define NVBLASTTKGROUP_H
+
+#include "NvBlastTkIdentifiable.h"
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+// Forward declarations
+class TkActor;
+
+
+/**
+Descriptor for a TkGroup. TkGroup uses a number of TkGroupWorker to process its actors.
+@see TkGroupWorker, TkGroup::setWorkerCount
+*/
+struct TkGroupDesc
+{
+ uint32_t workerCount; //!< The number of expected TkWorkers to process the TkGroup concurrently.
+};
+
+
+/**
+Used to collect internal counters using TkGroup::getStats (for profile builds only)
+@see TkGroup::getStats()
+*/
+struct TkGroupStats
+{
+ NvBlastTimers timers; //!< Accumulated time spent in blast low-level functions, see NvBlastTimers
+ uint32_t processedActorsCount; //!< Accumulated number of processed actors in all TkWorker
+ int64_t workerTime; //!< Accumulated time spent executing TkWorker::run. Unit is ticks, see NvBlastTimers.
+};
+
+
+/**
+A worker as provided by TkGroup::acquireWorker(). It manages the necessary memory for parallel processing.
+The group can be processed concurrently by calling process() from different threads using a different TkGroupWorker each.
+
+TkActors that have been damaged with applyFracture() such that they may be split into separate
+actors are split by this function. TkActors that have damage queued through the actor's damage() function
+will be fractured and split by this function.
+*/
+class TkGroupWorker
+{
+public:
+ /**
+ Process a job of this worker's TkGroup.
+
+ /param[in] jobId a job id in the range (0, TkGroup::startProcess()]
+ */
+ virtual void process(uint32_t jobId) = 0;
+};
+
+
+/**
+A group is a processing unit, to which the user may add TkActors. New actors generated from splitting a TkActor
+are automatically put into the same group. However, any actor may be removed from its group and placed into
+another group (or no group) by the user's choice.
+
+When the group's process function is called, all actors' damage buffers will be processed and turned into fracture events
+and the actor is split if applicable.
+
+This work can be done in multiple threads with the help of TkGroupWorker:
+Instead of calling the process function, commence the procedure with startProcess which returns the number of jobs to process.
+Each concurrent thread uses an acquired TkGroupWorker to process the jobs.
+Over the whole procedure, each job must be processed once and only once.
+Jobs can be processed in any order. TkGroupWorkers can be returned and acquired later by another task.
+After processing every job and returning all the workers to the group, endProcess concludes the procedure.
+*/
+class TkGroup : public TkIdentifiable
+{
+public:
+ /**
+ Add the actor to this group, if the actor does not currently belong to a group.
+
+ \param[in] actor The actor to add.
+
+ \return true if successful, false otherwise.
+ */
+ virtual bool addActor(TkActor& actor) = 0;
+
+ /**
+ The number of actors currently in this group.
+
+ \return the number of TkActors that currently exist in this group.
+ */
+ virtual uint32_t getActorCount() const = 0;
+
+ /**
+ Retrieve an array of pointers (into the user-supplied buffer) to actors.
+
+ \param[out] buffer A user-supplied array of TkActor pointers.
+ \param[in] bufferSize The number of elements available to write into buffer.
+ \param[in] indexStart The starting index of the actor.
+
+ \return the number of TkActor pointers written to the buffer.
+ */
+ virtual uint32_t getActors(TkActor** buffer, uint32_t bufferSize, uint32_t indexStart = 0) const = 0;
+
+ /**
+ Lock this group for processing concurrently with TkGroupWorker. The group is unlocked again with the endProcess() function.
+
+ \return The number of jobs to process. TkGroupWorker::process must be called once for each jobID from 0 to this number-1.
+ See TkGroup::process for a single threaded example.
+ */
+ virtual uint32_t startProcess() = 0;
+
+ /**
+ Unlock this group after all jobs were processed with TkGroupWorker. All workers must have been returned with returnWorker().
+ This function gathers the results of the split operations on the actors in this group. Events will be dispatched
+ to notify listeners of new and deleted actors.
+
+ Note that groups concurrently dispatching events for the same TkFamily require synchronization in the TkFamily's Listener.
+ However, concurrent use of endProcess is not recommended in this version. It should be called from the main thread.
+
+ \return true if the group was processing
+ */
+ virtual bool endProcess() = 0;
+
+ /**
+ Set the expected number of concurrent worker threads that will process this group concurrently.
+ */
+ virtual void setWorkerCount(uint32_t workerCount) = 0;
+
+ /**
+ \return The total amount of workers allocated for this group.
+ */
+ virtual uint32_t getWorkerCount() const = 0;
+
+ /**
+ Acquire one worker to process the group concurrently on a thread.
+ The worker must be returned with returnWorker() before endProcess() is called on its group.
+
+ \return A worker for this group (at most getWorkerCount) or nullptr if none is available.
+ */
+ virtual TkGroupWorker* acquireWorker() = 0;
+
+ /**
+ Return a worker previously acquired with acquireWorker() to this TkGroup.
+
+ \param[in] The TkGroupWorker previously acquired from this TkGroup.
+ */
+ virtual void returnWorker(TkGroupWorker*) = 0;
+
+ /**
+ Helper function to process the group synchronously on a single thread.
+ */
+ void process();
+
+ /**
+ For profile builds only, request stats of the last successful processing. Inactive in other builds.
+ The times and counters reported account for all the TkWorker (accumulated) taking part in the processing.
+
+ \param[in] stats The struct to be filled in.
+ */
+ virtual void getStats(TkGroupStats& stats) const = 0;
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+NV_INLINE void Nv::Blast::TkGroup::process()
+{
+ uint32_t jobCount = startProcess();
+ if (jobCount > 0)
+ {
+ TkGroupWorker* worker = acquireWorker();
+ for (uint32_t i = 0; i < jobCount; i++)
+ {
+ worker->process(i);
+ }
+ returnWorker(worker);
+ }
+ endProcess();
+}
+
+
+#endif // ifndef NVBLASTTKGROUP_H
diff --git a/sdk/toolkit/include/NvBlastTkIdentifiable.h b/sdk/toolkit/include/NvBlastTkIdentifiable.h
index 3f59001..27b57f3 100644..100755
--- a/sdk/toolkit/include/NvBlastTkIdentifiable.h
+++ b/sdk/toolkit/include/NvBlastTkIdentifiable.h
@@ -1,84 +1,84 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKIDENTIFIABLE_H
-#define NVBLASTTKIDENTIFIABLE_H
-
-
-#include "NvBlastTkObject.h"
-
-#include "NvBlastTypes.h"
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-// Forward declarations
-class TkType;
-
-
-/**
-TkIdentifiable objects have getID and setID methods for individual objects. They also have a type (class) identification.
-*/
-class TkIdentifiable : public TkObject
-{
-public:
- // Identifiable API
-
- /**
- Return the ID associated with this object.
-
- \return the ID for this object.
- */
- virtual const NvBlastID& getID() const = 0;
-
- /**
- Set the ID for this object.
- */
- virtual void setID(const NvBlastID& id) = 0;
-
- /**
- Access to the static (class) type data for this object.
-
- \return the static type data for this object type.
- */
- virtual const TkType& getType() const = 0;
-
- /**
- Integer field available to the user which may be serialized.
- */
- uint64_t userIntData;
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-#endif // ifndef NVBLASTTKIDENTIFIABLE_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKIDENTIFIABLE_H
+#define NVBLASTTKIDENTIFIABLE_H
+
+
+#include "NvBlastTkObject.h"
+
+#include "NvBlastTypes.h"
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+// Forward declarations
+class TkType;
+
+
+/**
+TkIdentifiable objects have getID and setID methods for individual objects. They also have a type (class) identification.
+*/
+class TkIdentifiable : public TkObject
+{
+public:
+ // Identifiable API
+
+ /**
+ Return the ID associated with this object.
+
+ \return the ID for this object.
+ */
+ virtual const NvBlastID& getID() const = 0;
+
+ /**
+ Set the ID for this object.
+ */
+ virtual void setID(const NvBlastID& id) = 0;
+
+ /**
+ Access to the static (class) type data for this object.
+
+ \return the static type data for this object type.
+ */
+ virtual const TkType& getType() const = 0;
+
+ /**
+ Integer field available to the user which may be serialized.
+ */
+ uint64_t userIntData;
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+#endif // ifndef NVBLASTTKIDENTIFIABLE_H
diff --git a/sdk/toolkit/include/NvBlastTkJoint.h b/sdk/toolkit/include/NvBlastTkJoint.h
index 05944d4..f468569 100644..100755
--- a/sdk/toolkit/include/NvBlastTkJoint.h
+++ b/sdk/toolkit/include/NvBlastTkJoint.h
@@ -1,78 +1,78 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKJOINT_H
-#define NVBLASTTKJOINT_H
-
-#include "NvBlastTkObject.h"
-
-#include "PxVec3.h"
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-/**
-The data contained in a TkJoint.
-*/
-struct TkJointData
-{
- TkActor* actors[2]; //!< The TkActor objects joined by the joint
- uint32_t chunkIndices[2]; //!< The chunk indices within the corresponding TkActor objects joined by the joint. The indexed chunks will be support chunks.
- physx::PxVec3 attachPositions[2]; //!< The position of the joint relative to each TkActor
-};
-
-
-/**
-The TkJoint is may join two different TkActors, or be created internally within a single TkActor.
-
-When a TkActor is created from a TkAsset with jointed bonds (the asset is created using a TkAssetDesc with joint flags on bonds, see TkActorDesc) then
-internal TkJoint objects are created and associated with every TkActor created from that TkAsset. The user only gets notification of the internal TkJoint
-objects when the TkActor is split into separate TkActor objects that hold the support chunks joined by an internal TkJoint.
-
-The user will be notified when the TkActor objects that are attached to TkJoint objects change, or are released. In that case, a TkEvent with
-a TkJointUpdateEvent payload is dispatched to TkEventListener objects registered with the TkFamily objects to which the actors belong.
-*/
-class TkJoint : public TkObject
-{
-public:
- /**
- Retrieve data in this joint.
-
- \return a TkJointData containing this joint's data.
- */
- virtual const TkJointData getData() const = 0;
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-#endif // ifndef NVBLASTTKJOINT_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKJOINT_H
+#define NVBLASTTKJOINT_H
+
+#include "NvBlastTkObject.h"
+
+#include "PxVec3.h"
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+/**
+The data contained in a TkJoint.
+*/
+struct TkJointData
+{
+ TkActor* actors[2]; //!< The TkActor objects joined by the joint
+ uint32_t chunkIndices[2]; //!< The chunk indices within the corresponding TkActor objects joined by the joint. The indexed chunks will be support chunks.
+ physx::PxVec3 attachPositions[2]; //!< The position of the joint relative to each TkActor
+};
+
+
+/**
+The TkJoint is may join two different TkActors, or be created internally within a single TkActor.
+
+When a TkActor is created from a TkAsset with jointed bonds (the asset is created using a TkAssetDesc with joint flags on bonds, see TkActorDesc) then
+internal TkJoint objects are created and associated with every TkActor created from that TkAsset. The user only gets notification of the internal TkJoint
+objects when the TkActor is split into separate TkActor objects that hold the support chunks joined by an internal TkJoint.
+
+The user will be notified when the TkActor objects that are attached to TkJoint objects change, or are released. In that case, a TkEvent with
+a TkJointUpdateEvent payload is dispatched to TkEventListener objects registered with the TkFamily objects to which the actors belong.
+*/
+class TkJoint : public TkObject
+{
+public:
+ /**
+ Retrieve data in this joint.
+
+ \return a TkJointData containing this joint's data.
+ */
+ virtual const TkJointData getData() const = 0;
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+#endif // ifndef NVBLASTTKJOINT_H
diff --git a/sdk/toolkit/include/NvBlastTkObject.h b/sdk/toolkit/include/NvBlastTkObject.h
index 86d517e..f8d8f56 100644..100755
--- a/sdk/toolkit/include/NvBlastTkObject.h
+++ b/sdk/toolkit/include/NvBlastTkObject.h
@@ -1,75 +1,75 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKOBJECT_H
-#define NVBLASTTKOBJECT_H
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-/**
-Base class for all objects in Tk. All TkObjects are releasable.
-*/
-class TkObject
-{
-public:
- /**
- Constructor clears userData.
- */
- TkObject() : userData(nullptr) {}
-
- // Object API
-
- /**
- Release this object and free associated memory.
- */
- virtual void release() = 0;
-
-protected:
- /**
- Destructor is virtual and not public - use the release() method instead of explicitly deleting a TkObject
- */
- virtual ~TkObject() {}
-
-public:
- // Data
-
- /**
- Pointer field available to the user.
- */
- void* userData;
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-#endif // ifndef NVBLASTTKOBJECT_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKOBJECT_H
+#define NVBLASTTKOBJECT_H
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+/**
+Base class for all objects in Tk. All TkObjects are releasable.
+*/
+class TkObject
+{
+public:
+ /**
+ Constructor clears userData.
+ */
+ TkObject() : userData(nullptr) {}
+
+ // Object API
+
+ /**
+ Release this object and free associated memory.
+ */
+ virtual void release() = 0;
+
+protected:
+ /**
+ Destructor is virtual and not public - use the release() method instead of explicitly deleting a TkObject
+ */
+ virtual ~TkObject() {}
+
+public:
+ // Data
+
+ /**
+ Pointer field available to the user.
+ */
+ void* userData;
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+#endif // ifndef NVBLASTTKOBJECT_H
diff --git a/sdk/toolkit/include/NvBlastTkType.h b/sdk/toolkit/include/NvBlastTkType.h
index 946ddc5..034288c 100644..100755
--- a/sdk/toolkit/include/NvBlastTkType.h
+++ b/sdk/toolkit/include/NvBlastTkType.h
@@ -1,83 +1,83 @@
-// This code contains NVIDIA Confidential Information and is disclosed to you
-// under a form of NVIDIA software license agreement provided separately to you.
-//
-// Notice
-// NVIDIA Corporation and its licensors retain all intellectual property and
-// proprietary rights in and to this software and related documentation and
-// any modifications thereto. Any use, reproduction, disclosure, or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA Corporation is strictly prohibited.
-//
-// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
-// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
-// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
-// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Information and code furnished is believed to be accurate and reliable.
-// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
-// information or for any infringement of patents or other rights of third parties that may
-// result from its use. No license is granted by implication or otherwise under any patent
-// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
-// This code supersedes and replaces all information previously supplied.
-// NVIDIA Corporation products are not authorized for use as critical
-// components in life support devices or systems without express written approval of
-// NVIDIA Corporation.
-//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-
-
-#ifndef NVBLASTTKTYPE_H
-#define NVBLASTTKTYPE_H
-
-#include "NvBlastTypes.h"
-
-
-
-namespace Nv
-{
-namespace Blast
-{
-
-/**
-Interface for static (class) type data. This data is used for identification in streams,
-class-specific object queries in TkFramework, etc. Only classes derived from TkIdentifiable
-use TkType data.
-*/
-class TkType
-{
-public:
- /**
- The class name.
-
- \return the class name.
- */
- virtual const char* getName() const = 0;
-
- /**
- The data format version for this class. When deserializing, this version must match the
- current version. If not, the user may convert the data format using the format conversion
- extension.
-
- \return the version number.
- */
- virtual uint32_t getVersion() const = 0;
-
- /**
- Test for equality. This type is used in static (per-class) data, so types are equal exactly
- when their addresses are equal.
-
- \param[in] type The TkType to compare with this TkType.
-
- \return true if this type equals the input type, false otherwise.
- */
- bool operator == (const TkType& type) const
- {
- return &type == this;
- }
-};
-
-} // namespace Blast
-} // namespace Nv
-
-
-#endif // ifndef NVBLASTTKTYPE_H
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+
+
+#ifndef NVBLASTTKTYPE_H
+#define NVBLASTTKTYPE_H
+
+#include "NvBlastTypes.h"
+
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+/**
+Interface for static (class) type data. This data is used for identification in streams,
+class-specific object queries in TkFramework, etc. Only classes derived from TkIdentifiable
+use TkType data.
+*/
+class TkType
+{
+public:
+ /**
+ The class name.
+
+ \return the class name.
+ */
+ virtual const char* getName() const = 0;
+
+ /**
+ The data format version for this class. When deserializing, this version must match the
+ current version. If not, the user may convert the data format using the format conversion
+ extension.
+
+ \return the version number.
+ */
+ virtual uint32_t getVersion() const = 0;
+
+ /**
+ Test for equality. This type is used in static (per-class) data, so types are equal exactly
+ when their addresses are equal.
+
+ \param[in] type The TkType to compare with this TkType.
+
+ \return true if this type equals the input type, false otherwise.
+ */
+ bool operator == (const TkType& type) const
+ {
+ return &type == this;
+ }
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+#endif // ifndef NVBLASTTKTYPE_H