// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // * Neither the name of NVIDIA CORPORATION nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Copyright (c) 2018 NVIDIA Corporation. All rights reserved. // This file was generated by NvParameterized/scripts/GenParameterized.pl #include "ClothingCookedParam.h" #include #include using namespace NvParameterized; namespace nvidia { namespace clothing { using namespace ClothingCookedParamNS; const char* const ClothingCookedParamFactory::vptr = NvParameterized::getVptr(); 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(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(¶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