diff options
| author | git perforce import user <a@b> | 2016-10-25 12:29:14 -0600 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees> | 2016-10-25 18:56:37 -0500 |
| commit | 3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch) | |
| tree | fa6485c169e50d7415a651bf838f5bcd0fd3bfbd /APEX_1.4/module/basicios_legacy | |
| download | physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip | |
Initial commit:
PhysX 3.4.0 Update @ 21294896
APEX 1.4.0 Update @ 21275617
[CL 21300167]
Diffstat (limited to 'APEX_1.4/module/basicios_legacy')
50 files changed, 20706 insertions, 0 deletions
diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p0_0p1.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p0_0p1.h new file mode 100644 index 00000000..817ce7a7 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p0_0p1.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P0_0P1H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P0_0P1H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p0.h" +#include "BasicIOSAssetParam_0p1.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p0, + nvidia::parameterized::BasicIOSAssetParam_0p1, + nvidia::parameterized::BasicIOSAssetParam_0p0::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_0p1::ClassVersion> + ConversionBasicIOSAssetParam_0p0_0p1Parent; + +class ConversionBasicIOSAssetParam_0p0_0p1: public ConversionBasicIOSAssetParam_0p0_0p1Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p0_0p1)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p0_0p1)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p0_0p1(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p0_0p1Parent(t) {} + + bool convert() + { + // just take the default values (scaleSceneGravity = 1.0, externalAcceleration=0,0,0) + return true; + } +}; + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p1_0p2.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p1_0p2.h new file mode 100644 index 00000000..247b1a1c --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p1_0p2.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P1_0P2H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P1_0P2H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p1.h" +#include "BasicIOSAssetParam_0p2.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p1, + nvidia::parameterized::BasicIOSAssetParam_0p2, + nvidia::parameterized::BasicIOSAssetParam_0p1::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_0p2::ClassVersion> + ConversionBasicIOSAssetParam_0p1_0p2Parent; + +class ConversionBasicIOSAssetParam_0p1_0p2: public ConversionBasicIOSAssetParam_0p1_0p2Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p1_0p2)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p1_0p2)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p1_0p2(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p1_0p2Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p2_0p3.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p2_0p3.h new file mode 100644 index 00000000..1e8840b5 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p2_0p3.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P2_0P3H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P2_0P3H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p2.h" +#include "BasicIOSAssetParam_0p3.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p2, + nvidia::parameterized::BasicIOSAssetParam_0p3, + nvidia::parameterized::BasicIOSAssetParam_0p2::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_0p3::ClassVersion> + ConversionBasicIOSAssetParam_0p2_0p3Parent; + +class ConversionBasicIOSAssetParam_0p2_0p3: public ConversionBasicIOSAssetParam_0p2_0p3Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p2_0p3)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p2_0p3)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p2_0p3(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p2_0p3Parent(t) {} + + bool convert() + { + // Inherit median from legacy asset + mNewData->particleMass.center = mLegacyData->particleMass; + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p3_0p4.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p3_0p4.h new file mode 100644 index 00000000..ff0e5d50 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p3_0p4.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P3_0P4H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P3_0P4H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p3.h" +#include "BasicIOSAssetParam_0p4.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p3, + nvidia::parameterized::BasicIOSAssetParam_0p4, + nvidia::parameterized::BasicIOSAssetParam_0p3::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_0p4::ClassVersion> + ConversionBasicIOSAssetParam_0p3_0p4Parent; + +class ConversionBasicIOSAssetParam_0p3_0p4: public ConversionBasicIOSAssetParam_0p3_0p4Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p3_0p4)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p3_0p4)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p3_0p4(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p3_0p4Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + // copy 'collisionGroupMaskName' to 'collisionFilterDataName' + NvParameterized::Handle handle(*mNewData, "collisionFilterDataName"); + handle.setParamString(mLegacyData->collisionGroupMaskName); + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p4_0p5.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p4_0p5.h new file mode 100644 index 00000000..3131e3a2 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p4_0p5.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P4_0P5H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P4_0P5H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p4.h" +#include "BasicIOSAssetParam_0p5.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p4, + nvidia::parameterized::BasicIOSAssetParam_0p5, + nvidia::parameterized::BasicIOSAssetParam_0p4::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_0p5::ClassVersion> + ConversionBasicIOSAssetParam_0p4_0p5Parent; + +class ConversionBasicIOSAssetParam_0p4_0p5: public ConversionBasicIOSAssetParam_0p4_0p5Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p4_0p5)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p4_0p5)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p4_0p5(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p4_0p5Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p5_0p6.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p5_0p6.h new file mode 100644 index 00000000..35966e61 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p5_0p6.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P5_0P6H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P5_0P6H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p5.h" +#include "BasicIOSAssetParam_0p6.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p5, + nvidia::parameterized::BasicIOSAssetParam_0p6, + nvidia::parameterized::BasicIOSAssetParam_0p5::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_0p6::ClassVersion> + ConversionBasicIOSAssetParam_0p5_0p6Parent; + +class ConversionBasicIOSAssetParam_0p5_0p6: public ConversionBasicIOSAssetParam_0p5_0p6Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p5_0p6)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p5_0p6)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p5_0p6(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p5_0p6Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p6_0p7.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p6_0p7.h new file mode 100644 index 00000000..5f808e89 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p6_0p7.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P6_0P7H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P6_0P7H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p6.h" +#include "BasicIOSAssetParam_0p7.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p6, + nvidia::parameterized::BasicIOSAssetParam_0p7, + nvidia::parameterized::BasicIOSAssetParam_0p6::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_0p7::ClassVersion> + ConversionBasicIOSAssetParam_0p6_0p7Parent; + +class ConversionBasicIOSAssetParam_0p6_0p7: public ConversionBasicIOSAssetParam_0p6_0p7Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p6_0p7)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p6_0p7)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p6_0p7(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p6_0p7Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p7_0p8.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p7_0p8.h new file mode 100644 index 00000000..78af5db2 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p7_0p8.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P7_0P8H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P7_0P8H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p7.h" +#include "BasicIOSAssetParam_0p8.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p7, + nvidia::parameterized::BasicIOSAssetParam_0p8, + nvidia::parameterized::BasicIOSAssetParam_0p7::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_0p8::ClassVersion> + ConversionBasicIOSAssetParam_0p7_0p8Parent; + +class ConversionBasicIOSAssetParam_0p7_0p8: public ConversionBasicIOSAssetParam_0p7_0p8Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p7_0p8)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p7_0p8)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p7_0p8(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p7_0p8Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p8_0p9.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p8_0p9.h new file mode 100644 index 00000000..58cadf7b --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p8_0p9.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P8_0P9H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P8_0P9H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p8.h" +#include "BasicIOSAssetParam_0p9.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p8, + nvidia::parameterized::BasicIOSAssetParam_0p9, + nvidia::parameterized::BasicIOSAssetParam_0p8::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_0p9::ClassVersion> + ConversionBasicIOSAssetParam_0p8_0p9Parent; + +class ConversionBasicIOSAssetParam_0p8_0p9: public ConversionBasicIOSAssetParam_0p8_0p9Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p8_0p9)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p8_0p9)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p8_0p9(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p8_0p9Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + // Old + // UseFakeDensityDistance + // FakeDensityDistance + // UseFakeDensityGrid + // FakeDensityGridSize + // FakeDensityGridMaxCellCount + // FakeDensityGridResolution + + // New + // FakeDensityGrid.Enabled + // FakeDensityGrid.FrustumMode + // FakeDensityGrid.GridResolution + // FakeDensityGrid.NormalParams.GridSize + // FakeDensityGrid.NormalParams.GridMaxCellCount + // FakeDensityGrid.FrustumParams.GridSize + // FakeDensityGrid.FrustumParams.GridMaxCellCount + + // Don't transfer anything. + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p9_1p0.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p9_1p0.h new file mode 100644 index 00000000..066602f8 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_0p9_1p0.h @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_0P9_1P0H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_0P9_1P0H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_0p9.h" +#include "BasicIOSAssetParam_1p0.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_0p9, + nvidia::parameterized::BasicIOSAssetParam_1p0, + nvidia::parameterized::BasicIOSAssetParam_0p9::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_1p0::ClassVersion> + ConversionBasicIOSAssetParam_0p9_1p0Parent; + +class ConversionBasicIOSAssetParam_0p9_1p0: public ConversionBasicIOSAssetParam_0p9_1p0Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_0p9_1p0)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_0p9_1p0)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_0p9_1p0(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_0p9_1p0Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + mNewData->GridDensityGrid.Enabled = mLegacyData->FakeDensityGrid.Enabled; + mNewData->GridDensityGrid.FrustumParams.GridMaxCellCount = mLegacyData->FakeDensityGrid.FrustumParams.GridMaxCellCount; + mNewData->GridDensityGrid.FrustumParams.GridSize = mLegacyData->FakeDensityGrid.FrustumParams.GridSize; + + NvParameterized::Handle hEnumNew(*mNewData, "GridDensityGrid.GridResolution"); //convert FDG -> GDG + NvParameterized::Handle hEnumOld(*mLegacyData, "FakeDensityGrid.GridResolution"); + PX_ASSERT(hEnumNew.isValid()); + PX_ASSERT(hEnumOld.isValid()); + + const NvParameterized::Definition* paramDefOld; + paramDefOld = hEnumOld.parameterDefinition(); + int32_t index = paramDefOld->enumValIndex(mLegacyData->FakeDensityGrid.GridResolution); + + const NvParameterized::Definition* paramDefNew; + paramDefNew = hEnumNew.parameterDefinition(); + hEnumNew.setParamEnum(paramDefNew->enumVal(index)); + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p0_1p1.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p0_1p1.h new file mode 100644 index 00000000..81a0a723 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p0_1p1.h @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_1P0_1P1H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_1P0_1P1H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_1p0.h" +#include "BasicIOSAssetParam_1p1.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_1p0, + nvidia::parameterized::BasicIOSAssetParam_1p1, + nvidia::parameterized::BasicIOSAssetParam_1p0::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_1p1::ClassVersion> + ConversionBasicIOSAssetParam_1p0_1p1Parent; + +class ConversionBasicIOSAssetParam_1p0_1p1: public ConversionBasicIOSAssetParam_1p0_1p1Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_1p0_1p1)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_1p0_1p1)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_1p0_1p1(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_1p0_1p1Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + mNewData->GridDensity.Enabled = mLegacyData->GridDensityGrid.Enabled; + // mNewData->GridDensity.Resolution = mLegacyData->GridDensityGrid.GridResolution; + mNewData->GridDensity.GridSize = mLegacyData->GridDensityGrid.FrustumParams.GridSize; + mNewData->GridDensity.MaxCellCount = mLegacyData->GridDensityGrid.FrustumParams.GridMaxCellCount; + + // enums are strings, better do it the safe way + NvParameterized::Handle hEnumNew(*mNewData, "GridDensity.Resolution"); + NvParameterized::Handle hEnumOld(*mLegacyData, "GridDensityGrid.GridResolution"); + PX_ASSERT(hEnumNew.isValid()); + PX_ASSERT(hEnumOld.isValid()); + + const NvParameterized::Definition* paramDefOld; + paramDefOld = hEnumOld.parameterDefinition(); + int32_t index = paramDefOld->enumValIndex(mLegacyData->GridDensityGrid.GridResolution); + + const NvParameterized::Definition* paramDefNew; + paramDefNew = hEnumNew.parameterDefinition(); + hEnumNew.setParamEnum(paramDefNew->enumVal(index)); + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p1_1p2.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p1_1p2.h new file mode 100644 index 00000000..b576ff30 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p1_1p2.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_1P1_1P2H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_1P1_1P2H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_1p1.h" +#include "BasicIOSAssetParam_1p2.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_1p1, + nvidia::parameterized::BasicIOSAssetParam_1p2, + nvidia::parameterized::BasicIOSAssetParam_1p1::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_1p2::ClassVersion> + ConversionBasicIOSAssetParam_1p1_1p2Parent; + +class ConversionBasicIOSAssetParam_1p1_1p2: public ConversionBasicIOSAssetParam_1p1_1p2Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_1p1_1p2)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_1p1_1p2)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_1p1_1p2(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_1p1_1p2Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p2_1p3.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p2_1p3.h new file mode 100644 index 00000000..2eac6ef3 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p2_1p3.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_1P2_1P3H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_1P2_1P3H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_1p2.h" +#include "BasicIOSAssetParam_1p3.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_1p2, + nvidia::parameterized::BasicIOSAssetParam_1p3, + nvidia::parameterized::BasicIOSAssetParam_1p2::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_1p3::ClassVersion> + ConversionBasicIOSAssetParam_1p2_1p3Parent; + +class ConversionBasicIOSAssetParam_1p2_1p3: public ConversionBasicIOSAssetParam_1p2_1p3Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_1p2_1p3)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_1p2_1p3)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_1p2_1p3(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_1p2_1p3Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p3_1p4.h b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p3_1p4.h new file mode 100644 index 00000000..56368e3b --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/ConversionBasicIOSAssetParam_1p3_1p4.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + + +#ifndef MODULE_CONVERSIONBASICIOSASSETPARAM_1P3_1P4H_H +#define MODULE_CONVERSIONBASICIOSASSETPARAM_1P3_1P4H_H + +#include "NvParamConversionTemplate.h" +#include "BasicIOSAssetParam_1p3.h" +#include "BasicIOSAssetParam_1p4.h" + +namespace nvidia { +namespace apex { +namespace legacy { + + +typedef NvParameterized::ParamConversionTemplate<nvidia::parameterized::BasicIOSAssetParam_1p3, + nvidia::parameterized::BasicIOSAssetParam_1p4, + nvidia::parameterized::BasicIOSAssetParam_1p3::ClassVersion, + nvidia::parameterized::BasicIOSAssetParam_1p4::ClassVersion> + ConversionBasicIOSAssetParam_1p3_1p4Parent; + +class ConversionBasicIOSAssetParam_1p3_1p4: public ConversionBasicIOSAssetParam_1p3_1p4Parent +{ +public: + static NvParameterized::Conversion* Create(NvParameterized::Traits* t) + { + void* buf = t->alloc(sizeof(ConversionBasicIOSAssetParam_1p3_1p4)); + return buf ? PX_PLACEMENT_NEW(buf, ConversionBasicIOSAssetParam_1p3_1p4)(t) : 0; + } + +protected: + ConversionBasicIOSAssetParam_1p3_1p4(NvParameterized::Traits* t) : ConversionBasicIOSAssetParam_1p3_1p4Parent(t) {} + + const NvParameterized::PrefVer* getPreferredVersions() const + { + static NvParameterized::PrefVer prefVers[] = + { + //TODO: + // Add your preferred versions for included references here. + // Entry format is + // { (const char*)longName, (uint32_t)preferredVersion } + + { 0, 0 } // Terminator (do not remove!) + }; + + return prefVers; + } + + bool convert() + { + //TODO: + // Write custom conversion code here using mNewData and mLegacyData members. + // + // Note that + // - mNewData has already been initialized with default values + // - same-named/same-typed members have already been copied + // from mLegacyData to mNewData + // - included references were moved to mNewData + // (and updated to preferred versions according to getPreferredVersions) + // + // For more info see the versioning wiki. + + return true; + } +}; + + +} +} +} //nvidia::apex::legacy + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p0.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p0.h new file mode 100644 index 00000000..2c9f6c76 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p0.h @@ -0,0 +1,233 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p0_h +#define HEADER_BasicIOSAssetParam_0p0_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p0NS +{ + + + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + +}; + +static const uint32_t checksum[] = { 0x13e90d7d, 0x9644d70e, 0x92bd7f6c, 0xa4c80d68, }; + +} // namespace BasicIOSAssetParam_0p0NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p0 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p0NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p0(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p0(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p0NS::checksum); + return BasicIOSAssetParam_0p0NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p0NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p0* tmpThis = const_cast<BasicIOSAssetParam_0p0*>(this); + return *(static_cast<BasicIOSAssetParam_0p0NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p0NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p0NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p0Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p0::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p0), BasicIOSAssetParam_0p0::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p0::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p0"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p0)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p0)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p0::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p0::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p0"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p0 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p0*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p0::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p0::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p0::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p0::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p1.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p1.h new file mode 100644 index 00000000..a65bf702 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p1.h @@ -0,0 +1,235 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p1_h +#define HEADER_BasicIOSAssetParam_0p1_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p1NS +{ + + + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + +}; + +static const uint32_t checksum[] = { 0xfef11c54, 0x679c8a6e, 0xb38c2860, 0x9eb5ca69, }; + +} // namespace BasicIOSAssetParam_0p1NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p1 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p1NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p1(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p1(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)1; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p1NS::checksum); + return BasicIOSAssetParam_0p1NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p1NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p1* tmpThis = const_cast<BasicIOSAssetParam_0p1*>(this); + return *(static_cast<BasicIOSAssetParam_0p1NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p1NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p1NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p1Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p1::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p1), BasicIOSAssetParam_0p1::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p1::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p1"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p1)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p1)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p1::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p1::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p1"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p1 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p1*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p1::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p1::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p1::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p1::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p2.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p2.h new file mode 100644 index 00000000..9d9325ac --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p2.h @@ -0,0 +1,238 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p2_h +#define HEADER_BasicIOSAssetParam_0p2_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p2NS +{ + + + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + NvParameterized::DummyStringStruct collisionGroupName; + NvParameterized::DummyStringStruct collisionGroupMaskName; + float particleMass; + +}; + +static const uint32_t checksum[] = { 0x76342808, 0xfd820291, 0xf3442960, 0x52c21a2a, }; + +} // namespace BasicIOSAssetParam_0p2NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p2 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p2NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p2(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p2(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)2; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p2NS::checksum); + return BasicIOSAssetParam_0p2NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p2NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p2* tmpThis = const_cast<BasicIOSAssetParam_0p2*>(this); + return *(static_cast<BasicIOSAssetParam_0p2NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p2NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p2NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p2Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p2::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p2), BasicIOSAssetParam_0p2::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p2::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p2"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p2)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p2)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p2::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p2::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p2"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p2 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p2*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p2::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p2::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p2::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p2::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p3.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p3.h new file mode 100644 index 00000000..0bde55dc --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p3.h @@ -0,0 +1,245 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p3_h +#define HEADER_BasicIOSAssetParam_0p3_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p3NS +{ + +struct RandomF32_Type; + +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + NvParameterized::DummyStringStruct collisionGroupName; + NvParameterized::DummyStringStruct collisionGroupMaskName; + RandomF32_Type particleMass; + +}; + +static const uint32_t checksum[] = { 0x3b2fd8d7, 0x3393dc25, 0x6c4e302a, 0x80a29e81, }; + +} // namespace BasicIOSAssetParam_0p3NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p3 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p3NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p3(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p3(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)3; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p3NS::checksum); + return BasicIOSAssetParam_0p3NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p3NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p3* tmpThis = const_cast<BasicIOSAssetParam_0p3*>(this); + return *(static_cast<BasicIOSAssetParam_0p3NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p3NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p3NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p3Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p3::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p3), BasicIOSAssetParam_0p3::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p3::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p3"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p3)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p3)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p3::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p3::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p3"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p3 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p3*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p3::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p3::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p3::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p3::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p4.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p4.h new file mode 100644 index 00000000..d3ca37da --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p4.h @@ -0,0 +1,250 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p4_h +#define HEADER_BasicIOSAssetParam_0p4_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p4NS +{ + +struct RandomF32_Type; + +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + +}; + +static const uint32_t checksum[] = { 0x0cb6a84c, 0x48e1978e, 0x961cee62, 0x01d7d95b, }; + +} // namespace BasicIOSAssetParam_0p4NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p4 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p4NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p4(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p4(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)4; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p4NS::checksum); + return BasicIOSAssetParam_0p4NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p4NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p4* tmpThis = const_cast<BasicIOSAssetParam_0p4*>(this); + return *(static_cast<BasicIOSAssetParam_0p4NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p4NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p4NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p4Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p4::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p4), BasicIOSAssetParam_0p4::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p4::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p4"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p4)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p4)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p4::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p4::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p4"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p4 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p4*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p4::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p4::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p4::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p4::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p5.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p5.h new file mode 100644 index 00000000..fbb91543 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p5.h @@ -0,0 +1,251 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p5_h +#define HEADER_BasicIOSAssetParam_0p5_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p5NS +{ + +struct RandomF32_Type; + +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + +}; + +static const uint32_t checksum[] = { 0x7af510ee, 0x7cf95f56, 0x5c6c9a11, 0xca6f7260, }; + +} // namespace BasicIOSAssetParam_0p5NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p5 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p5NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p5(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p5(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)5; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p5NS::checksum); + return BasicIOSAssetParam_0p5NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p5NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p5* tmpThis = const_cast<BasicIOSAssetParam_0p5*>(this); + return *(static_cast<BasicIOSAssetParam_0p5NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p5NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p5NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p5Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p5::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p5), BasicIOSAssetParam_0p5::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p5::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p5"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p5)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p5)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p5::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p5::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p5"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p5 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p5*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p5::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p5::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p5::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p5::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p6.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p6.h new file mode 100644 index 00000000..3323fd4f --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p6.h @@ -0,0 +1,253 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p6_h +#define HEADER_BasicIOSAssetParam_0p6_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p6NS +{ + +struct RandomF32_Type; + +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + bool collisionWithConvex; + bool collisionWithTriangleMesh; + +}; + +static const uint32_t checksum[] = { 0xf6d69e51, 0x7edca183, 0xb8953089, 0xdd758d6f, }; + +} // namespace BasicIOSAssetParam_0p6NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p6 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p6NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p6(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p6(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)6; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p6NS::checksum); + return BasicIOSAssetParam_0p6NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p6NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p6* tmpThis = const_cast<BasicIOSAssetParam_0p6*>(this); + return *(static_cast<BasicIOSAssetParam_0p6NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p6NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p6NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p6Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p6::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p6), BasicIOSAssetParam_0p6::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p6::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p6"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p6)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p6)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p6::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p6::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p6"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p6 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p6*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p6::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p6::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p6::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p6::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p7.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p7.h new file mode 100644 index 00000000..42e2fd6d --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p7.h @@ -0,0 +1,254 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p7_h +#define HEADER_BasicIOSAssetParam_0p7_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p7NS +{ + +struct RandomF32_Type; + +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + uint32_t maxCollidingObjects; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + bool collisionWithConvex; + bool collisionWithTriangleMesh; + +}; + +static const uint32_t checksum[] = { 0xd08a68f8, 0xdfb2b2cb, 0x04b13ed2, 0x8ac33237, }; + +} // namespace BasicIOSAssetParam_0p7NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p7 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p7NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p7(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p7(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)7; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p7NS::checksum); + return BasicIOSAssetParam_0p7NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p7NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p7* tmpThis = const_cast<BasicIOSAssetParam_0p7*>(this); + return *(static_cast<BasicIOSAssetParam_0p7NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p7NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p7NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p7Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p7::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p7), BasicIOSAssetParam_0p7::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p7::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p7"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p7)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p7)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p7::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p7::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p7"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p7 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p7*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p7::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p7::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p7::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p7::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p8.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p8.h new file mode 100644 index 00000000..dd139f24 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p8.h @@ -0,0 +1,260 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p8_h +#define HEADER_BasicIOSAssetParam_0p8_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p8NS +{ + +struct RandomF32_Type; + +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + uint32_t maxCollidingObjects; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + bool collisionWithConvex; + bool collisionWithTriangleMesh; + bool UseFakeDensityDistance; + float FakeDensityDistance; + bool UseFakeDensityGrid; + float FakeDensityGridSize; + uint32_t FakeDensityGridMaxCellCount; + const char* FakeDensityGridResolution; + +}; + +static const uint32_t checksum[] = { 0x200e5368, 0x7869390f, 0x538d6f82, 0xca3a948f, }; + +} // namespace BasicIOSAssetParam_0p8NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p8 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p8NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p8(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p8(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)8; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p8NS::checksum); + return BasicIOSAssetParam_0p8NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p8NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p8* tmpThis = const_cast<BasicIOSAssetParam_0p8*>(this); + return *(static_cast<BasicIOSAssetParam_0p8NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p8NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p8NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p8Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p8::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p8), BasicIOSAssetParam_0p8::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p8::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p8"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p8)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p8)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p8::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p8::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p8"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p8 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p8*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p8::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p8::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p8::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p8::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p9.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p9.h new file mode 100644 index 00000000..29228940 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_0p9.h @@ -0,0 +1,270 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_0p9_h +#define HEADER_BasicIOSAssetParam_0p9_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_0p9NS +{ + +struct RandomF32_Type; +struct FakeDensityGridNonSharedParams_Type; +struct FakeDensityGridParams_Type; + +struct FakeDensityGridNonSharedParams_Type +{ + float GridSize; + uint32_t GridMaxCellCount; +}; +struct FakeDensityGridParams_Type +{ + bool Enabled; + bool FrustumMode; + const char* GridResolution; + FakeDensityGridNonSharedParams_Type NormalParams; + FakeDensityGridNonSharedParams_Type FrustumParams; +}; +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + uint32_t maxCollidingObjects; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + bool collisionWithConvex; + bool collisionWithTriangleMesh; + FakeDensityGridParams_Type FakeDensityGrid; + +}; + +static const uint32_t checksum[] = { 0x6e9af62c, 0x78c430f2, 0x556ec540, 0x264551cc, }; + +} // namespace BasicIOSAssetParam_0p9NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_0p9 : public NvParameterized::NvParameters, public BasicIOSAssetParam_0p9NS::ParametersStruct +{ +public: + BasicIOSAssetParam_0p9(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_0p9(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)9; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_0p9NS::checksum); + return BasicIOSAssetParam_0p9NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_0p9NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_0p9* tmpThis = const_cast<BasicIOSAssetParam_0p9*>(this); + return *(static_cast<BasicIOSAssetParam_0p9NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_0p9NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_0p9NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_0p9Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_0p9::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_0p9), BasicIOSAssetParam_0p9::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_0p9::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p9"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_0p9)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_0p9)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_0p9::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_0p9::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_0p9"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_0p9 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_0p9*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_0p9::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_0p9::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_0p9::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_0p9::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p0.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p0.h new file mode 100644 index 00000000..516d30f2 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p0.h @@ -0,0 +1,268 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_1p0_h +#define HEADER_BasicIOSAssetParam_1p0_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_1p0NS +{ + +struct RandomF32_Type; +struct GridDensityGridNonSharedParams_Type; +struct GridDensityGridParams_Type; + +struct GridDensityGridNonSharedParams_Type +{ + float GridSize; + uint32_t GridMaxCellCount; +}; +struct GridDensityGridParams_Type +{ + bool Enabled; + const char* GridResolution; + GridDensityGridNonSharedParams_Type FrustumParams; +}; +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + uint32_t maxCollidingObjects; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + bool collisionWithConvex; + bool collisionWithTriangleMesh; + GridDensityGridParams_Type GridDensityGrid; + +}; + +static const uint32_t checksum[] = { 0x0ec8eaad, 0xe41b35e0, 0x0495591a, 0x41cce2f3, }; + +} // namespace BasicIOSAssetParam_1p0NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_1p0 : public NvParameterized::NvParameters, public BasicIOSAssetParam_1p0NS::ParametersStruct +{ +public: + BasicIOSAssetParam_1p0(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_1p0(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)1 << 16) + (uint32_t)0; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_1p0NS::checksum); + return BasicIOSAssetParam_1p0NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_1p0NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_1p0* tmpThis = const_cast<BasicIOSAssetParam_1p0*>(this); + return *(static_cast<BasicIOSAssetParam_1p0NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_1p0NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_1p0NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_1p0Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_1p0::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_1p0), BasicIOSAssetParam_1p0::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_1p0::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p0"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_1p0)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_1p0)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_1p0::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_1p0::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p0"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_1p0 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_1p0*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_1p0::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_1p0::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_1p0::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_1p0::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p1.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p1.h new file mode 100644 index 00000000..f87af5fe --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p1.h @@ -0,0 +1,263 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_1p1_h +#define HEADER_BasicIOSAssetParam_1p1_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_1p1NS +{ + +struct RandomF32_Type; +struct GridDensityParams_Type; + +struct GridDensityParams_Type +{ + bool Enabled; + const char* Resolution; + float GridSize; + uint32_t MaxCellCount; +}; +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + uint32_t maxCollidingObjects; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + bool collisionWithConvex; + bool collisionWithTriangleMesh; + GridDensityParams_Type GridDensity; + +}; + +static const uint32_t checksum[] = { 0xb9cf2ef9, 0x026f63d8, 0xf432a6a2, 0x5405c67a, }; + +} // namespace BasicIOSAssetParam_1p1NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_1p1 : public NvParameterized::NvParameters, public BasicIOSAssetParam_1p1NS::ParametersStruct +{ +public: + BasicIOSAssetParam_1p1(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_1p1(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)1 << 16) + (uint32_t)1; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_1p1NS::checksum); + return BasicIOSAssetParam_1p1NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_1p1NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_1p1* tmpThis = const_cast<BasicIOSAssetParam_1p1*>(this); + return *(static_cast<BasicIOSAssetParam_1p1NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_1p1NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_1p1NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_1p1Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_1p1::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_1p1), BasicIOSAssetParam_1p1::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_1p1::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p1"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_1p1)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_1p1)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_1p1::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_1p1::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p1"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_1p1 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_1p1*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_1p1::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_1p1::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_1p1::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_1p1::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p2.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p2.h new file mode 100644 index 00000000..8422a370 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p2.h @@ -0,0 +1,264 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_1p2_h +#define HEADER_BasicIOSAssetParam_1p2_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_1p2NS +{ + +struct RandomF32_Type; +struct GridDensityParams_Type; + +struct GridDensityParams_Type +{ + bool Enabled; + const char* Resolution; + float GridSize; + uint32_t MaxCellCount; +}; +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + uint32_t maxCollidingObjects; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + bool collisionWithConvex; + bool collisionWithTriangleMesh; + GridDensityParams_Type GridDensity; + bool enableTemperatureBuffer; + +}; + +static const uint32_t checksum[] = { 0xc3985a5c, 0x2317e2e4, 0xb76060b8, 0x57d78da2, }; + +} // namespace BasicIOSAssetParam_1p2NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_1p2 : public NvParameterized::NvParameters, public BasicIOSAssetParam_1p2NS::ParametersStruct +{ +public: + BasicIOSAssetParam_1p2(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_1p2(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)1 << 16) + (uint32_t)2; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_1p2NS::checksum); + return BasicIOSAssetParam_1p2NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_1p2NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_1p2* tmpThis = const_cast<BasicIOSAssetParam_1p2*>(this); + return *(static_cast<BasicIOSAssetParam_1p2NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_1p2NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_1p2NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_1p2Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_1p2::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_1p2), BasicIOSAssetParam_1p2::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_1p2::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p2"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_1p2)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_1p2)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_1p2::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_1p2::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p2"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_1p2 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_1p2*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_1p2::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_1p2::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_1p2::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_1p2::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p3.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p3.h new file mode 100644 index 00000000..bdf71e5f --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p3.h @@ -0,0 +1,281 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_1p3_h +#define HEADER_BasicIOSAssetParam_1p3_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_1p3NS +{ + +struct RandomF32_Type; +struct GridDensityParams_Type; +struct ParticleToGridCouplingParams_Type; +struct GridToParticleCouplingParams_Type; + +struct ParticleToGridCouplingParams_Type +{ + float accelTimeConstant; + float decelTimeConstant; + float thresholdMultiplier; +}; +struct GridDensityParams_Type +{ + bool Enabled; + const char* Resolution; + float GridSize; + uint32_t MaxCellCount; +}; +struct GridToParticleCouplingParams_Type +{ + float accelTimeConstant; + float decelTimeConstant; + float thresholdMultiplier; +}; +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + uint32_t maxCollidingObjects; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + bool collisionWithConvex; + bool collisionWithTriangleMesh; + GridDensityParams_Type GridDensity; + bool enableTemperatureBuffer; + bool enableCouplingOverride; + ParticleToGridCouplingParams_Type particleToGridCoupling; + GridToParticleCouplingParams_Type gridToParticleCoupling; + +}; + +static const uint32_t checksum[] = { 0xce8e2592, 0xae4fe7ed, 0x0e4024c0, 0x2142d36e, }; + +} // namespace BasicIOSAssetParam_1p3NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_1p3 : public NvParameterized::NvParameters, public BasicIOSAssetParam_1p3NS::ParametersStruct +{ +public: + BasicIOSAssetParam_1p3(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_1p3(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)1 << 16) + (uint32_t)3; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_1p3NS::checksum); + return BasicIOSAssetParam_1p3NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_1p3NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_1p3* tmpThis = const_cast<BasicIOSAssetParam_1p3*>(this); + return *(static_cast<BasicIOSAssetParam_1p3NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_1p3NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_1p3NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_1p3Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_1p3::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_1p3), BasicIOSAssetParam_1p3::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_1p3::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p3"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_1p3)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_1p3)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_1p3::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_1p3::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p3"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_1p3 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_1p3*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_1p3::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_1p3::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_1p3::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_1p3::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p4.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p4.h new file mode 100644 index 00000000..b1a9c607 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIOSAssetParam_1p4.h @@ -0,0 +1,282 @@ +// 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 + + +#ifndef HEADER_BasicIOSAssetParam_1p4_h +#define HEADER_BasicIOSAssetParam_1p4_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIOSAssetParam_1p4NS +{ + +struct RandomF32_Type; +struct GridDensityParams_Type; +struct ParticleToGridCouplingParams_Type; +struct GridToParticleCouplingParams_Type; + +struct ParticleToGridCouplingParams_Type +{ + float accelTimeConstant; + float decelTimeConstant; + float thresholdMultiplier; +}; +struct GridDensityParams_Type +{ + bool Enabled; + const char* Resolution; + float GridSize; + uint32_t MaxCellCount; +}; +struct GridToParticleCouplingParams_Type +{ + float accelTimeConstant; + float decelTimeConstant; + float thresholdMultiplier; +}; +struct RandomF32_Type +{ + float center; + float spread; + const char* type; +}; + +struct ParametersStruct +{ + + float restDensity; + float particleRadius; + uint32_t maxParticleCount; + float maxInjectedParticleCount; + uint32_t maxCollidingObjects; + float sceneGravityScale; + physx::PxVec3 externalAcceleration; + RandomF32_Type particleMass; + NvParameterized::DummyStringStruct collisionFilterDataName; + NvParameterized::DummyStringStruct fieldSamplerFilterDataName; + bool staticCollision; + float restitutionForStaticShapes; + bool dynamicCollision; + float restitutionForDynamicShapes; + float collisionDistanceMultiplier; + float collisionThreshold; + bool collisionWithConvex; + bool collisionWithTriangleMesh; + GridDensityParams_Type GridDensity; + bool enableTemperatureBuffer; + bool enableDensityBuffer; + bool enableCouplingOverride; + ParticleToGridCouplingParams_Type particleToGridCoupling; + GridToParticleCouplingParams_Type gridToParticleCoupling; + +}; + +static const uint32_t checksum[] = { 0xd1ae20ca, 0xe79f585e, 0x9ab86d65, 0x9964607a, }; + +} // namespace BasicIOSAssetParam_1p4NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIOSAssetParam_1p4 : public NvParameterized::NvParameters, public BasicIOSAssetParam_1p4NS::ParametersStruct +{ +public: + BasicIOSAssetParam_1p4(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIOSAssetParam_1p4(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIOSAssetParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)1 << 16) + (uint32_t)4; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIOSAssetParam_1p4NS::checksum); + return BasicIOSAssetParam_1p4NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIOSAssetParam_1p4NS::ParametersStruct& parameters(void) const + { + BasicIOSAssetParam_1p4* tmpThis = const_cast<BasicIOSAssetParam_1p4*>(this); + return *(static_cast<BasicIOSAssetParam_1p4NS::ParametersStruct*>(tmpThis)); + } + + BasicIOSAssetParam_1p4NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIOSAssetParam_1p4NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIOSAssetParam_1p4Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIOSAssetParam_1p4::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIOSAssetParam_1p4), BasicIOSAssetParam_1p4::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIOSAssetParam_1p4::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p4"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIOSAssetParam_1p4)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIOSAssetParam_1p4)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIOSAssetParam_1p4::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIOSAssetParam_1p4::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIOSAssetParam_1p4"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIOSAssetParam_1p4 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIOSAssetParam_1p4*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIOSAssetParam_1p4::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIOSAssetParam_1p4::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIOSAssetParam_1p4::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIOSAssetParam_1p4::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIosDebugRenderParams_0p0.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIosDebugRenderParams_0p0.h new file mode 100644 index 00000000..b3aed4cf --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIosDebugRenderParams_0p0.h @@ -0,0 +1,232 @@ +// 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 + + +#ifndef HEADER_BasicIosDebugRenderParams_0p0_h +#define HEADER_BasicIosDebugRenderParams_0p0_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIosDebugRenderParams_0p0NS +{ + + + +struct ParametersStruct +{ + + bool VISUALIZE_BASIC_IOS_ACTOR; + bool VISUALIZE_BASIC_IOS_COLLIDE_SHAPES; + bool VISUALIZE_BASIC_IOS_GRID_DENSITY; + +}; + +static const uint32_t checksum[] = { 0xfdf6893d, 0xf8944ef9, 0x2d74bc9a, 0x7fb067bf, }; + +} // namespace BasicIosDebugRenderParams_0p0NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIosDebugRenderParams_0p0 : public NvParameterized::NvParameters, public BasicIosDebugRenderParams_0p0NS::ParametersStruct +{ +public: + BasicIosDebugRenderParams_0p0(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIosDebugRenderParams_0p0(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIosDebugRenderParams"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIosDebugRenderParams_0p0NS::checksum); + return BasicIosDebugRenderParams_0p0NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIosDebugRenderParams_0p0NS::ParametersStruct& parameters(void) const + { + BasicIosDebugRenderParams_0p0* tmpThis = const_cast<BasicIosDebugRenderParams_0p0*>(this); + return *(static_cast<BasicIosDebugRenderParams_0p0NS::ParametersStruct*>(tmpThis)); + } + + BasicIosDebugRenderParams_0p0NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIosDebugRenderParams_0p0NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIosDebugRenderParams_0p0Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIosDebugRenderParams_0p0::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIosDebugRenderParams_0p0), BasicIosDebugRenderParams_0p0::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIosDebugRenderParams_0p0::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIosDebugRenderParams_0p0"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIosDebugRenderParams_0p0)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIosDebugRenderParams_0p0)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIosDebugRenderParams_0p0::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIosDebugRenderParams_0p0::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIosDebugRenderParams_0p0"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIosDebugRenderParams_0p0 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIosDebugRenderParams_0p0*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIosDebugRenderParams_0p0::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIosDebugRenderParams_0p0::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIosDebugRenderParams_0p0::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIosDebugRenderParams_0p0::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/BasicIosModuleParameters_0p0.h b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIosModuleParameters_0p0.h new file mode 100644 index 00000000..051a3103 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/BasicIosModuleParameters_0p0.h @@ -0,0 +1,230 @@ +// 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 + + +#ifndef HEADER_BasicIosModuleParameters_0p0_h +#define HEADER_BasicIosModuleParameters_0p0_h + +#include "NvParametersTypes.h" + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +#include "nvparameterized/NvParameterized.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "NvParameters.h" +#include "NvTraitsInternal.h" +#endif + +namespace nvidia +{ +namespace parameterized +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace BasicIosModuleParameters_0p0NS +{ + + + +struct ParametersStruct +{ + + uint32_t unused; + +}; + +static const uint32_t checksum[] = { 0x3fbae874, 0x2a648c69, 0x7ac9c757, 0x46be4dcd, }; + +} // namespace BasicIosModuleParameters_0p0NS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class BasicIosModuleParameters_0p0 : public NvParameterized::NvParameters, public BasicIosModuleParameters_0p0NS::ParametersStruct +{ +public: + BasicIosModuleParameters_0p0(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~BasicIosModuleParameters_0p0(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("BasicIosModuleParameters"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(BasicIosModuleParameters_0p0NS::checksum); + return BasicIosModuleParameters_0p0NS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const BasicIosModuleParameters_0p0NS::ParametersStruct& parameters(void) const + { + BasicIosModuleParameters_0p0* tmpThis = const_cast<BasicIosModuleParameters_0p0*>(this); + return *(static_cast<BasicIosModuleParameters_0p0NS::ParametersStruct*>(tmpThis)); + } + + BasicIosModuleParameters_0p0NS::ParametersStruct& parameters(void) + { + return *(static_cast<BasicIosModuleParameters_0p0NS::ParametersStruct*>(this)); + } + + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; + virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); + + void initDefaults(void); + +protected: + + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); + virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; + + + virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; + +private: + + void buildTree(void); + void initDynamicArrays(void); + void initStrings(void); + void initReferences(void); + void freeDynamicArrays(void); + void freeStrings(void); + void freeReferences(void); + + static bool mBuiltFlag; + static NvParameterized::MutexType mBuiltFlagMutex; +}; + +class BasicIosModuleParameters_0p0Factory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + BasicIosModuleParameters_0p0::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(BasicIosModuleParameters_0p0), BasicIosModuleParameters_0p0::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, BasicIosModuleParameters_0p0::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIosModuleParameters_0p0"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(BasicIosModuleParameters_0p0)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, BasicIosModuleParameters_0p0)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, BasicIosModuleParameters_0p0::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, BasicIosModuleParameters_0p0::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class BasicIosModuleParameters_0p0"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of BasicIosModuleParameters_0p0 here + // but it may call default constructors of members and spoil the data + NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); + + // Init vtable (everything else is already initialized) + *(const char**)bufObj = vptr; + + return (BasicIosModuleParameters_0p0*)bufObj; + } + + virtual const char* getClassName() + { + return (BasicIosModuleParameters_0p0::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (BasicIosModuleParameters_0p0::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (BasicIosModuleParameters_0p0::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (BasicIosModuleParameters_0p0::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace parameterized +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/basicios_legacy/include/autogen/ModuleBasicIOSLegacyRegistration.h b/APEX_1.4/module/basicios_legacy/include/autogen/ModuleBasicIOSLegacyRegistration.h new file mode 100644 index 00000000..ca1002c7 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/include/autogen/ModuleBasicIOSLegacyRegistration.h @@ -0,0 +1,416 @@ +/* + * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, 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. + */ + +#ifndef MODULE_MODULEBASICIOSLEGACYREGISTRATIONH_H +#define MODULE_MODULEBASICIOSLEGACYREGISTRATIONH_H + +#include "PsAllocator.h" +#include "NvRegistrationsForTraitsBase.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "PxAssert.h" +#include <stdint.h> + +// INCLUDE GENERATED FACTORIES +#include "BasicIOSAssetParam_0p0.h" +#include "BasicIOSAssetParam_0p1.h" +#include "BasicIOSAssetParam_0p2.h" +#include "BasicIOSAssetParam_0p3.h" +#include "BasicIOSAssetParam_0p4.h" +#include "BasicIOSAssetParam_0p5.h" +#include "BasicIOSAssetParam_0p6.h" +#include "BasicIOSAssetParam_0p7.h" +#include "BasicIOSAssetParam_0p8.h" +#include "BasicIOSAssetParam_0p9.h" +#include "BasicIOSAssetParam_1p0.h" +#include "BasicIOSAssetParam_1p1.h" +#include "BasicIOSAssetParam_1p2.h" +#include "BasicIOSAssetParam_1p3.h" +#include "BasicIOSAssetParam_1p4.h" +#include "BasicIosDebugRenderParams_0p0.h" +#include "BasicIosModuleParameters_0p0.h" + + +// INCLUDE GENERATED CONVERSION +#include "ConversionBasicIOSAssetParam_0p0_0p1.h" +#include "ConversionBasicIOSAssetParam_0p1_0p2.h" +#include "ConversionBasicIOSAssetParam_0p2_0p3.h" +#include "ConversionBasicIOSAssetParam_0p3_0p4.h" +#include "ConversionBasicIOSAssetParam_0p4_0p5.h" +#include "ConversionBasicIOSAssetParam_0p5_0p6.h" +#include "ConversionBasicIOSAssetParam_0p6_0p7.h" +#include "ConversionBasicIOSAssetParam_0p7_0p8.h" +#include "ConversionBasicIOSAssetParam_0p8_0p9.h" +#include "ConversionBasicIOSAssetParam_0p9_1p0.h" +#include "ConversionBasicIOSAssetParam_1p0_1p1.h" +#include "ConversionBasicIOSAssetParam_1p1_1p2.h" +#include "ConversionBasicIOSAssetParam_1p2_1p3.h" +#include "ConversionBasicIOSAssetParam_1p3_1p4.h" + + +// global namespace + +class ModuleBasicIOSLegacyRegistration : public NvParameterized::RegistrationsForTraitsBase +{ +public: + static void invokeRegistration(NvParameterized::Traits* parameterizedTraits) + { + if (parameterizedTraits) + { + ModuleBasicIOSLegacyRegistration().registerAll(*parameterizedTraits); + } + } + + static void invokeUnregistration(NvParameterized::Traits* parameterizedTraits) + { + if (parameterizedTraits) + { + ModuleBasicIOSLegacyRegistration().unregisterAll(*parameterizedTraits); + } + } + + void registerAvailableFactories(NvParameterized::Traits& parameterizedTraits) + { + ::NvParameterized::Factory* factoriesToRegister[] = { +// REGISTER GENERATED FACTORIES + new nvidia::parameterized::BasicIOSAssetParam_0p0Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p1Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p2Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p3Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p4Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p5Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p6Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p7Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p8Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p9Factory(), + new nvidia::parameterized::BasicIOSAssetParam_1p0Factory(), + new nvidia::parameterized::BasicIOSAssetParam_1p1Factory(), + new nvidia::parameterized::BasicIOSAssetParam_1p2Factory(), + new nvidia::parameterized::BasicIOSAssetParam_1p3Factory(), + + }; + + for (size_t i = 0; i < sizeof(factoriesToRegister)/sizeof(factoriesToRegister[0]); ++i) + { + parameterizedTraits.registerFactory(*factoriesToRegister[i]); + } + } + + virtual void registerAvailableConverters(NvParameterized::Traits& parameterizedTraits) + { +// REGISTER GENERATED CONVERSION + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p0_0p1 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p1_0p2 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p2_0p3 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p3_0p4 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p4_0p5 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p5_0p6 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p6_0p7 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p7_0p8 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p8_0p9 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p9_1p0 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_1p0_1p1 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_1p1_1p2 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_1p2_1p3 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_1p3_1p4 ConverterToRegister; + parameterizedTraits.registerConversion(ConverterToRegister::TOldClass::staticClassName(), + ConverterToRegister::TOldClass::ClassVersion, + ConverterToRegister::TNewClass::ClassVersion, + *(ConverterToRegister::Create(¶meterizedTraits))); + } + + } + + void unregisterAvailableFactories(NvParameterized::Traits& parameterizedTraits) + { + struct FactoryDesc + { + const char* name; + uint32_t version; + }; + + ::NvParameterized::Factory* factoriesToUnregister[] = { +// UNREGISTER GENERATED FACTORIES + new nvidia::parameterized::BasicIOSAssetParam_0p0Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p1Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p2Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p3Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p4Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p5Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p6Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p7Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p8Factory(), + new nvidia::parameterized::BasicIOSAssetParam_0p9Factory(), + new nvidia::parameterized::BasicIOSAssetParam_1p0Factory(), + new nvidia::parameterized::BasicIOSAssetParam_1p1Factory(), + new nvidia::parameterized::BasicIOSAssetParam_1p2Factory(), + new nvidia::parameterized::BasicIOSAssetParam_1p3Factory(), + + }; + + for (size_t i = 0; i < sizeof(factoriesToUnregister)/sizeof(factoriesToUnregister[0]); ++i) + { + ::NvParameterized::Factory* removedFactory = parameterizedTraits.removeFactory(factoriesToUnregister[i]->getClassName(), factoriesToUnregister[i]->getVersion()); + if (!removedFactory) + { + PX_ASSERT_WITH_MESSAGE(0, "Factory can not be removed!"); + } + else + { + removedFactory->freeParameterDefinitionTable(¶meterizedTraits); + delete removedFactory; + delete factoriesToUnregister[i]; + } + } + } + + virtual void unregisterAvailableConverters(NvParameterized::Traits& parameterizedTraits) + { +// UNREGISTER GENERATED CONVERSION + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p0_0p1 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p1_0p2 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p2_0p3 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p3_0p4 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p4_0p5 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p5_0p6 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p6_0p7 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p7_0p8 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p8_0p9 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_0p9_1p0 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_1p0_1p1 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_1p1_1p2 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_1p2_1p3 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + { + typedef nvidia::apex::legacy::ConversionBasicIOSAssetParam_1p3_1p4 ConverterToUnregister; + ::NvParameterized::Conversion* removedConv = parameterizedTraits.removeConversion(ConverterToUnregister::TOldClass::staticClassName(), + ConverterToUnregister::TOldClass::ClassVersion, + ConverterToUnregister::TNewClass::ClassVersion); + if (removedConv) { + removedConv->~Conversion(); parameterizedTraits.free(removedConv); // PLACEMENT DELETE + } else { + // assert("Conversion was not found"); + } + } + + } + +}; + +// global namespace + +#endif diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p0.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p0.cpp new file mode 100644 index 00000000..b1fc71c0 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p0.cpp @@ -0,0 +1,414 @@ +// 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 "BasicIOSAssetParam_0p0.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p0NS; + +const char* const BasicIOSAssetParam_0p0Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p0, BasicIOSAssetParam_0p0::ClassAlignment>(); + +const uint32_t NumParamDefs = 5; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 4 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount +}; + + +bool BasicIOSAssetParam_0p0::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p0::mBuiltFlagMutex; + +BasicIOSAssetParam_0p0::BasicIOSAssetParam_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p0FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p0::~BasicIOSAssetParam_0p0() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p0::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->~BasicIOSAssetParam_0p0(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p0::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p0::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p0* tmpParam = const_cast<BasicIOSAssetParam_0p0*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p0::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 BasicIOSAssetParam_0p0::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 BasicIOSAssetParam_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p0::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p0::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 BasicIOSAssetParam_0p0::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[4]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(2); + Children[2] = PDEF_PTR(3); + Children[3] = PDEF_PTR(4); + + ParamDefTable[0].setChildren(Children, 4); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p0::initStrings(void) +{ +} + +void BasicIOSAssetParam_0p0::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p0::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p0::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p0::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p0::freeStrings(void) +{ +} + +void BasicIOSAssetParam_0p0::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p1.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p1.cpp new file mode 100644 index 00000000..4d18353f --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p1.cpp @@ -0,0 +1,476 @@ +// 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 "BasicIOSAssetParam_0p1.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p1NS; + +const char* const BasicIOSAssetParam_0p1Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p1, BasicIOSAssetParam_0p1::ClassAlignment>(); + +const uint32_t NumParamDefs = 7; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 6 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration +}; + + +bool BasicIOSAssetParam_0p1::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p1::mBuiltFlagMutex; + +BasicIOSAssetParam_0p1::BasicIOSAssetParam_0p1(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p1FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p1::~BasicIOSAssetParam_0p1() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p1::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->~BasicIOSAssetParam_0p1(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p1::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p1::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p1* tmpParam = const_cast<BasicIOSAssetParam_0p1*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p1::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 BasicIOSAssetParam_0p1::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 BasicIOSAssetParam_0p1::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p1::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p1::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 BasicIOSAssetParam_0p1::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("sceneGravityScale", 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(0), 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("min", uint64_t(0), true); + HintTable[1].init("shortDescription", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#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); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p1::initStrings(void) +{ +} + +void BasicIOSAssetParam_0p1::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p1::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p1::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p1::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p1::freeStrings(void) +{ +} + +void BasicIOSAssetParam_0p1::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p2.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p2.cpp new file mode 100644 index 00000000..5d4ea6d5 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p2.cpp @@ -0,0 +1,567 @@ +// 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 "BasicIOSAssetParam_0p2.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p2NS; + +const char* const BasicIOSAssetParam_0p2Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p2, BasicIOSAssetParam_0p2::ClassAlignment>(); + +const uint32_t NumParamDefs = 10; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 9, +}; + +#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)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionGroupName), NULL, 0 }, // collisionGroupName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionGroupMaskName), NULL, 0 }, // collisionGroupMaskName + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleMass), NULL, 0 }, // particleMass +}; + + +bool BasicIOSAssetParam_0p2::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p2::mBuiltFlagMutex; + +BasicIOSAssetParam_0p2::BasicIOSAssetParam_0p2(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p2FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p2::~BasicIOSAssetParam_0p2() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p2::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->~BasicIOSAssetParam_0p2(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p2::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p2::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p2* tmpParam = const_cast<BasicIOSAssetParam_0p2*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p2::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 BasicIOSAssetParam_0p2::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 BasicIOSAssetParam_0p2::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p2::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p2::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 BasicIOSAssetParam_0p2::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("sceneGravityScale", 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(0), 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("min", uint64_t(0), true); + HintTable[1].init("shortDescription", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="collisionGroupName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("collisionGroupName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "Defines the name that specifies the collision group for this IOS.\nAny actor that this IOS will interact with must have the same collision group name.\n", true); + HintTable[1].init("programmersDescription", "There can be upto 32 collision groups numbered 0-31. APEX allocates collision group numbers sequentially\nstarting at 0 and incrementing. Consequently if games want to use their own collision groups they should\nstart at 31 and allocate them sequentially downward to avoid conflicting with the APEX collision groups.\n", true); + HintTable[2].init("shortDescription", "The collision group name for this IOS.", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="collisionGroupMaskName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("collisionGroupMaskName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "Defines the name that specifies the name of the collision group mask (128 bit) for this IOS.\nThis is the four 32 bit unsigned int version of collision detection.\nAny actor that this IOS will interact with must have a mask and a filter equation that returns true.\n", true); + HintTable[1].init("programmersDescription", "See the PhsyX SDK documentation 'NxGroupsMask Class Reference' for further details.\n", true); + HintTable[2].init("shortDescription", "The collision group Mask name for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("particleMass", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Mass of a particle", true); + ParamDefTable[9].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(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); + + ParamDefTable[0].setChildren(Children, 9); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p2::initStrings(void) +{ + collisionGroupName.isAllocated = true; + collisionGroupName.buf = NULL; + collisionGroupMaskName.isAllocated = true; + collisionGroupMaskName.buf = NULL; +} + +void BasicIOSAssetParam_0p2::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p2::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass = float(1); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p2::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p2::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p2::freeStrings(void) +{ + + if (collisionGroupName.isAllocated && collisionGroupName.buf) + { + mParameterizedTraits->strfree((char*)collisionGroupName.buf); + } + + if (collisionGroupMaskName.isAllocated && collisionGroupMaskName.buf) + { + mParameterizedTraits->strfree((char*)collisionGroupMaskName.buf); + } +} + +void BasicIOSAssetParam_0p2::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p3.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p3.cpp new file mode 100644 index 00000000..523eeb01 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p3.cpp @@ -0,0 +1,656 @@ +// 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 "BasicIOSAssetParam_0p3.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p3NS; + +const char* const BasicIOSAssetParam_0p3Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p3, BasicIOSAssetParam_0p3::ClassAlignment>(); + +const uint32_t NumParamDefs = 13; +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, +}; + +#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)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionGroupName), NULL, 0 }, // collisionGroupName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionGroupMaskName), NULL, 0 }, // collisionGroupMaskName + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(9), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type +}; + + +bool BasicIOSAssetParam_0p3::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p3::mBuiltFlagMutex; + +BasicIOSAssetParam_0p3::BasicIOSAssetParam_0p3(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p3FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p3::~BasicIOSAssetParam_0p3() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p3::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->~BasicIOSAssetParam_0p3(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p3::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p3::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p3* tmpParam = const_cast<BasicIOSAssetParam_0p3*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p3::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 BasicIOSAssetParam_0p3::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 BasicIOSAssetParam_0p3::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p3::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p3::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 BasicIOSAssetParam_0p3::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("sceneGravityScale", 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(0), 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("min", uint64_t(0), true); + HintTable[1].init("shortDescription", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="collisionGroupName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("collisionGroupName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "Defines the name that specifies the collision group for this IOS.\nAny actor that this IOS will interact with must have the same collision group name.\n", true); + HintTable[1].init("programmersDescription", "There can be upto 32 collision groups numbered 0-31. APEX allocates collision group numbers sequentially\nstarting at 0 and incrementing. Consequently if games want to use their own collision groups they should\nstart at 31 and allocate them sequentially downward to avoid conflicting with the APEX collision groups.\n", true); + HintTable[2].init("shortDescription", "The collision group name for this IOS.", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="collisionGroupMaskName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("collisionGroupMaskName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("longDescription", "Defines the name that specifies the name of the collision group mask (128 bit) for this IOS.\nThis is the four 32 bit unsigned int version of collision detection.\nAny actor that this IOS will interact with must have a mask and a filter equation that returns true.\n", true); + HintTable[1].init("programmersDescription", "See the PhsyX SDK documentation 'NxGroupsMask Class Reference' for further details.\n", true); + HintTable[2].init("shortDescription", "The collision group Mask name for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[12].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[9]; + 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); + + ParamDefTable[0].setChildren(Children, 9); + } + + // SetChildren for: nodeIndex=9, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(10); + Children[1] = PDEF_PTR(11); + Children[2] = PDEF_PTR(12); + + ParamDefTable[9].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p3::initStrings(void) +{ + collisionGroupName.isAllocated = true; + collisionGroupName.buf = NULL; + collisionGroupMaskName.isAllocated = true; + collisionGroupMaskName.buf = NULL; +} + +void BasicIOSAssetParam_0p3::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p3::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p3::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p3::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p3::freeStrings(void) +{ + + if (collisionGroupName.isAllocated && collisionGroupName.buf) + { + mParameterizedTraits->strfree((char*)collisionGroupName.buf); + } + + if (collisionGroupMaskName.isAllocated && collisionGroupMaskName.buf) + { + mParameterizedTraits->strfree((char*)collisionGroupMaskName.buf); + } +} + +void BasicIOSAssetParam_0p3::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p4.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p4.cpp new file mode 100644 index 00000000..8114f8fc --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p4.cpp @@ -0,0 +1,817 @@ +// 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 "BasicIOSAssetParam_0p4.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p4NS; + +const char* const BasicIOSAssetParam_0p4Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p4, BasicIOSAssetParam_0p4::ClassAlignment>(); + +const uint32_t NumParamDefs = 18; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 17, 8, 9, 10, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 14 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(14), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier +}; + + +bool BasicIOSAssetParam_0p4::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p4::mBuiltFlagMutex; + +BasicIOSAssetParam_0p4::BasicIOSAssetParam_0p4(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p4FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p4::~BasicIOSAssetParam_0p4() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p4::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->~BasicIOSAssetParam_0p4(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p4::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p4::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p4* tmpParam = const_cast<BasicIOSAssetParam_0p4*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p4::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 BasicIOSAssetParam_0p4::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 BasicIOSAssetParam_0p4::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p4::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p4::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 BasicIOSAssetParam_0p4::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("sceneGravityScale", 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(0), 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("min", uint64_t(0), true); + HintTable[1].init("shortDescription", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[10].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("collisionFilterDataName", 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 filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("collisionDistanceMultiplier", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[14]; + 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(11); + Children[8] = PDEF_PTR(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + + ParamDefTable[0].setChildren(Children, 14); + } + + // SetChildren for: nodeIndex=7, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(8); + Children[1] = PDEF_PTR(9); + Children[2] = PDEF_PTR(10); + + ParamDefTable[7].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p4::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_0p4::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p4::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p4::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p4::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p4::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_0p4::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p5.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p5.cpp new file mode 100644 index 00000000..3c9a3b81 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p5.cpp @@ -0,0 +1,860 @@ +// 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 "BasicIOSAssetParam_0p5.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p5NS; + +const char* const BasicIOSAssetParam_0p5Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p5, BasicIOSAssetParam_0p5::ClassAlignment>(); + +const uint32_t NumParamDefs = 19; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 17, 18, 8, 9, 10, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 15 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(15), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold +}; + + +bool BasicIOSAssetParam_0p5::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p5::mBuiltFlagMutex; + +BasicIOSAssetParam_0p5::BasicIOSAssetParam_0p5(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p5FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p5::~BasicIOSAssetParam_0p5() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p5::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->~BasicIOSAssetParam_0p5(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p5::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p5::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p5* tmpParam = const_cast<BasicIOSAssetParam_0p5*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p5::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 BasicIOSAssetParam_0p5::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 BasicIOSAssetParam_0p5::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p5::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p5::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 BasicIOSAssetParam_0p5::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("sceneGravityScale", 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(0), 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("min", uint64_t(0), true); + HintTable[1].init("shortDescription", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[10].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("collisionFilterDataName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("HIDDEN", 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("HIDDEN", uint64_t(1), true); + HintTable[1].init("shortDescription", "The filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("fieldSamplerFilterDataName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + HintTable[1].init("shortDescription", "The filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[17].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(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("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[15]; + 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(11); + Children[8] = PDEF_PTR(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + + ParamDefTable[0].setChildren(Children, 15); + } + + // SetChildren for: nodeIndex=7, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(8); + Children[1] = PDEF_PTR(9); + Children[2] = PDEF_PTR(10); + + ParamDefTable[7].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p5::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_0p5::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p5::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p5::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p5::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p5::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_0p5::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p6.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p6.cpp new file mode 100644 index 00000000..7d7c9c0d --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p6.cpp @@ -0,0 +1,910 @@ +// 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 "BasicIOSAssetParam_0p6.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p6NS; + +const char* const BasicIOSAssetParam_0p6Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p6, BasicIOSAssetParam_0p6::ClassAlignment>(); + +const uint32_t NumParamDefs = 21; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 8, 9, 10, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 17 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(17), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithConvex), NULL, 0 }, // collisionWithConvex + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithTriangleMesh), NULL, 0 }, // collisionWithTriangleMesh +}; + + +bool BasicIOSAssetParam_0p6::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p6::mBuiltFlagMutex; + +BasicIOSAssetParam_0p6::BasicIOSAssetParam_0p6(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p6FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p6::~BasicIOSAssetParam_0p6() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p6::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->~BasicIOSAssetParam_0p6(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p6::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p6::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p6* tmpParam = const_cast<BasicIOSAssetParam_0p6*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p6::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 BasicIOSAssetParam_0p6::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 BasicIOSAssetParam_0p6::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p6::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p6::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 BasicIOSAssetParam_0p6::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("sceneGravityScale", 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(0), 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("min", uint64_t(0), true); + HintTable[1].init("shortDescription", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[10].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("collisionFilterDataName", 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 filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[17].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(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("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="collisionWithConvex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("collisionWithConvex", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with convex shapes", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="collisionWithTriangleMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("collisionWithTriangleMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables collision with triangle mesh shapes", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[17]; + 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(11); + Children[8] = PDEF_PTR(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + Children[15] = PDEF_PTR(19); + Children[16] = PDEF_PTR(20); + + ParamDefTable[0].setChildren(Children, 17); + } + + // SetChildren for: nodeIndex=7, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(8); + Children[1] = PDEF_PTR(9); + Children[2] = PDEF_PTR(10); + + ParamDefTable[7].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p6::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_0p6::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p6::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + collisionWithConvex = bool(1); + collisionWithTriangleMesh = bool(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p6::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p6::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p6::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_0p6::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p7.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p7.cpp new file mode 100644 index 00000000..97c52f0a --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p7.cpp @@ -0,0 +1,942 @@ +// 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 "BasicIOSAssetParam_0p7.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p7NS; + +const char* const BasicIOSAssetParam_0p7Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p7, BasicIOSAssetParam_0p7::ClassAlignment>(); + +const uint32_t NumParamDefs = 22; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 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), 18 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxCollidingObjects), NULL, 0 }, // maxCollidingObjects + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(18), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithConvex), NULL, 0 }, // collisionWithConvex + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithTriangleMesh), NULL, 0 }, // collisionWithTriangleMesh +}; + + +bool BasicIOSAssetParam_0p7::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p7::mBuiltFlagMutex; + +BasicIOSAssetParam_0p7::BasicIOSAssetParam_0p7(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p7FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p7::~BasicIOSAssetParam_0p7() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p7::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->~BasicIOSAssetParam_0p7(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p7::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p7::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p7* tmpParam = const_cast<BasicIOSAssetParam_0p7*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p7::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 BasicIOSAssetParam_0p7::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 BasicIOSAssetParam_0p7::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p7::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p7::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 BasicIOSAssetParam_0p7::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="maxCollidingObjects" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("maxCollidingObjects", 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[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("longDescription", "Maximum number of objects that are able to collide with each other (boxes, spheres, capsules, hspaces, convexmeshes, trimeshes).\n", true); + HintTable[1].init("min", uint64_t(1), true); + HintTable[2].init("shortDescription", "Maximum number of objects that are able to collide with each other.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("sceneGravityScale", 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(0), true); + ParamDefTable[6].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", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[11].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("collisionFilterDataName", 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 filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[18].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="collisionWithConvex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("collisionWithConvex", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with convex shapes", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="collisionWithTriangleMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("collisionWithTriangleMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables collision with triangle mesh shapes", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // 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(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(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + Children[15] = PDEF_PTR(19); + Children[16] = PDEF_PTR(20); + Children[17] = PDEF_PTR(21); + + ParamDefTable[0].setChildren(Children, 18); + } + + // SetChildren for: nodeIndex=8, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(9); + Children[1] = PDEF_PTR(10); + Children[2] = PDEF_PTR(11); + + ParamDefTable[8].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p7::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_0p7::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p7::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + maxCollidingObjects = uint32_t(32); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + collisionWithConvex = bool(1); + collisionWithTriangleMesh = bool(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p7::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p7::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p7::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_0p7::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p8.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p8.cpp new file mode 100644 index 00000000..67e508e4 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p8.cpp @@ -0,0 +1,1119 @@ +// 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 "BasicIOSAssetParam_0p8.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p8NS; + +const char* const BasicIOSAssetParam_0p8Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p8, BasicIOSAssetParam_0p8::ClassAlignment>(); + +const uint32_t NumParamDefs = 28; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 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), 24 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxCollidingObjects), NULL, 0 }, // maxCollidingObjects + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(24), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithConvex), NULL, 0 }, // collisionWithConvex + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithTriangleMesh), NULL, 0 }, // collisionWithTriangleMesh + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->UseFakeDensityDistance), NULL, 0 }, // UseFakeDensityDistance + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->FakeDensityDistance), NULL, 0 }, // FakeDensityDistance + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->UseFakeDensityGrid), NULL, 0 }, // UseFakeDensityGrid + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->FakeDensityGridSize), NULL, 0 }, // FakeDensityGridSize + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->FakeDensityGridMaxCellCount), NULL, 0 }, // FakeDensityGridMaxCellCount + { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->FakeDensityGridResolution), NULL, 0 }, // FakeDensityGridResolution +}; + + +bool BasicIOSAssetParam_0p8::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p8::mBuiltFlagMutex; + +BasicIOSAssetParam_0p8::BasicIOSAssetParam_0p8(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p8FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p8::~BasicIOSAssetParam_0p8() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p8::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->~BasicIOSAssetParam_0p8(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p8::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p8::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p8* tmpParam = const_cast<BasicIOSAssetParam_0p8*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p8::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 BasicIOSAssetParam_0p8::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 BasicIOSAssetParam_0p8::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p8::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p8::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 BasicIOSAssetParam_0p8::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="maxCollidingObjects" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("maxCollidingObjects", 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[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("longDescription", "Maximum number of objects that are able to collide with each other (boxes, spheres, capsules, hspaces, convexmeshes, trimeshes).\n", true); + HintTable[1].init("min", uint64_t(1), true); + HintTable[2].init("shortDescription", "Maximum number of objects that are able to collide with each other.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("sceneGravityScale", 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(0), true); + ParamDefTable[6].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", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[11].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("collisionFilterDataName", 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 filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[18].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="collisionWithConvex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("collisionWithConvex", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with convex shapes", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="collisionWithTriangleMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("collisionWithTriangleMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables collision with triangle mesh shapes", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="UseFakeDensityDistance" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("UseFakeDensityDistance", 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 option is true; a fake distance will be computed based on a distance from the emitter position\n\n", true); + HintTable[1].init("shortDescription", "Compute a Fake Density Value based on distance from the emitter", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="FakeDensityDistance" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("FakeDensityDistance", 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(0), 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("longDescription", "Particles nearest the emitter location will have a density of 1 and particles greater than the FakeDensityDistance will have a density of zero.\nMust be positive.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "The distance from the emitter location for the fake density to be computed in a range of 1 to 0", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="UseFakeDensityGrid" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("UseFakeDensityGrid", 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 option is true; a fake distance will be computed based on the grouping of particles in a 3d grid\n", true); + HintTable[1].init("shortDescription", "Compute a Fake Density Using a Grid Relative to the Emitter", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="FakeDensityGridSize" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("FakeDensityGridSize", 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(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", "The default value is a 10 meter cube\nMust be positive.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "The size of the grid in world space", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="FakeDensityGridMaxCellCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("FakeDensityGridMaxCellCount", 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[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("longDescription", "This is the integer count representing how many particles reside in a single grid cell before the density is considered 1.\nIt is valid for the density to be greater than one. For example, if there were 32 particles in a grid cell with a max-cell count of\n16, then the density would be equalt to 2.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "This is the number of particles within a gridcell for a density of 1", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="FakeDensityGridResolution" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("FakeDensityGridResolution", TYPE_ENUM, 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 enumeration defines the 3d resolution of the grid.\n", true); + HintTable[1].init("shortDescription", "The enum defines the resolution of the 3d grid which voxelizes the sprite positions for the fake grid density calculation", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "FDG_8", "FDG_16", "FDG_32", "FDG_64", "FDG_128", "FDG_256" }; + ParamDefTable[27].setEnumVals((const char**)EnumVals, 6); + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[24]; + 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(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + Children[15] = PDEF_PTR(19); + Children[16] = PDEF_PTR(20); + Children[17] = PDEF_PTR(21); + Children[18] = PDEF_PTR(22); + Children[19] = PDEF_PTR(23); + Children[20] = PDEF_PTR(24); + Children[21] = PDEF_PTR(25); + Children[22] = PDEF_PTR(26); + Children[23] = PDEF_PTR(27); + + ParamDefTable[0].setChildren(Children, 24); + } + + // SetChildren for: nodeIndex=8, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(9); + Children[1] = PDEF_PTR(10); + Children[2] = PDEF_PTR(11); + + ParamDefTable[8].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p8::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_0p8::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p8::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + maxCollidingObjects = uint32_t(32); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + collisionWithConvex = bool(1); + collisionWithTriangleMesh = bool(0); + UseFakeDensityDistance = bool(0); + FakeDensityDistance = float(10); + UseFakeDensityGrid = bool(0); + FakeDensityGridSize = float(10); + FakeDensityGridMaxCellCount = uint32_t(16); + FakeDensityGridResolution = (const char*)"FDG_16"; + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p8::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p8::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p8::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_0p8::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p9.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p9.cpp new file mode 100644 index 00000000..ae1acc23 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_0p9.cpp @@ -0,0 +1,1247 @@ +// 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 "BasicIOSAssetParam_0p9.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_0p9NS; + +const char* const BasicIOSAssetParam_0p9Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_0p9, BasicIOSAssetParam_0p9::ClassAlignment>(); + +const uint32_t NumParamDefs = 32; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 9, 10, 11, 23, + 24, 25, 26, 29, 27, 28, 30, 31, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 19 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxCollidingObjects), NULL, 0 }, // maxCollidingObjects + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(19), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithConvex), NULL, 0 }, // collisionWithConvex + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithTriangleMesh), NULL, 0 }, // collisionWithTriangleMesh + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->FakeDensityGrid), CHILDREN(22), 5 }, // FakeDensityGrid + { TYPE_BOOL, false, (size_t)(&((FakeDensityGridParams_Type*)0)->Enabled), NULL, 0 }, // FakeDensityGrid.Enabled + { TYPE_BOOL, false, (size_t)(&((FakeDensityGridParams_Type*)0)->FrustumMode), NULL, 0 }, // FakeDensityGrid.FrustumMode + { TYPE_ENUM, false, (size_t)(&((FakeDensityGridParams_Type*)0)->GridResolution), NULL, 0 }, // FakeDensityGrid.GridResolution + { TYPE_STRUCT, false, (size_t)(&((FakeDensityGridParams_Type*)0)->NormalParams), CHILDREN(27), 2 }, // FakeDensityGrid.NormalParams + { TYPE_F32, false, (size_t)(&((FakeDensityGridNonSharedParams_Type*)0)->GridSize), NULL, 0 }, // FakeDensityGrid.NormalParams.GridSize + { TYPE_U32, false, (size_t)(&((FakeDensityGridNonSharedParams_Type*)0)->GridMaxCellCount), NULL, 0 }, // FakeDensityGrid.NormalParams.GridMaxCellCount + { TYPE_STRUCT, false, (size_t)(&((FakeDensityGridParams_Type*)0)->FrustumParams), CHILDREN(29), 2 }, // FakeDensityGrid.FrustumParams + { TYPE_F32, false, (size_t)(&((FakeDensityGridNonSharedParams_Type*)0)->GridSize), NULL, 0 }, // FakeDensityGrid.FrustumParams.GridSize + { TYPE_U32, false, (size_t)(&((FakeDensityGridNonSharedParams_Type*)0)->GridMaxCellCount), NULL, 0 }, // FakeDensityGrid.FrustumParams.GridMaxCellCount +}; + + +bool BasicIOSAssetParam_0p9::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_0p9::mBuiltFlagMutex; + +BasicIOSAssetParam_0p9::BasicIOSAssetParam_0p9(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_0p9FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_0p9::~BasicIOSAssetParam_0p9() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_0p9::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->~BasicIOSAssetParam_0p9(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p9::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_0p9::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_0p9* tmpParam = const_cast<BasicIOSAssetParam_0p9*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_0p9::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 BasicIOSAssetParam_0p9::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 BasicIOSAssetParam_0p9::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_0p9::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_0p9::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 BasicIOSAssetParam_0p9::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="maxCollidingObjects" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("maxCollidingObjects", 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[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("longDescription", "Maximum number of objects that are able to collide with each other (boxes, spheres, capsules, hspaces, convexmeshes, trimeshes).\n", true); + HintTable[1].init("min", uint64_t(1), true); + HintTable[2].init("shortDescription", "Maximum number of objects that are able to collide with each other.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("sceneGravityScale", 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(0), true); + ParamDefTable[6].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", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[11].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("collisionFilterDataName", 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 filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[18].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="collisionWithConvex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("collisionWithConvex", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with convex shapes", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="collisionWithTriangleMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("collisionWithTriangleMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables collision with triangle mesh shapes", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="FakeDensityGrid" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("FakeDensityGrid", TYPE_STRUCT, "FakeDensityGridParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Settings for Fake Density Grid\n", true); + HintTable[1].init("shortDescription", "Settings for Fake Density Grid", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="FakeDensityGrid.Enabled" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("Enabled", 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 option is true; a fake density will be computed based on the grouping of particles in a 3d grid\n", true); + HintTable[1].init("shortDescription", "Compute a Fake Density Using a Grid", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="FakeDensityGrid.FrustumMode" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("FrustumMode", 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 option is true; a fake density will be computed based on the grouping of particles in a 3d grid projected into the viewing volume.\nIf frustum information is unavailable, then normal grid density will be used.\n", true); + HintTable[1].init("shortDescription", "Compute a Fake Density Using a Grid in the viewing volume", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="FakeDensityGrid.GridResolution" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("GridResolution", TYPE_ENUM, 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 enumeration defines the 3d resolution of the grid.\n", true); + HintTable[1].init("shortDescription", "The enum defines the resolution of the 3d grid which voxelizes the sprite positions for the fake grid density calculation", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "FDG_8", "FDG_16", "FDG_32", "FDG_64", "FDG_128", "FDG_256" }; + ParamDefTable[25].setEnumVals((const char**)EnumVals, 6); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="FakeDensityGrid.NormalParams" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("NormalParams", TYPE_STRUCT, "FakeDensityGridNonSharedParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Settings for the grid when not in frustumMode.\n", true); + HintTable[1].init("shortDescription", "Settings for the grid when not in frustumMode.", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="FakeDensityGrid.NormalParams.GridSize" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("GridSize", 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(0), 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("longDescription", "The default value is a 10 units\nMust be positive.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "The size of the grid in world space, Depth of grid in frustum mode.", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="FakeDensityGrid.NormalParams.GridMaxCellCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("GridMaxCellCount", 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[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("longDescription", "This is the integer count representing how many particles reside in a single grid cell before the density is considered 1.\nIt is valid for the density to be greater than one. For example, if there were 32 particles in a grid cell with a max-cell count of\n16, then the density would be equal to 2.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "This is the number of particles within a gridcell for a density of 1", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="FakeDensityGrid.FrustumParams" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("FrustumParams", TYPE_STRUCT, "FakeDensityGridNonSharedParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Settings for the grid when in frustumMode.\n", true); + HintTable[1].init("shortDescription", "Settings for the grid when in frustumMode.", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="FakeDensityGrid.FrustumParams.GridSize" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("GridSize", 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(0), true); + ParamDefTable[30].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", "The default value is a 10 units\nMust be positive.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "The size of the grid in world space, Depth of grid in frustum mode.", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="FakeDensityGrid.FrustumParams.GridMaxCellCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("GridMaxCellCount", 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[31].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", "This is the integer count representing how many particles reside in a single grid cell before the density is considered 1.\nIt is valid for the density to be greater than one. For example, if there were 32 particles in a grid cell with a max-cell count of\n16, then the density would be equal to 2.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "This is the number of particles within a gridcell for a density of 1", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[19]; + 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(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + Children[15] = PDEF_PTR(19); + Children[16] = PDEF_PTR(20); + Children[17] = PDEF_PTR(21); + Children[18] = PDEF_PTR(22); + + ParamDefTable[0].setChildren(Children, 19); + } + + // SetChildren for: nodeIndex=8, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(9); + Children[1] = PDEF_PTR(10); + Children[2] = PDEF_PTR(11); + + ParamDefTable[8].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=22, longName="FakeDensityGrid" + { + static Definition* Children[5]; + Children[0] = PDEF_PTR(23); + Children[1] = PDEF_PTR(24); + Children[2] = PDEF_PTR(25); + Children[3] = PDEF_PTR(26); + Children[4] = PDEF_PTR(29); + + ParamDefTable[22].setChildren(Children, 5); + } + + // SetChildren for: nodeIndex=26, longName="FakeDensityGrid.NormalParams" + { + static Definition* Children[2]; + Children[0] = PDEF_PTR(27); + Children[1] = PDEF_PTR(28); + + ParamDefTable[26].setChildren(Children, 2); + } + + // SetChildren for: nodeIndex=29, longName="FakeDensityGrid.FrustumParams" + { + static Definition* Children[2]; + Children[0] = PDEF_PTR(30); + Children[1] = PDEF_PTR(31); + + ParamDefTable[29].setChildren(Children, 2); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_0p9::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_0p9::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p9::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + maxCollidingObjects = uint32_t(32); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + collisionWithConvex = bool(1); + collisionWithTriangleMesh = bool(0); + FakeDensityGrid.Enabled = bool(0); + FakeDensityGrid.FrustumMode = bool(0); + FakeDensityGrid.GridResolution = (const char*)"FDG_16"; + FakeDensityGrid.NormalParams.GridSize = float(10); + FakeDensityGrid.NormalParams.GridMaxCellCount = uint32_t(16); + FakeDensityGrid.FrustumParams.GridSize = float(10); + FakeDensityGrid.FrustumParams.GridMaxCellCount = uint32_t(16); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_0p9::initReferences(void) +{ +} + +void BasicIOSAssetParam_0p9::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_0p9::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_0p9::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p0.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p0.cpp new file mode 100644 index 00000000..c1182549 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p0.cpp @@ -0,0 +1,1125 @@ +// 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 "BasicIOSAssetParam_1p0.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_1p0NS; + +const char* const BasicIOSAssetParam_1p0Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_1p0, BasicIOSAssetParam_1p0::ClassAlignment>(); + +const uint32_t NumParamDefs = 28; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 9, 10, 11, 23, + 24, 25, 26, 27, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 19 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxCollidingObjects), NULL, 0 }, // maxCollidingObjects + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(19), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithConvex), NULL, 0 }, // collisionWithConvex + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithTriangleMesh), NULL, 0 }, // collisionWithTriangleMesh + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->GridDensityGrid), CHILDREN(22), 3 }, // GridDensityGrid + { TYPE_BOOL, false, (size_t)(&((GridDensityGridParams_Type*)0)->Enabled), NULL, 0 }, // GridDensityGrid.Enabled + { TYPE_ENUM, false, (size_t)(&((GridDensityGridParams_Type*)0)->GridResolution), NULL, 0 }, // GridDensityGrid.GridResolution + { TYPE_STRUCT, false, (size_t)(&((GridDensityGridParams_Type*)0)->FrustumParams), CHILDREN(25), 2 }, // GridDensityGrid.FrustumParams + { TYPE_F32, false, (size_t)(&((GridDensityGridNonSharedParams_Type*)0)->GridSize), NULL, 0 }, // GridDensityGrid.FrustumParams.GridSize + { TYPE_U32, false, (size_t)(&((GridDensityGridNonSharedParams_Type*)0)->GridMaxCellCount), NULL, 0 }, // GridDensityGrid.FrustumParams.GridMaxCellCount +}; + + +bool BasicIOSAssetParam_1p0::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_1p0::mBuiltFlagMutex; + +BasicIOSAssetParam_1p0::BasicIOSAssetParam_1p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_1p0FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_1p0::~BasicIOSAssetParam_1p0() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_1p0::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->~BasicIOSAssetParam_1p0(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p0::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p0::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_1p0* tmpParam = const_cast<BasicIOSAssetParam_1p0*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_1p0::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 BasicIOSAssetParam_1p0::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 BasicIOSAssetParam_1p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_1p0::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_1p0::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 BasicIOSAssetParam_1p0::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created objects on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="maxCollidingObjects" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("maxCollidingObjects", 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[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("longDescription", "Maximum number of objects that are able to collide with each other (boxes, spheres, capsules, hspaces, convexmeshes, trimeshes).\n", true); + HintTable[1].init("min", uint64_t(1), true); + HintTable[2].init("shortDescription", "Maximum number of objects that are able to collide with each other.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("sceneGravityScale", 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(0), true); + ParamDefTable[6].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", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[11].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("collisionFilterDataName", 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 filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[18].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="collisionWithConvex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("collisionWithConvex", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with convex shapes", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="collisionWithTriangleMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("collisionWithTriangleMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables collision with triangle mesh shapes", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="GridDensityGrid" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("GridDensityGrid", TYPE_STRUCT, "GridDensityGridParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Settings for Density Grid\n", true); + HintTable[1].init("shortDescription", "Settings for Density Grid", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="GridDensityGrid.Enabled" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("Enabled", 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 option is true; density will be computed based on the grouping of particles in a 3d grid\n", true); + HintTable[1].init("shortDescription", "Compute Density Using a Grid", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="GridDensityGrid.GridResolution" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("GridResolution", TYPE_ENUM, 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 enumeration defines the 3d resolution of the grid.\n", true); + HintTable[1].init("shortDescription", "The enum defines the resolution of the 3d grid which voxelizes the sprite positions for the grid density calculation", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "GDG_8", "GDG_16", "GDG_32", "GDG_64", "GDG_128", "GDG_256" }; + ParamDefTable[24].setEnumVals((const char**)EnumVals, 6); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="GridDensityGrid.FrustumParams" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("FrustumParams", TYPE_STRUCT, "GridDensityGridNonSharedParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Settings for the grid.\n", true); + HintTable[1].init("shortDescription", "Settings for the grid.", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="GridDensityGrid.FrustumParams.GridSize" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("GridSize", 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(0), 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("longDescription", "The default value is a 10 units\nMust be positive.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Depth of grid.", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="GridDensityGrid.FrustumParams.GridMaxCellCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("GridMaxCellCount", 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[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("longDescription", "This is the integer count representing how many particles reside in a single grid cell before the density is considered 1.\nIt is valid for the density to be greater than one. For example, if there were 32 particles in a grid cell with a max-cell count of\n16, then the density would be equal to 2.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "This is the number of particles within a gridcell for a density of 1", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[19]; + 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(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + Children[15] = PDEF_PTR(19); + Children[16] = PDEF_PTR(20); + Children[17] = PDEF_PTR(21); + Children[18] = PDEF_PTR(22); + + ParamDefTable[0].setChildren(Children, 19); + } + + // SetChildren for: nodeIndex=8, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(9); + Children[1] = PDEF_PTR(10); + Children[2] = PDEF_PTR(11); + + ParamDefTable[8].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=22, longName="GridDensityGrid" + { + 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=25, longName="GridDensityGrid.FrustumParams" + { + static Definition* Children[2]; + Children[0] = PDEF_PTR(26); + Children[1] = PDEF_PTR(27); + + ParamDefTable[25].setChildren(Children, 2); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_1p0::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_1p0::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p0::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + maxCollidingObjects = uint32_t(32); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + collisionWithConvex = bool(1); + collisionWithTriangleMesh = bool(0); + GridDensityGrid.Enabled = bool(0); + GridDensityGrid.GridResolution = (const char*)"GDG_16"; + GridDensityGrid.FrustumParams.GridSize = float(10); + GridDensityGrid.FrustumParams.GridMaxCellCount = uint32_t(16); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_1p0::initReferences(void) +{ +} + +void BasicIOSAssetParam_1p0::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p0::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_1p0::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p1.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p1.cpp new file mode 100644 index 00000000..7ea3d268 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p1.cpp @@ -0,0 +1,1101 @@ +// 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 "BasicIOSAssetParam_1p1.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_1p1NS; + +const char* const BasicIOSAssetParam_1p1Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_1p1, BasicIOSAssetParam_1p1::ClassAlignment>(); + +const uint32_t NumParamDefs = 27; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 9, 10, 11, 23, + 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), 19 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxCollidingObjects), NULL, 0 }, // maxCollidingObjects + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(19), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithConvex), NULL, 0 }, // collisionWithConvex + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithTriangleMesh), NULL, 0 }, // collisionWithTriangleMesh + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->GridDensity), CHILDREN(22), 4 }, // GridDensity + { TYPE_BOOL, false, (size_t)(&((GridDensityParams_Type*)0)->Enabled), NULL, 0 }, // GridDensity.Enabled + { TYPE_ENUM, false, (size_t)(&((GridDensityParams_Type*)0)->Resolution), NULL, 0 }, // GridDensity.Resolution + { TYPE_F32, false, (size_t)(&((GridDensityParams_Type*)0)->GridSize), NULL, 0 }, // GridDensity.GridSize + { TYPE_U32, false, (size_t)(&((GridDensityParams_Type*)0)->MaxCellCount), NULL, 0 }, // GridDensity.MaxCellCount +}; + + +bool BasicIOSAssetParam_1p1::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_1p1::mBuiltFlagMutex; + +BasicIOSAssetParam_1p1::BasicIOSAssetParam_1p1(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_1p1FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_1p1::~BasicIOSAssetParam_1p1() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_1p1::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->~BasicIOSAssetParam_1p1(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p1::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p1::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_1p1* tmpParam = const_cast<BasicIOSAssetParam_1p1*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_1p1::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 BasicIOSAssetParam_1p1::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 BasicIOSAssetParam_1p1::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_1p1::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_1p1::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 BasicIOSAssetParam_1p1::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created particles on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="maxCollidingObjects" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("maxCollidingObjects", 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[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("longDescription", "Maximum number of objects that are able to collide with each other (boxes, spheres, capsules, hspaces, convexmeshes, trimeshes).\n", true); + HintTable[1].init("min", uint64_t(1), true); + HintTable[2].init("shortDescription", "Maximum number of particles that are able to collide with each other.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("sceneGravityScale", 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(0), true); + ParamDefTable[6].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", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[11].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("collisionFilterDataName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + HintTable[1].init("shortDescription", "The filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[18].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="collisionWithConvex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("collisionWithConvex", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with convex shapes", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="collisionWithTriangleMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("collisionWithTriangleMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables collision with triangle mesh shapes", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="GridDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("GridDensity", TYPE_STRUCT, "GridDensityParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Settings for Density Grid\n", true); + HintTable[1].init("shortDescription", "Settings for Density Grid", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="GridDensity.Enabled" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("Enabled", 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 option is true; density will be computed based on the grouping of particles in a 3d grid\n", true); + HintTable[1].init("shortDescription", "Compute Density Using a Grid", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="GridDensity.Resolution" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("Resolution", TYPE_ENUM, 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 enumeration defines the 3d resolution of the grid.\n", true); + HintTable[1].init("shortDescription", "Number of cells in a 3D grid, used to calculate particles positions. Higher values divide the grid into more cells.", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "GDG_8", "GDG_16", "GDG_32", "GDG_64", "GDG_128", "GDG_256" }; + ParamDefTable[24].setEnumVals((const char**)EnumVals, 6); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="GridDensity.GridSize" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("GridSize", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("DISPLAY_NAME", "Grid Depth", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[25].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("DISPLAY_NAME", "Grid Depth", true); + HintTable[1].init("longDescription", "The default value is a 10 units\nMust be positive.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Depth of grid.", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="GridDensity.MaxCellCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("MaxCellCount", 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[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("longDescription", "This is the integer count representing how many particles reside in a single grid cell before the density is considered 1.\nIt is valid for the density to be greater than one. For example, if there were 32 particles in a grid cell with a max-cell count of\n16, then the density would be equal to 2.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "This is the number of particles within a gridcell for a density of 1", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[19]; + 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(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + Children[15] = PDEF_PTR(19); + Children[16] = PDEF_PTR(20); + Children[17] = PDEF_PTR(21); + Children[18] = PDEF_PTR(22); + + ParamDefTable[0].setChildren(Children, 19); + } + + // SetChildren for: nodeIndex=8, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(9); + Children[1] = PDEF_PTR(10); + Children[2] = PDEF_PTR(11); + + ParamDefTable[8].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=22, longName="GridDensity" + { + static Definition* Children[4]; + Children[0] = PDEF_PTR(23); + Children[1] = PDEF_PTR(24); + Children[2] = PDEF_PTR(25); + Children[3] = PDEF_PTR(26); + + ParamDefTable[22].setChildren(Children, 4); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_1p1::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_1p1::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p1::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + maxCollidingObjects = uint32_t(32); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + collisionWithConvex = bool(1); + collisionWithTriangleMesh = bool(0); + GridDensity.Enabled = bool(0); + GridDensity.Resolution = (const char*)"GDG_16"; + GridDensity.GridSize = float(10); + GridDensity.MaxCellCount = uint32_t(16); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_1p1::initReferences(void) +{ +} + +void BasicIOSAssetParam_1p1::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p1::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_1p1::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p2.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p2.cpp new file mode 100644 index 00000000..d532985a --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p2.cpp @@ -0,0 +1,1132 @@ +// 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 "BasicIOSAssetParam_1p2.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_1p2NS; + +const char* const BasicIOSAssetParam_1p2Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_1p2, BasicIOSAssetParam_1p2::ClassAlignment>(); + +const uint32_t NumParamDefs = 28; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 27, 9, 10, 11, + 23, 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), 20 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxCollidingObjects), NULL, 0 }, // maxCollidingObjects + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(20), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithConvex), NULL, 0 }, // collisionWithConvex + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithTriangleMesh), NULL, 0 }, // collisionWithTriangleMesh + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->GridDensity), CHILDREN(23), 4 }, // GridDensity + { TYPE_BOOL, false, (size_t)(&((GridDensityParams_Type*)0)->Enabled), NULL, 0 }, // GridDensity.Enabled + { TYPE_ENUM, false, (size_t)(&((GridDensityParams_Type*)0)->Resolution), NULL, 0 }, // GridDensity.Resolution + { TYPE_F32, false, (size_t)(&((GridDensityParams_Type*)0)->GridSize), NULL, 0 }, // GridDensity.GridSize + { TYPE_U32, false, (size_t)(&((GridDensityParams_Type*)0)->MaxCellCount), NULL, 0 }, // GridDensity.MaxCellCount + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->enableTemperatureBuffer), NULL, 0 }, // enableTemperatureBuffer +}; + + +bool BasicIOSAssetParam_1p2::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_1p2::mBuiltFlagMutex; + +BasicIOSAssetParam_1p2::BasicIOSAssetParam_1p2(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_1p2FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_1p2::~BasicIOSAssetParam_1p2() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_1p2::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->~BasicIOSAssetParam_1p2(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p2::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p2::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_1p2* tmpParam = const_cast<BasicIOSAssetParam_1p2*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_1p2::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 BasicIOSAssetParam_1p2::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 BasicIOSAssetParam_1p2::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_1p2::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_1p2::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 BasicIOSAssetParam_1p2::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created particles on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="maxCollidingObjects" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("maxCollidingObjects", 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[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("longDescription", "Maximum number of objects that are able to collide with each other (boxes, spheres, capsules, hspaces, convexmeshes, trimeshes).\n", true); + HintTable[1].init("min", uint64_t(1), true); + HintTable[2].init("shortDescription", "Maximum number of particles that are able to collide with each other.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("sceneGravityScale", 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(0), true); + ParamDefTable[6].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", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[11].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("collisionFilterDataName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + HintTable[1].init("shortDescription", "The filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[18].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="collisionWithConvex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("collisionWithConvex", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with convex shapes", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="collisionWithTriangleMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("collisionWithTriangleMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables collision with triangle mesh shapes", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="GridDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("GridDensity", TYPE_STRUCT, "GridDensityParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Settings for Density Grid\n", true); + HintTable[1].init("shortDescription", "Settings for Density Grid", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="GridDensity.Enabled" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("Enabled", 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 option is true; density will be computed based on the grouping of particles in a 3d grid\n", true); + HintTable[1].init("shortDescription", "Compute Density Using a Grid", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="GridDensity.Resolution" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("Resolution", TYPE_ENUM, 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 enumeration defines the 3d resolution of the grid.\n", true); + HintTable[1].init("shortDescription", "Number of cells in a 3D grid, used to calculate particles positions. Higher values divide the grid into more cells.", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "GDG_8", "GDG_16", "GDG_32", "GDG_64", "GDG_128", "GDG_256" }; + ParamDefTable[24].setEnumVals((const char**)EnumVals, 6); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="GridDensity.GridSize" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("GridSize", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("DISPLAY_NAME", "Grid Depth", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[25].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("DISPLAY_NAME", "Grid Depth", true); + HintTable[1].init("longDescription", "The default value is a 10 units\nMust be positive.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Depth of grid.", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="GridDensity.MaxCellCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("MaxCellCount", 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[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("longDescription", "This is the integer count representing how many particles reside in a single grid cell before the density is considered 1.\nIt is valid for the density to be greater than one. For example, if there were 32 particles in a grid cell with a max-cell count of\n16, then the density would be equal to 2.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "This is the number of particles within a gridcell for a density of 1", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="enableTemperatureBuffer" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("enableTemperatureBuffer", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), 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("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables temperature buffer.", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[20]; + 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(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + Children[15] = PDEF_PTR(19); + Children[16] = PDEF_PTR(20); + Children[17] = PDEF_PTR(21); + Children[18] = PDEF_PTR(22); + Children[19] = PDEF_PTR(27); + + ParamDefTable[0].setChildren(Children, 20); + } + + // SetChildren for: nodeIndex=8, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(9); + Children[1] = PDEF_PTR(10); + Children[2] = PDEF_PTR(11); + + ParamDefTable[8].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=22, longName="GridDensity" + { + static Definition* Children[4]; + Children[0] = PDEF_PTR(23); + Children[1] = PDEF_PTR(24); + Children[2] = PDEF_PTR(25); + Children[3] = PDEF_PTR(26); + + ParamDefTable[22].setChildren(Children, 4); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_1p2::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_1p2::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p2::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + maxCollidingObjects = uint32_t(32); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + collisionWithConvex = bool(1); + collisionWithTriangleMesh = bool(0); + GridDensity.Enabled = bool(0); + GridDensity.Resolution = (const char*)"GDG_16"; + GridDensity.GridSize = float(10); + GridDensity.MaxCellCount = uint32_t(16); + enableTemperatureBuffer = bool(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_1p2::initReferences(void) +{ +} + +void BasicIOSAssetParam_1p2::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p2::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_1p2::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p3.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p3.cpp new file mode 100644 index 00000000..7f8829e6 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p3.cpp @@ -0,0 +1,1375 @@ +// 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 "BasicIOSAssetParam_1p3.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_1p3NS; + +const char* const BasicIOSAssetParam_1p3Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_1p3, BasicIOSAssetParam_1p3::ClassAlignment>(); + +const uint32_t NumParamDefs = 37; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 27, 28, 29, 33, + 9, 10, 11, 23, 24, 25, 26, 30, 31, 32, 34, 35, 36, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 23 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxCollidingObjects), NULL, 0 }, // maxCollidingObjects + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(23), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithConvex), NULL, 0 }, // collisionWithConvex + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithTriangleMesh), NULL, 0 }, // collisionWithTriangleMesh + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->GridDensity), CHILDREN(26), 4 }, // GridDensity + { TYPE_BOOL, false, (size_t)(&((GridDensityParams_Type*)0)->Enabled), NULL, 0 }, // GridDensity.Enabled + { TYPE_ENUM, false, (size_t)(&((GridDensityParams_Type*)0)->Resolution), NULL, 0 }, // GridDensity.Resolution + { TYPE_F32, false, (size_t)(&((GridDensityParams_Type*)0)->GridSize), NULL, 0 }, // GridDensity.GridSize + { TYPE_U32, false, (size_t)(&((GridDensityParams_Type*)0)->MaxCellCount), NULL, 0 }, // GridDensity.MaxCellCount + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->enableTemperatureBuffer), NULL, 0 }, // enableTemperatureBuffer + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->enableCouplingOverride), NULL, 0 }, // enableCouplingOverride + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleToGridCoupling), CHILDREN(30), 3 }, // particleToGridCoupling + { TYPE_F32, false, (size_t)(&((ParticleToGridCouplingParams_Type*)0)->accelTimeConstant), NULL, 0 }, // particleToGridCoupling.accelTimeConstant + { TYPE_F32, false, (size_t)(&((ParticleToGridCouplingParams_Type*)0)->decelTimeConstant), NULL, 0 }, // particleToGridCoupling.decelTimeConstant + { TYPE_F32, false, (size_t)(&((ParticleToGridCouplingParams_Type*)0)->thresholdMultiplier), NULL, 0 }, // particleToGridCoupling.thresholdMultiplier + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->gridToParticleCoupling), CHILDREN(33), 3 }, // gridToParticleCoupling + { TYPE_F32, false, (size_t)(&((GridToParticleCouplingParams_Type*)0)->accelTimeConstant), NULL, 0 }, // gridToParticleCoupling.accelTimeConstant + { TYPE_F32, false, (size_t)(&((GridToParticleCouplingParams_Type*)0)->decelTimeConstant), NULL, 0 }, // gridToParticleCoupling.decelTimeConstant + { TYPE_F32, false, (size_t)(&((GridToParticleCouplingParams_Type*)0)->thresholdMultiplier), NULL, 0 }, // gridToParticleCoupling.thresholdMultiplier +}; + + +bool BasicIOSAssetParam_1p3::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_1p3::mBuiltFlagMutex; + +BasicIOSAssetParam_1p3::BasicIOSAssetParam_1p3(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_1p3FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_1p3::~BasicIOSAssetParam_1p3() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_1p3::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->~BasicIOSAssetParam_1p3(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p3::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p3::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_1p3* tmpParam = const_cast<BasicIOSAssetParam_1p3*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_1p3::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 BasicIOSAssetParam_1p3::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 BasicIOSAssetParam_1p3::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_1p3::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_1p3::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 BasicIOSAssetParam_1p3::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created particles on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="maxCollidingObjects" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("maxCollidingObjects", 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[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("longDescription", "Maximum number of objects that are able to collide with each other (boxes, spheres, capsules, hspaces, convexmeshes, trimeshes).\n", true); + HintTable[1].init("min", uint64_t(1), true); + HintTable[2].init("shortDescription", "Maximum number of particles that are able to collide with each other.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("sceneGravityScale", 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(0), true); + ParamDefTable[6].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", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[11].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("collisionFilterDataName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + HintTable[1].init("shortDescription", "The filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[18].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="collisionWithConvex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("collisionWithConvex", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with convex shapes", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="collisionWithTriangleMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("collisionWithTriangleMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables collision with triangle mesh shapes", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="GridDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("GridDensity", TYPE_STRUCT, "GridDensityParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Settings for Density Grid\n", true); + HintTable[1].init("shortDescription", "Settings for Density Grid", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="GridDensity.Enabled" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("Enabled", 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 option is true; density will be computed based on the grouping of particles in a 3d grid\n", true); + HintTable[1].init("shortDescription", "Compute Density Using a Grid", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="GridDensity.Resolution" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("Resolution", TYPE_ENUM, 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 enumeration defines the 3d resolution of the grid.\n", true); + HintTable[1].init("shortDescription", "Number of cells in a 3D grid, used to calculate particles positions. Higher values divide the grid into more cells.", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "GDG_8", "GDG_16", "GDG_32", "GDG_64", "GDG_128", "GDG_256" }; + ParamDefTable[24].setEnumVals((const char**)EnumVals, 6); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="GridDensity.GridSize" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("GridSize", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("DISPLAY_NAME", "Grid Depth", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[25].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("DISPLAY_NAME", "Grid Depth", true); + HintTable[1].init("longDescription", "The default value is a 10 units\nMust be positive.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Depth of grid.", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="GridDensity.MaxCellCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("MaxCellCount", 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[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("longDescription", "This is the integer count representing how many particles reside in a single grid cell before the density is considered 1.\nIt is valid for the density to be greater than one. For example, if there were 32 particles in a grid cell with a max-cell count of\n16, then the density would be equal to 2.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "This is the number of particles within a gridcell for a density of 1", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="enableTemperatureBuffer" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("enableTemperatureBuffer", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), 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("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables temperature buffer.", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="enableCouplingOverride" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("enableCouplingOverride", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), 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("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "If true, IOS coupling settings are used. If false, dynamic grid coupling settings are used.", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="particleToGridCoupling" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("particleToGridCoupling", TYPE_STRUCT, "ParticleToGridCouplingParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Settings for particle to grid coupling", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="particleToGridCoupling.accelTimeConstant" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("accelTimeConstant", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Controls rate at which the grid accepts influence from particles. A value of 0 means instant coupling.", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="particleToGridCoupling.decelTimeConstant" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("decelTimeConstant", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Controls rate at which the grid accepts influence from particles. A value of 0 means instant coupling.", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=32, longName="particleToGridCoupling.thresholdMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; + ParamDef->init("thresholdMultiplier", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "A value greater than 1 creates a deadzone, where no particle to grid coupling occurs.", true); + ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=33, longName="gridToParticleCoupling" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; + ParamDef->init("gridToParticleCoupling", TYPE_STRUCT, "GridToParticleCouplingParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Settings for grid to particle coupling", true); + ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=34, longName="gridToParticleCoupling.accelTimeConstant" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; + ParamDef->init("accelTimeConstant", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Controls rate at which particles accept influence from the grid. A value of 0 means instant coupling.", true); + ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=35, longName="gridToParticleCoupling.decelTimeConstant" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; + ParamDef->init("decelTimeConstant", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Controls rate at which particles accept influence from the grid. A value of 0 means instant coupling.", true); + ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=36, longName="gridToParticleCoupling.thresholdMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; + ParamDef->init("thresholdMultiplier", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "A value greater than 1 creates a deadzone, where no grid to particle coupling occurs.", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[23]; + 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(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + Children[15] = PDEF_PTR(19); + Children[16] = PDEF_PTR(20); + Children[17] = PDEF_PTR(21); + Children[18] = PDEF_PTR(22); + Children[19] = PDEF_PTR(27); + Children[20] = PDEF_PTR(28); + Children[21] = PDEF_PTR(29); + Children[22] = PDEF_PTR(33); + + ParamDefTable[0].setChildren(Children, 23); + } + + // SetChildren for: nodeIndex=8, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(9); + Children[1] = PDEF_PTR(10); + Children[2] = PDEF_PTR(11); + + ParamDefTable[8].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=22, longName="GridDensity" + { + static Definition* Children[4]; + Children[0] = PDEF_PTR(23); + Children[1] = PDEF_PTR(24); + Children[2] = PDEF_PTR(25); + Children[3] = PDEF_PTR(26); + + ParamDefTable[22].setChildren(Children, 4); + } + + // SetChildren for: nodeIndex=29, longName="particleToGridCoupling" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(30); + Children[1] = PDEF_PTR(31); + Children[2] = PDEF_PTR(32); + + ParamDefTable[29].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=33, longName="gridToParticleCoupling" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(34); + Children[1] = PDEF_PTR(35); + Children[2] = PDEF_PTR(36); + + ParamDefTable[33].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_1p3::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_1p3::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p3::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + maxCollidingObjects = uint32_t(32); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + collisionWithConvex = bool(1); + collisionWithTriangleMesh = bool(0); + GridDensity.Enabled = bool(0); + GridDensity.Resolution = (const char*)"GDG_16"; + GridDensity.GridSize = float(10); + GridDensity.MaxCellCount = uint32_t(16); + enableTemperatureBuffer = bool(0); + enableCouplingOverride = bool(0); + particleToGridCoupling.accelTimeConstant = float(0.01); + particleToGridCoupling.decelTimeConstant = float(10); + particleToGridCoupling.thresholdMultiplier = float(2); + gridToParticleCoupling.accelTimeConstant = float(0.01); + gridToParticleCoupling.decelTimeConstant = float(0.01); + gridToParticleCoupling.thresholdMultiplier = float(1); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_1p3::initReferences(void) +{ +} + +void BasicIOSAssetParam_1p3::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p3::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_1p3::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p4.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p4.cpp new file mode 100644 index 00000000..d5981a1a --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIOSAssetParam_1p4.cpp @@ -0,0 +1,1406 @@ +// 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 "BasicIOSAssetParam_1p4.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIOSAssetParam_1p4NS; + +const char* const BasicIOSAssetParam_1p4Factory::vptr = + NvParameterized::getVptr<BasicIOSAssetParam_1p4, BasicIOSAssetParam_1p4::ClassAlignment>(); + +const uint32_t NumParamDefs = 38; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 27, 28, 29, 30, + 34, 9, 10, 11, 23, 24, 25, 26, 31, 32, 33, 35, 36, 37, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 24 }, + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restDensity), NULL, 0 }, // restDensity + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->particleRadius), NULL, 0 }, // particleRadius + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxParticleCount), NULL, 0 }, // maxParticleCount + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxInjectedParticleCount), NULL, 0 }, // maxInjectedParticleCount + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxCollidingObjects), NULL, 0 }, // maxCollidingObjects + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->sceneGravityScale), NULL, 0 }, // sceneGravityScale + { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->externalAcceleration), NULL, 0 }, // externalAcceleration + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleMass), CHILDREN(24), 3 }, // particleMass + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->center), NULL, 0 }, // particleMass.center + { TYPE_F32, false, (size_t)(&((RandomF32_Type*)0)->spread), NULL, 0 }, // particleMass.spread + { TYPE_ENUM, false, (size_t)(&((RandomF32_Type*)0)->type), NULL, 0 }, // particleMass.type + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->collisionFilterDataName), NULL, 0 }, // collisionFilterDataName + { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->fieldSamplerFilterDataName), NULL, 0 }, // fieldSamplerFilterDataName + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->staticCollision), NULL, 0 }, // staticCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForStaticShapes), NULL, 0 }, // restitutionForStaticShapes + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->dynamicCollision), NULL, 0 }, // dynamicCollision + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->restitutionForDynamicShapes), NULL, 0 }, // restitutionForDynamicShapes + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionDistanceMultiplier), NULL, 0 }, // collisionDistanceMultiplier + { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionThreshold), NULL, 0 }, // collisionThreshold + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithConvex), NULL, 0 }, // collisionWithConvex + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->collisionWithTriangleMesh), NULL, 0 }, // collisionWithTriangleMesh + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->GridDensity), CHILDREN(27), 4 }, // GridDensity + { TYPE_BOOL, false, (size_t)(&((GridDensityParams_Type*)0)->Enabled), NULL, 0 }, // GridDensity.Enabled + { TYPE_ENUM, false, (size_t)(&((GridDensityParams_Type*)0)->Resolution), NULL, 0 }, // GridDensity.Resolution + { TYPE_F32, false, (size_t)(&((GridDensityParams_Type*)0)->GridSize), NULL, 0 }, // GridDensity.GridSize + { TYPE_U32, false, (size_t)(&((GridDensityParams_Type*)0)->MaxCellCount), NULL, 0 }, // GridDensity.MaxCellCount + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->enableTemperatureBuffer), NULL, 0 }, // enableTemperatureBuffer + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->enableDensityBuffer), NULL, 0 }, // enableDensityBuffer + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->enableCouplingOverride), NULL, 0 }, // enableCouplingOverride + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->particleToGridCoupling), CHILDREN(31), 3 }, // particleToGridCoupling + { TYPE_F32, false, (size_t)(&((ParticleToGridCouplingParams_Type*)0)->accelTimeConstant), NULL, 0 }, // particleToGridCoupling.accelTimeConstant + { TYPE_F32, false, (size_t)(&((ParticleToGridCouplingParams_Type*)0)->decelTimeConstant), NULL, 0 }, // particleToGridCoupling.decelTimeConstant + { TYPE_F32, false, (size_t)(&((ParticleToGridCouplingParams_Type*)0)->thresholdMultiplier), NULL, 0 }, // particleToGridCoupling.thresholdMultiplier + { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->gridToParticleCoupling), CHILDREN(34), 3 }, // gridToParticleCoupling + { TYPE_F32, false, (size_t)(&((GridToParticleCouplingParams_Type*)0)->accelTimeConstant), NULL, 0 }, // gridToParticleCoupling.accelTimeConstant + { TYPE_F32, false, (size_t)(&((GridToParticleCouplingParams_Type*)0)->decelTimeConstant), NULL, 0 }, // gridToParticleCoupling.decelTimeConstant + { TYPE_F32, false, (size_t)(&((GridToParticleCouplingParams_Type*)0)->thresholdMultiplier), NULL, 0 }, // gridToParticleCoupling.thresholdMultiplier +}; + + +bool BasicIOSAssetParam_1p4::mBuiltFlag = false; +NvParameterized::MutexType BasicIOSAssetParam_1p4::mBuiltFlagMutex; + +BasicIOSAssetParam_1p4::BasicIOSAssetParam_1p4(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIOSAssetParam_1p4FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIOSAssetParam_1p4::~BasicIOSAssetParam_1p4() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIOSAssetParam_1p4::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->~BasicIOSAssetParam_1p4(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p4::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIOSAssetParam_1p4::getParameterDefinitionTree(void) const +{ + BasicIOSAssetParam_1p4* tmpParam = const_cast<BasicIOSAssetParam_1p4*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIOSAssetParam_1p4::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 BasicIOSAssetParam_1p4::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 BasicIOSAssetParam_1p4::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIOSAssetParam_1p4::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIOSAssetParam_1p4::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 BasicIOSAssetParam_1p4::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="restDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("restDensity", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), 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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nAuthored density of the instanced objects simulated by this IOS. Emitters need this\nvalue for constant density emitter effects.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Rest density of particles", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="particleRadius" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("particleRadius", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[2].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("gameScale", "true", true); + HintTable[1].init("longDescription", "\nRadius of a particle.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Radius of a particle", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="maxParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("maxParticleCount", 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[3].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", "Maximum particle count", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=4, longName="maxInjectedParticleCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; + ParamDef->init("maxInjectedParticleCount", 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(0), 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("longDescription", "\nThe maximum number of new particles to be spawned on each frame. Use values >1 to provide the absolute value,\nor 0 <= x <= 1 to provide the percentage rate to overall number of particles. \n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Maximum number of newly created particles on each frame", true); + ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=5, longName="maxCollidingObjects" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; + ParamDef->init("maxCollidingObjects", 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[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("longDescription", "Maximum number of objects that are able to collide with each other (boxes, spheres, capsules, hspaces, convexmeshes, trimeshes).\n", true); + HintTable[1].init("min", uint64_t(1), true); + HintTable[2].init("shortDescription", "Maximum number of particles that are able to collide with each other.", true); + ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=6, longName="sceneGravityScale" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; + ParamDef->init("sceneGravityScale", 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(0), true); + ParamDefTable[6].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", "Used to scale, or even disable the basic IOS's gravity", true); + ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=7, longName="externalAcceleration" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; + ParamDef->init("externalAcceleration", TYPE_VEC3, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("gameScale", "true", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("shortDescription", "Acceleration (m/s^2) applied to all particles at all time steps (added to the scaled scene gravity).", true); + ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=8, longName="particleMass" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; + ParamDef->init("particleMass", TYPE_STRUCT, "RandomF32", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Defines parameters of probability distribution of particle masses.\n", true); + HintTable[1].init("shortDescription", "Probability distribution of particle masses for this IOS.", true); + ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=9, longName="particleMass.center" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; + ParamDef->init("center", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Center of distribution", true); + ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=10, longName="particleMass.spread" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; + ParamDef->init("spread", 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", "Spread is std deviation for normal distribution or halfwidth for uniform distribution.\n", true); + HintTable[1].init("shortDescription", "Spread of distribution", true); + ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=11, longName="particleMass.type" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; + ParamDef->init("type", TYPE_ENUM, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Type of probability distribution (currently only normal and uniform are supported).\n", true); + HintTable[1].init("shortDescription", "Distribution type", true); + ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "uniform", "normal" }; + ParamDefTable[11].setEnumVals((const char**)EnumVals, 2); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=12, longName="collisionFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; + ParamDef->init("collisionFilterDataName", TYPE_STRING, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("HIDDEN", uint64_t(1), true); + HintTable[1].init("shortDescription", "The filter data (group/groupsMask) name for IOS vs PhysX interaction.", true); + ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=13, longName="fieldSamplerFilterDataName" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; + ParamDef->init("fieldSamplerFilterDataName", 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 filter data name for IOS vs FieldSampler interaction.", true); + ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=14, longName="staticCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; + ParamDef->init("staticCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with static shapes", true); + ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=15, longName="restitutionForStaticShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; + ParamDef->init("restitutionForStaticShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with static shapes.", true); + ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=16, longName="dynamicCollision" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; + ParamDef->init("dynamicCollision", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with dynamic shapes", true); + ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=17, longName="restitutionForDynamicShapes" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; + ParamDef->init("restitutionForDynamicShapes", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#else + + static HintImpl HintTable[4]; + static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; + HintTable[0].init("defaultValue", double(0.5), true); + HintTable[1].init("max", uint64_t(1), true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Defines the restitution coefficient used for collisions with dynamic shapes.", true); + ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=18, longName="collisionDistanceMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; + ParamDef->init("collisionDistanceMultiplier", 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(0), true); + ParamDefTable[18].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", "Defines the distance (= collisionDistanceMultiplier*particleRadius) between particles and collision geometry, which is maintained during simulation.", true); + ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=19, longName="collisionThreshold" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; + ParamDef->init("collisionThreshold", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#else + + static HintImpl HintTable[3]; + static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; + HintTable[0].init("gameScale", "true", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "Defines the threshold for collision between particles and collision geometry, inside this threshold collision contact is generated without a response.", true); + ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=20, longName="collisionWithConvex" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; + ParamDef->init("collisionWithConvex", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(1), true); + HintTable[1].init("shortDescription", "Enables collision with convex shapes", true); + ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=21, longName="collisionWithTriangleMesh" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; + ParamDef->init("collisionWithTriangleMesh", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables collision with triangle mesh shapes", true); + ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=22, longName="GridDensity" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; + ParamDef->init("GridDensity", TYPE_STRUCT, "GridDensityParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("longDescription", "Settings for Density Grid\n", true); + HintTable[1].init("shortDescription", "Settings for Density Grid", true); + ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=23, longName="GridDensity.Enabled" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; + ParamDef->init("Enabled", 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 option is true; density will be computed based on the grouping of particles in a 3d grid\n", true); + HintTable[1].init("shortDescription", "Compute Density Using a Grid", true); + ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=24, longName="GridDensity.Resolution" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; + ParamDef->init("Resolution", TYPE_ENUM, 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 enumeration defines the 3d resolution of the grid.\n", true); + HintTable[1].init("shortDescription", "Number of cells in a 3D grid, used to calculate particles positions. Higher values divide the grid into more cells.", true); + ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + static const char* const EnumVals[] = { "GDG_8", "GDG_16", "GDG_32", "GDG_64", "GDG_128", "GDG_256" }; + ParamDefTable[24].setEnumVals((const char**)EnumVals, 6); + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=25, longName="GridDensity.GridSize" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; + ParamDef->init("GridSize", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("DISPLAY_NAME", "Grid Depth", true); + HintTable[1].init("min", uint64_t(0), true); + ParamDefTable[25].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("DISPLAY_NAME", "Grid Depth", true); + HintTable[1].init("longDescription", "The default value is a 10 units\nMust be positive.\n", true); + HintTable[2].init("min", uint64_t(0), true); + HintTable[3].init("shortDescription", "Depth of grid.", true); + ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 4); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=26, longName="GridDensity.MaxCellCount" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; + ParamDef->init("MaxCellCount", 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[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("longDescription", "This is the integer count representing how many particles reside in a single grid cell before the density is considered 1.\nIt is valid for the density to be greater than one. For example, if there were 32 particles in a grid cell with a max-cell count of\n16, then the density would be equal to 2.\n", true); + HintTable[1].init("min", uint64_t(0), true); + HintTable[2].init("shortDescription", "This is the number of particles within a gridcell for a density of 1", true); + ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 3); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=27, longName="enableTemperatureBuffer" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; + ParamDef->init("enableTemperatureBuffer", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), 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("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables temperature buffer.", true); + ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=28, longName="enableDensityBuffer" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; + ParamDef->init("enableDensityBuffer", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), 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("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "Enables density buffer.", true); + ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=29, longName="enableCouplingOverride" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; + ParamDef->init("enableCouplingOverride", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#else + + static HintImpl HintTable[2]; + static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; + HintTable[0].init("defaultValue", uint64_t(0), true); + HintTable[1].init("shortDescription", "If true, IOS coupling settings are used. If false, dynamic grid coupling settings are used.", true); + ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=30, longName="particleToGridCoupling" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; + ParamDef->init("particleToGridCoupling", TYPE_STRUCT, "ParticleToGridCouplingParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Settings for particle to grid coupling", true); + ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=31, longName="particleToGridCoupling.accelTimeConstant" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; + ParamDef->init("accelTimeConstant", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Controls rate at which the grid accepts influence from particles. A value of 0 means instant coupling.", true); + ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=32, longName="particleToGridCoupling.decelTimeConstant" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; + ParamDef->init("decelTimeConstant", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Controls rate at which the grid accepts influence from particles. A value of 0 means instant coupling.", true); + ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=33, longName="particleToGridCoupling.thresholdMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; + ParamDef->init("thresholdMultiplier", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "A value greater than 1 creates a deadzone, where no particle to grid coupling occurs.", true); + ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=34, longName="gridToParticleCoupling" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; + ParamDef->init("gridToParticleCoupling", TYPE_STRUCT, "GridToParticleCouplingParams", true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Settings for grid to particle coupling", true); + ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=35, longName="gridToParticleCoupling.accelTimeConstant" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; + ParamDef->init("accelTimeConstant", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Controls rate at which particles accept influence from the grid. A value of 0 means instant coupling.", true); + ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=36, longName="gridToParticleCoupling.decelTimeConstant" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; + ParamDef->init("decelTimeConstant", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Controls rate at which particles accept influence from the grid. A value of 0 means instant coupling.", true); + ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=37, longName="gridToParticleCoupling.thresholdMultiplier" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; + ParamDef->init("thresholdMultiplier", TYPE_F32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "A value greater than 1 creates a deadzone, where no grid to particle coupling occurs.", true); + ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[24]; + 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(12); + Children[9] = PDEF_PTR(13); + Children[10] = PDEF_PTR(14); + Children[11] = PDEF_PTR(15); + Children[12] = PDEF_PTR(16); + Children[13] = PDEF_PTR(17); + Children[14] = PDEF_PTR(18); + Children[15] = PDEF_PTR(19); + Children[16] = PDEF_PTR(20); + Children[17] = PDEF_PTR(21); + Children[18] = PDEF_PTR(22); + Children[19] = PDEF_PTR(27); + Children[20] = PDEF_PTR(28); + Children[21] = PDEF_PTR(29); + Children[22] = PDEF_PTR(30); + Children[23] = PDEF_PTR(34); + + ParamDefTable[0].setChildren(Children, 24); + } + + // SetChildren for: nodeIndex=8, longName="particleMass" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(9); + Children[1] = PDEF_PTR(10); + Children[2] = PDEF_PTR(11); + + ParamDefTable[8].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=22, longName="GridDensity" + { + static Definition* Children[4]; + Children[0] = PDEF_PTR(23); + Children[1] = PDEF_PTR(24); + Children[2] = PDEF_PTR(25); + Children[3] = PDEF_PTR(26); + + ParamDefTable[22].setChildren(Children, 4); + } + + // SetChildren for: nodeIndex=30, longName="particleToGridCoupling" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(31); + Children[1] = PDEF_PTR(32); + Children[2] = PDEF_PTR(33); + + ParamDefTable[30].setChildren(Children, 3); + } + + // SetChildren for: nodeIndex=34, longName="gridToParticleCoupling" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(35); + Children[1] = PDEF_PTR(36); + Children[2] = PDEF_PTR(37); + + ParamDefTable[34].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void BasicIOSAssetParam_1p4::initStrings(void) +{ + collisionFilterDataName.isAllocated = true; + collisionFilterDataName.buf = NULL; + fieldSamplerFilterDataName.isAllocated = true; + fieldSamplerFilterDataName.buf = NULL; +} + +void BasicIOSAssetParam_1p4::initDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p4::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + restDensity = float(0); + particleRadius = float(1); + maxParticleCount = uint32_t(16384); + maxInjectedParticleCount = float(0.1); + maxCollidingObjects = uint32_t(32); + sceneGravityScale = float(1); + externalAcceleration = physx::PxVec3(init(0, 0, 0)); + particleMass.center = float(0); + particleMass.spread = float(0); + particleMass.type = (const char*)"uniform"; + + particleMass.center = 1.0f; + + staticCollision = bool(1); + restitutionForStaticShapes = float(0.5f); + dynamicCollision = bool(1); + restitutionForDynamicShapes = float(0.5f); + collisionDistanceMultiplier = float(1.0f); + collisionThreshold = float(0.001f); + collisionWithConvex = bool(1); + collisionWithTriangleMesh = bool(0); + GridDensity.Enabled = bool(0); + GridDensity.Resolution = (const char*)"GDG_16"; + GridDensity.GridSize = float(10); + GridDensity.MaxCellCount = uint32_t(16); + enableTemperatureBuffer = bool(0); + enableDensityBuffer = bool(0); + enableCouplingOverride = bool(0); + particleToGridCoupling.accelTimeConstant = float(0.01); + particleToGridCoupling.decelTimeConstant = float(10); + particleToGridCoupling.thresholdMultiplier = float(2); + gridToParticleCoupling.accelTimeConstant = float(0.01); + gridToParticleCoupling.decelTimeConstant = float(0.01); + gridToParticleCoupling.thresholdMultiplier = float(1); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIOSAssetParam_1p4::initReferences(void) +{ +} + +void BasicIOSAssetParam_1p4::freeDynamicArrays(void) +{ +} + +void BasicIOSAssetParam_1p4::freeStrings(void) +{ + + if (collisionFilterDataName.isAllocated && collisionFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)collisionFilterDataName.buf); + } + + if (fieldSamplerFilterDataName.isAllocated && fieldSamplerFilterDataName.buf) + { + mParameterizedTraits->strfree((char*)fieldSamplerFilterDataName.buf); + } +} + +void BasicIOSAssetParam_1p4::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIosDebugRenderParams_0p0.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIosDebugRenderParams_0p0.cpp new file mode 100644 index 00000000..5802cece --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIosDebugRenderParams_0p0.cpp @@ -0,0 +1,358 @@ +// 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 "BasicIosDebugRenderParams_0p0.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIosDebugRenderParams_0p0NS; + +const char* const BasicIosDebugRenderParams_0p0Factory::vptr = + NvParameterized::getVptr<BasicIosDebugRenderParams_0p0, BasicIosDebugRenderParams_0p0::ClassAlignment>(); + +const uint32_t NumParamDefs = 4; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, 2, 3, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 3 }, + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->VISUALIZE_BASIC_IOS_ACTOR), NULL, 0 }, // VISUALIZE_BASIC_IOS_ACTOR + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->VISUALIZE_BASIC_IOS_COLLIDE_SHAPES), NULL, 0 }, // VISUALIZE_BASIC_IOS_COLLIDE_SHAPES + { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->VISUALIZE_BASIC_IOS_GRID_DENSITY), NULL, 0 }, // VISUALIZE_BASIC_IOS_GRID_DENSITY +}; + + +bool BasicIosDebugRenderParams_0p0::mBuiltFlag = false; +NvParameterized::MutexType BasicIosDebugRenderParams_0p0::mBuiltFlagMutex; + +BasicIosDebugRenderParams_0p0::BasicIosDebugRenderParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIosDebugRenderParams_0p0FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIosDebugRenderParams_0p0::~BasicIosDebugRenderParams_0p0() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIosDebugRenderParams_0p0::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->~BasicIosDebugRenderParams_0p0(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIosDebugRenderParams_0p0::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIosDebugRenderParams_0p0::getParameterDefinitionTree(void) const +{ + BasicIosDebugRenderParams_0p0* tmpParam = const_cast<BasicIosDebugRenderParams_0p0*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIosDebugRenderParams_0p0::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 BasicIosDebugRenderParams_0p0::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 BasicIosDebugRenderParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIosDebugRenderParams_0p0::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIosDebugRenderParams_0p0::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 BasicIosDebugRenderParams_0p0::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="VISUALIZE_BASIC_IOS_ACTOR" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("VISUALIZE_BASIC_IOS_ACTOR", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Render the IOS Actor in view window", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=2, longName="VISUALIZE_BASIC_IOS_COLLIDE_SHAPES" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; + ParamDef->init("VISUALIZE_BASIC_IOS_COLLIDE_SHAPES", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Render the IOS collision shapes in view window", true); + ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=3, longName="VISUALIZE_BASIC_IOS_GRID_DENSITY" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; + ParamDef->init("VISUALIZE_BASIC_IOS_GRID_DENSITY", TYPE_BOOL, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "Render the IOS Grid Density in the view window", true); + ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[3]; + Children[0] = PDEF_PTR(1); + Children[1] = PDEF_PTR(2); + Children[2] = PDEF_PTR(3); + + ParamDefTable[0].setChildren(Children, 3); + } + + mBuiltFlag = true; + +} +void BasicIosDebugRenderParams_0p0::initStrings(void) +{ +} + +void BasicIosDebugRenderParams_0p0::initDynamicArrays(void) +{ +} + +void BasicIosDebugRenderParams_0p0::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + VISUALIZE_BASIC_IOS_ACTOR = bool(true); + VISUALIZE_BASIC_IOS_COLLIDE_SHAPES = bool(false); + VISUALIZE_BASIC_IOS_GRID_DENSITY = bool(false); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIosDebugRenderParams_0p0::initReferences(void) +{ +} + +void BasicIosDebugRenderParams_0p0::freeDynamicArrays(void) +{ +} + +void BasicIosDebugRenderParams_0p0::freeStrings(void) +{ +} + +void BasicIosDebugRenderParams_0p0::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/BasicIosModuleParameters_0p0.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIosModuleParameters_0p0.cpp new file mode 100644 index 00000000..29aeb84b --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/BasicIosModuleParameters_0p0.cpp @@ -0,0 +1,318 @@ +// 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 "BasicIosModuleParameters_0p0.h" +#include <string.h> +#include <stdlib.h> + +using namespace NvParameterized; + +namespace nvidia +{ +namespace parameterized +{ + +using namespace BasicIosModuleParameters_0p0NS; + +const char* const BasicIosModuleParameters_0p0Factory::vptr = + NvParameterized::getVptr<BasicIosModuleParameters_0p0, BasicIosModuleParameters_0p0::ClassAlignment>(); + +const uint32_t NumParamDefs = 2; +static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; + + +static const size_t ParamLookupChildrenTable[] = +{ + 1, +}; + +#define TENUM(type) nvidia::##type +#define CHILDREN(index) &ParamLookupChildrenTable[index] +static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = +{ + { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, + { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->unused), NULL, 0 }, // unused +}; + + +bool BasicIosModuleParameters_0p0::mBuiltFlag = false; +NvParameterized::MutexType BasicIosModuleParameters_0p0::mBuiltFlagMutex; + +BasicIosModuleParameters_0p0::BasicIosModuleParameters_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : + NvParameters(traits, buf, refCount) +{ + //mParameterizedTraits->registerFactory(className(), &BasicIosModuleParameters_0p0FactoryInst); + + if (!buf) //Do not init data if it is inplace-deserialized + { + initDynamicArrays(); + initStrings(); + initReferences(); + initDefaults(); + } +} + +BasicIosModuleParameters_0p0::~BasicIosModuleParameters_0p0() +{ + freeStrings(); + freeReferences(); + freeDynamicArrays(); +} + +void BasicIosModuleParameters_0p0::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->~BasicIosModuleParameters_0p0(); + + NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); +} + +const NvParameterized::DefinitionImpl* BasicIosModuleParameters_0p0::getParameterDefinitionTree(void) +{ + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +const NvParameterized::DefinitionImpl* BasicIosModuleParameters_0p0::getParameterDefinitionTree(void) const +{ + BasicIosModuleParameters_0p0* tmpParam = const_cast<BasicIosModuleParameters_0p0*>(this); + + if (!mBuiltFlag) // Double-checked lock + { + NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); + if (!mBuiltFlag) + { + tmpParam->buildTree(); + } + } + + return(&ParamDefTable[0]); +} + +NvParameterized::ErrorType BasicIosModuleParameters_0p0::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 BasicIosModuleParameters_0p0::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 BasicIosModuleParameters_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const +{ + ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<BasicIosModuleParameters_0p0::ParametersStruct*>(¶meters()), handle, offset); +} + + +/* Dynamic Handle Indices */ + +void BasicIosModuleParameters_0p0::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 BasicIosModuleParameters_0p0::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 ModuleBasicIos.", true); + ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // Initialize DefinitionImpl node: nodeIndex=1, longName="unused" + { + NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; + ParamDef->init("unused", TYPE_U32, NULL, true); + +#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS + +#else + + static HintImpl HintTable[1]; + static Hint* HintPtrTable[1] = { &HintTable[0], }; + HintTable[0].init("shortDescription", "No parameters necessary", true); + ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); + +#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ + + + + + + } + + // SetChildren for: nodeIndex=0, longName="" + { + static Definition* Children[1]; + Children[0] = PDEF_PTR(1); + + ParamDefTable[0].setChildren(Children, 1); + } + + mBuiltFlag = true; + +} +void BasicIosModuleParameters_0p0::initStrings(void) +{ +} + +void BasicIosModuleParameters_0p0::initDynamicArrays(void) +{ +} + +void BasicIosModuleParameters_0p0::initDefaults(void) +{ + + freeStrings(); + freeReferences(); + freeDynamicArrays(); + unused = uint32_t(0); + + initDynamicArrays(); + initStrings(); + initReferences(); +} + +void BasicIosModuleParameters_0p0::initReferences(void) +{ +} + +void BasicIosModuleParameters_0p0::freeDynamicArrays(void) +{ +} + +void BasicIosModuleParameters_0p0::freeStrings(void) +{ +} + +void BasicIosModuleParameters_0p0::freeReferences(void) +{ +} + +} // namespace parameterized +} // namespace nvidia diff --git a/APEX_1.4/module/basicios_legacy/src/autogen/ModuleBasicIOSLegacy.cpp b/APEX_1.4/module/basicios_legacy/src/autogen/ModuleBasicIOSLegacy.cpp new file mode 100644 index 00000000..6f3d5d32 --- /dev/null +++ b/APEX_1.4/module/basicios_legacy/src/autogen/ModuleBasicIOSLegacy.cpp @@ -0,0 +1,55 @@ +/* +* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. +* +* NVIDIA CORPORATION and its licensors retain all intellectual property +* and proprietary rights in and to this software, 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. +* +* This code was autogenerated from ModuleLegacy.template +*/ + +#include "ApexUsingNamespace.h" +#include "Apex.h" +#include "ApexLegacyModule.h" +#include "ApexRWLockable.h" +#include "ModuleBasicIOSLegacyRegistration.h" + +namespace nvidia +{ +namespace apex +{ +namespace legacy +{ + +class ModuleBasicIOSLegacy : public ApexLegacyModule, public ApexRWLockable +{ +public: + APEX_RW_LOCKABLE_BOILERPLATE + + ModuleBasicIOSLegacy(ApexSDKIntl* inSdk) + { + mName = "BasicIOS_Legacy"; + mSdk = inSdk; + mApiProxy = this; + ModuleBasicIOSLegacyRegistration::invokeRegistration(mSdk->getParameterizedTraits()); + } + +protected: + void releaseLegacyObjects() + { + ModuleBasicIOSLegacyRegistration::invokeUnregistration(mSdk->getParameterizedTraits()); + } +}; + +void instantiateModuleBasicIOSLegacy() +{ + ApexSDKIntl *sdk = GetInternalApexSDK(); + ModuleBasicIOSLegacy *impl = PX_NEW(ModuleBasicIOSLegacy)(sdk); + sdk->registerExternalModule((Module *) impl, (ModuleIntl *) impl); +} + +} +} +} |