aboutsummaryrefslogtreecommitdiff
path: root/sdk/extensions/authoring/include/NvBlastExtAuthoring.h
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-10-24 15:25:02 -0700
committerBryan Galdrikian <[email protected]>2017-10-24 15:25:02 -0700
commitb0c11962f6012430da3bcaa2727288046b33d648 (patch)
treecf13338fa4fd7072badf64f751f94abeeb437003 /sdk/extensions/authoring/include/NvBlastExtAuthoring.h
parentlinux build fix - all configs (diff)
downloadblast-b0c11962f6012430da3bcaa2727288046b33d648.tar.xz
blast-b0c11962f6012430da3bcaa2727288046b33d648.zip
Changes for 1.1.1
See README.md
Diffstat (limited to 'sdk/extensions/authoring/include/NvBlastExtAuthoring.h')
-rw-r--r--sdk/extensions/authoring/include/NvBlastExtAuthoring.h74
1 files changed, 73 insertions, 1 deletions
diff --git a/sdk/extensions/authoring/include/NvBlastExtAuthoring.h b/sdk/extensions/authoring/include/NvBlastExtAuthoring.h
index ce21c65..dd49677 100644
--- a/sdk/extensions/authoring/include/NvBlastExtAuthoring.h
+++ b/sdk/extensions/authoring/include/NvBlastExtAuthoring.h
@@ -47,9 +47,13 @@ namespace Nv
class ConvexMeshBuilder;
class BlastBondGenerator;
class MeshCleaner;
+ struct CollisionParams;
+ struct CollisionHull;
}
}
+struct NvBlastExtAssetUtilsBondDesc;
+
/**
Constructs mesh object from array of triangles.
User should call release() after usage.
@@ -96,6 +100,37 @@ Create ConvexMeshBuilder
NVBLAST_API Nv::Blast::ConvexMeshBuilder* NvBlastExtAuthoringCreateConvexMeshBuilder(physx::PxCooking* cooking,
physx::PxPhysicsInsertionCallback* insertionCallback);
+
+/**
+Transforms collision hull in place using scale, rotation, transform.
+\param[in, out] hull Pointer to the hull to be transformed (modified).
+\param[in] scale Pointer to scale to be applied. Can be nullptr.
+\param[in] rotation Pointer to rotation to be applied. Can be nullptr.
+\param[in] translation Pointer to translation to be applied. Can be nullptr.
+*/
+NVBLAST_API void NvBlastExtAuthoringTransformCollisionHullInPlace
+(
+ Nv::Blast::CollisionHull* hull,
+ const physx::PxVec3* scaling,
+ const physx::PxQuat* rotation,
+ const physx::PxVec3* translation
+);
+
+/**
+Transforms collision hull in place using scale, rotation, transform.
+\param[in] hull Pointer to the hull to be transformed (modified).
+\param[in] scale Pointer to scale to be applied. Can be nullptr.
+\param[in] rotation Pointer to rotation to be applied. Can be nullptr.
+\param[in] translation Pointer to translation to be applied. Can be nullptr.
+*/
+NVBLAST_API Nv::Blast::CollisionHull* NvBlastExtAuthoringTransformCollisionHull
+(
+ const Nv::Blast::CollisionHull* hull,
+ const physx::PxVec3* scaling,
+ const physx::PxQuat* rotation,
+ const physx::PxVec3* translation
+);
+
/**
Performs pending fractures and generates fractured asset, render and collision geometry
@@ -104,10 +139,11 @@ Performs pending fractures and generates fractured asset, render and collision g
\param[in] collisionBuilder Collision builder created by NvBlastExtAuthoringCreateConvexMeshBuilder
\param[in] defaultSupportDepth All new chunks will be marked as support if its depth equal to defaultSupportDepth.
By default leaves (chunks without children) marked as support.
+\param[in] collisionParam Parameters of collision hulls generation.
\return Authoring result
*/
NVBLAST_API Nv::Blast::AuthoringResult* NvBlastExtAuthoringProcessFracture(Nv::Blast::FractureTool& fTool,
- Nv::Blast::BlastBondGenerator& bondGenerator, Nv::Blast::ConvexMeshBuilder& collisionBuilder, int32_t defaultSupportDepth = -1);
+ Nv::Blast::BlastBondGenerator& bondGenerator, Nv::Blast::ConvexMeshBuilder& collisionBuilder, const Nv::Blast::CollisionParams& collisionParam, int32_t defaultSupportDepth = -1);
/**
@@ -116,4 +152,40 @@ NVBLAST_API Nv::Blast::AuthoringResult* NvBlastExtAuthoringProcessFracture(Nv::B
*/
NVBLAST_API Nv::Blast::MeshCleaner* NvBlastExtAuthoringCreateMeshCleaner();
+
+
+/**
+Finds bonds connecting chunks in a list of assets
+
+New bond descriptors may be given to bond support chunks from different components.
+
+An NvBlastAsset may appear more than once in the components array.
+
+NOTE: This function allocates memory using the allocator in NvBlastGlobals, to create the new bond
+descriptor arrays returned. The user must free this memory after use with NVBLAST_FREE
+
+\param[in] components An array of assets to merge, of size componentCount.
+\param[in] scales If not NULL, an array of size componentCount of scales to apply to the geometric data in the chunks and bonds. If NULL, no scaling is applied.
+\param[in] rotations If not NULL, an array of size componentCount of rotations to apply to the geometric data in the chunks and bonds. The quaternions MUST be normalized.
+ If NULL, no rotations are applied.
+\param[in] translations If not NULL, an array of of size componentCount of translations to apply to the geometric data in the chunks and bonds. If NULL, no translations are applied.
+\param[in] convexHullOffsets For each component, an array of chunkSize+1 specifying the start of the convex hulls for that chunk inside the chunkHulls array for that component.
+\param[in] chunkHulls For each component, an array of CollisionHull* specifying the collision geometry for the chunks in that component.
+\param[in] componentCount The size of the components and relativeTransforms arrays.
+\param[out] newBondDescs Descriptors of type NvBlastExtAssetUtilsBondDesc for new bonds between components.
+
+\return the number of bonds in newBondDescs
+*/
+NVBLAST_API uint32_t NvBlastExtAuthoringFindAssetConnectingBonds
+(
+ const NvBlastAsset** components,
+ const physx::PxVec3* scales,
+ const physx::PxQuat* rotations,
+ const physx::PxVec3* translations,
+ const uint32_t** convexHullOffsets,
+ const Nv::Blast::CollisionHull*** chunkHulls,
+ uint32_t componentCount,
+ NvBlastExtAssetUtilsBondDesc*& newBondDescs
+);
+
#endif // ifndef NVBLASTAUTHORING_H