aboutsummaryrefslogtreecommitdiff
path: root/examples/UnityExample/Assets/Plugins
diff options
context:
space:
mode:
authorWISH\AndyBuchanan <[email protected]>2018-08-14 16:06:02 +0100
committerWISH\AndyBuchanan <[email protected]>2018-08-14 16:06:02 +0100
commit4bced2d73f61b440f81b3dff68e66cad5787d64d (patch)
treefd14e7b7bddc70868ebd2e8c6178d0183a40b1a9 /examples/UnityExample/Assets/Plugins
parentFixing line endings in buildtools/packman5/packman (diff)
downloadblast-4bced2d73f61b440f81b3dff68e66cad5787d64d.tar.xz
blast-4bced2d73f61b440f81b3dff68e66cad5787d64d.zip
Fixes to UnitySample to make it build & run. ( In Unity 2018.2 )
Diffstat (limited to 'examples/UnityExample/Assets/Plugins')
-rwxr-xr-xexamples/UnityExample/Assets/Plugins/Blast/NvBlastExtShadersWrapper.cs27
-rwxr-xr-xexamples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs32
-rwxr-xr-xexamples/UnityExample/Assets/Plugins/Blast/NvBlastWrapper.cs135
-rwxr-xr-xexamples/UnityExample/Assets/Plugins/Blast/x64/NvBlastDEBUG_x64.dllbin239616 -> 260608 bytes
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtilsDEBUG_x64.dllbin0 -> 69632 bytes
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtilsDEBUG_x64.dll.meta24
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtils_x64.dllbin0 -> 19456 bytes
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtils_x64.dll.meta24
-rwxr-xr-xexamples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtCommonDEBUG_x64.dllbin54272 -> 0 bytes
-rwxr-xr-xexamples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtCommonDEBUG_x64.dll.meta54
-rwxr-xr-xexamples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShadersDEBUG_x64.dllbin61952 -> 131072 bytes
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShaders_x64.dllbin0 -> 40448 bytes
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShaders_x64.dll.meta24
-rwxr-xr-xexamples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtUtilsDEBUG_x64.dllbin99328 -> 0 bytes
-rwxr-xr-xexamples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtUtilsDEBUG_x64.dll.meta54
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobalsDEBUG_x64.dllbin0 -> 101376 bytes
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobalsDEBUG_x64.dll.meta24
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobals_x64.dllbin0 -> 12800 bytes
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobals_x64.dll.meta24
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlast_x64.dllbin0 -> 64512 bytes
-rw-r--r--examples/UnityExample/Assets/Plugins/Blast/x64/NvBlast_x64.dll.meta24
21 files changed, 256 insertions, 190 deletions
diff --git a/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtShadersWrapper.cs b/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtShadersWrapper.cs
index 21e208c..7b4c5d1 100755
--- a/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtShadersWrapper.cs
+++ b/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtShadersWrapper.cs
@@ -7,36 +7,33 @@ using UnityEngine;
[StructLayout(LayoutKind.Sequential)]
public class NvBlastExtRadialDamageDesc
{
- public float compressive; //!< compressive (radial) damage component
+ public float damage; //!< normalized damage amount, range: [0, 1] (maximum health value to be reduced)
public float p0;
public float p1;
public float p2;
- public float minRadius; //!< inner radius of damage action
+ public float minRadius; //!< inner radius of damage action
public float maxRadius; //!< outer radius of damage action
};
[StructLayout(LayoutKind.Sequential)]
public class NvBlastExtMaterial
{
- public float singleChunkThreshold; //!< subsupport chunks only take damage surpassing this value
- public float graphChunkThreshold; //!< support chunks only take damage surpassing this value
- public float bondTangentialThreshold; //!< bond only take damage surpassing this value
- public float bondNormalThreshold; //!< currently unused - forward damage propagation
- public float damageAttenuation; //!< factor of damage attenuation while forwarding
+ public float health; //!< health
+ public float minDamageThreshold; //!< min damage fraction threshold to be applied. Range [0, 1]. For example 0.1 filters all damage below 10% of health.
+ public float maxDamageThreshold; //!< max damage fraction threshold to be applied. Range [0, 1]. For example 0.8 won't allow more then 80% of health damage to be applied.
};
-
public static class NvBlastExtShadersWrapper
{
public const string DLL_NAME = "NvBlastExtShaders" + NvBlastWrapper.DLL_POSTFIX + "_" + NvBlastWrapper.DLL_PLATFORM;
#region Dll
[DllImport(DLL_NAME)]
- private static extern bool NvBlastExtDamageActorRadialFalloff(IntPtr actor, NvBlastFractureBuffers buffers, NvBlastExtRadialDamageDesc damageDescBuffer, UInt32 damageDescCount, NvBlastExtMaterial material, NvBlastWrapper.NvBlastLog logFn, NvBlastTimers timers);
- #endregion
+ public static extern void NvBlastExtFalloffGraphShader( NvBlastFractureBuffers buffers, NvBlastGraphShaderActor actor, NvBlastExtProgramParams p ); // System.IntPtr xparams
+
+ [DllImport(DLL_NAME)]
+ public static extern void NvBlastExtFalloffSubgraphShader( NvBlastFractureBuffers buffers, NvBlastSubgraphShaderActor actor, NvBlastExtProgramParams p ); // NvBlastExtProgramParams
+ #endregion
+
+}
- public static bool DamageRadialFalloff(this NvBlastActor actor, NvBlastFractureBuffers buffers, NvBlastExtRadialDamageDesc damageDescBuffer, UInt32 damageDescCount, NvBlastExtMaterial material)
- {
- return NvBlastExtDamageActorRadialFalloff(actor.ptr, buffers, damageDescBuffer, damageDescCount, material, NvBlastWrapper.Log, null);
- }
-} \ No newline at end of file
diff --git a/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs b/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs
index 94ca399..c902192 100755
--- a/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs
+++ b/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs
@@ -7,15 +7,29 @@ using UnityEngine;
public static class NvBlastExtUtilsWrapper
{
- public const string DLL_NAME = "NvBlastExtUtils" + NvBlastWrapper.DLL_POSTFIX + "_" + NvBlastWrapper.DLL_PLATFORM;
+ //!AJB 20180809 Function was moved to a different plug in
+ public const string DLL_NAME = "NvBlast" + NvBlastWrapper.DLL_POSTFIX + "_" + NvBlastWrapper.DLL_PLATFORM; // NvBlastExtAssetUtils
- #region Dll
- [DllImport(DLL_NAME)]
- private static extern void NvBlastReorderAssetDescChunks([In, Out] NvBlastChunkDesc[] chunkDescs, uint chunkCount, [In, Out] NvBlastBondDesc[] bondDescs, uint bondCount, [In, Out] uint[] chunkReorderMap);
- #endregion
+ #region Dll
+ [DllImport(DLL_NAME)]
+ private static extern void NvBlastReorderAssetDescChunks
+ (
+ [In, Out] NvBlastChunkDesc[] chunkDescs,
+ UInt32 chunkCount,
+ [In, Out] NvBlastBondDesc[] bondDescs,
+ UInt32 bondCount,
+ UInt32[] chunkReorderMap,
+ bool keepBondNormalChunkOrder,
+ System.IntPtr scratch,
+ System.UIntPtr logFn // NvBlastLog, may be null
+ );
+ #endregion
- public static void ReorderAssetDescChunks(NvBlastAssetDesc assetDesc, uint[] chunkReorderMap)
+ public static void ReorderAssetDescChunks(NvBlastAssetDesc assetDesc, uint[] chunkReorderMap)
{
- NvBlastReorderAssetDescChunks(assetDesc.chunkDescs, assetDesc.chunkCount, assetDesc.bondDescs, assetDesc.bondCount, chunkReorderMap);
- }
-} \ No newline at end of file
+ System.IntPtr scratchPtr = NvBlastWrapper.GetScratch( (int)( assetDesc.chunkCount * Marshal.SizeOf( typeof(NvBlastChunkDesc) ) ) );
+ NvBlastReorderAssetDescChunks(assetDesc.chunkDescs, assetDesc.chunkCount, assetDesc.bondDescs, assetDesc.bondCount, chunkReorderMap, true, scratchPtr, System.UIntPtr.Zero);
+ }
+}
+
+
diff --git a/examples/UnityExample/Assets/Plugins/Blast/NvBlastWrapper.cs b/examples/UnityExample/Assets/Plugins/Blast/NvBlastWrapper.cs
index 13822f8..41b4f68 100755
--- a/examples/UnityExample/Assets/Plugins/Blast/NvBlastWrapper.cs
+++ b/examples/UnityExample/Assets/Plugins/Blast/NvBlastWrapper.cs
@@ -13,8 +13,8 @@ public struct NvBlastChunkDesc
SupportFlag = (1 << 0)
};
- /** Central position in chunk. */
- public Single c0;
+ /** Central position in chunk. */
+ public Single c0;
public Single c1;
public Single c2;
@@ -49,12 +49,12 @@ public struct NvBlastBond
public struct NvBlastBondDesc
{
- /** The indices of the chunks linked by this bond. They must be different support chunk indices. */
- public UInt32 chunk0;
- public UInt32 chunk1;
+ /** Bond data (see NvBlastBond). */
+ public NvBlastBond bond;
- /** Bond data (see NvBlastBond). */
- public NvBlastBond bond;
+ /** The indices of the chunks linked by this bond. They must be different support chunk indices. */
+ public UInt32 chunk0;
+ public UInt32 chunk1;
}
[StructLayout(LayoutKind.Sequential)]
@@ -137,7 +137,8 @@ public struct NvBlastChunk
public UInt32 userData;
};
-public struct NvBlastChunkGraph
+
+public struct NvBlastSupportGraph
{
UInt32 nodeCount;
public IntPtr chunkIndices;
@@ -189,28 +190,34 @@ public class NvBlastFractureBuffers
public class NvBlastActorSplitEvent
{
public IntPtr deletedActor; //!< deleted actor or nullptr if actor has not changed
- public IntPtr newActors; //!< list of created actors
+ public IntPtr newActors; //!< list of created actors ( NvBlastActor** )
};
[StructLayout(LayoutKind.Sequential)]
public class NvBlastGraphShaderActor
{
- UInt32 firstGraphNodeIndex; //<! Entry index for graphNodeIndexLinks
+ UInt32 actorIndex; //!< Actor's index.
+ UInt32 graphNodeCount; //!< Actor's graph node count.
+ UInt32 assetNodeCount; //!< Asset node count.
+ UInt32 firstGraphNodeIndex; //<! Entry index for graphNodeIndexLinks
public UInt32[] graphNodeIndexLinks; //<! Linked index list of connected nodes. Traversable with nextIndex = graphNodeIndexLinks[currentIndex], terminates with 0xFFFFFFFF.
public UInt32[] chunkIndices; //<! Graph's map from node index to support chunk index.
public UInt32[] adjacencyPartition; //<! See NvBlastChunkGraph::adjacencyPartition.
public UInt32[] adjacentNodeIndices; //<! See NvBlastChunkGraph::adjacentNodeIndices.
public UInt32[] adjacentBondIndices; //<! See NvBlastChunkGraph::adjacentBondIndices.
- public NvBlastBond[] assetBonds; //<! NvBlastBonds geometry in the NvBlastAsset.
- public Single[] familyBondHealths; //<! Actual bond health values for broken bond detection.
+ public NvBlastBond[] assetBonds; //<! NvBlastBonds geometry in the NvBlastAsset.
+ public NvBlastChunk[] assetChunks; //!< NvBlastChunks geometry in the NvBlastAsset.
+ public Single[] familyBondHealths; //<! Actual bond health values for broken bond detection.
+ public Single[] supportChunkHealths; //!< Actual chunk health values for dead chunk detection.
+ public UInt32[] nodeActorIndices; //!< Family's map from node index to actor index.
};
[StructLayout(LayoutKind.Sequential)]
-public class NvBlastProgramParams
+public struct NvBlastExtProgramParams
{
- public IntPtr damageDescBuffer; //!< array of damage descriptions
- public UInt32 damageDescCount; //!< number of damage descriptions in array
- public IntPtr material; //!< pointer to material
+ public IntPtr damageDescBuffer; //!< array of damage descriptions // (NvBlastExtRadialDamageDesc)
+ public IntPtr material; //!< pointer to material
+ public IntPtr accelerator; //!< //NvBlastExtDamageAccelerator* accelerator;
};
[StructLayout(LayoutKind.Sequential)]
@@ -222,10 +229,10 @@ public class NvBlastSubgraphShaderActor
public struct NvBlastDamageProgram
{
- public delegate void NvBlastGraphShaderFunction(System.IntPtr commandBuffers, System.IntPtr actor, System.IntPtr p);
- public delegate void NvBlastSubgraphShaderFunction(NvBlastFractureBuffers commandBuffers, NvBlastSubgraphShaderActor actor, NvBlastProgramParams p);
+ public delegate void NvBlastGraphShaderFunction( NvBlastFractureBuffers commandBuffers, NvBlastGraphShaderActor actor, NvBlastExtProgramParams p ); // System.IntPtr p
+ public delegate void NvBlastSubgraphShaderFunction( NvBlastFractureBuffers commandBuffers, NvBlastSubgraphShaderActor actor, NvBlastExtProgramParams p);
- public NvBlastGraphShaderFunction graphShaderFunction;
+ public NvBlastGraphShaderFunction graphShaderFunction;
public NvBlastSubgraphShaderFunction subgraphShaderFunction;
};
@@ -234,8 +241,9 @@ public class NvBlastWrapper
{
//////// DLL ////////
- public const string DLL_POSTFIX = "DEBUG"; //DEBUG
- public const string DLL_PLATFORM = "x64";
+// public const string DLL_POSTFIX = "DEBUG";
+ public const string DLL_POSTFIX = "";
+ public const string DLL_PLATFORM = "x64";
public const string DLL_NAME = "NvBlast" + DLL_POSTFIX + "_" + DLL_PLATFORM;
@@ -377,31 +385,37 @@ public class NvBlastAsset : DisposablePtr
{
#region Dll
[DllImport(NvBlastWrapper.DLL_NAME)]
- static extern UInt64 NvBlastAssetCreateRequiredScratch(NvBlastAssetDesc desc);
+ static extern UInt64 NvBlastGetRequiredScratchForCreateAsset(NvBlastAssetDesc desc, NvBlastWrapper.NvBlastLog logFn);
- [DllImport(NvBlastWrapper.DLL_NAME)]
- static extern IntPtr NvBlastAssetCreate(NvBlastAssetDesc desc, NvBlastWrapper.NvBlastAlloc allocFn, IntPtr scratch, NvBlastWrapper.NvBlastLog logFn);
+ [DllImport(NvBlastWrapper.DLL_NAME)]
+ static extern UInt64 NvBlastGetAssetMemorySize( NvBlastAssetDesc desc, NvBlastWrapper.NvBlastLog logFn );
[DllImport(NvBlastWrapper.DLL_NAME)]
- static extern void NvBlastAssetRelease(IntPtr asset, NvBlastWrapper.NvBlastFree freeFn, NvBlastWrapper.NvBlastLog logFn);
+ static extern IntPtr NvBlastCreateAsset( System.IntPtr mem, NvBlastAssetDesc desc, IntPtr scratch, NvBlastWrapper.NvBlastLog logFn);
+
+// [DllImport(NvBlastWrapper.DLL_NAME)]
+// static extern void NvBlastAssetRelease(IntPtr asset, NvBlastWrapper.NvBlastFree freeFn, NvBlastWrapper.NvBlastLog logFn);
[DllImport(NvBlastWrapper.DLL_NAME)]
static extern UInt32 NvBlastAssetGetLeafChunkCount(IntPtr asset, NvBlastWrapper.NvBlastLog logFn);
[DllImport(NvBlastWrapper.DLL_NAME)]
- static extern NvBlastChunkGraph NvBlastAssetGetSupportGraph(IntPtr asset, NvBlastWrapper.NvBlastLog logFn);
+ static extern NvBlastSupportGraph NvBlastAssetGetSupportGraph(IntPtr asset, NvBlastWrapper.NvBlastLog logFn);
#endregion
- public NvBlastAsset(NvBlastAssetDesc desc)
+ public NvBlastAsset( NvBlastAssetDesc desc )
{
- var scratchSize = NvBlastAssetCreateRequiredScratch(desc);
- var asset = NvBlastAssetCreate(desc, NvBlastWrapper.Alloc, NvBlastWrapper.GetScratch((int)scratchSize), NvBlastWrapper.Log);
- Initialize(asset);
+ var scratchSize = NvBlastGetRequiredScratchForCreateAsset( desc, NvBlastWrapper.Log );
+ var assetSize = NvBlastGetAssetMemorySize(desc, NvBlastWrapper.Log);
+ IntPtr mem = NvBlastWrapper.Alloc( (long)assetSize);
+ var asset = NvBlastCreateAsset( mem, desc, NvBlastWrapper.GetScratch( (int)scratchSize ), NvBlastWrapper.Log );
+ Initialize( asset );
}
+ // asset = mem, or NULL on failure
- protected override void Release()
+ protected override void Release()
{
- NvBlastAssetRelease(ptr, NvBlastWrapper.Free, NvBlastWrapper.Log);
+ //NvBlastAssetRelease( ptr, NvBlastWrapper.Free, NvBlastWrapper.Log );
}
public UInt32 leafChunkCount
@@ -412,7 +426,7 @@ public class NvBlastAsset : DisposablePtr
}
}
- public NvBlastChunkGraph chunkGraph
+ public NvBlastSupportGraph chunkGraph
{
get
{
@@ -424,7 +438,7 @@ public class NvBlastAsset : DisposablePtr
}
}
- private NvBlastChunkGraph? _graph = null;
+ private NvBlastSupportGraph? _graph = null;
}
@@ -432,13 +446,16 @@ public class NvBlastFamily : DisposablePtr
{
#region Dll
[DllImport(NvBlastWrapper.DLL_NAME)]
- static extern IntPtr NvBlastFamilyCreate(IntPtr asset, NvBlastWrapper.NvBlastAlloc allocFn, NvBlastWrapper.NvBlastLog logFn);
+ static extern IntPtr NvBlastAssetCreateFamily( IntPtr mem, IntPtr asset, NvBlastWrapper.NvBlastLog logFn );
- [DllImport(NvBlastWrapper.DLL_NAME)]
- static extern void NvBlastFamilyRelease(IntPtr family, NvBlastWrapper.NvBlastFree freeFn, NvBlastWrapper.NvBlastLog logFn);
- #endregion
+// [DllImport(NvBlastWrapper.DLL_NAME)]
+// static extern void NvBlastFamilyRelease(IntPtr family, NvBlastWrapper.NvBlastFree freeFn, NvBlastWrapper.NvBlastLog logFn);
- public NvBlastAsset asset
+ [DllImport(NvBlastWrapper.DLL_NAME)]
+ static extern UInt64 NvBlastAssetGetFamilyMemorySize( IntPtr asset, NvBlastWrapper.NvBlastLog logFn );
+ #endregion
+
+ public NvBlastAsset asset
{
get;
private set;
@@ -446,14 +463,16 @@ public class NvBlastFamily : DisposablePtr
public NvBlastFamily(NvBlastAsset asset_)
{
- asset = asset_;
- var family = NvBlastFamilyCreate(asset.ptr, NvBlastWrapper.Alloc, NvBlastWrapper.Log);
- Initialize(family);
+ var memSize = NvBlastAssetGetFamilyMemorySize(asset_.ptr, NvBlastWrapper.Log);
+ IntPtr mem = NvBlastWrapper.Alloc((long)memSize );
+ asset = asset_;
+ var family = NvBlastAssetCreateFamily( mem, asset.ptr, NvBlastWrapper.Log );
+ Initialize( family );
}
- protected override void Release()
+ protected override void Release()
{
- NvBlastFamilyRelease(ptr, NvBlastWrapper.Free, NvBlastWrapper.Log);
+ //NvBlastFamilyRelease( ptr, NvBlastWrapper.Free, NvBlastWrapper.Log );
}
}
@@ -462,10 +481,10 @@ public class NvBlastActor : DisposablePtr
{
#region Dll
[DllImport(NvBlastWrapper.DLL_NAME)]
- static extern UInt64 NvBlastActorCreateRequiredScratch(IntPtr asset);
+ static extern UInt64 NvBlastFamilyGetRequiredScratchForCreateFirstActor(IntPtr asset, NvBlastWrapper.NvBlastLog logFn);
[DllImport(NvBlastWrapper.DLL_NAME)]
- static extern IntPtr NvBlastActorCreate(IntPtr family, NvBlastActorDesc desc, IntPtr scratch, NvBlastWrapper.NvBlastLog logFn);
+ static extern IntPtr NvBlastFamilyCreateFirstActor(IntPtr family, NvBlastActorDesc desc, IntPtr scratch, NvBlastWrapper.NvBlastLog logFn);
[DllImport(NvBlastWrapper.DLL_NAME)]
static extern void NvBlastActorRelease(IntPtr actor);
@@ -483,16 +502,16 @@ public class NvBlastActor : DisposablePtr
static extern UInt32 NvBlastActorGetGraphNodeIndices([In, Out] UInt32[] graphNodeIndices, UInt32 graphNodeIndicesSize, IntPtr actor, NvBlastWrapper.NvBlastLog logFn);
[DllImport(NvBlastWrapper.DLL_NAME)]
- static extern void NvBlastActorGenerateFracture(NvBlastFractureBuffers commandBuffers, IntPtr actor, NvBlastDamageProgram program, NvBlastProgramParams programParams, NvBlastWrapper.NvBlastLog logFn, NvBlastTimers timers);
+ static extern void NvBlastActorGenerateFracture(NvBlastFractureBuffers commandBuffers, IntPtr actor, NvBlastDamageProgram program, NvBlastExtProgramParams programParams, NvBlastWrapper.NvBlastLog logFn, NvBlastTimers timers);
[DllImport(NvBlastWrapper.DLL_NAME)]
static extern void NvBlastActorApplyFracture(IntPtr eventBuffers, IntPtr actor, NvBlastFractureBuffers commands, NvBlastWrapper.NvBlastLog logFn, NvBlastTimers timers);
[DllImport(NvBlastWrapper.DLL_NAME)]
- static extern UInt64 NvBlastActorSplitRequiredScratch(IntPtr actor);
+ static extern UInt64 NvBlastActorGetRequiredScratchForSplit(IntPtr actor, NvBlastWrapper.NvBlastLog logFn);
[DllImport(NvBlastWrapper.DLL_NAME)]
- static extern UInt32 NvBlastActorSplit([In, Out] NvBlastActorSplitEvent result, UInt32 newActorsMaxCount, IntPtr actor, IntPtr scratch, NvBlastWrapper.NvBlastLog logFn, NvBlastTimers timers);
+ static extern UInt32 NvBlastActorSplit([In, Out] NvBlastActorSplitEvent result, IntPtr actor, UInt32 newActorsMaxCount, IntPtr scratch, NvBlastWrapper.NvBlastLog logFn, NvBlastTimers timers);
#endregion
public NvBlastFamily family
@@ -507,9 +526,9 @@ public class NvBlastActor : DisposablePtr
{
family = family_;
- var scratchSize = NvBlastActorCreateRequiredScratch(family_.asset.ptr);
- var actor = NvBlastActorCreate(family.ptr, desc, NvBlastWrapper.GetScratch((int)scratchSize), NvBlastWrapper.Log);
- Initialize(actor);
+ var scratchSize = NvBlastFamilyGetRequiredScratchForCreateFirstActor( family.ptr, NvBlastWrapper.Log);
+ var actor = NvBlastFamilyCreateFirstActor( family.ptr, desc, NvBlastWrapper.GetScratch((int)scratchSize), NvBlastWrapper.Log );
+ Initialize(actor);
}
public NvBlastActor(NvBlastFamily family_, IntPtr ptr)
@@ -560,9 +579,9 @@ public class NvBlastActor : DisposablePtr
}
}
- public void GenerateFracture(NvBlastFractureBuffers buffers, NvBlastDamageProgram program, NvBlastProgramParams programParams)
+ public void GenerateFracture( NvBlastFractureBuffers buffers, NvBlastDamageProgram program, NvBlastExtProgramParams programParams )
{
- NvBlastActorGenerateFracture(buffers, ptr, program, programParams, NvBlastWrapper.Log, null);
+ NvBlastActorGenerateFracture( buffers, ptr, program, programParams, NvBlastWrapper.Log, null );
}
public void ApplyFracture(NvBlastFractureBuffers commands)
@@ -570,11 +589,11 @@ public class NvBlastActor : DisposablePtr
NvBlastActorApplyFracture(IntPtr.Zero, ptr, commands, NvBlastWrapper.Log, null);
}
- public UInt32 Split(NvBlastActorSplitEvent result, UInt32 newActorsMaxCount)
+ public UInt32 Split( NvBlastActorSplitEvent result, UInt32 newActorsMaxCount )
{
- var scratchSize = NvBlastActorSplitRequiredScratch(ptr);
- UInt32 newActorsCount = NvBlastActorSplit(result, newActorsMaxCount, ptr, NvBlastWrapper.GetScratch((int)scratchSize), NvBlastWrapper.Log, null);
- if(result.deletedActor != IntPtr.Zero)
+ var scratchSize = NvBlastActorGetRequiredScratchForSplit(ptr, NvBlastWrapper.Log);
+ UInt32 newActorsCount = NvBlastActorSplit( result, ptr, newActorsMaxCount, NvBlastWrapper.GetScratch((int)scratchSize), NvBlastWrapper.Log, null);
+ if( result.deletedActor != IntPtr.Zero )
{
ResetPtr();
}
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastDEBUG_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastDEBUG_x64.dll
index 323acb4..053c1eb 100755
--- a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastDEBUG_x64.dll
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastDEBUG_x64.dll
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtilsDEBUG_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtilsDEBUG_x64.dll
new file mode 100644
index 0000000..687da50
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtilsDEBUG_x64.dll
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtilsDEBUG_x64.dll.meta b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtilsDEBUG_x64.dll.meta
new file mode 100644
index 0000000..1e63451
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtilsDEBUG_x64.dll.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 088af6213d27b33488e83883ab80ddbf
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtils_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtils_x64.dll
new file mode 100644
index 0000000..a33ea16
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtils_x64.dll
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtils_x64.dll.meta b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtils_x64.dll.meta
new file mode 100644
index 0000000..1763e69
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtAssetUtils_x64.dll.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 9ecf364add0e0c342a12ed86e36ffebf
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtCommonDEBUG_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtCommonDEBUG_x64.dll
deleted file mode 100755
index 9000d94..0000000
--- a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtCommonDEBUG_x64.dll
+++ /dev/null
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtCommonDEBUG_x64.dll.meta b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtCommonDEBUG_x64.dll.meta
deleted file mode 100755
index cda3e53..0000000
--- a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtCommonDEBUG_x64.dll.meta
+++ /dev/null
@@ -1,54 +0,0 @@
-fileFormatVersion: 2
-guid: 819acd10daddc114cb79447732a44ff3
-timeCreated: 1482926953
-licenseType: Free
-PluginImporter:
- serializedVersion: 1
- iconMap: {}
- executionOrder: {}
- isPreloaded: 0
- isOverridable: 0
- platformData:
- Any:
- enabled: 1
- settings: {}
- Editor:
- enabled: 0
- settings:
- CPU: x86_64
- DefaultValueInitialized: true
- Linux:
- enabled: 0
- settings:
- CPU: None
- Linux64:
- enabled: 1
- settings:
- CPU: x86_64
- LinuxUniversal:
- enabled: 1
- settings:
- CPU: x86_64
- OSXIntel:
- enabled: 0
- settings:
- CPU: None
- OSXIntel64:
- enabled: 1
- settings:
- CPU: AnyCPU
- OSXUniversal:
- enabled: 0
- settings:
- CPU: x86_64
- Win:
- enabled: 0
- settings:
- CPU: None
- Win64:
- enabled: 1
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShadersDEBUG_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShadersDEBUG_x64.dll
index 401cd04..0d21f00 100755
--- a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShadersDEBUG_x64.dll
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShadersDEBUG_x64.dll
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShaders_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShaders_x64.dll
new file mode 100644
index 0000000..b21d758
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShaders_x64.dll
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShaders_x64.dll.meta b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShaders_x64.dll.meta
new file mode 100644
index 0000000..4fa6fe6
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtShaders_x64.dll.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 6c10d1683220a7c46b28c4e98f10aa05
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtUtilsDEBUG_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtUtilsDEBUG_x64.dll
deleted file mode 100755
index b24c4fa..0000000
--- a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtUtilsDEBUG_x64.dll
+++ /dev/null
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtUtilsDEBUG_x64.dll.meta b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtUtilsDEBUG_x64.dll.meta
deleted file mode 100755
index ccb6a94..0000000
--- a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastExtUtilsDEBUG_x64.dll.meta
+++ /dev/null
@@ -1,54 +0,0 @@
-fileFormatVersion: 2
-guid: 26135af3d3f04804dbaebd13245d00ce
-timeCreated: 1482926953
-licenseType: Free
-PluginImporter:
- serializedVersion: 1
- iconMap: {}
- executionOrder: {}
- isPreloaded: 0
- isOverridable: 0
- platformData:
- Any:
- enabled: 1
- settings: {}
- Editor:
- enabled: 0
- settings:
- CPU: x86_64
- DefaultValueInitialized: true
- Linux:
- enabled: 0
- settings:
- CPU: None
- Linux64:
- enabled: 1
- settings:
- CPU: x86_64
- LinuxUniversal:
- enabled: 1
- settings:
- CPU: x86_64
- OSXIntel:
- enabled: 0
- settings:
- CPU: None
- OSXIntel64:
- enabled: 1
- settings:
- CPU: AnyCPU
- OSXUniversal:
- enabled: 0
- settings:
- CPU: x86_64
- Win:
- enabled: 0
- settings:
- CPU: None
- Win64:
- enabled: 1
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobalsDEBUG_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobalsDEBUG_x64.dll
new file mode 100644
index 0000000..ebff1a2
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobalsDEBUG_x64.dll
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobalsDEBUG_x64.dll.meta b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobalsDEBUG_x64.dll.meta
new file mode 100644
index 0000000..d7c2605
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobalsDEBUG_x64.dll.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 2250d69db141dc54bb8062c9cc0bc7a0
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobals_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobals_x64.dll
new file mode 100644
index 0000000..d3a1887
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobals_x64.dll
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobals_x64.dll.meta b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobals_x64.dll.meta
new file mode 100644
index 0000000..f940e8b
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlastGlobals_x64.dll.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 8f19936d17663b4459005d2272b39d83
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlast_x64.dll b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlast_x64.dll
new file mode 100644
index 0000000..a6696a4
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlast_x64.dll
Binary files differ
diff --git a/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlast_x64.dll.meta b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlast_x64.dll.meta
new file mode 100644
index 0000000..5bd0070
--- /dev/null
+++ b/examples/UnityExample/Assets/Plugins/Blast/x64/NvBlast_x64.dll.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: d4d685ec2feb3a44cbe25c63b769a3b6
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant: