diff options
| author | git perforce import user <a@b> | 2016-10-25 12:29:14 -0600 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees> | 2016-10-25 18:56:37 -0500 |
| commit | 3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch) | |
| tree | fa6485c169e50d7415a651bf838f5bcd0fd3bfbd /APEX_1.4/module/clothing/src/autogen/ClothingCookedParam.cpp | |
| download | physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip | |
Initial commit:
PhysX 3.4.0 Update @ 21294896
APEX 1.4.0 Update @ 21275617
[CL 21300167]
Diffstat (limited to 'APEX_1.4/module/clothing/src/autogen/ClothingCookedParam.cpp')
| -rw-r--r-- | APEX_1.4/module/clothing/src/autogen/ClothingCookedParam.cpp | 970 |
1 files changed, 970 insertions, 0 deletions
diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingCookedParam.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingCookedParam.cpp new file mode 100644 index 00000000..9a7b91ee --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingCookedParam.cpp @@ -0,0 +1,970 @@ +// 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) 2008-2015 NVIDIA Corporation. All rights reserved. + +// This file was generated by NvParameterized/scripts/GenParameterized.pl + + +#include "ClothingCookedParam.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingCookedParamNS; + +const char* const ClothingCookedParamFactory::vptr = + NvParameterized::getVptr<ClothingCookedParam, ClothingCookedParam::ClassAlignment>(); + +const uint32_t NumParamDefs = 24; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 4, 6, 15, 17, 18, 20, 22, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 16, 19, 21, 23, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 9 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->actorScale), NULL, 0 }, // actorScale + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->convexCookedData), CHILDREN(9), 1 }, // convexCookedData + { TYPE_U8, false, 1 * sizeof(uint8_t), NULL, 0 }, // convexCookedData[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->convexMeshPointers), CHILDREN(10), 1 }, // convexMeshPointers + { TYPE_POINTER, false, 1 * sizeof(void*), NULL, 0 }, // convexMeshPointers[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->cookedPhysicalMeshes), CHILDREN(11), 1 }, // cookedPhysicalMeshes + { TYPE_STRUCT, false, 1 * sizeof(CookedPhysicalMesh_Type), CHILDREN(12), 7 }, // cookedPhysicalMeshes[] + { TYPE_U32, false, (size_t)(&((CookedPhysicalMesh_Type*)0)->physicalMeshId), NULL, 0 }, // cookedPhysicalMeshes[].physicalMeshId + { TYPE_U32, false, (size_t)(&((CookedPhysicalMesh_Type*)0)->cookedDataOffset), NULL, 0 }, // cookedPhysicalMeshes[].cookedDataOffset + { TYPE_U32, false, (size_t)(&((CookedPhysicalMesh_Type*)0)->cookedDataLength), NULL, 0 }, // cookedPhysicalMeshes[].cookedDataLength + { TYPE_POINTER, false, (size_t)(&((CookedPhysicalMesh_Type*)0)->deformableMeshPointer), NULL, 0 }, // cookedPhysicalMeshes[].deformableMeshPointer + { TYPE_U32, false, (size_t)(&((CookedPhysicalMesh_Type*)0)->deformableInvParticleWeightsOffset), NULL, 0 }, // cookedPhysicalMeshes[].deformableInvParticleWeightsOffset + { TYPE_U32, false, (size_t)(&((CookedPhysicalMesh_Type*)0)->virtualParticleIndicesOffset), NULL, 0 }, // cookedPhysicalMeshes[].virtualParticleIndicesOffset + { TYPE_U32, false, (size_t)(&((CookedPhysicalMesh_Type*)0)->virtualParticleIndicesLength), NULL, 0 }, // cookedPhysicalMeshes[].virtualParticleIndicesLength + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->deformableCookedData), CHILDREN(19), 1 }, // deformableCookedData + { TYPE_U8, false, 1 * sizeof(uint8_t), NULL, 0 }, // deformableCookedData[] + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->cookedDataVersion), NULL, 0 }, // cookedDataVersion + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->deformableInvParticleWeights), CHILDREN(20), 1 }, // deformableInvParticleWeights + { TYPE_F32, false, 1 * sizeof(float), NULL, 0 }, // deformableInvParticleWeights[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->virtualParticleIndices), CHILDREN(21), 1 }, // virtualParticleIndices + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // virtualParticleIndices[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->virtualParticleWeights), CHILDREN(22), 1 }, // virtualParticleWeights + { TYPE_VEC3, false, 1 * sizeof(physx::PxVec3), NULL, 0 }, // virtualParticleWeights[] +}; + + +bool ClothingCookedParam::mBuiltFlag = false; +NvParameterized::MutexType ClothingCookedParam::mBuiltFlagMutex; + +ClothingCookedParam::ClothingCookedParam(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingCookedParamFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingCookedParam::~ClothingCookedParam() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingCookedParam::destroy() +{ + // We cache these fields here to avoid overwrite in destructor + bool doDeallocateSelf = mDoDeallocateSelf; + NvParameterized::Traits* traits = mParameterizedTraits; + int32_t* refCount = mRefCount; + void* buf = mBuffer; + + this->~ClothingCookedParam(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingCookedParam::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingCookedParam::getParameterDefinitionTree(void) const +{ + ClothingCookedParam* tmpParam = const_cast<ClothingCookedParam*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingCookedParam::getParameterHandle(const char* long_name, Handle& handle) const +{ + ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); + if (Ret != ERROR_NONE) + { + return(Ret); + } + + size_t offset; + void* ptr; + + getVarPtr(handle, ptr, offset); + + if (ptr == NULL) + { + return(ERROR_INDEX_OUT_OF_RANGE); + } + + return(ERROR_NONE); +} + +NvParameterized::ErrorType ClothingCookedParam::getParameterHandle(const char* long_name, Handle& handle) +{ + ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); + if (Ret != ERROR_NONE) + { + return(Ret); + } + + size_t offset; + void* ptr; + + getVarPtr(handle, ptr, offset); + + if (ptr == NULL) + { + return(ERROR_INDEX_OUT_OF_RANGE); + } + + return(ERROR_NONE); +} + +void ClothingCookedParam::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingCookedParam::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void ClothingCookedParam::freeParameterDefinitionTable(NvParameterized::Traits* traits) +{ + if (!traits) + { + return; + } + + if (!mBuiltFlag) // Double-checked lock + { + return; + } + + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + + if (!mBuiltFlag) + { + return; + } + + for (uint32_t i = 0; i < NumParamDefs; ++i) + { + ParamDefTable[i].~DefinitionImpl(); + } + + traits->free(ParamDefTable); + + mBuiltFlag = false; +} + +#define PDEF_PTR(index) (&ParamDefTable[index]) + +void ClothingCookedParam::buildTree(void) +{ + + uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; + ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); + memset(ParamDefTable, 0, allocSize); + + for (uint32_t i = 0; i < NumParamDefs; ++i) + { + NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); + } + + // Initialize DefinitionImpl node: nodeIndex=0, longName="" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; + ParamDef->init("", TYPE_STRUCT, "STRUCT", true); + + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=1, longName="actorScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("actorScale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Actor scale", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="convexCookedData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("convexCookedData", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "All convexes are checked into the same buffer, one after the other.\n", true); + HintTable[1].init("shortDescription", "The cooked data for all the convex meshes.", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="convexCookedData[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("convexCookedData", TYPE_U8, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "All convexes are checked into the same buffer, one after the other.\n", true); + HintTable[1].init("shortDescription", "The cooked data for all the convex meshes.", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="convexMeshPointers" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("convexMeshPointers", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + HintTable[1].init("shortDescription", "Convex mesh pointers", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="convexMeshPointers[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("convexMeshPointers", TYPE_POINTER, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + HintTable[1].init("shortDescription", "Convex mesh pointers", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="cookedPhysicalMeshes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("cookedPhysicalMeshes", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Cooked physical meshes", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="cookedPhysicalMeshes[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("cookedPhysicalMeshes", TYPE_STRUCT, "CookedPhysicalMesh", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Cooked physical meshes", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="cookedPhysicalMeshes[].physicalMeshId" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("physicalMeshId", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Physical mesh ID", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="cookedPhysicalMeshes[].cookedDataOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("cookedDataOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Cooked data offset", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="cookedPhysicalMeshes[].cookedDataLength" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("cookedDataLength", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Cooked data length", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="cookedPhysicalMeshes[].deformableMeshPointer" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("deformableMeshPointer", TYPE_POINTER, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + HintTable[1].init("shortDescription", "Deformable mesh pointer", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="cookedPhysicalMeshes[].deformableInvParticleWeightsOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("deformableInvParticleWeightsOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Deformable inverse particle weights offset", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="cookedPhysicalMeshes[].virtualParticleIndicesOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("virtualParticleIndicesOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Virtual particle indices offset", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="cookedPhysicalMeshes[].virtualParticleIndicesLength" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("virtualParticleIndicesLength", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Virtual particle indices length", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="deformableCookedData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("deformableCookedData", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Deformable cooked data", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="deformableCookedData[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("deformableCookedData", TYPE_U8, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Deformable cooked data", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="cookedDataVersion" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("cookedDataVersion", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "When loading into a different PhysX version, it will cook again on loading.", true); + HintTable[1].init("shortDescription", "The PhysX SDK Version this data was cooked from", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="deformableInvParticleWeights" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("deformableInvParticleWeights", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Deformable inverse particle weights", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="deformableInvParticleWeights[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("deformableInvParticleWeights", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Deformable inverse particle weights", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="virtualParticleIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("virtualParticleIndices", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Virtual particle indices", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="virtualParticleIndices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("virtualParticleIndices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Virtual particle indices", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="virtualParticleWeights" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("virtualParticleWeights", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Virtual particle weights", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="virtualParticleWeights[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("virtualParticleWeights", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Virtual particle weights", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[9]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(2); + Children[2] = PDEF_PTR(4); + Children[3] = PDEF_PTR(6); + Children[4] = PDEF_PTR(15); + Children[5] = PDEF_PTR(17); + Children[6] = PDEF_PTR(18); + Children[7] = PDEF_PTR(20); + Children[8] = PDEF_PTR(22); + + ParamDefTable[0].setChildren(Children, 9); + } + + // SetChildren for: nodeIndex=2, longName="convexCookedData" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(3); + + ParamDefTable[2].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=4, longName="convexMeshPointers" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(5); + + ParamDefTable[4].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=6, longName="cookedPhysicalMeshes" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(7); + + ParamDefTable[6].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=7, longName="cookedPhysicalMeshes[]" + { + static Definition* Children[7]; + Children[0] = PDEF_PTR(8); + Children[1] = PDEF_PTR(9); + Children[2] = PDEF_PTR(10); + Children[3] = PDEF_PTR(11); + Children[4] = PDEF_PTR(12); + Children[5] = PDEF_PTR(13); + Children[6] = PDEF_PTR(14); + + ParamDefTable[7].setChildren(Children, 7); + } + + // SetChildren for: nodeIndex=15, longName="deformableCookedData" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(16); + + ParamDefTable[15].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=18, longName="deformableInvParticleWeights" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(19); + + ParamDefTable[18].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=20, longName="virtualParticleIndices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(21); + + ParamDefTable[20].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=22, longName="virtualParticleWeights" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(23); + + ParamDefTable[22].setChildren(Children, 1); + } + + mBuiltFlag = true; + +} +void ClothingCookedParam::initStrings(void) +{ +} + +void ClothingCookedParam::initDynamicArrays(void) +{ + convexCookedData.buf = NULL; + convexCookedData.isAllocated = true; + convexCookedData.elementSize = sizeof(uint8_t); + convexCookedData.arraySizes[0] = 0; + convexMeshPointers.buf = NULL; + convexMeshPointers.isAllocated = true; + convexMeshPointers.elementSize = sizeof(void*); + convexMeshPointers.arraySizes[0] = 0; + cookedPhysicalMeshes.buf = NULL; + cookedPhysicalMeshes.isAllocated = true; + cookedPhysicalMeshes.elementSize = sizeof(CookedPhysicalMesh_Type); + cookedPhysicalMeshes.arraySizes[0] = 0; + deformableCookedData.buf = NULL; + deformableCookedData.isAllocated = true; + deformableCookedData.elementSize = sizeof(uint8_t); + deformableCookedData.arraySizes[0] = 0; + deformableInvParticleWeights.buf = NULL; + deformableInvParticleWeights.isAllocated = true; + deformableInvParticleWeights.elementSize = sizeof(float); + deformableInvParticleWeights.arraySizes[0] = 0; + virtualParticleIndices.buf = NULL; + virtualParticleIndices.isAllocated = true; + virtualParticleIndices.elementSize = sizeof(uint32_t); + virtualParticleIndices.arraySizes[0] = 0; + virtualParticleWeights.buf = NULL; + virtualParticleWeights.isAllocated = true; + virtualParticleWeights.elementSize = sizeof(physx::PxVec3); + virtualParticleWeights.arraySizes[0] = 0; +} + +void ClothingCookedParam::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + actorScale = float(1.0f); + cookedDataVersion = uint32_t(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingCookedParam::initReferences(void) +{ +} + +void ClothingCookedParam::freeDynamicArrays(void) +{ + if (convexCookedData.isAllocated && convexCookedData.buf) + { + mParameterizedTraits->free(convexCookedData.buf); + } + if (convexMeshPointers.isAllocated && convexMeshPointers.buf) + { + mParameterizedTraits->free(convexMeshPointers.buf); + } + if (cookedPhysicalMeshes.isAllocated && cookedPhysicalMeshes.buf) + { + mParameterizedTraits->free(cookedPhysicalMeshes.buf); + } + if (deformableCookedData.isAllocated && deformableCookedData.buf) + { + mParameterizedTraits->free(deformableCookedData.buf); + } + if (deformableInvParticleWeights.isAllocated && deformableInvParticleWeights.buf) + { + mParameterizedTraits->free(deformableInvParticleWeights.buf); + } + if (virtualParticleIndices.isAllocated && virtualParticleIndices.buf) + { + mParameterizedTraits->free(virtualParticleIndices.buf); + } + if (virtualParticleWeights.isAllocated && virtualParticleWeights.buf) + { + mParameterizedTraits->free(virtualParticleWeights.buf); + } +} + +void ClothingCookedParam::freeStrings(void) +{ +} + +void ClothingCookedParam::freeReferences(void) +{ +} + +} // namespace clothing +} // namespace nvidia |