diff options
Diffstat (limited to 'APEX_1.4/module/clothing/src/autogen')
10 files changed, 14885 insertions, 0 deletions
diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingActorParam.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingActorParam.cpp new file mode 100644 index 00000000..291289e7 --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingActorParam.cpp @@ -0,0 +1,2394 @@ +// 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 "ClothingActorParam.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingActorParamNS; + +const char* const ClothingActorParamFactory::vptr = + NvParameterized::getVptr<ClothingActorParam, ClothingActorParam::ClassAlignment>(); + +const uint32_t NumParamDefs = 76; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 11, 12, 13, 14, 15, 16, 17, 18, 21, 24, 25, 27, 38, 54, 57, 58, 59, 61, + 63, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 4, 5, 6, 7, 8, 9, 10, 19, 20, 22, 23, + 26, 28, 29, 30, 35, 36, 37, 31, 32, 33, 34, 39, 45, 46, 51, 52, 53, 40, 41, 42, 43, + 44, 47, 48, 49, 50, 55, 56, 60, 62, 64, 71, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 32 }, + { TYPE_MAT44, false, (size_t)(&((ParametersStruct*)0)->globalPose), NULL, 0 }, // globalPose + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->useHardwareCloth), NULL, 0 }, // useHardwareCloth + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->flags), CHILDREN(32), 7 }, // flags + { TYPE_BOOL, false, (size_t)(&((ClothingActorFlags_Type*)0)->ParallelCpuSkinning), NULL, 0 }, // flags.ParallelCpuSkinning + { TYPE_BOOL, false, (size_t)(&((ClothingActorFlags_Type*)0)->RecomputeNormals), NULL, 0 }, // flags.RecomputeNormals + { TYPE_BOOL, false, (size_t)(&((ClothingActorFlags_Type*)0)->RecomputeTangents), NULL, 0 }, // flags.RecomputeTangents + { TYPE_BOOL, false, (size_t)(&((ClothingActorFlags_Type*)0)->Visualize), NULL, 0 }, // flags.Visualize + { TYPE_BOOL, false, (size_t)(&((ClothingActorFlags_Type*)0)->CorrectSimulationNormals), NULL, 0 }, // flags.CorrectSimulationNormals + { TYPE_BOOL, false, (size_t)(&((ClothingActorFlags_Type*)0)->ComputeRenderData), NULL, 0 }, // flags.ComputeRenderData + { TYPE_BOOL, false, (size_t)(&((ClothingActorFlags_Type*)0)->ComputePhysicsMeshNormals), NULL, 0 }, // flags.ComputePhysicsMeshNormals + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->fallbackSkinning), NULL, 0 }, // fallbackSkinning + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->slowStart), NULL, 0 }, // slowStart + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->useInternalBoneOrder), NULL, 0 }, // useInternalBoneOrder + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->updateStateWithGlobalMatrices), NULL, 0 }, // updateStateWithGlobalMatrices + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->uvChannelForTangentUpdate), NULL, 0 }, // uvChannelForTangentUpdate + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxDistanceBlendTime), NULL, 0 }, // maxDistanceBlendTime + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->clothingMaterialIndex), NULL, 0 }, // clothingMaterialIndex + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->windParams), CHILDREN(39), 2 }, // windParams + { TYPE_VEC3, false, (size_t)(&((WindParameters_Type*)0)->Velocity), NULL, 0 }, // windParams.Velocity + { TYPE_F32, false, (size_t)(&((WindParameters_Type*)0)->Adaption), NULL, 0 }, // windParams.Adaption + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->maxDistanceScale), CHILDREN(41), 2 }, // maxDistanceScale + { TYPE_F32, false, (size_t)(&((MaxDistanceScale_Type*)0)->Scale), NULL, 0 }, // maxDistanceScale.Scale + { TYPE_BOOL, false, (size_t)(&((MaxDistanceScale_Type*)0)->Multipliable), NULL, 0 }, // maxDistanceScale.Multipliable + { TYPE_U64, false, (size_t)(&((ParametersStruct*)0)->userData), NULL, 0 }, // userData + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->boneMatrices), CHILDREN(43), 1 }, // boneMatrices + { TYPE_MAT44, false, 1 * sizeof(physx::PxMat44), NULL, 0 }, // boneMatrices[] + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->clothDescTemplate), CHILDREN(44), 6 }, // clothDescTemplate + { TYPE_F32, false, (size_t)(&((ClothDescTemplate_Type*)0)->collisionResponseCoefficient), NULL, 0 }, // clothDescTemplate.collisionResponseCoefficient + { TYPE_U16, false, (size_t)(&((ClothDescTemplate_Type*)0)->collisionGroup), NULL, 0 }, // clothDescTemplate.collisionGroup + { TYPE_STRUCT, false, (size_t)(&((ClothDescTemplate_Type*)0)->groupsMask), CHILDREN(50), 4 }, // clothDescTemplate.groupsMask + { TYPE_U32, false, (size_t)(&((GroupsMask_Type*)0)->bits0), NULL, 0 }, // clothDescTemplate.groupsMask.bits0 + { TYPE_U32, false, (size_t)(&((GroupsMask_Type*)0)->bits1), NULL, 0 }, // clothDescTemplate.groupsMask.bits1 + { TYPE_U32, false, (size_t)(&((GroupsMask_Type*)0)->bits2), NULL, 0 }, // clothDescTemplate.groupsMask.bits2 + { TYPE_U32, false, (size_t)(&((GroupsMask_Type*)0)->bits3), NULL, 0 }, // clothDescTemplate.groupsMask.bits3 + { TYPE_BOUNDS3, false, (size_t)(&((ClothDescTemplate_Type*)0)->validBounds), NULL, 0 }, // clothDescTemplate.validBounds + { TYPE_U64, false, (size_t)(&((ClothDescTemplate_Type*)0)->compartment), NULL, 0 }, // clothDescTemplate.compartment + { TYPE_U64, false, (size_t)(&((ClothDescTemplate_Type*)0)->userData), NULL, 0 }, // clothDescTemplate.userData + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->shapeDescTemplate), CHILDREN(54), 6 }, // shapeDescTemplate + { TYPE_STRUCT, false, (size_t)(&((ShapeDescTemplate_Type*)0)->flags), CHILDREN(60), 5 }, // shapeDescTemplate.flags + { TYPE_BOOL, false, (size_t)(&((ShapeDescFlags_Type*)0)->NX_SF_VISUALIZATION), NULL, 0 }, // shapeDescTemplate.flags.NX_SF_VISUALIZATION + { TYPE_BOOL, false, (size_t)(&((ShapeDescFlags_Type*)0)->NX_SF_DISABLE_COLLISION), NULL, 0 }, // shapeDescTemplate.flags.NX_SF_DISABLE_COLLISION + { TYPE_BOOL, false, (size_t)(&((ShapeDescFlags_Type*)0)->NX_SF_DISABLE_RAYCASTING), NULL, 0 }, // shapeDescTemplate.flags.NX_SF_DISABLE_RAYCASTING + { TYPE_BOOL, false, (size_t)(&((ShapeDescFlags_Type*)0)->NX_SF_DYNAMIC_DYNAMIC_CCD), NULL, 0 }, // shapeDescTemplate.flags.NX_SF_DYNAMIC_DYNAMIC_CCD + { TYPE_BOOL, false, (size_t)(&((ShapeDescFlags_Type*)0)->NX_SF_DISABLE_SCENE_QUERIES), NULL, 0 }, // shapeDescTemplate.flags.NX_SF_DISABLE_SCENE_QUERIES + { TYPE_U16, false, (size_t)(&((ShapeDescTemplate_Type*)0)->collisionGroup), NULL, 0 }, // shapeDescTemplate.collisionGroup + { TYPE_STRUCT, false, (size_t)(&((ShapeDescTemplate_Type*)0)->groupsMask), CHILDREN(65), 4 }, // shapeDescTemplate.groupsMask + { TYPE_U32, false, (size_t)(&((GroupsMask_Type*)0)->bits0), NULL, 0 }, // shapeDescTemplate.groupsMask.bits0 + { TYPE_U32, false, (size_t)(&((GroupsMask_Type*)0)->bits1), NULL, 0 }, // shapeDescTemplate.groupsMask.bits1 + { TYPE_U32, false, (size_t)(&((GroupsMask_Type*)0)->bits2), NULL, 0 }, // shapeDescTemplate.groupsMask.bits2 + { TYPE_U32, false, (size_t)(&((GroupsMask_Type*)0)->bits3), NULL, 0 }, // shapeDescTemplate.groupsMask.bits3 + { TYPE_U16, false, (size_t)(&((ShapeDescTemplate_Type*)0)->materialIndex), NULL, 0 }, // shapeDescTemplate.materialIndex + { TYPE_U64, false, (size_t)(&((ShapeDescTemplate_Type*)0)->userData), NULL, 0 }, // shapeDescTemplate.userData + { TYPE_U64, false, (size_t)(&((ShapeDescTemplate_Type*)0)->name), NULL, 0 }, // shapeDescTemplate.name + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->actorDescTemplate), CHILDREN(69), 2 }, // actorDescTemplate + { TYPE_U64, false, (size_t)(&((ActorDescTemplate_Type*)0)->userData), NULL, 0 }, // actorDescTemplate.userData + { TYPE_U64, false, (size_t)(&((ActorDescTemplate_Type*)0)->name), NULL, 0 }, // actorDescTemplate.name + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->actorScale), NULL, 0 }, // actorScale + { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->runtimeCooked), NULL, 0 }, // runtimeCooked + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->morphDisplacements), CHILDREN(71), 1 }, // morphDisplacements + { TYPE_VEC3, false, 1 * sizeof(physx::PxVec3), NULL, 0 }, // morphDisplacements[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->morphPhysicalMeshNewPositions), CHILDREN(72), 1 }, // morphPhysicalMeshNewPositions + { TYPE_VEC3, false, 1 * sizeof(physx::PxVec3), NULL, 0 }, // morphPhysicalMeshNewPositions[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->morphGraphicalMeshNewPositions), CHILDREN(73), 1 }, // morphGraphicalMeshNewPositions + { TYPE_VEC3, false, 1 * sizeof(physx::PxVec3), NULL, 0 }, // morphGraphicalMeshNewPositions[] + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->allowAdaptiveTargetFrequency), NULL, 0 }, // allowAdaptiveTargetFrequency + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->useVelocityClamping), NULL, 0 }, // useVelocityClamping + { TYPE_BOUNDS3, false, (size_t)(&((ParametersStruct*)0)->vertexVelocityClamp), NULL, 0 }, // vertexVelocityClamp + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->pressure), NULL, 0 }, // pressure + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->multiplyGlobalPoseIntoBones), NULL, 0 }, // multiplyGlobalPoseIntoBones + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->overrideMaterialNames), CHILDREN(74), 1 }, // overrideMaterialNames + { TYPE_STRING, false, 1 * sizeof(NvParameterized::DummyStringStruct), NULL, 0 }, // overrideMaterialNames[] + { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->simulationBackend), NULL, 0 }, // simulationBackend + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->freezeByLOD), NULL, 0 }, // freezeByLOD + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->localSpaceSim), NULL, 0 }, // localSpaceSim + { TYPE_I32, false, (size_t)(&((ParametersStruct*)0)->teleportMode), NULL, 0 }, // teleportMode +}; + + +bool ClothingActorParam::mBuiltFlag = false; +NvParameterized::MutexType ClothingActorParam::mBuiltFlagMutex; + +ClothingActorParam::ClothingActorParam(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingActorParamFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingActorParam::~ClothingActorParam() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingActorParam::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->~ClothingActorParam(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingActorParam::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingActorParam::getParameterDefinitionTree(void) const +{ + ClothingActorParam* tmpParam = const_cast<ClothingActorParam*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingActorParam::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 ClothingActorParam::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 ClothingActorParam::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingActorParam::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ +/* [0] - overrideMaterialNames (not an array of structs) */ + +void ClothingActorParam::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 ClothingActorParam::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="globalPose" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("globalPose", TYPE_MAT44, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("shortDescription", "The pose where the clothing asset will be put into the scene", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="useHardwareCloth" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("useHardwareCloth", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Turns on hardware acceleration for the cloth simulation", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="flags" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("flags", TYPE_STRUCT, "ClothingActorFlags", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "A selection of flags, can be updated at runtime.", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="flags.ParallelCpuSkinning" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("ParallelCpuSkinning", TYPE_BOOL, 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 graphical vertices without correspondence to physical vertices or\ntriangles are skinned normally. This flag specifies whether this happens\nduring Physics scene simulation, or after.\nNote: If this flag is set, an inconsistency can arise when calling\nNxClothingActor::updateRenderResource in between NxApexScene::simulate\nand NxApexScene::fetchResults. As a workaround, you should only call\nNxClothingActor::updateRenderResources _after_ NxApexScene::fetchResults\nhas terminated.\n", true); + HintTable[1].init("shortDescription", "Determines whether or not to perform CPU skinning in parallel", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="flags.RecomputeNormals" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("RecomputeNormals", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This usually leads to better looking results, but is more expensive to\ncompute. Default is off.\n", true); + HintTable[1].init("shortDescription", "Fully recomputes the normals on the final mesh.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="flags.RecomputeTangents" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("RecomputeTangents", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "RecomputeTangents can only be set to false if less than half of the graphics mesh vertices have an exact\nmatch in the physics mesh. Otherwise it's always on.\n", true); + HintTable[1].init("shortDescription", "Fully recomputes the tangents on the final mesh.", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="flags.Visualize" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("Visualize", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Determines whether or not to display debug visualization for this clothing actor", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="flags.CorrectSimulationNormals" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("CorrectSimulationNormals", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "The MaxDistance=0 vertices can have a perturbed simulation normal. This usually\nhappens only for meshes where the MaxDistance=0 vertices are somewhere in the\nmiddle separating a simulated and non-simulated region. The normal for those\nvertices will be computed only by the simulated triangles which can lead to\nwrong results.\nThis solution will use the normals from the original simulation mesh and skin\nthem with respect to the local pose.\n", true); + HintTable[1].init("shortDescription", "", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="flags.ComputeRenderData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("ComputeRenderData", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "If set to false no skinning is done for this actor. Disable if all skinning is done outside of APEX.", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="flags.ComputePhysicsMeshNormals" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("ComputePhysicsMeshNormals", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "If set to false the normals on the physics mesh are not computed. Disable skinning and normal calculation is done outside of APEX.", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="fallbackSkinning" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("fallbackSkinning", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Performs the regular boneweighted skinning on the CPU before giving the\ndata out through the rendering API.\n", true); + HintTable[1].init("shortDescription", "Performs skinning in software", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="slowStart" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("slowStart", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "The first time a NxClothingActor starts to be simulated is with full max\ndistance. This prevents starting with full max distance and instead blending\nin as it will do the second time.\n", true); + HintTable[1].init("shortDescription", "Prevents from having full max distance right from the start", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="useInternalBoneOrder" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("useInternalBoneOrder", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("longDescription", "If this is set to true the bone buffers in updateState and the actor\ndescriptor have to be given in the same order as the bones are stored\ninternally in the asset. This can be queried using\nNxClothingAsset::getNumUsedBones and NxClothingAsset::getBoneName or\nNxClothingAsset::getBoneMapping.\n\nIf this is set to false, the bone buffers can be provided in the order as\nthey are stored in the application. This is either the bone order at\nauthoring time, or NxClothingAsset::remapBoneIndex can be called for each\nbone to let APEX know about the current ordering in the game. Note that\nthis is only recommended if the application already uses physx::PxMat44\n(or something binary equivalent) and does not have to convert the matrices.\n", true); + HintTable[2].init("shortDescription", "Expect internally ordered bone arrays in updateState call.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="updateStateWithGlobalMatrices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("updateStateWithGlobalMatrices", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Depending on what matrices are present, the state can be updated using\nglobal world or object space bone matrices or composite matrices. The\ncomposite matrix can be generated by multiplying the world or object space\nmatrix by the inverse bone bine pose.\n\nNote: If there are problems which might be caused by bind poses being\ndifferent in the ClothingAsset and in the game's animation system, changing\nthis to true (and thus providing global pose matrices) might fix the problem.\n", true); + HintTable[1].init("shortDescription", "Use world space matrices instead of composite (relative to bind pose) in NxClothingActor::updateState().", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="uvChannelForTangentUpdate" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("uvChannelForTangentUpdate", 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", "Tangent update is done based on one UV channel. This allows selection of what\nUV channel is being used.\n", true); + HintTable[1].init("shortDescription", "This UV channel is used for updating tangent space", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="maxDistanceBlendTime" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("maxDistanceBlendTime", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Note: This also influences how quickly different physical LoDs can be switched", true); + HintTable[1].init("shortDescription", "Time in seconds how long it takes to go from zero maxDistance to full maxDistance", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="clothingMaterialIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("clothingMaterialIndex", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Use this material from the assets material library", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="windParams" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("windParams", TYPE_STRUCT, "WindParameters", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The per-actor wind parameters", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="windParams.Velocity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("Velocity", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The target velocity each vertex tries to achieve.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="windParams.Adaption" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("Adaption", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This is roughly the inverse of the time in seconds it takes to adapt to the wind velocity.", true); + HintTable[1].init("shortDescription", "The rate of adaption. The higher this value, the faster the cloth reaches the wind velocity. Set to 0 to turn off wind.", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="maxDistanceScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("maxDistanceScale", TYPE_STRUCT, "MaxDistanceScale", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Maximum distance scale", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="maxDistanceScale.Scale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("Scale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Scale", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="maxDistanceScale.Multipliable" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("Multipliable", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Multipliable", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="userData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("userData", TYPE_U64, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("shortDescription", "Optional user data pointer associated with the clothing actor", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="boneMatrices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("boneMatrices", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("longDescription", "These matrices are sometimes referred to as composite matrices. They are the\nmultiplication of the current world space bone pose with the inverse bind\npose in world space.\nNote: If \'updateStateWithGlobalMatrices\' is set to true, these must be\nglobal poses instead.\n", true); + HintTable[2].init("shortDescription", "An Array of matrices with the full transform for each bone", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="boneMatrices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("boneMatrices", TYPE_MAT44, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("longDescription", "These matrices are sometimes referred to as composite matrices. They are the\nmultiplication of the current world space bone pose with the inverse bind\npose in world space.\nNote: If \'updateStateWithGlobalMatrices\' is set to true, these must be\nglobal poses instead.\n", true); + HintTable[2].init("shortDescription", "An Array of matrices with the full transform for each bone", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="clothDescTemplate" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("clothDescTemplate", TYPE_STRUCT, "ClothDescTemplate", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Contains the parameters the application can override on the NxClothDesc when created", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="clothDescTemplate.collisionResponseCoefficient" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("collisionResponseCoefficient", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This is only needed if the twoway interaction flag is set in the clothing asset.", true); + HintTable[1].init("shortDescription", "Defines a factor for the impulse transfer from cloth to colliding rigid bodies.", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="clothDescTemplate.collisionGroup" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("collisionGroup", TYPE_U16, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Sets which collision group this cloth is part of.", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="clothDescTemplate.groupsMask" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("groupsMask", TYPE_STRUCT, "GroupsMask", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Sets the 128-bit mask used for collision filtering.", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="clothDescTemplate.groupsMask.bits0" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("bits0", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "First part of 128-bit group mask", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=32, longName="clothDescTemplate.groupsMask.bits1" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; + ParamDef->init("bits1", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Second part of 128-bit group mask", true); + ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=33, longName="clothDescTemplate.groupsMask.bits2" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; + ParamDef->init("bits2", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Third part of 128-bit group mask", true); + ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=34, longName="clothDescTemplate.groupsMask.bits3" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; + ParamDef->init("bits3", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Fourth part of 128-bit group mask", true); + ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=35, longName="clothDescTemplate.validBounds" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; + ParamDef->init("validBounds", TYPE_BOUNDS3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Only works if the flag NX_CLF_VALIDBOUNDS is set.", true); + HintTable[1].init("shortDescription", "Defines the volume outside of which cloth particle are automatically removed from the simulation. ", true); + ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=36, longName="clothDescTemplate.compartment" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; + ParamDef->init("compartment", TYPE_U64, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("longDescription", "Must be either a pointer to an NxCompartment of type NX_SCT_CLOTH or\nNX_SCT_SOFTBODY, or NULL. A NULL compartment means creating NX_CLF_HARDWARE\ncloth in the first available cloth compartment (a default cloth compartment\nis created if none exists). Software cloth with a NULL compartment is\ncreated in the scene proper.\n", true); + HintTable[2].init("shortDescription", "The compartment to place the cloth in.", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=37, longName="clothDescTemplate.userData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; + ParamDef->init("userData", TYPE_U64, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("shortDescription", "Optional user data pointer.", true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=38, longName="shapeDescTemplate" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; + ParamDef->init("shapeDescTemplate", TYPE_STRUCT, "ShapeDescTemplate", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Contains the parameters the application can override on any actor shapes created", true); + ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=39, longName="shapeDescTemplate.flags" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; + ParamDef->init("flags", TYPE_STRUCT, "ShapeDescFlags", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shape description flags", true); + ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=40, longName="shapeDescTemplate.flags.NX_SF_VISUALIZATION" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[40]; + ParamDef->init("NX_SF_VISUALIZATION", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Enable debug renderer for this shape", true); + ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=41, longName="shapeDescTemplate.flags.NX_SF_DISABLE_COLLISION" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[41]; + ParamDef->init("NX_SF_DISABLE_COLLISION", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Disable collision detection for this shape (counterpart of NX_AF_DISABLE_COLLISION)", true); + ParamDefTable[41].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=42, longName="shapeDescTemplate.flags.NX_SF_DISABLE_RAYCASTING" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[42]; + ParamDef->init("NX_SF_DISABLE_RAYCASTING", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Disable raycasting for this shape", true); + ParamDefTable[42].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=43, longName="shapeDescTemplate.flags.NX_SF_DYNAMIC_DYNAMIC_CCD" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[43]; + ParamDef->init("NX_SF_DYNAMIC_DYNAMIC_CCD", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Enable dynamic-dynamic CCD for this shape. Used only when CCD is globally enabled and shape have a CCD skeleton.", true); + ParamDefTable[43].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=44, longName="shapeDescTemplate.flags.NX_SF_DISABLE_SCENE_QUERIES" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[44]; + ParamDef->init("NX_SF_DISABLE_SCENE_QUERIES", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Setting this to true will make the non-compartment CPU cloth not work.", true); + HintTable[1].init("shortDescription", "Disable participation in ray casts, overlap tests and sweeps.", true); + ParamDefTable[44].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=45, longName="shapeDescTemplate.collisionGroup" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[45]; + ParamDef->init("collisionGroup", TYPE_U16, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Default group is 0. Maximum possible group is 31. Collision groups are sets\nof shapes which may or may not be set to collision detect with each other;\nthis can be set using NxScene::setGroupCollisionFlag()\nSleeping: Does NOT wake the associated actor up automatically.\n", true); + HintTable[1].init("shortDescription", "Sets which collision group this shape is part of.", true); + ParamDefTable[45].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=46, longName="shapeDescTemplate.groupsMask" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[46]; + ParamDef->init("groupsMask", TYPE_STRUCT, "GroupsMask", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Sets the 128-bit mask used for collision filtering.", true); + ParamDefTable[46].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=47, longName="shapeDescTemplate.groupsMask.bits0" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[47]; + ParamDef->init("bits0", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "First part of 128-bit group mask", true); + ParamDefTable[47].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=48, longName="shapeDescTemplate.groupsMask.bits1" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[48]; + ParamDef->init("bits1", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Second part of 128-bit group mask", true); + ParamDefTable[48].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=49, longName="shapeDescTemplate.groupsMask.bits2" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[49]; + ParamDef->init("bits2", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Third part of 128-bit group mask", true); + ParamDefTable[49].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=50, longName="shapeDescTemplate.groupsMask.bits3" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[50]; + ParamDef->init("bits3", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Fourth part of 128-bit group mask", true); + ParamDefTable[50].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=51, longName="shapeDescTemplate.materialIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[51]; + ParamDef->init("materialIndex", TYPE_U16, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The material index of the shape.", true); + ParamDefTable[51].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=52, longName="shapeDescTemplate.userData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[52]; + ParamDef->init("userData", TYPE_U64, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[52].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("shortDescription", "Optional user data pointer", true); + ParamDefTable[52].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=53, longName="shapeDescTemplate.name" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[53]; + ParamDef->init("name", TYPE_U64, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[53].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("shortDescription", "Name of the shapes; must be set by the application and must be a persistent pointer.", true); + ParamDefTable[53].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=54, longName="actorDescTemplate" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[54]; + ParamDef->init("actorDescTemplate", TYPE_STRUCT, "ActorDescTemplate", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Contains the parameters the application can override on any actors created", true); + ParamDefTable[54].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=55, longName="actorDescTemplate.userData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[55]; + ParamDef->init("userData", TYPE_U64, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[55].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("shortDescription", "Optional user data pointer", true); + ParamDefTable[55].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=56, longName="actorDescTemplate.name" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[56]; + ParamDef->init("name", TYPE_U64, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[56].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("shortDescription", "Optional name string for the shape; must be set by the application and must be a persistent pointer.", true); + ParamDefTable[56].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=57, longName="actorScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[57]; + ParamDef->init("actorScale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Setting globalPose doesn't change the actor scale, actorScale should be set separately.\n", true); + HintTable[1].init("shortDescription", "Scales the actor relative to the asset.", true); + ParamDefTable[57].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=58, longName="runtimeCooked" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[58]; + ParamDef->init("runtimeCooked", TYPE_REF, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + ParamDefTable[58].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + HintTable[1].init("shortDescription", "Data cooked at runtime", true); + ParamDefTable[58].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + static const char* const RefVariantVals[] = { "ClothingCookedParam" }; + ParamDefTable[58].setRefVariantVals((const char**)RefVariantVals, 1); + + + + } + + // Initialize DefinitionImpl node: nodeIndex=59, longName="morphDisplacements" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[59]; + ParamDef->init("morphDisplacements", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Displacements according to the current morph target.", true); + ParamDefTable[59].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=60, longName="morphDisplacements[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[60]; + ParamDef->init("morphDisplacements", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Displacements according to the current morph target.", true); + ParamDefTable[60].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=61, longName="morphPhysicalMeshNewPositions" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[61]; + ParamDef->init("morphPhysicalMeshNewPositions", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "New positions for the physical meshes and convex collision volumes.", true); + ParamDefTable[61].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=62, longName="morphPhysicalMeshNewPositions[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[62]; + ParamDef->init("morphPhysicalMeshNewPositions", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "New positions for the physical meshes and convex collision volumes.", true); + ParamDefTable[62].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=63, longName="morphGraphicalMeshNewPositions" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[63]; + ParamDef->init("morphGraphicalMeshNewPositions", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "New positions of all submeshes of all graphical meshes.", true); + ParamDefTable[63].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=64, longName="morphGraphicalMeshNewPositions[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[64]; + ParamDef->init("morphGraphicalMeshNewPositions", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "New positions of all submeshes of all graphical meshes.", true); + ParamDefTable[64].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=65, longName="allowAdaptiveTargetFrequency" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[65]; + ParamDef->init("allowAdaptiveTargetFrequency", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Slightly modifies gravity to avoid high frequency jittering due to variable time steps.", true); + ParamDefTable[65].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=66, longName="useVelocityClamping" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[66]; + ParamDef->init("useVelocityClamping", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Enable/disable velocity clamping", true); + ParamDefTable[66].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=67, longName="vertexVelocityClamp" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[67]; + ParamDef->init("vertexVelocityClamp", TYPE_BOUNDS3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex velocity clamping values", true); + ParamDefTable[67].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=68, longName="pressure" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[68]; + ParamDef->init("pressure", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Set pressure of cloth, only works on closed meshes.", true); + ParamDefTable[68].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=69, longName="multiplyGlobalPoseIntoBones" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[69]; + ParamDef->init("multiplyGlobalPoseIntoBones", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Enable/disable multiplying global pose into bones", true); + ParamDefTable[69].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=70, longName="overrideMaterialNames" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[70]; + ParamDef->init("overrideMaterialNames", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Replacement material names for the ones provided by the render mesh asset inside the clothing asset.", true); + ParamDefTable[70].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + static const uint8_t dynHandleIndices[1] = { 0, }; + ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); + + } + + // Initialize DefinitionImpl node: nodeIndex=71, longName="overrideMaterialNames[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[71]; + ParamDef->init("overrideMaterialNames", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Replacement material names for the ones provided by the render mesh asset inside the clothing asset.", true); + ParamDefTable[71].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=72, longName="simulationBackend" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[72]; + ParamDef->init("simulationBackend", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Select which backend should be used. 'ForceNative' will only work when running with the 2.8.x PhysX SDK", true); + ParamDefTable[72].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "Default", "ForceNative", "ForceEmbedded" }; + ParamDefTable[72].setEnumVals((const char**)EnumVals, 3); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=73, longName="freezeByLOD" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[73]; + ParamDef->init("freezeByLOD", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Cloth state frozen when LoD turns off simulation of the actor, instead of returning to the animated state.", true); + ParamDefTable[73].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=74, longName="localSpaceSim" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[74]; + ParamDef->init("localSpaceSim", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "If this flag is enabled the simulation is done at origin, however the cloth is rendered at its global position.\nThe simulation of the actor is transformed such that the root bone ends up at origin. The scale of the actor is maintained during the simulation.\nIf a 3.x physX simulation backend is used, it is possible to add the inertia effects to the simulation, through\nthe inertiaScale parameter of the clothing material. So with an inertiaScale of 1.0 there should be no visible\ndifference between local space and global space simulation.\nKnown issues:\n- PhysX 2.8.4 does not support inertiaScale (it corresponds to inertiaScale=0.0f). So if localSpaceSim is enabled there's no inertia effect when the global pose of the clothing actor changes.\n- With 2.8.4 this only works for clothing on 1 character, without world collision. This is because collision volumes would interfere with the cloth that is simulated at origin.\nThis is not a problem in 3.x because there collision only happens with the collision volumes specifically defined for the clothing actor.\n", true); + HintTable[1].init("shortDescription", "Do simulation in local space.", true); + ParamDefTable[74].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=75, longName="teleportMode" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[75]; + ParamDef->init("teleportMode", TYPE_I32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "0 = ClothingTeleportMode::Continuous\n1 = ClothingTeleportMode::Teleport\n2 = ClothingTeleportMode::TeleportAndReset\n", true); + HintTable[1].init("shortDescription", "Buffered teleport state for the next simulate call, gets set in updateState, is reset to Continuous during simulate().", true); + ParamDefTable[75].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[32]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(2); + Children[2] = PDEF_PTR(3); + Children[3] = PDEF_PTR(11); + Children[4] = PDEF_PTR(12); + Children[5] = PDEF_PTR(13); + Children[6] = PDEF_PTR(14); + Children[7] = PDEF_PTR(15); + Children[8] = PDEF_PTR(16); + Children[9] = PDEF_PTR(17); + Children[10] = PDEF_PTR(18); + Children[11] = PDEF_PTR(21); + Children[12] = PDEF_PTR(24); + Children[13] = PDEF_PTR(25); + Children[14] = PDEF_PTR(27); + Children[15] = PDEF_PTR(38); + Children[16] = PDEF_PTR(54); + Children[17] = PDEF_PTR(57); + Children[18] = PDEF_PTR(58); + Children[19] = PDEF_PTR(59); + Children[20] = PDEF_PTR(61); + Children[21] = PDEF_PTR(63); + Children[22] = PDEF_PTR(65); + Children[23] = PDEF_PTR(66); + Children[24] = PDEF_PTR(67); + Children[25] = PDEF_PTR(68); + Children[26] = PDEF_PTR(69); + Children[27] = PDEF_PTR(70); + Children[28] = PDEF_PTR(72); + Children[29] = PDEF_PTR(73); + Children[30] = PDEF_PTR(74); + Children[31] = PDEF_PTR(75); + + ParamDefTable[0].setChildren(Children, 32); + } + + // SetChildren for: nodeIndex=3, longName="flags" + { + static Definition* Children[7]; + Children[0] = PDEF_PTR(4); + Children[1] = PDEF_PTR(5); + Children[2] = PDEF_PTR(6); + Children[3] = PDEF_PTR(7); + Children[4] = PDEF_PTR(8); + Children[5] = PDEF_PTR(9); + Children[6] = PDEF_PTR(10); + + ParamDefTable[3].setChildren(Children, 7); + } + + // SetChildren for: nodeIndex=18, longName="windParams" + { + static Definition* Children[2]; + Children[0] = PDEF_PTR(19); + Children[1] = PDEF_PTR(20); + + ParamDefTable[18].setChildren(Children, 2); + } + + // SetChildren for: nodeIndex=21, longName="maxDistanceScale" + { + static Definition* Children[2]; + Children[0] = PDEF_PTR(22); + Children[1] = PDEF_PTR(23); + + ParamDefTable[21].setChildren(Children, 2); + } + + // SetChildren for: nodeIndex=25, longName="boneMatrices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(26); + + ParamDefTable[25].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=27, longName="clothDescTemplate" + { + static Definition* Children[6]; + Children[0] = PDEF_PTR(28); + Children[1] = PDEF_PTR(29); + Children[2] = PDEF_PTR(30); + Children[3] = PDEF_PTR(35); + Children[4] = PDEF_PTR(36); + Children[5] = PDEF_PTR(37); + + ParamDefTable[27].setChildren(Children, 6); + } + + // SetChildren for: nodeIndex=30, longName="clothDescTemplate.groupsMask" + { + static Definition* Children[4]; + Children[0] = PDEF_PTR(31); + Children[1] = PDEF_PTR(32); + Children[2] = PDEF_PTR(33); + Children[3] = PDEF_PTR(34); + + ParamDefTable[30].setChildren(Children, 4); + } + + // SetChildren for: nodeIndex=38, longName="shapeDescTemplate" + { + static Definition* Children[6]; + Children[0] = PDEF_PTR(39); + Children[1] = PDEF_PTR(45); + Children[2] = PDEF_PTR(46); + Children[3] = PDEF_PTR(51); + Children[4] = PDEF_PTR(52); + Children[5] = PDEF_PTR(53); + + ParamDefTable[38].setChildren(Children, 6); + } + + // SetChildren for: nodeIndex=39, longName="shapeDescTemplate.flags" + { + static Definition* Children[5]; + Children[0] = PDEF_PTR(40); + Children[1] = PDEF_PTR(41); + Children[2] = PDEF_PTR(42); + Children[3] = PDEF_PTR(43); + Children[4] = PDEF_PTR(44); + + ParamDefTable[39].setChildren(Children, 5); + } + + // SetChildren for: nodeIndex=46, longName="shapeDescTemplate.groupsMask" + { + static Definition* Children[4]; + Children[0] = PDEF_PTR(47); + Children[1] = PDEF_PTR(48); + Children[2] = PDEF_PTR(49); + Children[3] = PDEF_PTR(50); + + ParamDefTable[46].setChildren(Children, 4); + } + + // SetChildren for: nodeIndex=54, longName="actorDescTemplate" + { + static Definition* Children[2]; + Children[0] = PDEF_PTR(55); + Children[1] = PDEF_PTR(56); + + ParamDefTable[54].setChildren(Children, 2); + } + + // SetChildren for: nodeIndex=59, longName="morphDisplacements" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(60); + + ParamDefTable[59].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=61, longName="morphPhysicalMeshNewPositions" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(62); + + ParamDefTable[61].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=63, longName="morphGraphicalMeshNewPositions" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(64); + + ParamDefTable[63].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=70, longName="overrideMaterialNames" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(71); + + ParamDefTable[70].setChildren(Children, 1); + } + + mBuiltFlag = true; + +} +void ClothingActorParam::initStrings(void) +{ +} + +void ClothingActorParam::initDynamicArrays(void) +{ + boneMatrices.buf = NULL; + boneMatrices.isAllocated = true; + boneMatrices.elementSize = sizeof(physx::PxMat44); + boneMatrices.arraySizes[0] = 0; + morphDisplacements.buf = NULL; + morphDisplacements.isAllocated = true; + morphDisplacements.elementSize = sizeof(physx::PxVec3); + morphDisplacements.arraySizes[0] = 0; + morphPhysicalMeshNewPositions.buf = NULL; + morphPhysicalMeshNewPositions.isAllocated = true; + morphPhysicalMeshNewPositions.elementSize = sizeof(physx::PxVec3); + morphPhysicalMeshNewPositions.arraySizes[0] = 0; + morphGraphicalMeshNewPositions.buf = NULL; + morphGraphicalMeshNewPositions.isAllocated = true; + morphGraphicalMeshNewPositions.elementSize = sizeof(physx::PxVec3); + morphGraphicalMeshNewPositions.arraySizes[0] = 0; + overrideMaterialNames.buf = NULL; + overrideMaterialNames.isAllocated = true; + overrideMaterialNames.elementSize = sizeof(NvParameterized::DummyStringStruct); + overrideMaterialNames.arraySizes[0] = 0; +} + +void ClothingActorParam::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + globalPose = physx::PxMat44(physx::PxVec4(1.0f)); + useHardwareCloth = bool(true); + flags.ParallelCpuSkinning = bool(true); + flags.RecomputeNormals = bool(false); + flags.RecomputeTangents = bool(false); + flags.Visualize = bool(true); + flags.CorrectSimulationNormals = bool(true); + flags.ComputeRenderData = bool(true); + flags.ComputePhysicsMeshNormals = bool(true); + fallbackSkinning = bool(false); + slowStart = bool(true); + useInternalBoneOrder = bool(false); + updateStateWithGlobalMatrices = bool(false); + uvChannelForTangentUpdate = uint32_t(0); + maxDistanceBlendTime = float(1.0); + clothingMaterialIndex = uint32_t(0); + windParams.Velocity = physx::PxVec3(0.0f); + windParams.Adaption = float(0.0f); + maxDistanceScale.Scale = float(1.0f); + maxDistanceScale.Multipliable = bool(false); + userData = uint64_t(0); + clothDescTemplate.collisionResponseCoefficient = float(0.2); + clothDescTemplate.collisionGroup = uint16_t(0); + clothDescTemplate.groupsMask.bits0 = uint32_t(0); + clothDescTemplate.groupsMask.bits1 = uint32_t(0); + clothDescTemplate.groupsMask.bits2 = uint32_t(0); + clothDescTemplate.groupsMask.bits3 = uint32_t(0); + clothDescTemplate.validBounds = physx::PxBounds3(physx::PxVec3(PX_MAX_F32), physx::PxVec3(-PX_MAX_F32)); + clothDescTemplate.compartment = uint64_t(0); + shapeDescTemplate.flags.NX_SF_VISUALIZATION = bool(true); + shapeDescTemplate.flags.NX_SF_DISABLE_COLLISION = bool(false); + shapeDescTemplate.flags.NX_SF_DISABLE_RAYCASTING = bool(true); + shapeDescTemplate.flags.NX_SF_DYNAMIC_DYNAMIC_CCD = bool(false); + shapeDescTemplate.flags.NX_SF_DISABLE_SCENE_QUERIES = bool(false); + shapeDescTemplate.collisionGroup = uint16_t(0); + shapeDescTemplate.groupsMask.bits0 = uint32_t(0); + shapeDescTemplate.groupsMask.bits1 = uint32_t(0); + shapeDescTemplate.groupsMask.bits2 = uint32_t(0); + shapeDescTemplate.groupsMask.bits3 = uint32_t(0); + shapeDescTemplate.materialIndex = uint16_t(0); + shapeDescTemplate.userData = uint64_t(0); + shapeDescTemplate.name = uint64_t(0); + actorDescTemplate.userData = uint64_t(0); + actorDescTemplate.name = uint64_t(0); + actorScale = float(1.0); + allowAdaptiveTargetFrequency = bool(true); + useVelocityClamping = bool(false); + vertexVelocityClamp = physx::PxBounds3(physx::PxVec3(-PX_MAX_F32), physx::PxVec3(PX_MAX_F32)); + pressure = float(-1.0); + multiplyGlobalPoseIntoBones = bool(true); + simulationBackend = (const char*)"Default"; + freezeByLOD = bool(false); + localSpaceSim = bool(false); + teleportMode = int32_t(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingActorParam::initReferences(void) +{ + runtimeCooked = NULL; + +} + +void ClothingActorParam::freeDynamicArrays(void) +{ + if (boneMatrices.isAllocated && boneMatrices.buf) + { + mParameterizedTraits->free(boneMatrices.buf); + } + if (morphDisplacements.isAllocated && morphDisplacements.buf) + { + mParameterizedTraits->free(morphDisplacements.buf); + } + if (morphPhysicalMeshNewPositions.isAllocated && morphPhysicalMeshNewPositions.buf) + { + mParameterizedTraits->free(morphPhysicalMeshNewPositions.buf); + } + if (morphGraphicalMeshNewPositions.isAllocated && morphGraphicalMeshNewPositions.buf) + { + mParameterizedTraits->free(morphGraphicalMeshNewPositions.buf); + } + if (overrideMaterialNames.isAllocated && overrideMaterialNames.buf) + { + mParameterizedTraits->free(overrideMaterialNames.buf); + } +} + +void ClothingActorParam::freeStrings(void) +{ + + for (int i = 0; i < overrideMaterialNames.arraySizes[0]; ++i) + { + if (overrideMaterialNames.buf[i].isAllocated && overrideMaterialNames.buf[i].buf) + { + mParameterizedTraits->strfree((char*)overrideMaterialNames.buf[i].buf); + } + } +} + +void ClothingActorParam::freeReferences(void) +{ + if (runtimeCooked) + { + runtimeCooked->destroy(); + } + +} + +} // namespace clothing +} // namespace nvidia diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingAssetParameters.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingAssetParameters.cpp new file mode 100644 index 00000000..eee0c7f2 --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingAssetParameters.cpp @@ -0,0 +1,2046 @@ +// 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 "ClothingAssetParameters.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingAssetParametersNS; + +const char* const ClothingAssetParametersFactory::vptr = + NvParameterized::getVptr<ClothingAssetParameters, ClothingAssetParameters::ClassAlignment>(); + +const uint32_t NumParamDefs = 60; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 3, 5, 15, 24, 25, 26, 27, 35, 37, 42, 44, 49, 51, 55, 56, 57, 58, 59, 2, 4, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 28, 29, 30, 31, 32, + 33, 34, 36, 38, 39, 40, 41, 43, 45, 46, 47, 48, 50, 52, 53, 54, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 19 }, + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->physicalMeshes), CHILDREN(19), 1 }, // physicalMeshes + { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // physicalMeshes[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->graphicalLods), CHILDREN(20), 1 }, // graphicalLods + { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // graphicalLods[] + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->simulation), CHILDREN(21), 9 }, // simulation + { TYPE_U32, false, (size_t)(&((SimulationParams_Type*)0)->hierarchicalLevels), NULL, 0 }, // simulation.hierarchicalLevels + { TYPE_F32, false, (size_t)(&((SimulationParams_Type*)0)->thickness), NULL, 0 }, // simulation.thickness + { TYPE_F32, false, (size_t)(&((SimulationParams_Type*)0)->virtualParticleDensity), NULL, 0 }, // simulation.virtualParticleDensity + { TYPE_VEC3, false, (size_t)(&((SimulationParams_Type*)0)->gravityDirection), NULL, 0 }, // simulation.gravityDirection + { TYPE_F32, false, (size_t)(&((SimulationParams_Type*)0)->sleepLinearVelocity), NULL, 0 }, // simulation.sleepLinearVelocity + { TYPE_BOOL, false, (size_t)(&((SimulationParams_Type*)0)->disableCCD), NULL, 0 }, // simulation.disableCCD + { TYPE_BOOL, false, (size_t)(&((SimulationParams_Type*)0)->untangling), NULL, 0 }, // simulation.untangling + { TYPE_BOOL, false, (size_t)(&((SimulationParams_Type*)0)->twowayInteraction), NULL, 0 }, // simulation.twowayInteraction + { TYPE_F32, false, (size_t)(&((SimulationParams_Type*)0)->restLengthScale), NULL, 0 }, // simulation.restLengthScale + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->bones), CHILDREN(30), 1 }, // bones + { TYPE_STRUCT, false, 1 * sizeof(BoneEntry_Type), CHILDREN(31), 7 }, // bones[] + { TYPE_I32, false, (size_t)(&((BoneEntry_Type*)0)->internalIndex), NULL, 0 }, // bones[].internalIndex + { TYPE_I32, false, (size_t)(&((BoneEntry_Type*)0)->externalIndex), NULL, 0 }, // bones[].externalIndex + { TYPE_U32, false, (size_t)(&((BoneEntry_Type*)0)->numMeshReferenced), NULL, 0 }, // bones[].numMeshReferenced + { TYPE_U32, false, (size_t)(&((BoneEntry_Type*)0)->numRigidBodiesReferenced), NULL, 0 }, // bones[].numRigidBodiesReferenced + { TYPE_I32, false, (size_t)(&((BoneEntry_Type*)0)->parentIndex), NULL, 0 }, // bones[].parentIndex + { TYPE_MAT44, false, (size_t)(&((BoneEntry_Type*)0)->bindPose), NULL, 0 }, // bones[].bindPose + { TYPE_STRING, false, (size_t)(&((BoneEntry_Type*)0)->name), NULL, 0 }, // bones[].name + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->bonesReferenced), NULL, 0 }, // bonesReferenced + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->bonesReferencedByMesh), NULL, 0 }, // bonesReferencedByMesh + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->rootBoneIndex), NULL, 0 }, // rootBoneIndex + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->boneActors), CHILDREN(38), 1 }, // boneActors + { TYPE_STRUCT, false, 1 * sizeof(ActorEntry_Type), CHILDREN(39), 6 }, // boneActors[] + { TYPE_I32, false, (size_t)(&((ActorEntry_Type*)0)->boneIndex), NULL, 0 }, // boneActors[].boneIndex + { TYPE_U32, false, (size_t)(&((ActorEntry_Type*)0)->convexVerticesStart), NULL, 0 }, // boneActors[].convexVerticesStart + { TYPE_U32, false, (size_t)(&((ActorEntry_Type*)0)->convexVerticesCount), NULL, 0 }, // boneActors[].convexVerticesCount + { TYPE_F32, false, (size_t)(&((ActorEntry_Type*)0)->capsuleRadius), NULL, 0 }, // boneActors[].capsuleRadius + { TYPE_F32, false, (size_t)(&((ActorEntry_Type*)0)->capsuleHeight), NULL, 0 }, // boneActors[].capsuleHeight + { TYPE_MAT44, false, (size_t)(&((ActorEntry_Type*)0)->localPose), NULL, 0 }, // boneActors[].localPose + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->boneVertices), CHILDREN(45), 1 }, // boneVertices + { TYPE_VEC3, false, 1 * sizeof(physx::PxVec3), NULL, 0 }, // boneVertices[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->boneSpheres), CHILDREN(46), 1 }, // boneSpheres + { TYPE_STRUCT, false, 1 * sizeof(BoneSphere_Type), CHILDREN(47), 3 }, // boneSpheres[] + { TYPE_I32, false, (size_t)(&((BoneSphere_Type*)0)->boneIndex), NULL, 0 }, // boneSpheres[].boneIndex + { TYPE_F32, false, (size_t)(&((BoneSphere_Type*)0)->radius), NULL, 0 }, // boneSpheres[].radius + { TYPE_VEC3, false, (size_t)(&((BoneSphere_Type*)0)->localPos), NULL, 0 }, // boneSpheres[].localPos + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->boneSphereConnections), CHILDREN(50), 1 }, // boneSphereConnections + { TYPE_U16, false, 1 * sizeof(uint16_t), NULL, 0 }, // boneSphereConnections[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->bonePlanes), CHILDREN(51), 1 }, // bonePlanes + { TYPE_STRUCT, false, 1 * sizeof(BonePlane_Type), CHILDREN(52), 3 }, // bonePlanes[] + { TYPE_I32, false, (size_t)(&((BonePlane_Type*)0)->boneIndex), NULL, 0 }, // bonePlanes[].boneIndex + { TYPE_VEC3, false, (size_t)(&((BonePlane_Type*)0)->n), NULL, 0 }, // bonePlanes[].n + { TYPE_F32, false, (size_t)(&((BonePlane_Type*)0)->d), NULL, 0 }, // bonePlanes[].d + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->collisionConvexes), CHILDREN(55), 1 }, // collisionConvexes + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // collisionConvexes[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->cookedData), CHILDREN(56), 1 }, // cookedData + { TYPE_STRUCT, false, 1 * sizeof(CookedEntry_Type), CHILDREN(57), 2 }, // cookedData[] + { TYPE_F32, false, (size_t)(&((CookedEntry_Type*)0)->scale), NULL, 0 }, // cookedData[].scale + { TYPE_REF, false, (size_t)(&((CookedEntry_Type*)0)->cookedData), NULL, 0 }, // cookedData[].cookedData + { TYPE_BOUNDS3, false, (size_t)(&((ParametersStruct*)0)->boundingBox), NULL, 0 }, // boundingBox + { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->materialLibrary), NULL, 0 }, // materialLibrary + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->materialIndex), NULL, 0 }, // materialIndex + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->interCollisionChannels), NULL, 0 }, // interCollisionChannels + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->toolString), NULL, 0 }, // toolString +}; + + +bool ClothingAssetParameters::mBuiltFlag = false; +NvParameterized::MutexType ClothingAssetParameters::mBuiltFlagMutex; + +ClothingAssetParameters::ClothingAssetParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingAssetParametersFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingAssetParameters::~ClothingAssetParameters() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingAssetParameters::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->~ClothingAssetParameters(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingAssetParameters::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingAssetParameters::getParameterDefinitionTree(void) const +{ + ClothingAssetParameters* tmpParam = const_cast<ClothingAssetParameters*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingAssetParameters::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 ClothingAssetParameters::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 ClothingAssetParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingAssetParameters::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ +/* [0] - physicalMeshes (not an array of structs) */ +/* [0] - graphicalLods (not an array of structs) */ +/* [1,6] - bones.name */ +/* [1,1] - cookedData.cookedData */ + +void ClothingAssetParameters::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 ClothingAssetParameters::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="physicalMeshes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("physicalMeshes", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + HintTable[1].init("longDescription", "These are used for multiple graphical LoDs.", true); + HintTable[2].init("shortDescription", "An Array of physical meshes", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + static const char* const RefVariantVals[] = { "ClothingPhysicalMeshParameters" }; + ParamDefTable[1].setRefVariantVals((const char**)RefVariantVals, 1); + + + ParamDef->setArraySize(-1); + static const uint8_t dynHandleIndices[1] = { 0, }; + ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="physicalMeshes[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("physicalMeshes", TYPE_REF, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + HintTable[1].init("longDescription", "These are used for multiple graphical LoDs.", true); + HintTable[2].init("shortDescription", "An Array of physical meshes", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + static const char* const RefVariantVals[] = { "ClothingPhysicalMeshParameters" }; + ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="graphicalLods" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("graphicalLods", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + HintTable[1].init("longDescription", "Each LoD contains a graphical mesh and a reference to a physical mesh.", true); + HintTable[2].init("shortDescription", "An array of graphical Lods.", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + static const char* const RefVariantVals[] = { "ClothingGraphicalLodParameters" }; + ParamDefTable[3].setRefVariantVals((const char**)RefVariantVals, 1); + + + ParamDef->setArraySize(-1); + static const uint8_t dynHandleIndices[1] = { 0, }; + ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="graphicalLods[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("graphicalLods", TYPE_REF, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + HintTable[1].init("longDescription", "Each LoD contains a graphical mesh and a reference to a physical mesh.", true); + HintTable[2].init("shortDescription", "An array of graphical Lods.", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + static const char* const RefVariantVals[] = { "ClothingGraphicalLodParameters" }; + ParamDefTable[4].setRefVariantVals((const char**)RefVariantVals, 1); + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="simulation" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("simulation", TYPE_STRUCT, "SimulationParams", true); + + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="simulation.hierarchicalLevels" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("hierarchicalLevels", 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", "Corresponds to NxClothMeshDesc::numHierarchyLevels.\nThis is orthogonal to the Hard Stretch Limitation in the Clothing Material.\n", true); + HintTable[1].init("shortDescription", "The number of cloth hierarhies. Only used to prevent stretching", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="simulation.thickness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("thickness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Each cloth particle will minimaly have as much distance to any collision volume.\nMost stable when this value corresponds roughly half the average edge length.\nCan be increased to prevent penetration artifacts.\n", true); + HintTable[1].init("shortDescription", "Minimal amount of separation between cloth particles and collision volumes.", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="simulation.virtualParticleDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("virtualParticleDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "0 will create no virtual particles. 1 will create 3 virtual particles for every triangle. Everything else is in between.", true); + HintTable[1].init("shortDescription", "Select the amount of virtual particles generated.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="simulation.gravityDirection" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("gravityDirection", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Direction of gravity for this asset.", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="simulation.sleepLinearVelocity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("sleepLinearVelocity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Most clothing doesn't need it, but it might be useful for smaller assets like flags and the like.", true); + HintTable[1].init("shortDescription", "Clothing will fall asleep if every vertex is slower than this velocity", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="simulation.disableCCD" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("disableCCD", TYPE_BOOL, 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 turning off CCD, cloth particles can tunnel through fast moving collision volumes. But sometimes\nill turning collision volumes can excert large velocities on particles. This can help prevent it.\n", true); + HintTable[1].init("shortDescription", "Turn off CCD when colliding cloth particles with collision volumes", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="simulation.untangling" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("untangling", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This feature is highly experimental and still rather slow. Only use when self-collision could not\nhelp adequately.\n", true); + HintTable[1].init("shortDescription", "EXPERIMENTAL: Untangle Cloth when it's entangled.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="simulation.twowayInteraction" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("twowayInteraction", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "For clothing this is normally not needed, as clothing should only follow the kinematic shapes. Needed when interacting\nwith dynamic rigid bodies that need to be influenced by clothing.\n", true); + HintTable[1].init("shortDescription", "Make use of twoway interaction", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="simulation.restLengthScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("restLengthScale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Scale for cloth rest lengths.", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="bones" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("bones", 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", "Each bone contains a bind pose and reference counters.", true); + HintTable[1].init("shortDescription", "Array of Bones", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + static const uint8_t dynHandleIndices[2] = { 1, 6, }; + ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 2); + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="bones[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("bones", TYPE_STRUCT, "BoneEntry", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Each bone contains a bind pose and reference counters.", true); + HintTable[1].init("shortDescription", "Array of Bones", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="bones[].internalIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("internalIndex", TYPE_I32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This usually corresponds to the array position this element is at.", true); + HintTable[1].init("shortDescription", "The index used internally for this bone.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="bones[].externalIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("externalIndex", TYPE_I32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The index that was given by the application", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="bones[].numMeshReferenced" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("numMeshReferenced", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The number of mesh vertices that have a non-zero weight to this bone.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="bones[].numRigidBodiesReferenced" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("numRigidBodiesReferenced", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The number of collision volumes attached to this bone", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="bones[].parentIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("parentIndex", TYPE_I32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The (internal) index of the parent bone", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="bones[].bindPose" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("bindPose", TYPE_MAT44, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The matrix this bone has in the default pose", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="bones[].name" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("name", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The name of this bone", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="bonesReferenced" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("bonesReferenced", 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", "Any bone in the bones array beyond this number is completely useless.", true); + HintTable[1].init("shortDescription", "Number of bones actually used by any of the meshes or collision volumes.", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="bonesReferencedByMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("bonesReferencedByMesh", 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", "Bones beyond this index can be used for collision volumes or not at all. This number is smaller or\nequal the 'bonesReferenced' number.\n", true); + HintTable[1].init("shortDescription", "Number of bones actually used by any of the meshes", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="rootBoneIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("rootBoneIndex", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Internal bone index with either parent=-1 or one bone with minimal distance to root when root is not inside the used bones", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="boneActors" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("boneActors", 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", "Each collision volume belongs to a bone and contains a description of its shape.", true); + HintTable[1].init("shortDescription", "Array of collision volumes", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="boneActors[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("boneActors", TYPE_STRUCT, "ActorEntry", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Each collision volume belongs to a bone and contains a description of its shape.", true); + HintTable[1].init("shortDescription", "Array of collision volumes", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="boneActors[].boneIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("boneIndex", TYPE_I32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The (internal) index this collision volume is attached to", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="boneActors[].convexVerticesStart" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("convexVerticesStart", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Index into the boneVertices array where the list of vertices for this shape starts.", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="boneActors[].convexVerticesCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("convexVerticesCount", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The number vertices that make up this convex.", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=32, longName="boneActors[].capsuleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; + ParamDef->init("capsuleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The radius of the capsule that describes this collision volume.", true); + ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=33, longName="boneActors[].capsuleHeight" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; + ParamDef->init("capsuleHeight", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The height of the capsule that describes this collision volume.", true); + ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=34, longName="boneActors[].localPose" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; + ParamDef->init("localPose", TYPE_MAT44, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The pose this collision volume has relative to the bone.", true); + ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=35, longName="boneVertices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; + ParamDef->init("boneVertices", 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 use the same array but different parts of it.", true); + HintTable[1].init("shortDescription", "Array of vertices that belong to one or more convex collision volumes", true); + ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=36, longName="boneVertices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; + ParamDef->init("boneVertices", TYPE_VEC3, 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 use the same array but different parts of it.", true); + HintTable[1].init("shortDescription", "Array of vertices that belong to one or more convex collision volumes", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=37, longName="boneSpheres" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; + ParamDef->init("boneSpheres", 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", "The spheres are connected to tapered capsules by the boneSphereConnections array.", true); + HintTable[1].init("shortDescription", "Array of spheres that describe the tapered capsules for clothing collision in PhysX3.", true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=38, longName="boneSpheres[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; + ParamDef->init("boneSpheres", TYPE_STRUCT, "BoneSphere", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "The spheres are connected to tapered capsules by the boneSphereConnections array.", true); + HintTable[1].init("shortDescription", "Array of spheres that describe the tapered capsules for clothing collision in PhysX3.", true); + ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=39, longName="boneSpheres[].boneIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; + ParamDef->init("boneIndex", TYPE_I32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The (internal) index this collision volume is attached to", true); + ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=40, longName="boneSpheres[].radius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[40]; + ParamDef->init("radius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The radius of the sphere that describes this collision volume.", true); + ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=41, longName="boneSpheres[].localPos" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[41]; + ParamDef->init("localPos", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The position this collision volume has relative to the bone.", true); + ParamDefTable[41].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=42, longName="boneSphereConnections" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[42]; + ParamDef->init("boneSphereConnections", 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", "This is an array of pairs, so the size must be dividible by 2.", true); + HintTable[1].init("shortDescription", "Array of indices into the boneSpheres array to describe pairs of spheres that form a capsule.", true); + ParamDefTable[42].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=43, longName="boneSphereConnections[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[43]; + ParamDef->init("boneSphereConnections", TYPE_U16, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This is an array of pairs, so the size must be dividible by 2.", true); + HintTable[1].init("shortDescription", "Array of indices into the boneSpheres array to describe pairs of spheres that form a capsule.", true); + ParamDefTable[43].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=44, longName="bonePlanes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[44]; + ParamDef->init("bonePlanes", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Array of planes used for collision convexes.", true); + ParamDefTable[44].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=45, longName="bonePlanes[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[45]; + ParamDef->init("bonePlanes", TYPE_STRUCT, "BonePlane", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Array of planes used for collision convexes.", true); + ParamDefTable[45].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=46, longName="bonePlanes[].boneIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[46]; + ParamDef->init("boneIndex", TYPE_I32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The (internal) index this collision volume is attached to", true); + ParamDefTable[46].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=47, longName="bonePlanes[].n" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[47]; + ParamDef->init("n", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Plane normal.", true); + ParamDefTable[47].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=48, longName="bonePlanes[].d" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[48]; + ParamDef->init("d", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Plane distance from origin.", true); + ParamDefTable[48].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=49, longName="collisionConvexes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[49]; + ParamDef->init("collisionConvexes", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Each entry is a bitmap that describes which bonePlanes are used to define a convex.", true); + ParamDefTable[49].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=50, longName="collisionConvexes[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[50]; + ParamDef->init("collisionConvexes", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Each entry is a bitmap that describes which bonePlanes are used to define a convex.", true); + ParamDefTable[50].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=51, longName="cookedData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[51]; + ParamDef->init("cookedData", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[51].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("shortDescription", "Various versions of cooked data", true); + ParamDefTable[51].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + static const uint8_t dynHandleIndices[2] = { 1, 1, }; + ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 2); + + } + + // Initialize DefinitionImpl node: nodeIndex=52, longName="cookedData[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[52]; + ParamDef->init("cookedData", TYPE_STRUCT, "CookedEntry", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[52].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("shortDescription", "Various versions of cooked data", true); + ParamDefTable[52].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=53, longName="cookedData[].scale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[53]; + ParamDef->init("scale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "", true); + ParamDefTable[53].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=54, longName="cookedData[].cookedData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[54]; + ParamDef->init("cookedData", TYPE_REF, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + ParamDefTable[54].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + HintTable[1].init("shortDescription", "Data cooked at runtime", true); + ParamDefTable[54].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + static const char* const RefVariantVals[] = { "ClothingCookedParam", "ClothingCookedPhysX3Param" }; + ParamDefTable[54].setRefVariantVals((const char**)RefVariantVals, 2); + + + + } + + // Initialize DefinitionImpl node: nodeIndex=55, longName="boundingBox" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[55]; + ParamDef->init("boundingBox", TYPE_BOUNDS3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This contains the simulated as well as the animated vertices.", true); + HintTable[1].init("shortDescription", "The Bounding-Box of the Asset", true); + ParamDefTable[55].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=56, longName="materialLibrary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[56]; + ParamDef->init("materialLibrary", TYPE_REF, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + ParamDefTable[56].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + HintTable[1].init("shortDescription", "The Material Library for this asset", true); + ParamDefTable[56].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + static const char* const RefVariantVals[] = { "ClothingMaterialLibraryParameters" }; + ParamDefTable[56].setRefVariantVals((const char**)RefVariantVals, 1); + + + + } + + // Initialize DefinitionImpl node: nodeIndex=57, longName="materialIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[57]; + ParamDef->init("materialIndex", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Default index for the material in the library", true); + ParamDefTable[57].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=58, longName="interCollisionChannels" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[58]; + ParamDef->init("interCollisionChannels", 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", "Experimental. Each bit of the represents a channel, so there can be a maximum of 32 channels.\nClothingActors that have at least one channel in common will collide, if inter-collision is enabled in the module.\n(3.x simulation only)\n", true); + HintTable[1].init("shortDescription", "Experimental. Collision Channels for inter-collision", true); + ParamDefTable[58].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=59, longName="toolString" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[59]; + ParamDef->init("toolString", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Describes the authoring tool.", true); + ParamDefTable[59].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[19]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(3); + Children[2] = PDEF_PTR(5); + Children[3] = PDEF_PTR(15); + Children[4] = PDEF_PTR(24); + Children[5] = PDEF_PTR(25); + Children[6] = PDEF_PTR(26); + Children[7] = PDEF_PTR(27); + Children[8] = PDEF_PTR(35); + Children[9] = PDEF_PTR(37); + Children[10] = PDEF_PTR(42); + Children[11] = PDEF_PTR(44); + Children[12] = PDEF_PTR(49); + Children[13] = PDEF_PTR(51); + Children[14] = PDEF_PTR(55); + Children[15] = PDEF_PTR(56); + Children[16] = PDEF_PTR(57); + Children[17] = PDEF_PTR(58); + Children[18] = PDEF_PTR(59); + + ParamDefTable[0].setChildren(Children, 19); + } + + // SetChildren for: nodeIndex=1, longName="physicalMeshes" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(2); + + ParamDefTable[1].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=3, longName="graphicalLods" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(4); + + ParamDefTable[3].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=5, longName="simulation" + { + static Definition* Children[9]; + Children[0] = PDEF_PTR(6); + Children[1] = PDEF_PTR(7); + Children[2] = PDEF_PTR(8); + Children[3] = PDEF_PTR(9); + Children[4] = PDEF_PTR(10); + Children[5] = PDEF_PTR(11); + Children[6] = PDEF_PTR(12); + Children[7] = PDEF_PTR(13); + Children[8] = PDEF_PTR(14); + + ParamDefTable[5].setChildren(Children, 9); + } + + // SetChildren for: nodeIndex=15, longName="bones" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(16); + + ParamDefTable[15].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=16, longName="bones[]" + { + static Definition* Children[7]; + Children[0] = PDEF_PTR(17); + Children[1] = PDEF_PTR(18); + Children[2] = PDEF_PTR(19); + Children[3] = PDEF_PTR(20); + Children[4] = PDEF_PTR(21); + Children[5] = PDEF_PTR(22); + Children[6] = PDEF_PTR(23); + + ParamDefTable[16].setChildren(Children, 7); + } + + // SetChildren for: nodeIndex=27, longName="boneActors" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(28); + + ParamDefTable[27].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=28, longName="boneActors[]" + { + static Definition* Children[6]; + Children[0] = PDEF_PTR(29); + Children[1] = PDEF_PTR(30); + Children[2] = PDEF_PTR(31); + Children[3] = PDEF_PTR(32); + Children[4] = PDEF_PTR(33); + Children[5] = PDEF_PTR(34); + + ParamDefTable[28].setChildren(Children, 6); + } + + // SetChildren for: nodeIndex=35, longName="boneVertices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(36); + + ParamDefTable[35].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=37, longName="boneSpheres" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(38); + + ParamDefTable[37].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=38, longName="boneSpheres[]" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(39); + Children[1] = PDEF_PTR(40); + Children[2] = PDEF_PTR(41); + + ParamDefTable[38].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=42, longName="boneSphereConnections" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(43); + + ParamDefTable[42].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=44, longName="bonePlanes" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(45); + + ParamDefTable[44].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=45, longName="bonePlanes[]" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(46); + Children[1] = PDEF_PTR(47); + Children[2] = PDEF_PTR(48); + + ParamDefTable[45].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=49, longName="collisionConvexes" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(50); + + ParamDefTable[49].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=51, longName="cookedData" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(52); + + ParamDefTable[51].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=52, longName="cookedData[]" + { + static Definition* Children[2]; + Children[0] = PDEF_PTR(53); + Children[1] = PDEF_PTR(54); + + ParamDefTable[52].setChildren(Children, 2); + } + + mBuiltFlag = true; + +} +void ClothingAssetParameters::initStrings(void) +{ + toolString.isAllocated = true; + toolString.buf = NULL; +} + +void ClothingAssetParameters::initDynamicArrays(void) +{ + physicalMeshes.buf = NULL; + physicalMeshes.isAllocated = true; + physicalMeshes.elementSize = sizeof(NvParameterized::Interface*); + physicalMeshes.arraySizes[0] = 0; + graphicalLods.buf = NULL; + graphicalLods.isAllocated = true; + graphicalLods.elementSize = sizeof(NvParameterized::Interface*); + graphicalLods.arraySizes[0] = 0; + bones.buf = NULL; + bones.isAllocated = true; + bones.elementSize = sizeof(BoneEntry_Type); + bones.arraySizes[0] = 0; + boneActors.buf = NULL; + boneActors.isAllocated = true; + boneActors.elementSize = sizeof(ActorEntry_Type); + boneActors.arraySizes[0] = 0; + boneVertices.buf = NULL; + boneVertices.isAllocated = true; + boneVertices.elementSize = sizeof(physx::PxVec3); + boneVertices.arraySizes[0] = 0; + boneSpheres.buf = NULL; + boneSpheres.isAllocated = true; + boneSpheres.elementSize = sizeof(BoneSphere_Type); + boneSpheres.arraySizes[0] = 0; + boneSphereConnections.buf = NULL; + boneSphereConnections.isAllocated = true; + boneSphereConnections.elementSize = sizeof(uint16_t); + boneSphereConnections.arraySizes[0] = 0; + bonePlanes.buf = NULL; + bonePlanes.isAllocated = true; + bonePlanes.elementSize = sizeof(BonePlane_Type); + bonePlanes.arraySizes[0] = 0; + collisionConvexes.buf = NULL; + collisionConvexes.isAllocated = true; + collisionConvexes.elementSize = sizeof(uint32_t); + collisionConvexes.arraySizes[0] = 0; + cookedData.buf = NULL; + cookedData.isAllocated = true; + cookedData.elementSize = sizeof(CookedEntry_Type); + cookedData.arraySizes[0] = 0; +} + +void ClothingAssetParameters::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + simulation.hierarchicalLevels = uint32_t(0); + simulation.thickness = float(0.01); + simulation.virtualParticleDensity = float(0.0); + simulation.gravityDirection = physx::PxVec3(physx::PxVec3(0.0f)); + simulation.sleepLinearVelocity = float(0.0); + simulation.disableCCD = bool(false); + simulation.untangling = bool(false); + simulation.twowayInteraction = bool(false); + simulation.restLengthScale = float(1.0); + bonesReferenced = uint32_t(0); + bonesReferencedByMesh = uint32_t(0); + rootBoneIndex = uint32_t(0); + boundingBox = physx::PxBounds3(physx::PxVec3(0.0f), physx::PxVec3(0.0f)); + materialIndex = uint32_t(0); + interCollisionChannels = uint32_t(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingAssetParameters::initReferences(void) +{ + materialLibrary = NULL; + +} + +void ClothingAssetParameters::freeDynamicArrays(void) +{ + if (physicalMeshes.isAllocated && physicalMeshes.buf) + { + mParameterizedTraits->free(physicalMeshes.buf); + } + if (graphicalLods.isAllocated && graphicalLods.buf) + { + mParameterizedTraits->free(graphicalLods.buf); + } + if (bones.isAllocated && bones.buf) + { + mParameterizedTraits->free(bones.buf); + } + if (boneActors.isAllocated && boneActors.buf) + { + mParameterizedTraits->free(boneActors.buf); + } + if (boneVertices.isAllocated && boneVertices.buf) + { + mParameterizedTraits->free(boneVertices.buf); + } + if (boneSpheres.isAllocated && boneSpheres.buf) + { + mParameterizedTraits->free(boneSpheres.buf); + } + if (boneSphereConnections.isAllocated && boneSphereConnections.buf) + { + mParameterizedTraits->free(boneSphereConnections.buf); + } + if (bonePlanes.isAllocated && bonePlanes.buf) + { + mParameterizedTraits->free(bonePlanes.buf); + } + if (collisionConvexes.isAllocated && collisionConvexes.buf) + { + mParameterizedTraits->free(collisionConvexes.buf); + } + if (cookedData.isAllocated && cookedData.buf) + { + mParameterizedTraits->free(cookedData.buf); + } +} + +void ClothingAssetParameters::freeStrings(void) +{ + + for (int i = 0; i < bones.arraySizes[0]; ++i) + { + if (bones.buf[i].name.isAllocated && bones.buf[i].name.buf) + { + mParameterizedTraits->strfree((char*)bones.buf[i].name.buf); + } + } + + if (toolString.isAllocated && toolString.buf) + { + mParameterizedTraits->strfree((char*)toolString.buf); + } +} + +void ClothingAssetParameters::freeReferences(void) +{ + + for (int i = 0; i < physicalMeshes.arraySizes[0]; ++i) + { + if (physicalMeshes.buf[i]) + { + physicalMeshes.buf[i]->destroy(); + } + } + + for (int i = 0; i < graphicalLods.arraySizes[0]; ++i) + { + if (graphicalLods.buf[i]) + { + graphicalLods.buf[i]->destroy(); + } + } + + for (int i = 0; i < cookedData.arraySizes[0]; i++) + { + if (cookedData.buf[i].cookedData) + { + cookedData.buf[i].cookedData->destroy(); + } + } + if (materialLibrary) + { + materialLibrary->destroy(); + } + +} + +} // namespace clothing +} // namespace nvidia 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 diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingCookedPhysX3Param.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingCookedPhysX3Param.cpp new file mode 100644 index 00000000..7e01986e --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingCookedPhysX3Param.cpp @@ -0,0 +1,1557 @@ +// 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 "ClothingCookedPhysX3Param.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingCookedPhysX3ParamNS; + +const char* const ClothingCookedPhysX3ParamFactory::vptr = + NvParameterized::getVptr<ClothingCookedPhysX3Param, ClothingCookedPhysX3Param::ClassAlignment>(); + +const uint32_t NumParamDefs = 43; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 5, 7, 9, 11, 13, 21, 26, 28, 30, 32, 34, 36, 37, 38, 42, 4, 6, 8, 10, 12, + 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 27, 29, 31, 33, 35, 39, 40, 41, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 18 }, + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->physicalMeshId), NULL, 0 }, // physicalMeshId + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->numVertices), NULL, 0 }, // numVertices + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->deformableRestLengths), CHILDREN(18), 1 }, // deformableRestLengths + { TYPE_F32, false, 1 * sizeof(float), NULL, 0 }, // deformableRestLengths[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->deformableIndices), CHILDREN(19), 1 }, // deformableIndices + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // deformableIndices[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->selfCollisionIndices), CHILDREN(20), 1 }, // selfCollisionIndices + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // selfCollisionIndices[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->selfCollisionNormalIndices), CHILDREN(21), 1 }, // selfCollisionNormalIndices + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // selfCollisionNormalIndices[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->selfCollisionNormalSetSizes), CHILDREN(22), 1 }, // selfCollisionNormalSetSizes + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // selfCollisionNormalSetSizes[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->deformableSets), CHILDREN(23), 1 }, // deformableSets + { TYPE_STRUCT, false, 1 * sizeof(SetDesc_Type), CHILDREN(24), 6 }, // deformableSets[] + { TYPE_U32, false, (size_t)(&((SetDesc_Type*)0)->fiberEnd), NULL, 0 }, // deformableSets[].fiberEnd + { TYPE_U32, false, (size_t)(&((SetDesc_Type*)0)->longestFiber), NULL, 0 }, // deformableSets[].longestFiber + { TYPE_U32, false, (size_t)(&((SetDesc_Type*)0)->shortestFiber), NULL, 0 }, // deformableSets[].shortestFiber + { TYPE_U32, false, (size_t)(&((SetDesc_Type*)0)->numEdges), NULL, 0 }, // deformableSets[].numEdges + { TYPE_F32, false, (size_t)(&((SetDesc_Type*)0)->avgEdgeLength), NULL, 0 }, // deformableSets[].avgEdgeLength + { TYPE_U32, false, (size_t)(&((SetDesc_Type*)0)->avgFiberLength), NULL, 0 }, // deformableSets[].avgFiberLength + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->deformablePhaseDescs), CHILDREN(30), 1 }, // deformablePhaseDescs + { TYPE_STRUCT, false, 1 * sizeof(PhaseDesc_Type), CHILDREN(31), 3 }, // deformablePhaseDescs[] + { TYPE_U32, false, (size_t)(&((PhaseDesc_Type*)0)->phaseType), NULL, 0 }, // deformablePhaseDescs[].phaseType + { TYPE_U32, false, (size_t)(&((PhaseDesc_Type*)0)->setIndex), NULL, 0 }, // deformablePhaseDescs[].setIndex + { TYPE_U32, false, (size_t)(&((PhaseDesc_Type*)0)->restValueOffset), NULL, 0 }, // deformablePhaseDescs[].restValueOffset + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->tetherAnchors), CHILDREN(34), 1 }, // tetherAnchors + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // tetherAnchors[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->tetherLengths), CHILDREN(35), 1 }, // tetherLengths + { TYPE_F32, false, 1 * sizeof(float), NULL, 0 }, // tetherLengths[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->deformableInvVertexWeights), CHILDREN(36), 1 }, // deformableInvVertexWeights + { TYPE_F32, false, 1 * sizeof(float), NULL, 0 }, // deformableInvVertexWeights[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->virtualParticleIndices), CHILDREN(37), 1 }, // virtualParticleIndices + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // virtualParticleIndices[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->virtualParticleWeights), CHILDREN(38), 1 }, // virtualParticleWeights + { TYPE_F32, false, 1 * sizeof(float), NULL, 0 }, // virtualParticleWeights[] + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->cookedDataVersion), NULL, 0 }, // cookedDataVersion + { TYPE_POINTER, false, (size_t)(&((ParametersStruct*)0)->fabricCPU), NULL, 0 }, // fabricCPU + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->fabricGPU), CHILDREN(39), 1 }, // fabricGPU + { TYPE_STRUCT, false, 1 * sizeof(FabricGPU_Type), CHILDREN(40), 2 }, // fabricGPU[] + { TYPE_POINTER, false, (size_t)(&((FabricGPU_Type*)0)->fabricGPU), NULL, 0 }, // fabricGPU[].fabricGPU + { TYPE_POINTER, false, (size_t)(&((FabricGPU_Type*)0)->factory), NULL, 0 }, // fabricGPU[].factory + { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->nextCookedData), NULL, 0 }, // nextCookedData +}; + + +bool ClothingCookedPhysX3Param::mBuiltFlag = false; +NvParameterized::MutexType ClothingCookedPhysX3Param::mBuiltFlagMutex; + +ClothingCookedPhysX3Param::ClothingCookedPhysX3Param(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingCookedPhysX3ParamFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingCookedPhysX3Param::~ClothingCookedPhysX3Param() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingCookedPhysX3Param::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->~ClothingCookedPhysX3Param(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingCookedPhysX3Param::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingCookedPhysX3Param::getParameterDefinitionTree(void) const +{ + ClothingCookedPhysX3Param* tmpParam = const_cast<ClothingCookedPhysX3Param*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingCookedPhysX3Param::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 ClothingCookedPhysX3Param::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 ClothingCookedPhysX3Param::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingCookedPhysX3Param::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void ClothingCookedPhysX3Param::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 ClothingCookedPhysX3Param::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="physicalMeshId" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + 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[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="numVertices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("numVertices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex count", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="deformableRestLengths" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("deformableRestLengths", 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 rest lengths", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="deformableRestLengths[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("deformableRestLengths", 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 rest lengths", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="deformableIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("deformableIndices", 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 indices", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="deformableIndices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("deformableIndices", 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 indices", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="selfCollisionIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("selfCollisionIndices", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Self collision indices", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="selfCollisionIndices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("selfCollisionIndices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Self collision indices", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="selfCollisionNormalIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("selfCollisionNormalIndices", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Self collision normal indices", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="selfCollisionNormalIndices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("selfCollisionNormalIndices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Self collision normal indices", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="selfCollisionNormalSetSizes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("selfCollisionNormalSetSizes", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Self collision normal set sizes", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="selfCollisionNormalSetSizes[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("selfCollisionNormalSetSizes", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Self collision normal set sizes", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="deformableSets" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("deformableSets", 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 sets", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="deformableSets[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("deformableSets", TYPE_STRUCT, "SetDesc", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Deformable sets", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="deformableSets[].fiberEnd" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("fiberEnd", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Fiber end", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="deformableSets[].longestFiber" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("longestFiber", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Longest fiber", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="deformableSets[].shortestFiber" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("shortestFiber", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shortest fiber", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="deformableSets[].numEdges" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("numEdges", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Edge count", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="deformableSets[].avgEdgeLength" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("avgEdgeLength", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Average edge length", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="deformableSets[].avgFiberLength" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("avgFiberLength", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Average fiber length", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="deformablePhaseDescs" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("deformablePhaseDescs", 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 phase descriptions", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="deformablePhaseDescs[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("deformablePhaseDescs", TYPE_STRUCT, "PhaseDesc", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Deformable phase descriptions", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="deformablePhaseDescs[].phaseType" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("phaseType", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Phase type", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="deformablePhaseDescs[].setIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("setIndex", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Set index", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="deformablePhaseDescs[].restValueOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("restValueOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Rest value offset", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="tetherAnchors" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("tetherAnchors", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Tether anchors", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="tetherAnchors[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("tetherAnchors", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Tether anchors", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="tetherLengths" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("tetherLengths", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Tether lengths", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="tetherLengths[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("tetherLengths", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Tether lengths", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="deformableInvVertexWeights" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("deformableInvVertexWeights", 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 vertex weights", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="deformableInvVertexWeights[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("deformableInvVertexWeights", 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 vertex weights", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=32, longName="virtualParticleIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; + 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[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=33, longName="virtualParticleIndices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; + 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[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=34, longName="virtualParticleWeights" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; + 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[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=35, longName="virtualParticleWeights[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; + ParamDef->init("virtualParticleWeights", TYPE_F32, 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[35].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=36, longName="cookedDataVersion" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; + ParamDef->init("cookedDataVersion", 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 version", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=37, longName="fabricCPU" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; + ParamDef->init("fabricCPU", 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[37].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", "Fabric CPU pointer", true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=38, longName="fabricGPU" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; + ParamDef->init("fabricGPU", 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[38].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", "Fabric GPU array", true); + ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=39, longName="fabricGPU[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; + ParamDef->init("fabricGPU", TYPE_STRUCT, "FabricGPU", 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[39].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", "Fabric GPU array", true); + ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=40, longName="fabricGPU[].fabricGPU" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[40]; + ParamDef->init("fabricGPU", 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[40].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", "Runtime pointer to shared fabric.", true); + ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=41, longName="fabricGPU[].factory" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[41]; + ParamDef->init("factory", 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[41].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", "Runtime pointer to the factory the fabric has been created with.", true); + ParamDefTable[41].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=42, longName="nextCookedData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[42]; + ParamDef->init("nextCookedData", TYPE_REF, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + ParamDefTable[42].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + HintTable[1].init("shortDescription", "Daisy-chain together multiple cooked data objects", true); + ParamDefTable[42].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + static const char* const RefVariantVals[] = { "ClothingCookedPhysX3Param" }; + ParamDefTable[42].setRefVariantVals((const char**)RefVariantVals, 1); + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[18]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(2); + Children[2] = PDEF_PTR(3); + Children[3] = PDEF_PTR(5); + Children[4] = PDEF_PTR(7); + Children[5] = PDEF_PTR(9); + Children[6] = PDEF_PTR(11); + Children[7] = PDEF_PTR(13); + Children[8] = PDEF_PTR(21); + Children[9] = PDEF_PTR(26); + Children[10] = PDEF_PTR(28); + Children[11] = PDEF_PTR(30); + Children[12] = PDEF_PTR(32); + Children[13] = PDEF_PTR(34); + Children[14] = PDEF_PTR(36); + Children[15] = PDEF_PTR(37); + Children[16] = PDEF_PTR(38); + Children[17] = PDEF_PTR(42); + + ParamDefTable[0].setChildren(Children, 18); + } + + // SetChildren for: nodeIndex=3, longName="deformableRestLengths" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(4); + + ParamDefTable[3].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=5, longName="deformableIndices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(6); + + ParamDefTable[5].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=7, longName="selfCollisionIndices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(8); + + ParamDefTable[7].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=9, longName="selfCollisionNormalIndices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(10); + + ParamDefTable[9].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=11, longName="selfCollisionNormalSetSizes" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(12); + + ParamDefTable[11].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=13, longName="deformableSets" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(14); + + ParamDefTable[13].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=14, longName="deformableSets[]" + { + static Definition* Children[6]; + Children[0] = PDEF_PTR(15); + Children[1] = PDEF_PTR(16); + Children[2] = PDEF_PTR(17); + Children[3] = PDEF_PTR(18); + Children[4] = PDEF_PTR(19); + Children[5] = PDEF_PTR(20); + + ParamDefTable[14].setChildren(Children, 6); + } + + // SetChildren for: nodeIndex=21, longName="deformablePhaseDescs" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(22); + + ParamDefTable[21].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=22, longName="deformablePhaseDescs[]" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(23); + Children[1] = PDEF_PTR(24); + Children[2] = PDEF_PTR(25); + + ParamDefTable[22].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=26, longName="tetherAnchors" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(27); + + ParamDefTable[26].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=28, longName="tetherLengths" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(29); + + ParamDefTable[28].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=30, longName="deformableInvVertexWeights" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(31); + + ParamDefTable[30].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=32, longName="virtualParticleIndices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(33); + + ParamDefTable[32].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=34, longName="virtualParticleWeights" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(35); + + ParamDefTable[34].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=38, longName="fabricGPU" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(39); + + ParamDefTable[38].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=39, longName="fabricGPU[]" + { + static Definition* Children[2]; + Children[0] = PDEF_PTR(40); + Children[1] = PDEF_PTR(41); + + ParamDefTable[39].setChildren(Children, 2); + } + + mBuiltFlag = true; + +} +void ClothingCookedPhysX3Param::initStrings(void) +{ +} + +void ClothingCookedPhysX3Param::initDynamicArrays(void) +{ + deformableRestLengths.buf = NULL; + deformableRestLengths.isAllocated = true; + deformableRestLengths.elementSize = sizeof(float); + deformableRestLengths.arraySizes[0] = 0; + deformableIndices.buf = NULL; + deformableIndices.isAllocated = true; + deformableIndices.elementSize = sizeof(uint32_t); + deformableIndices.arraySizes[0] = 0; + selfCollisionIndices.buf = NULL; + selfCollisionIndices.isAllocated = true; + selfCollisionIndices.elementSize = sizeof(uint32_t); + selfCollisionIndices.arraySizes[0] = 0; + selfCollisionNormalIndices.buf = NULL; + selfCollisionNormalIndices.isAllocated = true; + selfCollisionNormalIndices.elementSize = sizeof(uint32_t); + selfCollisionNormalIndices.arraySizes[0] = 0; + selfCollisionNormalSetSizes.buf = NULL; + selfCollisionNormalSetSizes.isAllocated = true; + selfCollisionNormalSetSizes.elementSize = sizeof(uint32_t); + selfCollisionNormalSetSizes.arraySizes[0] = 0; + deformableSets.buf = NULL; + deformableSets.isAllocated = true; + deformableSets.elementSize = sizeof(SetDesc_Type); + deformableSets.arraySizes[0] = 0; + deformablePhaseDescs.buf = NULL; + deformablePhaseDescs.isAllocated = true; + deformablePhaseDescs.elementSize = sizeof(PhaseDesc_Type); + deformablePhaseDescs.arraySizes[0] = 0; + tetherAnchors.buf = NULL; + tetherAnchors.isAllocated = true; + tetherAnchors.elementSize = sizeof(uint32_t); + tetherAnchors.arraySizes[0] = 0; + tetherLengths.buf = NULL; + tetherLengths.isAllocated = true; + tetherLengths.elementSize = sizeof(float); + tetherLengths.arraySizes[0] = 0; + deformableInvVertexWeights.buf = NULL; + deformableInvVertexWeights.isAllocated = true; + deformableInvVertexWeights.elementSize = sizeof(float); + deformableInvVertexWeights.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(float); + virtualParticleWeights.arraySizes[0] = 0; + fabricGPU.buf = NULL; + fabricGPU.isAllocated = true; + fabricGPU.elementSize = sizeof(FabricGPU_Type); + fabricGPU.arraySizes[0] = 0; +} + +void ClothingCookedPhysX3Param::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + physicalMeshId = uint32_t(0); + numVertices = uint32_t(0); + cookedDataVersion = uint32_t(0); + fabricCPU = NULL; + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingCookedPhysX3Param::initReferences(void) +{ + nextCookedData = NULL; + +} + +void ClothingCookedPhysX3Param::freeDynamicArrays(void) +{ + if (deformableRestLengths.isAllocated && deformableRestLengths.buf) + { + mParameterizedTraits->free(deformableRestLengths.buf); + } + if (deformableIndices.isAllocated && deformableIndices.buf) + { + mParameterizedTraits->free(deformableIndices.buf); + } + if (selfCollisionIndices.isAllocated && selfCollisionIndices.buf) + { + mParameterizedTraits->free(selfCollisionIndices.buf); + } + if (selfCollisionNormalIndices.isAllocated && selfCollisionNormalIndices.buf) + { + mParameterizedTraits->free(selfCollisionNormalIndices.buf); + } + if (selfCollisionNormalSetSizes.isAllocated && selfCollisionNormalSetSizes.buf) + { + mParameterizedTraits->free(selfCollisionNormalSetSizes.buf); + } + if (deformableSets.isAllocated && deformableSets.buf) + { + mParameterizedTraits->free(deformableSets.buf); + } + if (deformablePhaseDescs.isAllocated && deformablePhaseDescs.buf) + { + mParameterizedTraits->free(deformablePhaseDescs.buf); + } + if (tetherAnchors.isAllocated && tetherAnchors.buf) + { + mParameterizedTraits->free(tetherAnchors.buf); + } + if (tetherLengths.isAllocated && tetherLengths.buf) + { + mParameterizedTraits->free(tetherLengths.buf); + } + if (deformableInvVertexWeights.isAllocated && deformableInvVertexWeights.buf) + { + mParameterizedTraits->free(deformableInvVertexWeights.buf); + } + if (virtualParticleIndices.isAllocated && virtualParticleIndices.buf) + { + mParameterizedTraits->free(virtualParticleIndices.buf); + } + if (virtualParticleWeights.isAllocated && virtualParticleWeights.buf) + { + mParameterizedTraits->free(virtualParticleWeights.buf); + } + if (fabricGPU.isAllocated && fabricGPU.buf) + { + mParameterizedTraits->free(fabricGPU.buf); + } +} + +void ClothingCookedPhysX3Param::freeStrings(void) +{ +} + +void ClothingCookedPhysX3Param::freeReferences(void) +{ + if (nextCookedData) + { + nextCookedData->destroy(); + } + +} + +} // namespace clothing +} // namespace nvidia diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingDebugRenderParams.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingDebugRenderParams.cpp new file mode 100644 index 00000000..71ceee2e --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingDebugRenderParams.cpp @@ -0,0 +1,1327 @@ +// 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 "ClothingDebugRenderParams.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingDebugRenderParamsNS; + +const char* const ClothingDebugRenderParamsFactory::vptr = + NvParameterized::getVptr<ClothingDebugRenderParams, ClothingDebugRenderParams::ClassAlignment>(); + +const uint32_t NumParamDefs = 42; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 41 }, + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->Actors), NULL, 0 }, // Actors + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->SkinnedPositions), NULL, 0 }, // SkinnedPositions + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->Backstop), NULL, 0 }, // Backstop + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->BackstopPrecise), NULL, 0 }, // BackstopPrecise + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->MaxDistance), NULL, 0 }, // MaxDistance + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->MaxDistanceInwards), NULL, 0 }, // MaxDistanceInwards + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->SkinMapAll), NULL, 0 }, // SkinMapAll + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->SkinMapBad), NULL, 0 }, // SkinMapBad + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->SkinMapActual), NULL, 0 }, // SkinMapActual + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->SkinMapInvalidBary), NULL, 0 }, // SkinMapInvalidBary + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->PhysicsMeshWire), NULL, 0 }, // PhysicsMeshWire + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->PhysicsMeshSolid), NULL, 0 }, // PhysicsMeshSolid + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->PhysicsMeshNormals), NULL, 0 }, // PhysicsMeshNormals + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->Skeleton), NULL, 0 }, // Skeleton + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->BoneFrames), NULL, 0 }, // BoneFrames + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->BoneNames), NULL, 0 }, // BoneNames + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->Velocities), NULL, 0 }, // Velocities + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->Wind), NULL, 0 }, // Wind + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->GraphicalVertexBones), NULL, 0 }, // GraphicalVertexBones + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->PhysicalVertexBones), NULL, 0 }, // PhysicalVertexBones + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->CollisionShapes), NULL, 0 }, // CollisionShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->CollisionShapesWire), NULL, 0 }, // CollisionShapesWire + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->LengthFibers), NULL, 0 }, // LengthFibers + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->CrossSectionFibers), NULL, 0 }, // CrossSectionFibers + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->BendingFibers), NULL, 0 }, // BendingFibers + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->ShearingFibers), NULL, 0 }, // ShearingFibers + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->ZerostretchFibers), NULL, 0 }, // ZerostretchFibers + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->TethersActive), NULL, 0 }, // TethersActive + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->TethersInactive), NULL, 0 }, // TethersInactive + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->VirtualCollision), NULL, 0 }, // VirtualCollision + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->FiberRange), NULL, 0 }, // FiberRange + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->ShowInLocalSpace), NULL, 0 }, // ShowInLocalSpace + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->GlobalPose), NULL, 0 }, // GlobalPose + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->RecomputeSubmeshes), NULL, 0 }, // RecomputeSubmeshes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->RecomputeVertices), NULL, 0 }, // RecomputeVertices + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->PhysicsMeshIndices), NULL, 0 }, // PhysicsMeshIndices + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->MassScale), NULL, 0 }, // MassScale + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->SelfCollision), NULL, 0 }, // SelfCollision + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->SelfCollisionWire), NULL, 0 }, // SelfCollisionWire + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->SelfCollisionAttenuation), NULL, 0 }, // SelfCollisionAttenuation + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->SolverMode), NULL, 0 }, // SolverMode +}; + + +bool ClothingDebugRenderParams::mBuiltFlag = false; +NvParameterized::MutexType ClothingDebugRenderParams::mBuiltFlagMutex; + +ClothingDebugRenderParams::ClothingDebugRenderParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingDebugRenderParamsFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingDebugRenderParams::~ClothingDebugRenderParams() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingDebugRenderParams::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->~ClothingDebugRenderParams(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingDebugRenderParams::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingDebugRenderParams::getParameterDefinitionTree(void) const +{ + ClothingDebugRenderParams* tmpParam = const_cast<ClothingDebugRenderParams*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingDebugRenderParams::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 ClothingDebugRenderParams::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 ClothingDebugRenderParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingDebugRenderParams::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void ClothingDebugRenderParams::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 ClothingDebugRenderParams::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="Actors" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("Actors", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Enables/Disables visualization of all clothing actors", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="SkinnedPositions" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("SkinnedPositions", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Marks each animation position with a small cross as the centers of the spheres in which the simulated vertices are allowed to move. Blue for static vertices, black to white for increasing max distance.", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="Backstop" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("Backstop", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The part of the mesh with backstop is solidly rendered. Red for front faces, blue for back faces.", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="BackstopPrecise" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("BackstopPrecise", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws small segments of the backstop sphere for each simulation vertex. (scalable)", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="MaxDistance" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("MaxDistance", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws a line from the skinned position along the skinned normal with the length of the max distance this vertex is allowed to move. Note that the LoD mechanism can scale down the Max Distance of the asset.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="MaxDistanceInwards" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("MaxDistanceInwards", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Same as MaxDistance but to the other side. Bounded by backstop. The length of the line is either Max Distance or sphere collision distance, depending on which is smaller and restricts the motion of the vertex.", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="SkinMapAll" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("SkinMapAll", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws the full support mesh for mesh-mesh skinning.", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="SkinMapBad" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("SkinMapBad", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws the support mesh for mesh-mesh skinning. But only for vertices that actually lie outside of the support mesh and could cause problems", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="SkinMapActual" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("SkinMapActual", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws the actual support mesh for mesh-mesh skinning (only the parts that are effectively used).", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="SkinMapInvalidBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("SkinMapInvalidBary", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws physical triangles and corresponding graphical vertices that have invalid barycentric coordinates in the mesh skinning map. Red: invalid position bary. Purple: invalid normal bary. Blue: invalid tangent bary.", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="PhysicsMeshWire" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("PhysicsMeshWire", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Draws the simulation mesh, only the active region. From yellow to red, the closer a vertex gets to its max distance. (scalable)", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="PhysicsMeshSolid" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("PhysicsMeshSolid", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Same as PhysicsMeshWire but with solid triangles.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="PhysicsMeshNormals" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("PhysicsMeshNormals", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Displays the normals of the physics mesh (base for mesh-mesh skinning).", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="Skeleton" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("Skeleton", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws lines from parent to child bones. Active bones are displayed in purple, passive in blue. Only the subset of bones that have a vertex from any of the meshes or a collision volume bound to them will be visible.", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="BoneFrames" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("BoneFrames", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws the frame of each bone. (scalable)", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="BoneNames" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("BoneNames", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Displays the name of each bone. (scalable)", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="Velocities" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("Velocities", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws lines for each simulated vertex' velocity. (scalable)", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="Wind" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("Wind", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws lines for each simulated vertex' velocity change due to wind, velocity callback or pressure. (scalable)", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="GraphicalVertexBones" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("GraphicalVertexBones", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws colored lines from each graphical vertex to the bones it uses for skinning. White to black for decreasing weights.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="PhysicalVertexBones" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("PhysicalVertexBones", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws colored lines from each simulation vertex to the bones it uses for skinning. White to black for decreasing weights.", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="CollisionShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("CollisionShapes", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws solid capsules and spheres for the collision shapes.", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="CollisionShapesWire" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("CollisionShapesWire", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Draws wire capsules and spheres for the collision shapes.", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="LengthFibers" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("LengthFibers", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Show the vertical stretching fibers.", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="CrossSectionFibers" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("CrossSectionFibers", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Show the horizontal stretching fibers.", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="BendingFibers" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("BendingFibers", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Show the bending fibers.", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="ShearingFibers" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("ShearingFibers", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Show the shearing fibers.", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="ZerostretchFibers" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("ZerostretchFibers", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Show the zero-stretch phases.", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="TethersActive" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("TethersActive", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Show the tether constraitns, only active ones (0.99 their length and longer).", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="TethersInactive" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("TethersInactive", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Show the tether constraints, only inactive ones (less than 0.99 their length).", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="VirtualCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("VirtualCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Show the virtual particles. Each has 3 lines to the vertices it connects to.", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="FiberRange" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("FiberRange", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Combined with fiber debug rendering this visualizes the range where the stiffness of the chosen fiber type is scaled down. It shows how much the cloth is allowed to compress/stretch.", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=32, longName="ShowInLocalSpace" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; + ParamDef->init("ShowInLocalSpace", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Enables/Disables debug rendering in local space (experts only!)", true); + ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=33, longName="GlobalPose" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; + ParamDef->init("GlobalPose", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shows the internally stored global pose transform", true); + ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=34, longName="RecomputeSubmeshes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; + ParamDef->init("RecomputeSubmeshes", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shows the internal reordering of the render mesh asset into physical submeshes and non-simulated parts in shades of gray. This is used to split the cpu skinned part from the skinned part that is skinned the physics mesh.", true); + ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=35, longName="RecomputeVertices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; + ParamDef->init("RecomputeVertices", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shows the position of the reordered render vertices that are being skinned to the physics mesh. Vertices attached to simulated triangles are rendered orange. Additional vertices along the border are rendered purple, they are needed to prevent visible seams from normal and tangent calculations.", true); + ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=36, longName="PhysicsMeshIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; + ParamDef->init("PhysicsMeshIndices", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shows the indices of the physics mesh", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=37, longName="MassScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; + ParamDef->init("MassScale", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shows red crosses for particles where the mass is scaled for collision purpose", true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=38, longName="SelfCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; + ParamDef->init("SelfCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shows spheres that represent the self collision thickness", true); + ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=39, longName="SelfCollisionWire" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; + ParamDef->init("SelfCollisionWire", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shows spheres that represent the self collision thickness", true); + ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=40, longName="SelfCollisionAttenuation" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[40]; + ParamDef->init("SelfCollisionAttenuation", TYPE_F32, 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 connections are drawn that have an attenuation smaller than the given value.\n0.0f disables the visualization, 1.0f shows all attenuated pairs.\n", true); + HintTable[1].init("shortDescription", "Draws a line between vertices where selfcollision is reduced or turned off.", true); + ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=41, longName="SolverMode" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[41]; + ParamDef->init("SolverMode", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Shared: Fastest path. It means previous and current positions fit onto shared memory on the GPU.\nMixed: Only slightly slower than Shared. Current positions fit onto shared memory, previous positions need to be streamed in.\nGlobal: Significantly slower than Shared and Mixed. All data is read from global GPU memory. Try to reduce the vertex count and/or split up the asset.\n", true); + HintTable[1].init("shortDescription", "Displays which solver is used (2.x or 3.x), wether it runs on GPU, and if the simulation data fits into shared memory.", true); + ParamDefTable[41].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[41]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(2); + Children[2] = PDEF_PTR(3); + Children[3] = PDEF_PTR(4); + Children[4] = PDEF_PTR(5); + Children[5] = PDEF_PTR(6); + Children[6] = PDEF_PTR(7); + Children[7] = PDEF_PTR(8); + Children[8] = PDEF_PTR(9); + Children[9] = PDEF_PTR(10); + Children[10] = PDEF_PTR(11); + Children[11] = PDEF_PTR(12); + Children[12] = PDEF_PTR(13); + Children[13] = PDEF_PTR(14); + Children[14] = PDEF_PTR(15); + Children[15] = PDEF_PTR(16); + Children[16] = PDEF_PTR(17); + Children[17] = PDEF_PTR(18); + Children[18] = PDEF_PTR(19); + Children[19] = PDEF_PTR(20); + Children[20] = PDEF_PTR(21); + Children[21] = PDEF_PTR(22); + Children[22] = PDEF_PTR(23); + Children[23] = PDEF_PTR(24); + Children[24] = PDEF_PTR(25); + Children[25] = PDEF_PTR(26); + Children[26] = PDEF_PTR(27); + Children[27] = PDEF_PTR(28); + Children[28] = PDEF_PTR(29); + Children[29] = PDEF_PTR(30); + Children[30] = PDEF_PTR(31); + Children[31] = PDEF_PTR(32); + Children[32] = PDEF_PTR(33); + Children[33] = PDEF_PTR(34); + Children[34] = PDEF_PTR(35); + Children[35] = PDEF_PTR(36); + Children[36] = PDEF_PTR(37); + Children[37] = PDEF_PTR(38); + Children[38] = PDEF_PTR(39); + Children[39] = PDEF_PTR(40); + Children[40] = PDEF_PTR(41); + + ParamDefTable[0].setChildren(Children, 41); + } + + mBuiltFlag = true; + +} +void ClothingDebugRenderParams::initStrings(void) +{ +} + +void ClothingDebugRenderParams::initDynamicArrays(void) +{ +} + +void ClothingDebugRenderParams::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + Actors = bool(true); + SkinnedPositions = float(0); + Backstop = bool(false); + BackstopPrecise = float(0); + MaxDistance = bool(0); + MaxDistanceInwards = bool(0); + SkinMapAll = bool(0); + SkinMapBad = bool(0); + SkinMapActual = bool(0); + SkinMapInvalidBary = bool(0); + PhysicsMeshWire = float(0); + PhysicsMeshSolid = float(0); + PhysicsMeshNormals = float(0); + Skeleton = bool(0); + BoneFrames = float(0); + BoneNames = float(0); + Velocities = float(0); + Wind = float(0); + GraphicalVertexBones = bool(0); + PhysicalVertexBones = bool(0); + CollisionShapes = bool(false); + CollisionShapesWire = bool(false); + LengthFibers = bool(false); + CrossSectionFibers = bool(false); + BendingFibers = bool(false); + ShearingFibers = bool(false); + ZerostretchFibers = bool(false); + TethersActive = bool(false); + TethersInactive = bool(false); + VirtualCollision = bool(false); + FiberRange = bool(false); + ShowInLocalSpace = bool(false); + GlobalPose = bool(false); + RecomputeSubmeshes = bool(false); + RecomputeVertices = bool(false); + PhysicsMeshIndices = bool(false); + MassScale = bool(false); + SelfCollision = bool(false); + SelfCollisionWire = bool(false); + SelfCollisionAttenuation = float(false); + SolverMode = bool(false); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingDebugRenderParams::initReferences(void) +{ +} + +void ClothingDebugRenderParams::freeDynamicArrays(void) +{ +} + +void ClothingDebugRenderParams::freeStrings(void) +{ +} + +void ClothingDebugRenderParams::freeReferences(void) +{ +} + +} // namespace clothing +} // namespace nvidia diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingGraphicalLodParameters.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingGraphicalLodParameters.cpp new file mode 100644 index 00000000..59293e7c --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingGraphicalLodParameters.cpp @@ -0,0 +1,1491 @@ +// 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 "ClothingGraphicalLodParameters.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingGraphicalLodParametersNS; + +const char* const ClothingGraphicalLodParametersFactory::vptr = + NvParameterized::getVptr<ClothingGraphicalLodParameters, ClothingGraphicalLodParameters::ClassAlignment>(); + +const uint32_t NumParamDefs = 41; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 3, 4, 5, 6, 7, 9, 17, 26, 27, 28, 34, 35, 2, 8, 10, 11, 12, 13, 14, 15, 16, 18, + 19, 20, 21, 22, 23, 24, 25, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 13 }, + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->platforms), CHILDREN(13), 1 }, // platforms + { TYPE_STRING, false, 1 * sizeof(NvParameterized::DummyStringStruct), NULL, 0 }, // platforms[] + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->lod), NULL, 0 }, // lod + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->physicalMeshId), NULL, 0 }, // physicalMeshId + { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->renderMeshAsset), NULL, 0 }, // renderMeshAsset + { TYPE_POINTER, false, (size_t)(&((ParametersStruct*)0)->renderMeshAssetPointer), NULL, 0 }, // renderMeshAssetPointer + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->immediateClothMap), CHILDREN(14), 1 }, // immediateClothMap + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // immediateClothMap[] + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->skinClothMapB), CHILDREN(15), 1 }, // skinClothMapB + { TYPE_STRUCT, false, 1 * sizeof(SkinClothMapB_Type), CHILDREN(16), 6 }, // skinClothMapB[] + { TYPE_VEC3, false, (size_t)(&((SkinClothMapB_Type*)0)->vtxTetraBary), NULL, 0 }, // skinClothMapB[].vtxTetraBary + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->vertexIndexPlusOffset), NULL, 0 }, // skinClothMapB[].vertexIndexPlusOffset + { TYPE_VEC3, false, (size_t)(&((SkinClothMapB_Type*)0)->nrmTetraBary), NULL, 0 }, // skinClothMapB[].nrmTetraBary + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->faceIndex0), NULL, 0 }, // skinClothMapB[].faceIndex0 + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->tetraIndex), NULL, 0 }, // skinClothMapB[].tetraIndex + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->submeshIndex), NULL, 0 }, // skinClothMapB[].submeshIndex + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->skinClothMap), CHILDREN(22), 1 }, // skinClothMap + { TYPE_STRUCT, false, 1 * sizeof(SkinClothMapD_Type), CHILDREN(23), 7 }, // skinClothMap[] + { TYPE_VEC3, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexBary), NULL, 0 }, // skinClothMap[].vertexBary + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndex0), NULL, 0 }, // skinClothMap[].vertexIndex0 + { TYPE_VEC3, false, (size_t)(&((SkinClothMapD_Type*)0)->normalBary), NULL, 0 }, // skinClothMap[].normalBary + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndex1), NULL, 0 }, // skinClothMap[].vertexIndex1 + { TYPE_VEC3, false, (size_t)(&((SkinClothMapD_Type*)0)->tangentBary), NULL, 0 }, // skinClothMap[].tangentBary + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndex2), NULL, 0 }, // skinClothMap[].vertexIndex2 + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndexPlusOffset), NULL, 0 }, // skinClothMap[].vertexIndexPlusOffset + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->skinClothMapThickness), NULL, 0 }, // skinClothMapThickness + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->skinClothMapOffset), NULL, 0 }, // skinClothMapOffset + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->tetraMap), CHILDREN(30), 1 }, // tetraMap + { TYPE_STRUCT, false, 1 * sizeof(TetraLink_Type), CHILDREN(31), 4 }, // tetraMap[] + { TYPE_VEC3, false, (size_t)(&((TetraLink_Type*)0)->vertexBary), NULL, 0 }, // tetraMap[].vertexBary + { TYPE_U32, false, (size_t)(&((TetraLink_Type*)0)->tetraIndex0), NULL, 0 }, // tetraMap[].tetraIndex0 + { TYPE_VEC3, false, (size_t)(&((TetraLink_Type*)0)->normalBary), NULL, 0 }, // tetraMap[].normalBary + { TYPE_U32, false, (size_t)(&((TetraLink_Type*)0)->_dummyForAlignment), NULL, 0 }, // tetraMap[]._dummyForAlignment + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->renderMeshAssetSorting), NULL, 0 }, // renderMeshAssetSorting + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->physicsMeshPartitioning), CHILDREN(35), 1 }, // physicsMeshPartitioning + { TYPE_STRUCT, false, 1 * sizeof(PhysicsMeshPartitioning_Type), CHILDREN(36), 4 }, // physicsMeshPartitioning[] + { TYPE_U32, false, (size_t)(&((PhysicsMeshPartitioning_Type*)0)->graphicalSubmesh), NULL, 0 }, // physicsMeshPartitioning[].graphicalSubmesh + { TYPE_U32, false, (size_t)(&((PhysicsMeshPartitioning_Type*)0)->numSimulatedVertices), NULL, 0 }, // physicsMeshPartitioning[].numSimulatedVertices + { TYPE_U32, false, (size_t)(&((PhysicsMeshPartitioning_Type*)0)->numSimulatedVerticesAdditional), NULL, 0 }, // physicsMeshPartitioning[].numSimulatedVerticesAdditional + { TYPE_U32, false, (size_t)(&((PhysicsMeshPartitioning_Type*)0)->numSimulatedIndices), NULL, 0 }, // physicsMeshPartitioning[].numSimulatedIndices +}; + + +bool ClothingGraphicalLodParameters::mBuiltFlag = false; +NvParameterized::MutexType ClothingGraphicalLodParameters::mBuiltFlagMutex; + +ClothingGraphicalLodParameters::ClothingGraphicalLodParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingGraphicalLodParametersFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingGraphicalLodParameters::~ClothingGraphicalLodParameters() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingGraphicalLodParameters::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->~ClothingGraphicalLodParameters(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingGraphicalLodParameters::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingGraphicalLodParameters::getParameterDefinitionTree(void) const +{ + ClothingGraphicalLodParameters* tmpParam = const_cast<ClothingGraphicalLodParameters*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingGraphicalLodParameters::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 ClothingGraphicalLodParameters::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 ClothingGraphicalLodParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingGraphicalLodParameters::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ +/* [0] - platforms (not an array of structs) */ + +void ClothingGraphicalLodParameters::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 ClothingGraphicalLodParameters::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="platforms" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("platforms", 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", "The assets can be prepared for different platforms. This string specifies for which\nplatforms this LOD is kept in the asset.\n", true); + HintTable[1].init("shortDescription", "Platforms on this lod is used.", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + static const uint8_t dynHandleIndices[1] = { 0, }; + ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="platforms[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("platforms", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "The assets can be prepared for different platforms. This string specifies for which\nplatforms this LOD is kept in the asset.\n", true); + HintTable[1].init("shortDescription", "Platforms on this lod is used.", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="lod" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("lod", 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", "Even for a small number of LoDs, the LoD value does not have to be continuous. An Asset\ncan have 3 LoDs at leve 0, 3 and 6.\n", true); + HintTable[1].init("shortDescription", "The actual LoD value", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="physicalMeshId" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("physicalMeshId", 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", "This indexes a physical mesh from the physicalMesh Array in the ClothingAsset. Different\ngraphical LoDs can share a physical mesh.\n", true); + HintTable[1].init("shortDescription", "Index of the physical mesh used for this graphical mesh.", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="renderMeshAsset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("renderMeshAsset", TYPE_REF, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("INCLUDED", uint64_t(1), true); + HintTable[1].init("longDescription", "Each LoD must have a unique render mesh asset.\n", true); + HintTable[2].init("shortDescription", "The render mesh asset used for this LoD level", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + static const char* const RefVariantVals[] = { "RenderMeshAssetParameters" }; + ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 1); + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="renderMeshAssetPointer" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("renderMeshAssetPointer", TYPE_POINTER, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + HintTable[1].init("TYPE", "NiApexRenderMeshAsset", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + HintTable[1].init("TYPE", "NiApexRenderMeshAsset", true); + HintTable[2].init("shortDescription", "Render mesh asset pointer", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="immediateClothMap" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("immediateClothMap", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "If some vertices can not be mapped properly, they will use the skinClothMapB to tie to the physical mesh.\n", true); + HintTable[2].init("shortDescription", "Directly map some of the physically simulated vertices on the graphical mesh", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="immediateClothMap[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("immediateClothMap", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "If some vertices can not be mapped properly, they will use the skinClothMapB to tie to the physical mesh.\n", true); + HintTable[2].init("shortDescription", "Directly map some of the physically simulated vertices on the graphical mesh", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="skinClothMapB" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("skinClothMapB", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Usually maps only a subset of all vertices to the physical mesh. The others can be done through the immediateClothMap.\n", true); + HintTable[2].init("shortDescription", "Map each graphical vertex onto a physically simulated triangle through barycentric coordinates and implicit tetrahedrons.", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="skinClothMapB[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("skinClothMapB", TYPE_STRUCT, "SkinClothMapB", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Usually maps only a subset of all vertices to the physical mesh. The others can be done through the immediateClothMap.\n", true); + HintTable[2].init("shortDescription", "Map each graphical vertex onto a physically simulated triangle through barycentric coordinates and implicit tetrahedrons.", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="skinClothMapB[].vtxTetraBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("vtxTetraBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate into the implicit tetrahedron.", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="skinClothMapB[].vertexIndexPlusOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("vertexIndexPlusOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The vertex index in the graphical mesh (the target index).", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="skinClothMapB[].nrmTetraBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("nrmTetraBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (vertex+normal). When vertex is subtracted this will result in the normal again.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="skinClothMapB[].faceIndex0" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("faceIndex0", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "First index of the 3 consecutive indices making the physical triangle.", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="skinClothMapB[].tetraIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("tetraIndex", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Selects which of the 6 implicit tetrahedrons is used for the mapping.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="skinClothMapB[].submeshIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("submeshIndex", TYPE_U32, 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[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + HintTable[1].init("longDescription", "This is only needed during the authoring stage and thus does not need to be serialized.", true); + HintTable[2].init("shortDescription", "Index into which Physical Submesh/LoD this element of the mapping belongs to.", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="skinClothMap" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("skinClothMap", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Usually maps only a subset of all vertices to the physical mesh. The others can be done through the immediateClothMap.\n", true); + HintTable[2].init("shortDescription", "Map each graphical vertex onto a physically simulated triangle through barycentric coordinates.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="skinClothMap[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("skinClothMap", TYPE_STRUCT, "SkinClothMapD", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Usually maps only a subset of all vertices to the physical mesh. The others can be done through the immediateClothMap.\n", true); + HintTable[2].init("shortDescription", "Map each graphical vertex onto a physically simulated triangle through barycentric coordinates.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="skinClothMap[].vertexBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("vertexBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate into the triangle.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="skinClothMap[].vertexIndex0" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("vertexIndex0", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex index of the physics triangle.", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="skinClothMap[].normalBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("normalBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (vertex+normal). When vertex is subtracted this will result in the normal again.", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="skinClothMap[].vertexIndex1" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("vertexIndex1", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex index of the physics triangle.", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="skinClothMap[].tangentBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("tangentBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (position+tangent). When position is subtracted this will result in the tangent again.", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="skinClothMap[].vertexIndex2" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("vertexIndex2", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex index of the physics triangle.", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="skinClothMap[].vertexIndexPlusOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("vertexIndexPlusOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The vertex index in the graphical mesh (the target index).", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="skinClothMapThickness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("skinClothMapThickness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("READONLY", uint64_t(1), true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("READONLY", uint64_t(1), true); + HintTable[1].init("longDescription", "The physical mesh is expanded to both directions with this thickness, resulting in the doubled thickness.\nOnly used for Mesh-Mesh Skinning.\n", true); + HintTable[2].init("shortDescription", "Thickness of the mesh implicitly defined around the flat physical (triangle) mesh.", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="skinClothMapOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("skinClothMapOffset", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("READONLY", uint64_t(1), true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("READONLY", uint64_t(1), true); + HintTable[1].init("longDescription", "The length of the normals when added to the vertex to generate the barycentric coordinates.\n", true); + HintTable[2].init("shortDescription", "Normal offset of the mesh implicitly defined around the flat physical (triangle) mesh.", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="tetraMap" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("tetraMap", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "This map is only used when the physical mesh is based on tetrahedrons.\n", true); + HintTable[2].init("shortDescription", "Map each graphical vertex onto a physically simulated tetrahedron.", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="tetraMap[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("tetraMap", TYPE_STRUCT, "TetraLink", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "This map is only used when the physical mesh is based on tetrahedrons.\n", true); + HintTable[2].init("shortDescription", "Map each graphical vertex onto a physically simulated tetrahedron.", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="tetraMap[].vertexBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("vertexBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate into the tetrahedron.", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="tetraMap[].tetraIndex0" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("tetraIndex0", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "First index of the 4 consecutive indices making the physical tetrahedron.", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=32, longName="tetraMap[].normalBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; + ParamDef->init("normalBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (vertex+normal). When vertex is subtracted this will result in the normal again.", true); + ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=33, longName="tetraMap[]._dummyForAlignment" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; + ParamDef->init("_dummyForAlignment", TYPE_U32, 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[33].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", "Does not hold any data, only helps the alignment of the struct.", true); + ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=34, longName="renderMeshAssetSorting" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; + ParamDef->init("renderMeshAssetSorting", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Render mesh asset sorting", true); + ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=35, longName="physicsMeshPartitioning" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; + ParamDef->init("physicsMeshPartitioning", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Physics mesh partitioning", true); + ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=36, longName="physicsMeshPartitioning[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; + ParamDef->init("physicsMeshPartitioning", TYPE_STRUCT, "PhysicsMeshPartitioning", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Physics mesh partitioning", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=37, longName="physicsMeshPartitioning[].graphicalSubmesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; + ParamDef->init("graphicalSubmesh", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Graphical submesh", true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=38, longName="physicsMeshPartitioning[].numSimulatedVertices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; + ParamDef->init("numSimulatedVertices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Simulated vertex count", true); + ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=39, longName="physicsMeshPartitioning[].numSimulatedVerticesAdditional" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; + ParamDef->init("numSimulatedVerticesAdditional", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Simulated additional vertex count", true); + ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=40, longName="physicsMeshPartitioning[].numSimulatedIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[40]; + ParamDef->init("numSimulatedIndices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Simulated index count", true); + ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[13]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(3); + Children[2] = PDEF_PTR(4); + Children[3] = PDEF_PTR(5); + Children[4] = PDEF_PTR(6); + Children[5] = PDEF_PTR(7); + Children[6] = PDEF_PTR(9); + Children[7] = PDEF_PTR(17); + Children[8] = PDEF_PTR(26); + Children[9] = PDEF_PTR(27); + Children[10] = PDEF_PTR(28); + Children[11] = PDEF_PTR(34); + Children[12] = PDEF_PTR(35); + + ParamDefTable[0].setChildren(Children, 13); + } + + // SetChildren for: nodeIndex=1, longName="platforms" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(2); + + ParamDefTable[1].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=7, longName="immediateClothMap" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(8); + + ParamDefTable[7].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=9, longName="skinClothMapB" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(10); + + ParamDefTable[9].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=10, longName="skinClothMapB[]" + { + static Definition* Children[6]; + Children[0] = PDEF_PTR(11); + Children[1] = PDEF_PTR(12); + Children[2] = PDEF_PTR(13); + Children[3] = PDEF_PTR(14); + Children[4] = PDEF_PTR(15); + Children[5] = PDEF_PTR(16); + + ParamDefTable[10].setChildren(Children, 6); + } + + // SetChildren for: nodeIndex=17, longName="skinClothMap" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(18); + + ParamDefTable[17].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=18, longName="skinClothMap[]" + { + static Definition* Children[7]; + Children[0] = PDEF_PTR(19); + Children[1] = PDEF_PTR(20); + Children[2] = PDEF_PTR(21); + Children[3] = PDEF_PTR(22); + Children[4] = PDEF_PTR(23); + Children[5] = PDEF_PTR(24); + Children[6] = PDEF_PTR(25); + + ParamDefTable[18].setChildren(Children, 7); + } + + // SetChildren for: nodeIndex=28, longName="tetraMap" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(29); + + ParamDefTable[28].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=29, longName="tetraMap[]" + { + static Definition* Children[4]; + Children[0] = PDEF_PTR(30); + Children[1] = PDEF_PTR(31); + Children[2] = PDEF_PTR(32); + Children[3] = PDEF_PTR(33); + + ParamDefTable[29].setChildren(Children, 4); + } + + // SetChildren for: nodeIndex=35, longName="physicsMeshPartitioning" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(36); + + ParamDefTable[35].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=36, longName="physicsMeshPartitioning[]" + { + static Definition* Children[4]; + Children[0] = PDEF_PTR(37); + Children[1] = PDEF_PTR(38); + Children[2] = PDEF_PTR(39); + Children[3] = PDEF_PTR(40); + + ParamDefTable[36].setChildren(Children, 4); + } + + mBuiltFlag = true; + +} +void ClothingGraphicalLodParameters::initStrings(void) +{ +} + +void ClothingGraphicalLodParameters::initDynamicArrays(void) +{ + platforms.buf = NULL; + platforms.isAllocated = true; + platforms.elementSize = sizeof(NvParameterized::DummyStringStruct); + platforms.arraySizes[0] = 0; + immediateClothMap.buf = NULL; + immediateClothMap.isAllocated = true; + immediateClothMap.elementSize = sizeof(uint32_t); + immediateClothMap.arraySizes[0] = 0; + skinClothMapB.buf = NULL; + skinClothMapB.isAllocated = true; + skinClothMapB.elementSize = sizeof(SkinClothMapB_Type); + skinClothMapB.arraySizes[0] = 0; + skinClothMap.buf = NULL; + skinClothMap.isAllocated = true; + skinClothMap.elementSize = sizeof(SkinClothMapD_Type); + skinClothMap.arraySizes[0] = 0; + tetraMap.buf = NULL; + tetraMap.isAllocated = true; + tetraMap.elementSize = sizeof(TetraLink_Type); + tetraMap.arraySizes[0] = 0; + physicsMeshPartitioning.buf = NULL; + physicsMeshPartitioning.isAllocated = true; + physicsMeshPartitioning.elementSize = sizeof(PhysicsMeshPartitioning_Type); + physicsMeshPartitioning.arraySizes[0] = 0; +} + +void ClothingGraphicalLodParameters::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + lod = uint32_t(0); + physicalMeshId = uint32_t(-1); + renderMeshAssetPointer = NULL; + skinClothMapThickness = float(0); + skinClothMapOffset = float(0); + renderMeshAssetSorting = uint32_t(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingGraphicalLodParameters::initReferences(void) +{ + renderMeshAsset = NULL; + +} + +void ClothingGraphicalLodParameters::freeDynamicArrays(void) +{ + if (platforms.isAllocated && platforms.buf) + { + mParameterizedTraits->free(platforms.buf); + } + if (immediateClothMap.isAllocated && immediateClothMap.buf) + { + mParameterizedTraits->free(immediateClothMap.buf); + } + if (skinClothMapB.isAllocated && skinClothMapB.buf) + { + mParameterizedTraits->free(skinClothMapB.buf); + } + if (skinClothMap.isAllocated && skinClothMap.buf) + { + mParameterizedTraits->free(skinClothMap.buf); + } + if (tetraMap.isAllocated && tetraMap.buf) + { + mParameterizedTraits->free(tetraMap.buf); + } + if (physicsMeshPartitioning.isAllocated && physicsMeshPartitioning.buf) + { + mParameterizedTraits->free(physicsMeshPartitioning.buf); + } +} + +void ClothingGraphicalLodParameters::freeStrings(void) +{ + + for (int i = 0; i < platforms.arraySizes[0]; ++i) + { + if (platforms.buf[i].isAllocated && platforms.buf[i].buf) + { + mParameterizedTraits->strfree((char*)platforms.buf[i].buf); + } + } +} + +void ClothingGraphicalLodParameters::freeReferences(void) +{ + if (renderMeshAsset) + { + renderMeshAsset->destroy(); + } + +} + +} // namespace clothing +} // namespace nvidia diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingMaterialLibraryParameters.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingMaterialLibraryParameters.cpp new file mode 100644 index 00000000..5a0bf1c8 --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingMaterialLibraryParameters.cpp @@ -0,0 +1,1593 @@ +// 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 "ClothingMaterialLibraryParameters.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingMaterialLibraryParametersNS; + +const char* const ClothingMaterialLibraryParametersFactory::vptr = + NvParameterized::getVptr<ClothingMaterialLibraryParameters, ClothingMaterialLibraryParameters::ClassAlignment>(); + +const uint32_t NumParamDefs = 43; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 19, 23, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 26, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->materials), CHILDREN(1), 1 }, // materials + { TYPE_STRUCT, false, 1 * sizeof(ClothingMaterial_Type), CHILDREN(2), 28 }, // materials[] + { TYPE_STRING, false, (size_t)(&((ClothingMaterial_Type*)0)->materialName), NULL, 0 }, // materials[].materialName + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->verticalStretchingStiffness), NULL, 0 }, // materials[].verticalStretchingStiffness + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->horizontalStretchingStiffness), NULL, 0 }, // materials[].horizontalStretchingStiffness + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->bendingStiffness), NULL, 0 }, // materials[].bendingStiffness + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->shearingStiffness), NULL, 0 }, // materials[].shearingStiffness + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->tetherStiffness), NULL, 0 }, // materials[].tetherStiffness + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->tetherLimit), NULL, 0 }, // materials[].tetherLimit + { TYPE_BOOL, false, (size_t)(&((ClothingMaterial_Type*)0)->orthoBending), NULL, 0 }, // materials[].orthoBending + { TYPE_STRUCT, false, (size_t)(&((ClothingMaterial_Type*)0)->verticalStiffnessScaling), CHILDREN(30), 3 }, // materials[].verticalStiffnessScaling + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->compressionRange), NULL, 0 }, // materials[].verticalStiffnessScaling.compressionRange + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->stretchRange), NULL, 0 }, // materials[].verticalStiffnessScaling.stretchRange + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->scale), NULL, 0 }, // materials[].verticalStiffnessScaling.scale + { TYPE_STRUCT, false, (size_t)(&((ClothingMaterial_Type*)0)->horizontalStiffnessScaling), CHILDREN(33), 3 }, // materials[].horizontalStiffnessScaling + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->compressionRange), NULL, 0 }, // materials[].horizontalStiffnessScaling.compressionRange + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->stretchRange), NULL, 0 }, // materials[].horizontalStiffnessScaling.stretchRange + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->scale), NULL, 0 }, // materials[].horizontalStiffnessScaling.scale + { TYPE_STRUCT, false, (size_t)(&((ClothingMaterial_Type*)0)->bendingStiffnessScaling), CHILDREN(36), 3 }, // materials[].bendingStiffnessScaling + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->compressionRange), NULL, 0 }, // materials[].bendingStiffnessScaling.compressionRange + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->stretchRange), NULL, 0 }, // materials[].bendingStiffnessScaling.stretchRange + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->scale), NULL, 0 }, // materials[].bendingStiffnessScaling.scale + { TYPE_STRUCT, false, (size_t)(&((ClothingMaterial_Type*)0)->shearingStiffnessScaling), CHILDREN(39), 3 }, // materials[].shearingStiffnessScaling + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->compressionRange), NULL, 0 }, // materials[].shearingStiffnessScaling.compressionRange + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->stretchRange), NULL, 0 }, // materials[].shearingStiffnessScaling.stretchRange + { TYPE_F32, false, (size_t)(&((StiffnessScaling_Type*)0)->scale), NULL, 0 }, // materials[].shearingStiffnessScaling.scale + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->damping), NULL, 0 }, // materials[].damping + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->stiffnessFrequency), NULL, 0 }, // materials[].stiffnessFrequency + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->drag), NULL, 0 }, // materials[].drag + { TYPE_BOOL, false, (size_t)(&((ClothingMaterial_Type*)0)->comDamping), NULL, 0 }, // materials[].comDamping + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->friction), NULL, 0 }, // materials[].friction + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->massScale), NULL, 0 }, // materials[].massScale + { TYPE_U32, false, (size_t)(&((ClothingMaterial_Type*)0)->solverIterations), NULL, 0 }, // materials[].solverIterations + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->solverFrequency), NULL, 0 }, // materials[].solverFrequency + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->gravityScale), NULL, 0 }, // materials[].gravityScale + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->inertiaScale), NULL, 0 }, // materials[].inertiaScale + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->hardStretchLimitation), NULL, 0 }, // materials[].hardStretchLimitation + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->maxDistanceBias), NULL, 0 }, // materials[].maxDistanceBias + { TYPE_U32, false, (size_t)(&((ClothingMaterial_Type*)0)->hierarchicalSolverIterations), NULL, 0 }, // materials[].hierarchicalSolverIterations + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->selfcollisionThickness), NULL, 0 }, // materials[].selfcollisionThickness + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->selfcollisionSquashScale), NULL, 0 }, // materials[].selfcollisionSquashScale + { TYPE_F32, false, (size_t)(&((ClothingMaterial_Type*)0)->selfcollisionStiffness), NULL, 0 }, // materials[].selfcollisionStiffness +}; + + +bool ClothingMaterialLibraryParameters::mBuiltFlag = false; +NvParameterized::MutexType ClothingMaterialLibraryParameters::mBuiltFlagMutex; + +ClothingMaterialLibraryParameters::ClothingMaterialLibraryParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingMaterialLibraryParametersFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingMaterialLibraryParameters::~ClothingMaterialLibraryParameters() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingMaterialLibraryParameters::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->~ClothingMaterialLibraryParameters(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingMaterialLibraryParameters::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingMaterialLibraryParameters::getParameterDefinitionTree(void) const +{ + ClothingMaterialLibraryParameters* tmpParam = const_cast<ClothingMaterialLibraryParameters*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingMaterialLibraryParameters::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 ClothingMaterialLibraryParameters::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 ClothingMaterialLibraryParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingMaterialLibraryParameters::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ +/* [1,0] - materials.materialName */ + +void ClothingMaterialLibraryParameters::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 ClothingMaterialLibraryParameters::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="materials" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("materials", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Array of materials that are part of this library.", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + static const uint8_t dynHandleIndices[2] = { 1, 0, }; + ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 2); + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="materials[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("materials", TYPE_STRUCT, "ClothingMaterial", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Array of materials that are part of this library.", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="materials[].materialName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("materialName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Material name", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="materials[].verticalStretchingStiffness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("verticalStretchingStiffness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Vertical stretching stiffness of the cloth in the range (0, 1]. This parameter is ignored by the PhysX 2.8.4 solver.", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="materials[].horizontalStretchingStiffness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("horizontalStretchingStiffness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Horizontal Stretching stiffness of the cloth in the range (0, 1].", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="materials[].bendingStiffness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("bendingStiffness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Bending stiffness of the cloth in the range [0, 1].", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="materials[].shearingStiffness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("shearingStiffness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Shearing stiffness of the cloth in the range [0, 1].", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="materials[].tetherStiffness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("tetherStiffness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Range [0, 1], but should be 0. The higher this value, the more the piece of clothing is allowed to stretch.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="materials[].tetherLimit" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("tetherLimit", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(4.0), true); + HintTable[1].init("min", double(1.0), true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(4.0), true); + HintTable[1].init("min", double(1.0), true); + HintTable[2].init("shortDescription", "Range [1, 4], but should be 1. This scales the restlength of the tether constraints.", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="materials[].orthoBending" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("orthoBending", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Bending is modeled via an angular spring between adjacent triangles. This mode is slower but independent of stretching resistance.\n", true); + HintTable[1].init("shortDescription", "Enable/disable orthogonal bending resistance.", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="materials[].verticalStiffnessScaling" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("verticalStiffnessScaling", TYPE_STRUCT, "StiffnessScaling", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertical stiffness scaling", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="materials[].verticalStiffnessScaling.compressionRange" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("compressionRange", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("longDescription", "For any edge where the simulated length is within the range [restlength, compressionRange*restlength],\nthe scale will be multiplied on top of the regular stiffness.\nThis is can be used to allow the cloth to compress more easily up to a certain limit.\n", true); + HintTable[1].init("max", double(1.0), true); + HintTable[2].init("min", double(0.0), true); + HintTable[3].init("shortDescription", "Multiplier relative to rest length that defines where the stiffness is scaled down to allow compression.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="materials[].verticalStiffnessScaling.stretchRange" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("stretchRange", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("min", double(1.0), true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "For any edge where the simulated length is within the range [restlength, stretchRange*restlength],\nthe scale will be multiplied on top of the regular stiffness.\nThis is can be used to allow the cloth to stretch more easily up to a certain limit.\n", true); + HintTable[1].init("min", double(1.0), true); + HintTable[2].init("shortDescription", "Multiplier relative to rest length that defines the range where the stiffness is scaled down to allow stretching.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="materials[].verticalStiffnessScaling.scale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("scale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Stiffness scale [0, 1] applied when inside the scaling range.", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="materials[].horizontalStiffnessScaling" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("horizontalStiffnessScaling", TYPE_STRUCT, "StiffnessScaling", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Horizontal stiffness scaling", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="materials[].horizontalStiffnessScaling.compressionRange" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("compressionRange", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("longDescription", "For any edge where the simulated length is within the range [restlength, compressionRange*restlength],\nthe scale will be multiplied on top of the regular stiffness.\nThis is can be used to allow the cloth to compress more easily up to a certain limit.\n", true); + HintTable[1].init("max", double(1.0), true); + HintTable[2].init("min", double(0.0), true); + HintTable[3].init("shortDescription", "Multiplier relative to rest length that defines where the stiffness is scaled down to allow compression.", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="materials[].horizontalStiffnessScaling.stretchRange" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("stretchRange", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("min", double(1.0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "For any edge where the simulated length is within the range [restlength, stretchRange*restlength],\nthe scale will be multiplied on top of the regular stiffness.\nThis is can be used to allow the cloth to stretch more easily up to a certain limit.\n", true); + HintTable[1].init("min", double(1.0), true); + HintTable[2].init("shortDescription", "Multiplier relative to rest length that defines the range where the stiffness is scaled down to allow stretching.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="materials[].horizontalStiffnessScaling.scale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("scale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Stiffness scale [0, 1] applied when inside the scaling range.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="materials[].bendingStiffnessScaling" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("bendingStiffnessScaling", TYPE_STRUCT, "StiffnessScaling", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Bending stiffness scaling", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="materials[].bendingStiffnessScaling.compressionRange" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("compressionRange", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("longDescription", "For any edge where the simulated length is within the range [restlength, compressionRange*restlength],\nthe scale will be multiplied on top of the regular stiffness.\nThis is can be used to allow the cloth to compress more easily up to a certain limit.\n", true); + HintTable[1].init("max", double(1.0), true); + HintTable[2].init("min", double(0.0), true); + HintTable[3].init("shortDescription", "Multiplier relative to rest length that defines where the stiffness is scaled down to allow compression.", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="materials[].bendingStiffnessScaling.stretchRange" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("stretchRange", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("min", double(1.0), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "For any edge where the simulated length is within the range [restlength, stretchRange*restlength],\nthe scale will be multiplied on top of the regular stiffness.\nThis is can be used to allow the cloth to stretch more easily up to a certain limit.\n", true); + HintTable[1].init("min", double(1.0), true); + HintTable[2].init("shortDescription", "Multiplier relative to rest length that defines the range where the stiffness is scaled down to allow stretching.", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="materials[].bendingStiffnessScaling.scale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("scale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Stiffness scale [0, 1] applied when inside the scaling range.", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="materials[].shearingStiffnessScaling" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("shearingStiffnessScaling", TYPE_STRUCT, "StiffnessScaling", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Shearing stiffness scaling", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="materials[].shearingStiffnessScaling.compressionRange" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("compressionRange", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("longDescription", "For any edge where the simulated length is within the range [restlength, compressionRange*restlength],\nthe scale will be multiplied on top of the regular stiffness.\nThis is can be used to allow the cloth to compress more easily up to a certain limit.\n", true); + HintTable[1].init("max", double(1.0), true); + HintTable[2].init("min", double(0.0), true); + HintTable[3].init("shortDescription", "Multiplier relative to rest length that defines where the stiffness is scaled down to allow compression.", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="materials[].shearingStiffnessScaling.stretchRange" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("stretchRange", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("min", double(1.0), true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "For any edge where the simulated length is within the range [restlength, stretchRange*restlength],\nthe scale will be multiplied on top of the regular stiffness.\nThis is can be used to allow the cloth to stretch more easily up to a certain limit.\n", true); + HintTable[1].init("min", double(1.0), true); + HintTable[2].init("shortDescription", "Multiplier relative to rest length that defines the range where the stiffness is scaled down to allow stretching.", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="materials[].shearingStiffnessScaling.scale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("scale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Stiffness scale [0, 1] applied when inside the scaling range.", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="materials[].damping" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("damping", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Spring damping of the cloth in the range [0, 1]", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="materials[].stiffnessFrequency" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("stiffnessFrequency", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(500.0), true); + HintTable[1].init("min", double(10.0), true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(500.0), true); + HintTable[1].init("min", double(10.0), true); + HintTable[2].init("shortDescription", "Scales linearity of behavior for the varous stiffness values in the interval (0, 1)", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="materials[].drag" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("drag", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("longDescription", "The drag coefficient is the portion of local frame velocity that is applied to each particle.\n", true); + HintTable[1].init("max", double(1.0), true); + HintTable[2].init("min", double(0.0), true); + HintTable[3].init("shortDescription", "Drag coefficient n the range [0, 1]", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="materials[].comDamping" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("comDamping", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "If set, the global rigid body modes (translation and rotation) are extracted from damping. This way, the cloth\ncan freely move and rotate even under high damping.\n", true); + HintTable[1].init("shortDescription", "Enable/disable center of mass damping of internal velocities.", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="materials[].friction" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("friction", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("longDescription", "Currently only spheres and capsules impose friction on the colliding particles.", true); + HintTable[1].init("max", double(1.0), true); + HintTable[2].init("min", double(0.0), true); + HintTable[3].init("shortDescription", "Friction coefficient in the range [0, 1]", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=32, longName="materials[].massScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; + ParamDef->init("massScale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(100.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("max", double(100.0), true); + HintTable[1].init("min", double(0.0), true); + HintTable[2].init("shortDescription", "Controls the amount of mass scaling during collision [0, 100]", true); + ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=33, longName="materials[].solverIterations" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; + ParamDef->init("solverIterations", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("min", uint64_t(1), true); + ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "Small numbers make the simulation faster while the cloth gets less stiff.\n", true); + HintTable[1].init("min", uint64_t(1), true); + HintTable[2].init("shortDescription", "Number of solver iterations. For 2.x cloth", true); + ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=34, longName="materials[].solverFrequency" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; + ParamDef->init("solverFrequency", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("min", uint64_t(20), true); + ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "Small numbers make the simulation faster while the cloth gets less stiff.\n", true); + HintTable[1].init("min", uint64_t(20), true); + HintTable[2].init("shortDescription", "Number of solver iterations per second. For 3.x cloth", true); + ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=35, longName="materials[].gravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; + ParamDef->init("gravityScale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "A value of 0 will make the cloth ignore gravity, a value of 10 will apply 10 times the gravity.\n", true); + HintTable[1].init("shortDescription", "Amount of gravity that is applied to the cloth.", true); + ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=36, longName="materials[].inertiaScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; + ParamDef->init("inertiaScale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("longDescription", "A value of 0 will make the cloth move in global space without inertia, a value of 1 will keep all inertia.\n", true); + HintTable[1].init("max", double(1.0), true); + HintTable[2].init("min", double(0.0), true); + HintTable[3].init("shortDescription", "Amount of inertia that is kept when using local space simulation.", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=37, longName="materials[].hardStretchLimitation" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; + ParamDef->init("hardStretchLimitation", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(2.0), true); + HintTable[1].init("min", double(0.0), true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("longDescription", "Good values are usually between 1 and 1.1. Any value >= 1 will guarantee that a certain set of edges is not longer\nthan that value times the initial rest length.\n", true); + HintTable[1].init("max", double(2.0), true); + HintTable[2].init("min", double(0.0), true); + HintTable[3].init("shortDescription", "Make cloth simulation less stretchy. A value smaller than 1 will turn it off.", true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=38, longName="materials[].maxDistanceBias" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; + ParamDef->init("maxDistanceBias", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("max", double(1.0), true); + HintTable[1].init("min", double(-1.0), true); + ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("longDescription", "A value smaller than 0 will turn the sphere into a capsule and eventually a line (at value -1) along the normal of the vertex.\nA value bigger than 0 will turn the sphere into a disc.\n", true); + HintTable[1].init("max", double(1.0), true); + HintTable[2].init("min", double(-1.0), true); + HintTable[3].init("shortDescription", "Deform the max distance sphere into a capsule or a disc.", true); + ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=39, longName="materials[].hierarchicalSolverIterations" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; + ParamDef->init("hierarchicalSolverIterations", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("min", uint64_t(0), true); + ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("min", uint64_t(0), true); + HintTable[1].init("shortDescription", "Number of iterations of the hierarchical cloth solver.", true); + ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=40, longName="materials[].selfcollisionThickness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[40]; + ParamDef->init("selfcollisionThickness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This feature prevents meshes from self-intersecting. Only works properly when configured properly.", true); + HintTable[1].init("shortDescription", "Minimal amount of distance particles will keep of each other.", true); + ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=41, longName="materials[].selfcollisionSquashScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[41]; + ParamDef->init("selfcollisionSquashScale", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This feature prevents self collision thickness becoming too high for low resolution cloth.", true); + HintTable[1].init("shortDescription", "Amount of thickness scaling along surface normal.", true); + ParamDefTable[41].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=42, longName="materials[].selfcollisionStiffness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[42]; + ParamDef->init("selfcollisionStiffness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This feature prevents meshes from self-intersecting. Only works properly when configured properly.", true); + HintTable[1].init("shortDescription", "Stiffness of self collision solver.", true); + ParamDefTable[42].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(1); + + ParamDefTable[0].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=1, longName="materials" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(2); + + ParamDefTable[1].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=2, longName="materials[]" + { + static Definition* Children[28]; + Children[0] = PDEF_PTR(3); + Children[1] = PDEF_PTR(4); + Children[2] = PDEF_PTR(5); + Children[3] = PDEF_PTR(6); + Children[4] = PDEF_PTR(7); + Children[5] = PDEF_PTR(8); + Children[6] = PDEF_PTR(9); + Children[7] = PDEF_PTR(10); + Children[8] = PDEF_PTR(11); + Children[9] = PDEF_PTR(15); + Children[10] = PDEF_PTR(19); + Children[11] = PDEF_PTR(23); + Children[12] = PDEF_PTR(27); + Children[13] = PDEF_PTR(28); + Children[14] = PDEF_PTR(29); + Children[15] = PDEF_PTR(30); + Children[16] = PDEF_PTR(31); + Children[17] = PDEF_PTR(32); + Children[18] = PDEF_PTR(33); + Children[19] = PDEF_PTR(34); + Children[20] = PDEF_PTR(35); + Children[21] = PDEF_PTR(36); + Children[22] = PDEF_PTR(37); + Children[23] = PDEF_PTR(38); + Children[24] = PDEF_PTR(39); + Children[25] = PDEF_PTR(40); + Children[26] = PDEF_PTR(41); + Children[27] = PDEF_PTR(42); + + ParamDefTable[2].setChildren(Children, 28); + } + + // SetChildren for: nodeIndex=11, longName="materials[].verticalStiffnessScaling" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(12); + Children[1] = PDEF_PTR(13); + Children[2] = PDEF_PTR(14); + + ParamDefTable[11].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=15, longName="materials[].horizontalStiffnessScaling" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(16); + Children[1] = PDEF_PTR(17); + Children[2] = PDEF_PTR(18); + + ParamDefTable[15].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=19, longName="materials[].bendingStiffnessScaling" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(20); + Children[1] = PDEF_PTR(21); + Children[2] = PDEF_PTR(22); + + ParamDefTable[19].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=23, longName="materials[].shearingStiffnessScaling" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(24); + Children[1] = PDEF_PTR(25); + Children[2] = PDEF_PTR(26); + + ParamDefTable[23].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void ClothingMaterialLibraryParameters::initStrings(void) +{ +} + +void ClothingMaterialLibraryParameters::initDynamicArrays(void) +{ + materials.buf = NULL; + materials.isAllocated = true; + materials.elementSize = sizeof(ClothingMaterial_Type); + materials.arraySizes[0] = 0; +} + +void ClothingMaterialLibraryParameters::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingMaterialLibraryParameters::initReferences(void) +{ +} + +void ClothingMaterialLibraryParameters::freeDynamicArrays(void) +{ + if (materials.isAllocated && materials.buf) + { + mParameterizedTraits->free(materials.buf); + } +} + +void ClothingMaterialLibraryParameters::freeStrings(void) +{ + + for (int i = 0; i < materials.arraySizes[0]; ++i) + { + if (materials.buf[i].materialName.isAllocated && materials.buf[i].materialName.buf) + { + mParameterizedTraits->strfree((char*)materials.buf[i].materialName.buf); + } + } +} + +void ClothingMaterialLibraryParameters::freeReferences(void) +{ +} + +} // namespace clothing +} // namespace nvidia diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingModuleParameters.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingModuleParameters.cpp new file mode 100644 index 00000000..b6e4e0e6 --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingModuleParameters.cpp @@ -0,0 +1,583 @@ +// 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 "ClothingModuleParameters.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingModuleParametersNS; + +const char* const ClothingModuleParametersFactory::vptr = + NvParameterized::getVptr<ClothingModuleParameters, ClothingModuleParameters::ClassAlignment>(); + +const uint32_t NumParamDefs = 12; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 11 }, + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxNumCompartments), NULL, 0 }, // maxNumCompartments + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxUnusedPhysXResources), NULL, 0 }, // maxUnusedPhysXResources + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->allowAsyncCooking), NULL, 0 }, // allowAsyncCooking + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->asyncFetchResults), NULL, 0 }, // asyncFetchResults + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->avgSimFrequencyWindow), NULL, 0 }, // avgSimFrequencyWindow + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->allowApexWorkBetweenSubsteps), NULL, 0 }, // allowApexWorkBetweenSubsteps + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->interCollisionDistance), NULL, 0 }, // interCollisionDistance + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->interCollisionStiffness), NULL, 0 }, // interCollisionStiffness + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->interCollisionIterations), NULL, 0 }, // interCollisionIterations + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->sparseSelfCollision), NULL, 0 }, // sparseSelfCollision + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxTimeRenderProxyInPool), NULL, 0 }, // maxTimeRenderProxyInPool +}; + + +bool ClothingModuleParameters::mBuiltFlag = false; +NvParameterized::MutexType ClothingModuleParameters::mBuiltFlagMutex; + +ClothingModuleParameters::ClothingModuleParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingModuleParametersFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingModuleParameters::~ClothingModuleParameters() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingModuleParameters::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->~ClothingModuleParameters(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingModuleParameters::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingModuleParameters::getParameterDefinitionTree(void) const +{ + ClothingModuleParameters* tmpParam = const_cast<ClothingModuleParameters*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingModuleParameters::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 ClothingModuleParameters::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 ClothingModuleParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingModuleParameters::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void ClothingModuleParameters::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 ClothingModuleParameters::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); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "This class is used for initializing the NxModuleClothing.", true); + ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=1, longName="maxNumCompartments" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("maxNumCompartments", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValueConsoles", uint64_t(0), true); + HintTable[1].init("defaultValueWindows", uint64_t(4), true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValueConsoles", uint64_t(0), true); + HintTable[1].init("defaultValueWindows", uint64_t(4), true); + HintTable[2].init("longDescription", "To parallelize work hw cloth, sw cloth, hw softbodies and sw softbodies are distributed into different compartments. For each type maximally maxNumCompartments compartments are created in a scene.", true); + HintTable[3].init("shortDescription", "Maximum number of compartments to distribute the cloths and softbodies of the same type. Works only with PhysX 2.8.4", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="maxUnusedPhysXResources" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("maxUnusedPhysXResources", 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", "Not used instances are generated when NxClothingActors are released or their benefit is not high enough to allow simulation. Then they will return the NxCloth/NxSoftBody and the list of NxActors to their asset where it will be cached until another NxClothingActor needs them.", true); + HintTable[1].init("shortDescription", "Maximum number of NxCloth/NxSoftBody instances that are not used.", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="allowAsyncCooking" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("allowAsyncCooking", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "This can be turned off if unexpected bugs/crashes occur.", true); + HintTable[1].init("shortDescription", "ClothingActors will cook in a background thread to speed up creation time.", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="asyncFetchResults" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("asyncFetchResults", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Note that ApexPostTickTime from the scene stats will not be correct if true. Caution: Do not set this to false when simulate and/or fetchResults is called from a PxTask. fetchResults can block and wait for other tasks in this case, which can cause a deadlock if the dispatcher is using only 1 workerthread.", true); + HintTable[1].init("shortDescription", "Let fetch results tasks run longer than the fetchResults call, they will block at the next updateRenderResource call.", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="avgSimFrequencyWindow" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("avgSimFrequencyWindow", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Average Simulation Frequency is estimated with the last n frames", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="allowApexWorkBetweenSubsteps" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("allowApexWorkBetweenSubsteps", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "The clothing module can interpolate matrices between substeps. However, for this APEX needs to call simulate/fetchResults several times per frame. This causes problems if physX particles are handled by the application in the same scene. The application needs to be able to read particle buffers with deletion IDs after each fetchResults, which is not possible in that case. Use allowApexWorkBetweenSubsteps to enable matrix interpolation between substeps.", true); + HintTable[1].init("shortDescription", "Allow APEX SDK to interpolate clothing matrices between the substeps.", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="interCollisionDistance" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("interCollisionDistance", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Experimental. Set the radius to 0.0 to disable inter-collision.", true); + HintTable[1].init("shortDescription", "Experimental. Radius of the collision between different clothing actors. (3.x solver mode)", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="interCollisionStiffness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("interCollisionStiffness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Experimental. Stiffness of the collision between different clothing actors. (3.x solver mode)", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="interCollisionIterations" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("interCollisionIterations", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Experimental. Number of Iterations for the collision between different clothing actors. (3.x solver mode)", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="sparseSelfCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("sparseSelfCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Experimental. The particle subset is part of the cooked data and depends on the assets selfCollision radius.", true); + HintTable[1].init("shortDescription", "Experimental. Only use a subset of particles for self-collision. (3.x solver mode)", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="maxTimeRenderProxyInPool" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("maxTimeRenderProxyInPool", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Maximum number of frames a RenderProxy object can stay the object pool before the memory is released", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[11]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(2); + Children[2] = PDEF_PTR(3); + Children[3] = PDEF_PTR(4); + Children[4] = PDEF_PTR(5); + Children[5] = PDEF_PTR(6); + Children[6] = PDEF_PTR(7); + Children[7] = PDEF_PTR(8); + Children[8] = PDEF_PTR(9); + Children[9] = PDEF_PTR(10); + Children[10] = PDEF_PTR(11); + + ParamDefTable[0].setChildren(Children, 11); + } + + mBuiltFlag = true; + +} +void ClothingModuleParameters::initStrings(void) +{ +} + +void ClothingModuleParameters::initDynamicArrays(void) +{ +} + +void ClothingModuleParameters::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + maxNumCompartments = uint32_t(4); + maxUnusedPhysXResources = uint32_t(5); + allowAsyncCooking = bool(true); + asyncFetchResults = bool(true); + avgSimFrequencyWindow = uint32_t(60); + allowApexWorkBetweenSubsteps = bool(false); + interCollisionDistance = float(0.0); + interCollisionStiffness = float(1.0); + interCollisionIterations = uint32_t(1); + sparseSelfCollision = bool(false); + maxTimeRenderProxyInPool = uint32_t(100); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingModuleParameters::initReferences(void) +{ +} + +void ClothingModuleParameters::freeDynamicArrays(void) +{ +} + +void ClothingModuleParameters::freeStrings(void) +{ +} + +void ClothingModuleParameters::freeReferences(void) +{ +} + +} // namespace clothing +} // namespace nvidia diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingPhysicalMeshParameters.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingPhysicalMeshParameters.cpp new file mode 100644 index 00000000..de67c1a9 --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingPhysicalMeshParameters.cpp @@ -0,0 +1,2418 @@ +// 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 "ClothingPhysicalMeshParameters.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingPhysicalMeshParametersNS; + +const char* const ClothingPhysicalMeshParametersFactory::vptr = + NvParameterized::getVptr<ClothingPhysicalMeshParameters, ClothingPhysicalMeshParameters::ClassAlignment>(); + +const uint32_t NumParamDefs = 74; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 35, 43, 52, 53, 54, 62, 71, 72, 73, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 19, 21, 23, + 25, 26, 27, 29, 30, 31, 32, 33, 34, 9, 11, 13, 15, 16, 17, 18, 20, 22, 24, 28, 36, + 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 55, 56, 57, 58, 59, 60, 61, + 63, 64, 65, 66, 67, 68, 69, 70, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 10 }, + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->physicalMesh), CHILDREN(10), 22 }, // physicalMesh + { TYPE_U32, false, (size_t)(&((PhysicalMesh_Type*)0)->numVertices), NULL, 0 }, // physicalMesh.numVertices + { TYPE_U32, false, (size_t)(&((PhysicalMesh_Type*)0)->numSimulatedVertices), NULL, 0 }, // physicalMesh.numSimulatedVertices + { TYPE_U32, false, (size_t)(&((PhysicalMesh_Type*)0)->numMaxDistance0Vertices), NULL, 0 }, // physicalMesh.numMaxDistance0Vertices + { TYPE_U32, false, (size_t)(&((PhysicalMesh_Type*)0)->numIndices), NULL, 0 }, // physicalMesh.numIndices + { TYPE_U32, false, (size_t)(&((PhysicalMesh_Type*)0)->numSimulatedIndices), NULL, 0 }, // physicalMesh.numSimulatedIndices + { TYPE_U32, false, (size_t)(&((PhysicalMesh_Type*)0)->numBonesPerVertex), NULL, 0 }, // physicalMesh.numBonesPerVertex + { TYPE_ARRAY, true, (size_t)(&((PhysicalMesh_Type*)0)->vertices), CHILDREN(32), 1 }, // physicalMesh.vertices + { TYPE_VEC3, false, 1 * sizeof(physx::PxVec3), NULL, 0 }, // physicalMesh.vertices[] + { TYPE_ARRAY, true, (size_t)(&((PhysicalMesh_Type*)0)->normals), CHILDREN(33), 1 }, // physicalMesh.normals + { TYPE_VEC3, false, 1 * sizeof(physx::PxVec3), NULL, 0 }, // physicalMesh.normals[] + { TYPE_ARRAY, true, (size_t)(&((PhysicalMesh_Type*)0)->skinningNormals), CHILDREN(34), 1 }, // physicalMesh.skinningNormals + { TYPE_VEC3, false, 1 * sizeof(physx::PxVec3), NULL, 0 }, // physicalMesh.skinningNormals[] + { TYPE_ARRAY, true, (size_t)(&((PhysicalMesh_Type*)0)->constrainCoefficients), CHILDREN(35), 1 }, // physicalMesh.constrainCoefficients + { TYPE_STRUCT, false, 1 * sizeof(ConstrainCoefficient_Type), CHILDREN(36), 3 }, // physicalMesh.constrainCoefficients[] + { TYPE_F32, false, (size_t)(&((ConstrainCoefficient_Type*)0)->maxDistance), NULL, 0 }, // physicalMesh.constrainCoefficients[].maxDistance + { TYPE_F32, false, (size_t)(&((ConstrainCoefficient_Type*)0)->collisionSphereRadius), NULL, 0 }, // physicalMesh.constrainCoefficients[].collisionSphereRadius + { TYPE_F32, false, (size_t)(&((ConstrainCoefficient_Type*)0)->collisionSphereDistance), NULL, 0 }, // physicalMesh.constrainCoefficients[].collisionSphereDistance + { TYPE_ARRAY, true, (size_t)(&((PhysicalMesh_Type*)0)->boneIndices), CHILDREN(39), 1 }, // physicalMesh.boneIndices + { TYPE_U16, false, 1 * sizeof(uint16_t), NULL, 0 }, // physicalMesh.boneIndices[] + { TYPE_ARRAY, true, (size_t)(&((PhysicalMesh_Type*)0)->boneWeights), CHILDREN(40), 1 }, // physicalMesh.boneWeights + { TYPE_F32, false, 1 * sizeof(float), NULL, 0 }, // physicalMesh.boneWeights[] + { TYPE_ARRAY, true, (size_t)(&((PhysicalMesh_Type*)0)->optimizationData), CHILDREN(41), 1 }, // physicalMesh.optimizationData + { TYPE_U8, false, 1 * sizeof(uint8_t), NULL, 0 }, // physicalMesh.optimizationData[] + { TYPE_BOOL, false, (size_t)(&((PhysicalMesh_Type*)0)->hasNegativeBackstop), NULL, 0 }, // physicalMesh.hasNegativeBackstop + { TYPE_BOOL, false, (size_t)(&((PhysicalMesh_Type*)0)->isClosed), NULL, 0 }, // physicalMesh.isClosed + { TYPE_ARRAY, true, (size_t)(&((PhysicalMesh_Type*)0)->indices), CHILDREN(42), 1 }, // physicalMesh.indices + { TYPE_U32, false, 1 * sizeof(uint32_t), NULL, 0 }, // physicalMesh.indices[] + { TYPE_F32, false, (size_t)(&((PhysicalMesh_Type*)0)->maximumMaxDistance), NULL, 0 }, // physicalMesh.maximumMaxDistance + { TYPE_U32, false, (size_t)(&((PhysicalMesh_Type*)0)->physicalMeshSorting), NULL, 0 }, // physicalMesh.physicalMeshSorting + { TYPE_F32, false, (size_t)(&((PhysicalMesh_Type*)0)->shortestEdgeLength), NULL, 0 }, // physicalMesh.shortestEdgeLength + { TYPE_F32, false, (size_t)(&((PhysicalMesh_Type*)0)->averageEdgeLength), NULL, 0 }, // physicalMesh.averageEdgeLength + { TYPE_BOOL, false, (size_t)(&((PhysicalMesh_Type*)0)->isTetrahedralMesh), NULL, 0 }, // physicalMesh.isTetrahedralMesh + { TYPE_BOOL, false, (size_t)(&((PhysicalMesh_Type*)0)->flipNormals), NULL, 0 }, // physicalMesh.flipNormals + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->transitionUpB), CHILDREN(43), 1 }, // transitionUpB + { TYPE_STRUCT, false, 1 * sizeof(SkinClothMapB_Type), CHILDREN(44), 6 }, // transitionUpB[] + { TYPE_VEC3, false, (size_t)(&((SkinClothMapB_Type*)0)->vtxTetraBary), NULL, 0 }, // transitionUpB[].vtxTetraBary + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->vertexIndexPlusOffset), NULL, 0 }, // transitionUpB[].vertexIndexPlusOffset + { TYPE_VEC3, false, (size_t)(&((SkinClothMapB_Type*)0)->nrmTetraBary), NULL, 0 }, // transitionUpB[].nrmTetraBary + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->faceIndex0), NULL, 0 }, // transitionUpB[].faceIndex0 + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->tetraIndex), NULL, 0 }, // transitionUpB[].tetraIndex + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->submeshIndex), NULL, 0 }, // transitionUpB[].submeshIndex + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->transitionUp), CHILDREN(50), 1 }, // transitionUp + { TYPE_STRUCT, false, 1 * sizeof(SkinClothMapD_Type), CHILDREN(51), 7 }, // transitionUp[] + { TYPE_VEC3, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexBary), NULL, 0 }, // transitionUp[].vertexBary + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndex0), NULL, 0 }, // transitionUp[].vertexIndex0 + { TYPE_VEC3, false, (size_t)(&((SkinClothMapD_Type*)0)->normalBary), NULL, 0 }, // transitionUp[].normalBary + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndex1), NULL, 0 }, // transitionUp[].vertexIndex1 + { TYPE_VEC3, false, (size_t)(&((SkinClothMapD_Type*)0)->tangentBary), NULL, 0 }, // transitionUp[].tangentBary + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndex2), NULL, 0 }, // transitionUp[].vertexIndex2 + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndexPlusOffset), NULL, 0 }, // transitionUp[].vertexIndexPlusOffset + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->transitionUpThickness), NULL, 0 }, // transitionUpThickness + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->transitionUpOffset), NULL, 0 }, // transitionUpOffset + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->transitionDownB), CHILDREN(58), 1 }, // transitionDownB + { TYPE_STRUCT, false, 1 * sizeof(SkinClothMapB_Type), CHILDREN(59), 6 }, // transitionDownB[] + { TYPE_VEC3, false, (size_t)(&((SkinClothMapB_Type*)0)->vtxTetraBary), NULL, 0 }, // transitionDownB[].vtxTetraBary + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->vertexIndexPlusOffset), NULL, 0 }, // transitionDownB[].vertexIndexPlusOffset + { TYPE_VEC3, false, (size_t)(&((SkinClothMapB_Type*)0)->nrmTetraBary), NULL, 0 }, // transitionDownB[].nrmTetraBary + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->faceIndex0), NULL, 0 }, // transitionDownB[].faceIndex0 + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->tetraIndex), NULL, 0 }, // transitionDownB[].tetraIndex + { TYPE_U32, false, (size_t)(&((SkinClothMapB_Type*)0)->submeshIndex), NULL, 0 }, // transitionDownB[].submeshIndex + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->transitionDown), CHILDREN(65), 1 }, // transitionDown + { TYPE_STRUCT, false, 1 * sizeof(SkinClothMapD_Type), CHILDREN(66), 7 }, // transitionDown[] + { TYPE_VEC3, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexBary), NULL, 0 }, // transitionDown[].vertexBary + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndex0), NULL, 0 }, // transitionDown[].vertexIndex0 + { TYPE_VEC3, false, (size_t)(&((SkinClothMapD_Type*)0)->normalBary), NULL, 0 }, // transitionDown[].normalBary + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndex1), NULL, 0 }, // transitionDown[].vertexIndex1 + { TYPE_VEC3, false, (size_t)(&((SkinClothMapD_Type*)0)->tangentBary), NULL, 0 }, // transitionDown[].tangentBary + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndex2), NULL, 0 }, // transitionDown[].vertexIndex2 + { TYPE_U32, false, (size_t)(&((SkinClothMapD_Type*)0)->vertexIndexPlusOffset), NULL, 0 }, // transitionDown[].vertexIndexPlusOffset + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->transitionDownThickness), NULL, 0 }, // transitionDownThickness + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->transitionDownOffset), NULL, 0 }, // transitionDownOffset + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->referenceCount), NULL, 0 }, // referenceCount +}; + + +bool ClothingPhysicalMeshParameters::mBuiltFlag = false; +NvParameterized::MutexType ClothingPhysicalMeshParameters::mBuiltFlagMutex; + +ClothingPhysicalMeshParameters::ClothingPhysicalMeshParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingPhysicalMeshParametersFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingPhysicalMeshParameters::~ClothingPhysicalMeshParameters() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingPhysicalMeshParameters::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->~ClothingPhysicalMeshParameters(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingPhysicalMeshParameters::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingPhysicalMeshParameters::getParameterDefinitionTree(void) const +{ + ClothingPhysicalMeshParameters* tmpParam = const_cast<ClothingPhysicalMeshParameters*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingPhysicalMeshParameters::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 ClothingPhysicalMeshParameters::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 ClothingPhysicalMeshParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingPhysicalMeshParameters::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void ClothingPhysicalMeshParameters::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 ClothingPhysicalMeshParameters::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="physicalMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("physicalMesh", TYPE_STRUCT, "PhysicalMesh", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The physical mesh data.", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="physicalMesh.numVertices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("numVertices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Number of vertices of this mesh", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="physicalMesh.numSimulatedVertices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("numSimulatedVertices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Number of simulated vertices of this mesh", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="physicalMesh.numMaxDistance0Vertices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("numMaxDistance0Vertices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Number of vertices that have max distance set to 0", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="physicalMesh.numIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("numIndices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Number of indices of this mesh", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="physicalMesh.numSimulatedIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("numSimulatedIndices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Number of simulated indices of this mesh", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="physicalMesh.numBonesPerVertex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("numBonesPerVertex", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Number of bone weights/indices per vertex", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="physicalMesh.vertices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("vertices", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("shortDescription", "Array of vertices", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[8].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="physicalMesh.vertices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("vertices", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("shortDescription", "Array of vertices", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="physicalMesh.normals" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("normals", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "These are the normals provided by the user. The mesh-mesh skinning will try to restore them as good\nas possible throughout simulation. Note, they can differ from the skinningNormals quite drastically.\n", true); + HintTable[2].init("shortDescription", "Array of normals", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[10].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="physicalMesh.normals[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("normals", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "These are the normals provided by the user. The mesh-mesh skinning will try to restore them as good\nas possible throughout simulation. Note, they can differ from the skinningNormals quite drastically.\n", true); + HintTable[2].init("shortDescription", "Array of normals", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="physicalMesh.skinningNormals" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("skinningNormals", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "These are the normals of the original mesh. They reflect what should come out of physics but the output\ncan be distorted because parts of the simulation mesh are turned off, resulting in wrong normal computation.\nThey are needed for the flags.CorrectSimulationNormals actorflag.\n", true); + HintTable[2].init("shortDescription", "Array of skinning normals", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[12].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="physicalMesh.skinningNormals[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("skinningNormals", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "These are the normals of the original mesh. They reflect what should come out of physics but the output\ncan be distorted because parts of the simulation mesh are turned off, resulting in wrong normal computation.\nThey are needed for the flags.CorrectSimulationNormals actorflag.\n", true); + HintTable[2].init("shortDescription", "Array of skinning normals", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="physicalMesh.constrainCoefficients" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("constrainCoefficients", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "These are not provided but computed by copying values from the graphical mesh to the physical mesh.\n", true); + HintTable[2].init("shortDescription", "The clothing constrain coefficients for this mesh.", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[14].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="physicalMesh.constrainCoefficients[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("constrainCoefficients", TYPE_STRUCT, "ConstrainCoefficient", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "These are not provided but computed by copying values from the graphical mesh to the physical mesh.\n", true); + HintTable[2].init("shortDescription", "The clothing constrain coefficients for this mesh.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="physicalMesh.constrainCoefficients[].maxDistance" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("maxDistance", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Maximum distance this vertex is allowed to travel from its skinned position.", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="physicalMesh.constrainCoefficients[].collisionSphereRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("collisionSphereRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Size of the Backstop collision sphere.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="physicalMesh.constrainCoefficients[].collisionSphereDistance" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionSphereDistance", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Distance of the Backstop collision sphere.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="physicalMesh.boneIndices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("boneIndices", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Note: contains numVertices * numBonesPerVertex elements.\n", true); + HintTable[2].init("shortDescription", "The bone indices per vertex", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[19].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="physicalMesh.boneIndices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("boneIndices", TYPE_U16, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Note: contains numVertices * numBonesPerVertex elements.\n", true); + HintTable[2].init("shortDescription", "The bone indices per vertex", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="physicalMesh.boneWeights" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("boneWeights", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Note: contains numVertices * numBonesPerVertex elements.\n", true); + HintTable[2].init("shortDescription", "The bone weights per vertex", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[21].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="physicalMesh.boneWeights[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("boneWeights", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Note: contains numVertices * numBonesPerVertex elements.\n", true); + HintTable[2].init("shortDescription", "The bone weights per vertex", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="physicalMesh.optimizationData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("optimizationData", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Each byte contains info for 2 vertices.\nbits 0-3: number of actual bones for that vertex (with boneWeight > 0)\nbit 4: set if that vertex has a negative backstop\nbits 5-7: same data for next vertex\n", true); + HintTable[2].init("shortDescription", "Per Vertex Number of boneweights > 0, bool if it has negative collision distance", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[23].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="physicalMesh.optimizationData[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("optimizationData", TYPE_U8, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("longDescription", "Each byte contains info for 2 vertices.\nbits 0-3: number of actual bones for that vertex (with boneWeight > 0)\nbit 4: set if that vertex has a negative backstop\nbits 5-7: same data for next vertex\n", true); + HintTable[2].init("shortDescription", "Per Vertex Number of boneweights > 0, bool if it has negative collision distance", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="physicalMesh.hasNegativeBackstop" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("hasNegativeBackstop", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "True if at least 1 has negative collision distance", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="physicalMesh.isClosed" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("isClosed", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "True if all edges have two adjacent triangles", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="physicalMesh.indices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("indices", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("shortDescription", "The index buffer", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[27].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="physicalMesh.indices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("indices", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("NOPVD", uint64_t(1), true); + HintTable[1].init("shortDescription", "The index buffer", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="physicalMesh.maximumMaxDistance" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("maximumMaxDistance", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The maximum max-distance value for all the vertices.", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="physicalMesh.physicalMeshSorting" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("physicalMeshSorting", 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 sorting", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="physicalMesh.shortestEdgeLength" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("shortestEdgeLength", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Mesh statistic, only needed for debug rendering.", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=32, longName="physicalMesh.averageEdgeLength" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; + ParamDef->init("averageEdgeLength", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Mesh statistic, useful for selecting the thickness of the mesh-mesh skinning.", true); + ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=33, longName="physicalMesh.isTetrahedralMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; + ParamDef->init("isTetrahedralMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Are we storing triangles or tetrahedrons in this mesh.", true); + ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=34, longName="physicalMesh.flipNormals" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; + ParamDef->init("flipNormals", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "True when the model has been transformed to left-handed space.", true); + ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=35, longName="transitionUpB" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; + ParamDef->init("transitionUpB", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Transition between this and the next graphical LoD.", true); + ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[35].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=36, longName="transitionUpB[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; + ParamDef->init("transitionUpB", TYPE_STRUCT, "SkinClothMapB", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Transition between this and the next graphical LoD.", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=37, longName="transitionUpB[].vtxTetraBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; + ParamDef->init("vtxTetraBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate into the implicit tetrahedron.", true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=38, longName="transitionUpB[].vertexIndexPlusOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; + ParamDef->init("vertexIndexPlusOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The vertex index in the graphical mesh (the target index).", true); + ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=39, longName="transitionUpB[].nrmTetraBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; + ParamDef->init("nrmTetraBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (vertex+normal). When vertex is subtracted this will result in the normal again.", true); + ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=40, longName="transitionUpB[].faceIndex0" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[40]; + ParamDef->init("faceIndex0", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "First index of the 3 consecutive indices making the physical triangle.", true); + ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=41, longName="transitionUpB[].tetraIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[41]; + ParamDef->init("tetraIndex", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Selects which of the 6 implicit tetrahedrons is used for the mapping.", true); + ParamDefTable[41].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=42, longName="transitionUpB[].submeshIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[42]; + ParamDef->init("submeshIndex", TYPE_U32, 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[42].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + HintTable[1].init("longDescription", "This is only needed during the authoring stage and thus does not need to be serialized.", true); + HintTable[2].init("shortDescription", "Index into which Physical Submesh/LoD this element of the mapping belongs to.", true); + ParamDefTable[42].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=43, longName="transitionUp" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[43]; + ParamDef->init("transitionUp", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Transition between this and the next graphical LoD.", true); + ParamDefTable[43].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[43].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=44, longName="transitionUp[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[44]; + ParamDef->init("transitionUp", TYPE_STRUCT, "SkinClothMapD", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Transition between this and the next graphical LoD.", true); + ParamDefTable[44].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=45, longName="transitionUp[].vertexBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[45]; + ParamDef->init("vertexBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate into the triangle.", true); + ParamDefTable[45].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=46, longName="transitionUp[].vertexIndex0" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[46]; + ParamDef->init("vertexIndex0", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex index of the physics triangle.", true); + ParamDefTable[46].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=47, longName="transitionUp[].normalBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[47]; + ParamDef->init("normalBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (vertex+normal). When vertex is subtracted this will result in the normal again.", true); + ParamDefTable[47].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=48, longName="transitionUp[].vertexIndex1" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[48]; + ParamDef->init("vertexIndex1", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex index of the physics triangle.", true); + ParamDefTable[48].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=49, longName="transitionUp[].tangentBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[49]; + ParamDef->init("tangentBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (position+tangent). When position is subtracted this will result in the tangent again.", true); + ParamDefTable[49].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=50, longName="transitionUp[].vertexIndex2" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[50]; + ParamDef->init("vertexIndex2", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex index of the physics triangle.", true); + ParamDefTable[50].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=51, longName="transitionUp[].vertexIndexPlusOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[51]; + ParamDef->init("vertexIndexPlusOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The vertex index in the graphical mesh (the target index).", true); + ParamDefTable[51].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=52, longName="transitionUpThickness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[52]; + ParamDef->init("transitionUpThickness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The thickness of the transition map", true); + ParamDefTable[52].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=53, longName="transitionUpOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[53]; + ParamDef->init("transitionUpOffset", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The normal offset of the transition map", true); + ParamDefTable[53].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=54, longName="transitionDownB" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[54]; + ParamDef->init("transitionDownB", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Transition between this and the previous graphical LoD.", true); + ParamDefTable[54].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[54].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=55, longName="transitionDownB[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[55]; + ParamDef->init("transitionDownB", TYPE_STRUCT, "SkinClothMapB", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Transition between this and the previous graphical LoD.", true); + ParamDefTable[55].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=56, longName="transitionDownB[].vtxTetraBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[56]; + ParamDef->init("vtxTetraBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate into the implicit tetrahedron.", true); + ParamDefTable[56].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=57, longName="transitionDownB[].vertexIndexPlusOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[57]; + ParamDef->init("vertexIndexPlusOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The vertex index in the graphical mesh (the target index).", true); + ParamDefTable[57].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=58, longName="transitionDownB[].nrmTetraBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[58]; + ParamDef->init("nrmTetraBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (vertex+normal). When vertex is subtracted this will result in the normal again.", true); + ParamDefTable[58].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=59, longName="transitionDownB[].faceIndex0" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[59]; + ParamDef->init("faceIndex0", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "First index of the 3 consecutive indices making the physical triangle.", true); + ParamDefTable[59].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=60, longName="transitionDownB[].tetraIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[60]; + ParamDef->init("tetraIndex", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Selects which of the 6 implicit tetrahedrons is used for the mapping.", true); + ParamDefTable[60].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=61, longName="transitionDownB[].submeshIndex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[61]; + ParamDef->init("submeshIndex", TYPE_U32, 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[61].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("DONOTSERIALIZE", uint64_t(1), true); + HintTable[1].init("longDescription", "This is only needed during the authoring stage and thus does not need to be serialized.", true); + HintTable[2].init("shortDescription", "Index into which Physical Submesh/LoD this element of the mapping belongs to.", true); + ParamDefTable[61].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=62, longName="transitionDown" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[62]; + ParamDef->init("transitionDown", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Transition between this and the previous graphical LoD.", true); + ParamDefTable[62].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + ParamDefTable[62].setAlignment(16); + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=63, longName="transitionDown[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[63]; + ParamDef->init("transitionDown", TYPE_STRUCT, "SkinClothMapD", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Transition between this and the previous graphical LoD.", true); + ParamDefTable[63].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=64, longName="transitionDown[].vertexBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[64]; + ParamDef->init("vertexBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate into the triangle.", true); + ParamDefTable[64].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=65, longName="transitionDown[].vertexIndex0" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[65]; + ParamDef->init("vertexIndex0", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex index of the physics triangle.", true); + ParamDefTable[65].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=66, longName="transitionDown[].normalBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[66]; + ParamDef->init("normalBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (vertex+normal). When vertex is subtracted this will result in the normal again.", true); + ParamDefTable[66].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=67, longName="transitionDown[].vertexIndex1" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[67]; + ParamDef->init("vertexIndex1", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex index of the physics triangle.", true); + ParamDefTable[67].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=68, longName="transitionDown[].tangentBary" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[68]; + ParamDef->init("tangentBary", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The barycentric coordinate of (position+tangent). When position is subtracted this will result in the tangent again.", true); + ParamDefTable[68].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=69, longName="transitionDown[].vertexIndex2" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[69]; + ParamDef->init("vertexIndex2", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Vertex index of the physics triangle.", true); + ParamDefTable[69].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=70, longName="transitionDown[].vertexIndexPlusOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[70]; + ParamDef->init("vertexIndexPlusOffset", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The vertex index in the graphical mesh (the target index).", true); + ParamDefTable[70].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=71, longName="transitionDownThickness" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[71]; + ParamDef->init("transitionDownThickness", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The thickness of the transition map", true); + ParamDefTable[71].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=72, longName="transitionDownOffset" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[72]; + ParamDef->init("transitionDownOffset", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "The normal offset of the transition map", true); + ParamDefTable[72].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=73, longName="referenceCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[73]; + ParamDef->init("referenceCount", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("READONLY", uint64_t(1), true); + ParamDefTable[73].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("READONLY", uint64_t(1), true); + HintTable[1].init("shortDescription", "Only used internally, do not modify", true); + ParamDefTable[73].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[10]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(35); + Children[2] = PDEF_PTR(43); + Children[3] = PDEF_PTR(52); + Children[4] = PDEF_PTR(53); + Children[5] = PDEF_PTR(54); + Children[6] = PDEF_PTR(62); + Children[7] = PDEF_PTR(71); + Children[8] = PDEF_PTR(72); + Children[9] = PDEF_PTR(73); + + ParamDefTable[0].setChildren(Children, 10); + } + + // SetChildren for: nodeIndex=1, longName="physicalMesh" + { + static Definition* Children[22]; + Children[0] = PDEF_PTR(2); + Children[1] = PDEF_PTR(3); + Children[2] = PDEF_PTR(4); + Children[3] = PDEF_PTR(5); + Children[4] = PDEF_PTR(6); + Children[5] = PDEF_PTR(7); + Children[6] = PDEF_PTR(8); + Children[7] = PDEF_PTR(10); + Children[8] = PDEF_PTR(12); + Children[9] = PDEF_PTR(14); + Children[10] = PDEF_PTR(19); + Children[11] = PDEF_PTR(21); + Children[12] = PDEF_PTR(23); + Children[13] = PDEF_PTR(25); + Children[14] = PDEF_PTR(26); + Children[15] = PDEF_PTR(27); + Children[16] = PDEF_PTR(29); + Children[17] = PDEF_PTR(30); + Children[18] = PDEF_PTR(31); + Children[19] = PDEF_PTR(32); + Children[20] = PDEF_PTR(33); + Children[21] = PDEF_PTR(34); + + ParamDefTable[1].setChildren(Children, 22); + } + + // SetChildren for: nodeIndex=8, longName="physicalMesh.vertices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(9); + + ParamDefTable[8].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=10, longName="physicalMesh.normals" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(11); + + ParamDefTable[10].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=12, longName="physicalMesh.skinningNormals" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(13); + + ParamDefTable[12].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=14, longName="physicalMesh.constrainCoefficients" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(15); + + ParamDefTable[14].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=15, longName="physicalMesh.constrainCoefficients[]" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(16); + Children[1] = PDEF_PTR(17); + Children[2] = PDEF_PTR(18); + + ParamDefTable[15].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=19, longName="physicalMesh.boneIndices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(20); + + ParamDefTable[19].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=21, longName="physicalMesh.boneWeights" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(22); + + ParamDefTable[21].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=23, longName="physicalMesh.optimizationData" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(24); + + ParamDefTable[23].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=27, longName="physicalMesh.indices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(28); + + ParamDefTable[27].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=35, longName="transitionUpB" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(36); + + ParamDefTable[35].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=36, longName="transitionUpB[]" + { + static Definition* Children[6]; + Children[0] = PDEF_PTR(37); + Children[1] = PDEF_PTR(38); + Children[2] = PDEF_PTR(39); + Children[3] = PDEF_PTR(40); + Children[4] = PDEF_PTR(41); + Children[5] = PDEF_PTR(42); + + ParamDefTable[36].setChildren(Children, 6); + } + + // SetChildren for: nodeIndex=43, longName="transitionUp" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(44); + + ParamDefTable[43].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=44, longName="transitionUp[]" + { + static Definition* Children[7]; + Children[0] = PDEF_PTR(45); + Children[1] = PDEF_PTR(46); + Children[2] = PDEF_PTR(47); + Children[3] = PDEF_PTR(48); + Children[4] = PDEF_PTR(49); + Children[5] = PDEF_PTR(50); + Children[6] = PDEF_PTR(51); + + ParamDefTable[44].setChildren(Children, 7); + } + + // SetChildren for: nodeIndex=54, longName="transitionDownB" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(55); + + ParamDefTable[54].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=55, longName="transitionDownB[]" + { + static Definition* Children[6]; + Children[0] = PDEF_PTR(56); + Children[1] = PDEF_PTR(57); + Children[2] = PDEF_PTR(58); + Children[3] = PDEF_PTR(59); + Children[4] = PDEF_PTR(60); + Children[5] = PDEF_PTR(61); + + ParamDefTable[55].setChildren(Children, 6); + } + + // SetChildren for: nodeIndex=62, longName="transitionDown" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(63); + + ParamDefTable[62].setChildren(Children, 1); + } + + // SetChildren for: nodeIndex=63, longName="transitionDown[]" + { + static Definition* Children[7]; + Children[0] = PDEF_PTR(64); + Children[1] = PDEF_PTR(65); + Children[2] = PDEF_PTR(66); + Children[3] = PDEF_PTR(67); + Children[4] = PDEF_PTR(68); + Children[5] = PDEF_PTR(69); + Children[6] = PDEF_PTR(70); + + ParamDefTable[63].setChildren(Children, 7); + } + + mBuiltFlag = true; + +} +void ClothingPhysicalMeshParameters::initStrings(void) +{ +} + +void ClothingPhysicalMeshParameters::initDynamicArrays(void) +{ + physicalMesh.vertices.buf = NULL; + physicalMesh.vertices.isAllocated = true; + physicalMesh.vertices.elementSize = sizeof(physx::PxVec3); + physicalMesh.vertices.arraySizes[0] = 0; + physicalMesh.normals.buf = NULL; + physicalMesh.normals.isAllocated = true; + physicalMesh.normals.elementSize = sizeof(physx::PxVec3); + physicalMesh.normals.arraySizes[0] = 0; + physicalMesh.skinningNormals.buf = NULL; + physicalMesh.skinningNormals.isAllocated = true; + physicalMesh.skinningNormals.elementSize = sizeof(physx::PxVec3); + physicalMesh.skinningNormals.arraySizes[0] = 0; + physicalMesh.constrainCoefficients.buf = NULL; + physicalMesh.constrainCoefficients.isAllocated = true; + physicalMesh.constrainCoefficients.elementSize = sizeof(ConstrainCoefficient_Type); + physicalMesh.constrainCoefficients.arraySizes[0] = 0; + physicalMesh.boneIndices.buf = NULL; + physicalMesh.boneIndices.isAllocated = true; + physicalMesh.boneIndices.elementSize = sizeof(uint16_t); + physicalMesh.boneIndices.arraySizes[0] = 0; + physicalMesh.boneWeights.buf = NULL; + physicalMesh.boneWeights.isAllocated = true; + physicalMesh.boneWeights.elementSize = sizeof(float); + physicalMesh.boneWeights.arraySizes[0] = 0; + physicalMesh.optimizationData.buf = NULL; + physicalMesh.optimizationData.isAllocated = true; + physicalMesh.optimizationData.elementSize = sizeof(uint8_t); + physicalMesh.optimizationData.arraySizes[0] = 0; + physicalMesh.indices.buf = NULL; + physicalMesh.indices.isAllocated = true; + physicalMesh.indices.elementSize = sizeof(uint32_t); + physicalMesh.indices.arraySizes[0] = 0; + transitionUpB.buf = NULL; + transitionUpB.isAllocated = true; + transitionUpB.elementSize = sizeof(SkinClothMapB_Type); + transitionUpB.arraySizes[0] = 0; + transitionUp.buf = NULL; + transitionUp.isAllocated = true; + transitionUp.elementSize = sizeof(SkinClothMapD_Type); + transitionUp.arraySizes[0] = 0; + transitionDownB.buf = NULL; + transitionDownB.isAllocated = true; + transitionDownB.elementSize = sizeof(SkinClothMapB_Type); + transitionDownB.arraySizes[0] = 0; + transitionDown.buf = NULL; + transitionDown.isAllocated = true; + transitionDown.elementSize = sizeof(SkinClothMapD_Type); + transitionDown.arraySizes[0] = 0; +} + +void ClothingPhysicalMeshParameters::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + physicalMesh.numVertices = uint32_t(0); + physicalMesh.numSimulatedVertices = uint32_t(0); + physicalMesh.numIndices = uint32_t(0); + physicalMesh.numSimulatedIndices = uint32_t(0); + physicalMesh.numBonesPerVertex = uint32_t(0); + physicalMesh.hasNegativeBackstop = bool(false); + physicalMesh.isClosed = bool(false); + physicalMesh.maximumMaxDistance = float(0); + physicalMesh.physicalMeshSorting = uint32_t(0); + physicalMesh.shortestEdgeLength = float(0); + physicalMesh.averageEdgeLength = float(0); + physicalMesh.isTetrahedralMesh = bool(false); + physicalMesh.flipNormals = bool(false); + transitionUpThickness = float(0); + transitionUpOffset = float(0); + transitionDownThickness = float(0); + transitionDownOffset = float(0); + referenceCount = uint32_t(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingPhysicalMeshParameters::initReferences(void) +{ +} + +void ClothingPhysicalMeshParameters::freeDynamicArrays(void) +{ + if (physicalMesh.vertices.isAllocated && physicalMesh.vertices.buf) + { + mParameterizedTraits->free(physicalMesh.vertices.buf); + } + if (physicalMesh.normals.isAllocated && physicalMesh.normals.buf) + { + mParameterizedTraits->free(physicalMesh.normals.buf); + } + if (physicalMesh.skinningNormals.isAllocated && physicalMesh.skinningNormals.buf) + { + mParameterizedTraits->free(physicalMesh.skinningNormals.buf); + } + if (physicalMesh.constrainCoefficients.isAllocated && physicalMesh.constrainCoefficients.buf) + { + mParameterizedTraits->free(physicalMesh.constrainCoefficients.buf); + } + if (physicalMesh.boneIndices.isAllocated && physicalMesh.boneIndices.buf) + { + mParameterizedTraits->free(physicalMesh.boneIndices.buf); + } + if (physicalMesh.boneWeights.isAllocated && physicalMesh.boneWeights.buf) + { + mParameterizedTraits->free(physicalMesh.boneWeights.buf); + } + if (physicalMesh.optimizationData.isAllocated && physicalMesh.optimizationData.buf) + { + mParameterizedTraits->free(physicalMesh.optimizationData.buf); + } + if (physicalMesh.indices.isAllocated && physicalMesh.indices.buf) + { + mParameterizedTraits->free(physicalMesh.indices.buf); + } + if (transitionUpB.isAllocated && transitionUpB.buf) + { + mParameterizedTraits->free(transitionUpB.buf); + } + if (transitionUp.isAllocated && transitionUp.buf) + { + mParameterizedTraits->free(transitionUp.buf); + } + if (transitionDownB.isAllocated && transitionDownB.buf) + { + mParameterizedTraits->free(transitionDownB.buf); + } + if (transitionDown.isAllocated && transitionDown.buf) + { + mParameterizedTraits->free(transitionDown.buf); + } +} + +void ClothingPhysicalMeshParameters::freeStrings(void) +{ +} + +void ClothingPhysicalMeshParameters::freeReferences(void) +{ +} + +} // namespace clothing +} // namespace nvidia diff --git a/APEX_1.4/module/clothing/src/autogen/ClothingPreviewParam.cpp b/APEX_1.4/module/clothing/src/autogen/ClothingPreviewParam.cpp new file mode 100644 index 00000000..c1996251 --- /dev/null +++ b/APEX_1.4/module/clothing/src/autogen/ClothingPreviewParam.cpp @@ -0,0 +1,506 @@ +// 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 "ClothingPreviewParam.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace clothing +{ + +using namespace ClothingPreviewParamNS; + +const char* const ClothingPreviewParamFactory::vptr = + NvParameterized::getVptr<ClothingPreviewParam, ClothingPreviewParam::ClassAlignment>(); + +const uint32_t NumParamDefs = 8; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 6 }, + { TYPE_MAT44, false, (size_t)(&((ParametersStruct*)0)->globalPose), NULL, 0 }, // globalPose + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->fallbackSkinning), NULL, 0 }, // fallbackSkinning + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->useInternalBoneOrder), NULL, 0 }, // useInternalBoneOrder + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->updateStateWithGlobalMatrices), NULL, 0 }, // updateStateWithGlobalMatrices + { TYPE_U64, false, (size_t)(&((ParametersStruct*)0)->userData), NULL, 0 }, // userData + { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->boneMatrices), CHILDREN(6), 1 }, // boneMatrices + { TYPE_MAT44, false, 1 * sizeof(physx::PxMat44), NULL, 0 }, // boneMatrices[] +}; + + +bool ClothingPreviewParam::mBuiltFlag = false; +NvParameterized::MutexType ClothingPreviewParam::mBuiltFlagMutex; + +ClothingPreviewParam::ClothingPreviewParam(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &ClothingPreviewParamFactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +ClothingPreviewParam::~ClothingPreviewParam() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void ClothingPreviewParam::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->~ClothingPreviewParam(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* ClothingPreviewParam::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* ClothingPreviewParam::getParameterDefinitionTree(void) const +{ + ClothingPreviewParam* tmpParam = const_cast<ClothingPreviewParam*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType ClothingPreviewParam::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 ClothingPreviewParam::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 ClothingPreviewParam::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ClothingPreviewParam::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void ClothingPreviewParam::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 ClothingPreviewParam::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="globalPose" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("globalPose", TYPE_MAT44, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("shortDescription", "The pose where the clothing asset will be put into the scene", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="fallbackSkinning" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("fallbackSkinning", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Performs the regular boneweighted skinning on the CPU before giving the\ndata out through the rendering API.\n", true); + HintTable[1].init("shortDescription", "Performs skinning in software", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="useInternalBoneOrder" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("useInternalBoneOrder", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("longDescription", "If this is set to true the bone buffers in updateState and the actor\ndescriptor have to be given in the same order as the bones are stored\ninternally in the asset. This can be queried using\nNxClothingAsset::getNumUsedBones and NxClothingAsset::getBoneName or\nNxClothingAsset::getBoneMapping.\n\nIf this is set to false, the bone buffers can be provided in the order as\nthey are stored in the application. This is either the bone order at\nauthoring time, or NxClothingAsset::remapBoneIndex can be called for each\nbone to let APEX know about the current ordering in the game. Note that\nthis is only recommended if the application already uses physx::PxMat44\n(or something binary equivalent) and does not have to convert the matrices.\n", true); + HintTable[2].init("shortDescription", "Expect internally ordered bone arrays in updateState call.", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="updateStateWithGlobalMatrices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("updateStateWithGlobalMatrices", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Depending on what matrices are present, the state can be updated using\nglobal world or object space bone matrices or composite matrices. The\ncomposite matrix can be generated by multiplying the world or object space\nmatrix by the inverse bone bine pose.\n\nNote: If there are problems which might be caused by bind poses being\ndifferent in the ClothingAsset and in the game's animation system, changing\nthis to true (and thus providing global pose matrices) might fix the problem.\n", true); + HintTable[1].init("shortDescription", "Use world space matrices instead of composite (relative to bind pose) in NxClothingActor::updateState().", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="userData" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("userData", TYPE_U64, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", 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("editorDisplay", "false", true); + HintTable[1].init("shortDescription", "Optional user data pointer associated with the clothing actor", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="boneMatrices" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("boneMatrices", TYPE_ARRAY, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("longDescription", "These matrices are sometimes referred to as composite matrices. They are the\nmultiplication of the current world space bone pose with the inverse bind\npose in world space.\nNote: If \'updateStateWithGlobalMatrices\' is set to true, these must be\nglobal poses instead.\n", true); + HintTable[2].init("shortDescription", "An Array of matrices with the full transform for each bone", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + ParamDef->setArraySize(-1); + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="boneMatrices[]" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("boneMatrices", TYPE_MAT44, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("editorDisplay", "false", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("editorDisplay", "false", true); + HintTable[1].init("longDescription", "These matrices are sometimes referred to as composite matrices. They are the\nmultiplication of the current world space bone pose with the inverse bind\npose in world space.\nNote: If \'updateStateWithGlobalMatrices\' is set to true, these must be\nglobal poses instead.\n", true); + HintTable[2].init("shortDescription", "An Array of matrices with the full transform for each bone", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[6]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(2); + Children[2] = PDEF_PTR(3); + Children[3] = PDEF_PTR(4); + Children[4] = PDEF_PTR(5); + Children[5] = PDEF_PTR(6); + + ParamDefTable[0].setChildren(Children, 6); + } + + // SetChildren for: nodeIndex=6, longName="boneMatrices" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(7); + + ParamDefTable[6].setChildren(Children, 1); + } + + mBuiltFlag = true; + +} +void ClothingPreviewParam::initStrings(void) +{ +} + +void ClothingPreviewParam::initDynamicArrays(void) +{ + boneMatrices.buf = NULL; + boneMatrices.isAllocated = true; + boneMatrices.elementSize = sizeof(physx::PxMat44); + boneMatrices.arraySizes[0] = 0; +} + +void ClothingPreviewParam::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + globalPose = physx::PxMat44(physx::PxVec4(1.0f)); + fallbackSkinning = bool(false); + useInternalBoneOrder = bool(false); + updateStateWithGlobalMatrices = bool(false); + userData = uint64_t(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void ClothingPreviewParam::initReferences(void) +{ +} + +void ClothingPreviewParam::freeDynamicArrays(void) +{ + if (boneMatrices.isAllocated && boneMatrices.buf) + { + mParameterizedTraits->free(boneMatrices.buf); + } +} + +void ClothingPreviewParam::freeStrings(void) +{ +} + +void ClothingPreviewParam::freeReferences(void) +{ +} + +} // namespace clothing +} // namespace nvidia |