public NvBlastActor(NvBlastFamily family_, NvBlastActorDesc desc) { family = family_; var scratchSize = NvBlastFamilyGetRequiredScratchForCreateFirstActor(family.ptr, NvBlastWrapper.Log); var actor = NvBlastFamilyCreateFirstActor(family.ptr, desc, NvBlastWrapper.GetScratch((int)scratchSize), NvBlastWrapper.Log); Initialize(actor); }
public NvBlastAsset(NvBlastAssetDesc desc) { 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); }
public NvBlastFamily(NvBlastAsset asset_) { 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); }
public UInt32 Split(NvBlastActorSplitEvent result, UInt32 newActorsMaxCount) { 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(); } return(newActorsCount); }
public static void ReorderAssetDescChunks(NvBlastAssetDesc assetDesc, uint[] chunkReorderMap) { 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); }