diff options
| author | sschirm <[email protected]> | 2016-12-23 14:20:36 +0100 |
|---|---|---|
| committer | sschirm <[email protected]> | 2016-12-23 14:56:17 +0100 |
| commit | ef6937e69e8ee3f409cf9d460d5ad300a65d5924 (patch) | |
| tree | 710426e8daa605551ce3f34b581897011101c30f /APEX_1.4/module/iofx/src/autogen | |
| parent | Initial commit: (diff) | |
| download | physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.tar.xz physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.zip | |
PhysX 3.4 / APEX 1.4 release candidate @21506124
Diffstat (limited to 'APEX_1.4/module/iofx/src/autogen')
39 files changed, 0 insertions, 16671 deletions
diff --git a/APEX_1.4/module/iofx/src/autogen/ColorVsDensityCompositeModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ColorVsDensityCompositeModifierParams.cpp deleted file mode 100644 index aa12bd3b..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ColorVsDensityCompositeModifierParams.cpp +++ /dev/null @@ -1,459 +0,0 @@ -// 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 "ColorVsDensityCompositeModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ColorVsDensityCompositeModifierParamsNS; - -const char* const ColorVsDensityCompositeModifierParamsFactory::vptr = - NvParameterized::getVptr<ColorVsDensityCompositeModifierParams, ColorVsDensityCompositeModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(colorDensityStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((colorDensityStruct_Type*)0)->density), NULL, 0 }, // controlPoints[].density - { TYPE_VEC4, false, (size_t)(&((colorDensityStruct_Type*)0)->color), NULL, 0 }, // controlPoints[].color -}; - - -bool ColorVsDensityCompositeModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ColorVsDensityCompositeModifierParams::mBuiltFlagMutex; - -ColorVsDensityCompositeModifierParams::ColorVsDensityCompositeModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsDensityCompositeModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsDensityCompositeModifierParams::~ColorVsDensityCompositeModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsDensityCompositeModifierParams::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->~ColorVsDensityCompositeModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsDensityCompositeModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsDensityCompositeModifierParams::getParameterDefinitionTree(void) const -{ - ColorVsDensityCompositeModifierParams* tmpParam = const_cast<ColorVsDensityCompositeModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsDensityCompositeModifierParams::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 ColorVsDensityCompositeModifierParams::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 ColorVsDensityCompositeModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsDensityCompositeModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsDensityCompositeModifierParams::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 ColorVsDensityCompositeModifierParams::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", "ColorVsDensityComposite modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Density", true); - HintTable[5].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite color vs density curve", true); - HintTable[5].init("xAxisLabel", "Density", true); - HintTable[6].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "colorDensityStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Density", true); - HintTable[5].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite color vs density curve", true); - HintTable[5].init("xAxisLabel", "Density", true); - HintTable[6].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].density" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("density", 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[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", "Density", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].color" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("color", TYPE_VEC4, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("COLOR", uint64_t(1), true); - HintTable[1].init("max", uint64_t(16), true); - HintTable[2].init("min", uint64_t(0), true); - ParamDefTable[4].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("COLOR", uint64_t(1), true); - HintTable[1].init("max", uint64_t(16), true); - HintTable[2].init("min", uint64_t(0), true); - HintTable[3].init("shortDescription", "Color is formatted x=R, y=G, z=B, w=A", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ColorVsDensityCompositeModifierParams::initStrings(void) -{ -} - -void ColorVsDensityCompositeModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(colorDensityStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsDensityCompositeModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsDensityCompositeModifierParams::initReferences(void) -{ -} - -void ColorVsDensityCompositeModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsDensityCompositeModifierParams::freeStrings(void) -{ -} - -void ColorVsDensityCompositeModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ColorVsDensityModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ColorVsDensityModifierParams.cpp deleted file mode 100644 index 168f45c0..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ColorVsDensityModifierParams.cpp +++ /dev/null @@ -1,478 +0,0 @@ -// 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 "ColorVsDensityModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ColorVsDensityModifierParamsNS; - -const char* const ColorVsDensityModifierParamsFactory::vptr = - NvParameterized::getVptr<ColorVsDensityModifierParams, ColorVsDensityModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 6; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->colorChannel), NULL, 0 }, // colorChannel - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(2), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(3), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool ColorVsDensityModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ColorVsDensityModifierParams::mBuiltFlagMutex; - -ColorVsDensityModifierParams::ColorVsDensityModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsDensityModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsDensityModifierParams::~ColorVsDensityModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsDensityModifierParams::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->~ColorVsDensityModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsDensityModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsDensityModifierParams::getParameterDefinitionTree(void) const -{ - ColorVsDensityModifierParams* tmpParam = const_cast<ColorVsDensityModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsDensityModifierParams::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 ColorVsDensityModifierParams::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 ColorVsDensityModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsDensityModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsDensityModifierParams::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 ColorVsDensityModifierParams::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", "ColorVsDensity modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="colorChannel" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("colorChannel", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "alpha", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "alpha", true); - HintTable[1].init("shortDescription", "Color channel", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "red", "green", "blue", "alpha" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 4); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Density", true); - HintTable[5].init("yAxisLabel", "Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[8]; - static Hint* HintPtrTable[8] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[5].init("shortDescription", "Control points for a curve", true); - HintTable[6].init("xAxisLabel", "Density", true); - HintTable[7].init("yAxisLabel", "Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Density", true); - HintTable[5].init("yAxisLabel", "Color", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[8]; - static Hint* HintPtrTable[8] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[5].init("shortDescription", "Control points for a curve", true); - HintTable[6].init("xAxisLabel", "Density", true); - HintTable[7].init("yAxisLabel", "Color", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Density", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Color", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(3); - - ParamDefTable[2].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=3, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(4); - Children[1] = PDEF_PTR(5); - - ParamDefTable[3].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ColorVsDensityModifierParams::initStrings(void) -{ -} - -void ColorVsDensityModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsDensityModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - colorChannel = (const char*)"alpha"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsDensityModifierParams::initReferences(void) -{ -} - -void ColorVsDensityModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsDensityModifierParams::freeStrings(void) -{ -} - -void ColorVsDensityModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ColorVsLifeCompositeModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ColorVsLifeCompositeModifierParams.cpp deleted file mode 100644 index fbd9c761..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ColorVsLifeCompositeModifierParams.cpp +++ /dev/null @@ -1,471 +0,0 @@ -// 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 "ColorVsLifeCompositeModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ColorVsLifeCompositeModifierParamsNS; - -const char* const ColorVsLifeCompositeModifierParamsFactory::vptr = - NvParameterized::getVptr<ColorVsLifeCompositeModifierParams, ColorVsLifeCompositeModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(colorLifeStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((colorLifeStruct_Type*)0)->lifeRemaining), NULL, 0 }, // controlPoints[].lifeRemaining - { TYPE_VEC4, false, (size_t)(&((colorLifeStruct_Type*)0)->color), NULL, 0 }, // controlPoints[].color -}; - - -bool ColorVsLifeCompositeModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ColorVsLifeCompositeModifierParams::mBuiltFlagMutex; - -ColorVsLifeCompositeModifierParams::ColorVsLifeCompositeModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsLifeCompositeModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsLifeCompositeModifierParams::~ColorVsLifeCompositeModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsLifeCompositeModifierParams::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->~ColorVsLifeCompositeModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsLifeCompositeModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsLifeCompositeModifierParams::getParameterDefinitionTree(void) const -{ - ColorVsLifeCompositeModifierParams* tmpParam = const_cast<ColorVsLifeCompositeModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsLifeCompositeModifierParams::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 ColorVsLifeCompositeModifierParams::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 ColorVsLifeCompositeModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsLifeCompositeModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsLifeCompositeModifierParams::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 ColorVsLifeCompositeModifierParams::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", "ColorVsLifeComposite modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Life Time", true); - HintTable[5].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite color vs life curve", true); - HintTable[5].init("xAxisLabel", "Life Time", true); - HintTable[6].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "colorLifeStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Life Time", true); - HintTable[5].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite color vs life curve", true); - HintTable[5].init("xAxisLabel", "Life Time", true); - HintTable[6].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].lifeRemaining" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("lifeRemaining", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Life remaining", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].color" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("color", TYPE_VEC4, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[8]; - static Hint* HintPtrTable[8] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], }; - HintTable[0].init("COLOR", uint64_t(1), true); - HintTable[1].init("max_w", uint64_t(8), true); - HintTable[2].init("max_x", uint64_t(8), true); - HintTable[3].init("max_y", uint64_t(8), true); - HintTable[4].init("min_w", uint64_t(0), true); - HintTable[5].init("min_x", uint64_t(0), true); - HintTable[6].init("min_y", uint64_t(0), true); - HintTable[7].init("min_z", uint64_t(0), true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#else - - static HintImpl HintTable[9]; - static Hint* HintPtrTable[9] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], &HintTable[8], }; - HintTable[0].init("COLOR", uint64_t(1), true); - HintTable[1].init("max_w", uint64_t(8), true); - HintTable[2].init("max_x", uint64_t(8), true); - HintTable[3].init("max_y", uint64_t(8), true); - HintTable[4].init("min_w", uint64_t(0), true); - HintTable[5].init("min_x", uint64_t(0), true); - HintTable[6].init("min_y", uint64_t(0), true); - HintTable[7].init("min_z", uint64_t(0), true); - HintTable[8].init("shortDescription", "Color is formatted x=R, y=G, z=B, w=A", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 9); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ColorVsLifeCompositeModifierParams::initStrings(void) -{ -} - -void ColorVsLifeCompositeModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(colorLifeStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsLifeCompositeModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsLifeCompositeModifierParams::initReferences(void) -{ -} - -void ColorVsLifeCompositeModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsLifeCompositeModifierParams::freeStrings(void) -{ -} - -void ColorVsLifeCompositeModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ColorVsLifeModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ColorVsLifeModifierParams.cpp deleted file mode 100644 index 801c5209..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ColorVsLifeModifierParams.cpp +++ /dev/null @@ -1,474 +0,0 @@ -// 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 "ColorVsLifeModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ColorVsLifeModifierParamsNS; - -const char* const ColorVsLifeModifierParamsFactory::vptr = - NvParameterized::getVptr<ColorVsLifeModifierParams, ColorVsLifeModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 6; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->colorChannel), NULL, 0 }, // colorChannel - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(2), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(3), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool ColorVsLifeModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ColorVsLifeModifierParams::mBuiltFlagMutex; - -ColorVsLifeModifierParams::ColorVsLifeModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsLifeModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsLifeModifierParams::~ColorVsLifeModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsLifeModifierParams::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->~ColorVsLifeModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsLifeModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsLifeModifierParams::getParameterDefinitionTree(void) const -{ - ColorVsLifeModifierParams* tmpParam = const_cast<ColorVsLifeModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsLifeModifierParams::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 ColorVsLifeModifierParams::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 ColorVsLifeModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsLifeModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsLifeModifierParams::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 ColorVsLifeModifierParams::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", "ColorVsLife modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="colorChannel" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("colorChannel", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "alpha", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "alpha", true); - HintTable[1].init("shortDescription", "Color channel", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "red", "green", "blue", "alpha" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 4); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Life Time", true); - HintTable[2].init("yAxisLabel", "Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Life Time", true); - HintTable[2].init("yAxisLabel", "Color", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Color", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Life", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Color", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(3); - - ParamDefTable[2].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=3, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(4); - Children[1] = PDEF_PTR(5); - - ParamDefTable[3].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ColorVsLifeModifierParams::initStrings(void) -{ -} - -void ColorVsLifeModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsLifeModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - colorChannel = (const char*)"alpha"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsLifeModifierParams::initReferences(void) -{ -} - -void ColorVsLifeModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsLifeModifierParams::freeStrings(void) -{ -} - -void ColorVsLifeModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ColorVsTemperatureCompositeModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ColorVsTemperatureCompositeModifierParams.cpp deleted file mode 100644 index 388930f9..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ColorVsTemperatureCompositeModifierParams.cpp +++ /dev/null @@ -1,455 +0,0 @@ -// 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 "ColorVsTemperatureCompositeModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ColorVsTemperatureCompositeModifierParamsNS; - -const char* const ColorVsTemperatureCompositeModifierParamsFactory::vptr = - NvParameterized::getVptr<ColorVsTemperatureCompositeModifierParams, ColorVsTemperatureCompositeModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(colorTemperatureStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((colorTemperatureStruct_Type*)0)->temperature), NULL, 0 }, // controlPoints[].temperature - { TYPE_VEC4, false, (size_t)(&((colorTemperatureStruct_Type*)0)->color), NULL, 0 }, // controlPoints[].color -}; - - -bool ColorVsTemperatureCompositeModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ColorVsTemperatureCompositeModifierParams::mBuiltFlagMutex; - -ColorVsTemperatureCompositeModifierParams::ColorVsTemperatureCompositeModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsTemperatureCompositeModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsTemperatureCompositeModifierParams::~ColorVsTemperatureCompositeModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsTemperatureCompositeModifierParams::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->~ColorVsTemperatureCompositeModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsTemperatureCompositeModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsTemperatureCompositeModifierParams::getParameterDefinitionTree(void) const -{ - ColorVsTemperatureCompositeModifierParams* tmpParam = const_cast<ColorVsTemperatureCompositeModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsTemperatureCompositeModifierParams::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 ColorVsTemperatureCompositeModifierParams::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 ColorVsTemperatureCompositeModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsTemperatureCompositeModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsTemperatureCompositeModifierParams::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 ColorVsTemperatureCompositeModifierParams::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", "ColorVsTemperatureComposite modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Temperature", true); - HintTable[4].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite color vs Temperature curve", true); - HintTable[4].init("xAxisLabel", "Temperature", true); - HintTable[5].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "colorTemperatureStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Temperature", true); - HintTable[4].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite color vs Temperature curve", true); - HintTable[4].init("xAxisLabel", "Temperature", true); - HintTable[5].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].temperature" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("temperature", 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[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", "Temperature", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].color" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("color", TYPE_VEC4, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("COLOR", uint64_t(1), true); - HintTable[1].init("max", uint64_t(16), true); - HintTable[2].init("min", uint64_t(0), true); - ParamDefTable[4].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("COLOR", uint64_t(1), true); - HintTable[1].init("max", uint64_t(16), true); - HintTable[2].init("min", uint64_t(0), true); - HintTable[3].init("shortDescription", "Color is formatted x=R, y=G, z=B, w=A", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ColorVsTemperatureCompositeModifierParams::initStrings(void) -{ -} - -void ColorVsTemperatureCompositeModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(colorTemperatureStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsTemperatureCompositeModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsTemperatureCompositeModifierParams::initReferences(void) -{ -} - -void ColorVsTemperatureCompositeModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsTemperatureCompositeModifierParams::freeStrings(void) -{ -} - -void ColorVsTemperatureCompositeModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ColorVsTemperatureModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ColorVsTemperatureModifierParams.cpp deleted file mode 100644 index 3efec478..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ColorVsTemperatureModifierParams.cpp +++ /dev/null @@ -1,478 +0,0 @@ -// 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 "ColorVsTemperatureModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ColorVsTemperatureModifierParamsNS; - -const char* const ColorVsTemperatureModifierParamsFactory::vptr = - NvParameterized::getVptr<ColorVsTemperatureModifierParams, ColorVsTemperatureModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 6; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->colorChannel), NULL, 0 }, // colorChannel - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(2), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(3), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool ColorVsTemperatureModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ColorVsTemperatureModifierParams::mBuiltFlagMutex; - -ColorVsTemperatureModifierParams::ColorVsTemperatureModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsTemperatureModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsTemperatureModifierParams::~ColorVsTemperatureModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsTemperatureModifierParams::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->~ColorVsTemperatureModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsTemperatureModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsTemperatureModifierParams::getParameterDefinitionTree(void) const -{ - ColorVsTemperatureModifierParams* tmpParam = const_cast<ColorVsTemperatureModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsTemperatureModifierParams::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 ColorVsTemperatureModifierParams::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 ColorVsTemperatureModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsTemperatureModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsTemperatureModifierParams::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 ColorVsTemperatureModifierParams::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", "ColorVsTemperature modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="colorChannel" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("colorChannel", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "alpha", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "alpha", true); - HintTable[1].init("shortDescription", "Color channel", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "red", "green", "blue", "alpha" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 4); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Temperature", true); - HintTable[5].init("yAxisLabel", "Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[8]; - static Hint* HintPtrTable[8] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[5].init("shortDescription", "Control points for a curve", true); - HintTable[6].init("xAxisLabel", "Temperature", true); - HintTable[7].init("yAxisLabel", "Color", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Temperature", true); - HintTable[5].init("yAxisLabel", "Color", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[8]; - static Hint* HintPtrTable[8] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[5].init("shortDescription", "Control points for a curve", true); - HintTable[6].init("xAxisLabel", "Temperature", true); - HintTable[7].init("yAxisLabel", "Color", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Temperature", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Color", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(3); - - ParamDefTable[2].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=3, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(4); - Children[1] = PDEF_PTR(5); - - ParamDefTable[3].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ColorVsTemperatureModifierParams::initStrings(void) -{ -} - -void ColorVsTemperatureModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsTemperatureModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - colorChannel = (const char*)"alpha"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsTemperatureModifierParams::initReferences(void) -{ -} - -void ColorVsTemperatureModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsTemperatureModifierParams::freeStrings(void) -{ -} - -void ColorVsTemperatureModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ColorVsVelocityCompositeModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ColorVsVelocityCompositeModifierParams.cpp deleted file mode 100644 index 9745d6dc..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ColorVsVelocityCompositeModifierParams.cpp +++ /dev/null @@ -1,533 +0,0 @@ -// 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 "ColorVsVelocityCompositeModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ColorVsVelocityCompositeModifierParamsNS; - -const char* const ColorVsVelocityCompositeModifierParamsFactory::vptr = - NvParameterized::getVptr<ColorVsVelocityCompositeModifierParams, ColorVsVelocityCompositeModifierParams::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), 3 }, - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->velocity0), NULL, 0 }, // velocity0 - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->velocity1), NULL, 0 }, // velocity1 - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(3), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(colorVelocityStruct_Type), CHILDREN(4), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((colorVelocityStruct_Type*)0)->velocity), NULL, 0 }, // controlPoints[].velocity - { TYPE_VEC4, false, (size_t)(&((colorVelocityStruct_Type*)0)->color), NULL, 0 }, // controlPoints[].color -}; - - -bool ColorVsVelocityCompositeModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ColorVsVelocityCompositeModifierParams::mBuiltFlagMutex; - -ColorVsVelocityCompositeModifierParams::ColorVsVelocityCompositeModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsVelocityCompositeModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsVelocityCompositeModifierParams::~ColorVsVelocityCompositeModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsVelocityCompositeModifierParams::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->~ColorVsVelocityCompositeModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsVelocityCompositeModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsVelocityCompositeModifierParams::getParameterDefinitionTree(void) const -{ - ColorVsVelocityCompositeModifierParams* tmpParam = const_cast<ColorVsVelocityCompositeModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsVelocityCompositeModifierParams::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 ColorVsVelocityCompositeModifierParams::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 ColorVsVelocityCompositeModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsVelocityCompositeModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsVelocityCompositeModifierParams::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 ColorVsVelocityCompositeModifierParams::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", "ColorVsVelocityComposite modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="velocity0" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("velocity0", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("gameScale", "true", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("gameScale", "true", true); - HintTable[1].init("shortDescription", "First velocity point", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="velocity1" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("velocity1", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("gameScale", "true", true); - ParamDefTable[2].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", "Second velocity point", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Velocity", true); - HintTable[5].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite color vs velocity curve", true); - HintTable[5].init("xAxisLabel", "Velocity", true); - HintTable[6].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("controlPoints", TYPE_STRUCT, "colorVelocityStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Velocity", true); - HintTable[5].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(2), true); - HintTable[2].init("ColorWheel", "true", true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite color vs velocity curve", true); - HintTable[5].init("xAxisLabel", "Velocity", true); - HintTable[6].init("yAxisLabel", "Alpha + Color", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="controlPoints[].velocity" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("velocity", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Velocity", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="controlPoints[].color" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("color", TYPE_VEC4, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[8]; - static Hint* HintPtrTable[8] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], }; - HintTable[0].init("COLOR", uint64_t(1), true); - HintTable[1].init("max_w", uint64_t(8), true); - HintTable[2].init("max_x", uint64_t(8), true); - HintTable[3].init("max_y", uint64_t(8), true); - HintTable[4].init("min_w", uint64_t(0), true); - HintTable[5].init("min_x", uint64_t(0), true); - HintTable[6].init("min_y", uint64_t(0), true); - HintTable[7].init("min_z", uint64_t(0), true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#else - - static HintImpl HintTable[9]; - static Hint* HintPtrTable[9] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], &HintTable[8], }; - HintTable[0].init("COLOR", uint64_t(1), true); - HintTable[1].init("max_w", uint64_t(8), true); - HintTable[2].init("max_x", uint64_t(8), true); - HintTable[3].init("max_y", uint64_t(8), true); - HintTable[4].init("min_w", uint64_t(0), true); - HintTable[5].init("min_x", uint64_t(0), true); - HintTable[6].init("min_y", uint64_t(0), true); - HintTable[7].init("min_z", uint64_t(0), true); - HintTable[8].init("shortDescription", "Color is formatted x=R, y=G, z=B, w=A", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 9); - -#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); - } - - // SetChildren for: nodeIndex=3, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(4); - - ParamDefTable[3].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=4, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - - ParamDefTable[4].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ColorVsVelocityCompositeModifierParams::initStrings(void) -{ -} - -void ColorVsVelocityCompositeModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(colorVelocityStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsVelocityCompositeModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - velocity0 = float(0); - velocity1 = float(1); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsVelocityCompositeModifierParams::initReferences(void) -{ -} - -void ColorVsVelocityCompositeModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsVelocityCompositeModifierParams::freeStrings(void) -{ -} - -void ColorVsVelocityCompositeModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ColorVsVelocityModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ColorVsVelocityModifierParams.cpp deleted file mode 100644 index 5b593de8..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ColorVsVelocityModifierParams.cpp +++ /dev/null @@ -1,524 +0,0 @@ -// 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 "ColorVsVelocityModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ColorVsVelocityModifierParamsNS; - -const char* const ColorVsVelocityModifierParamsFactory::vptr = - NvParameterized::getVptr<ColorVsVelocityModifierParams, ColorVsVelocityModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 8; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, 6, 7, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 4 }, - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->colorChannel), NULL, 0 }, // colorChannel - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->velocity0), NULL, 0 }, // velocity0 - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->velocity1), NULL, 0 }, // velocity1 - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(4), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(5), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool ColorVsVelocityModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ColorVsVelocityModifierParams::mBuiltFlagMutex; - -ColorVsVelocityModifierParams::ColorVsVelocityModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsVelocityModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsVelocityModifierParams::~ColorVsVelocityModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsVelocityModifierParams::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->~ColorVsVelocityModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsVelocityModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsVelocityModifierParams::getParameterDefinitionTree(void) const -{ - ColorVsVelocityModifierParams* tmpParam = const_cast<ColorVsVelocityModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsVelocityModifierParams::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 ColorVsVelocityModifierParams::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 ColorVsVelocityModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsVelocityModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsVelocityModifierParams::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 ColorVsVelocityModifierParams::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", "ColorVsVelocity modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="colorChannel" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("colorChannel", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "alpha", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "alpha", true); - HintTable[1].init("shortDescription", "Color channel", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "red", "green", "blue", "alpha" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 4); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="velocity0" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("velocity0", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Helpful documentation goes here", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="velocity1" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("velocity1", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Helpful documentation goes here", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Velocity", true); - HintTable[2].init("yAxisLabel", "Color", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Velocity", true); - HintTable[4].init("yAxisLabel", "Color", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Velocity", true); - HintTable[2].init("yAxisLabel", "Color", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Velocity", true); - HintTable[4].init("yAxisLabel", "Color", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Velocity", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Color", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#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); - } - - // SetChildren for: nodeIndex=4, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(5); - - ParamDefTable[4].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=5, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(6); - Children[1] = PDEF_PTR(7); - - ParamDefTable[5].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ColorVsVelocityModifierParams::initStrings(void) -{ -} - -void ColorVsVelocityModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsVelocityModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - colorChannel = (const char*)"alpha"; - velocity0 = float(0); - velocity1 = float(1); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsVelocityModifierParams::initReferences(void) -{ -} - -void ColorVsVelocityModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsVelocityModifierParams::freeStrings(void) -{ -} - -void ColorVsVelocityModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/InitialColorModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/InitialColorModifierParams.cpp deleted file mode 100644 index 58ca122d..00000000 --- a/APEX_1.4/module/iofx/src/autogen/InitialColorModifierParams.cpp +++ /dev/null @@ -1,328 +0,0 @@ -// 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 "InitialColorModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace InitialColorModifierParamsNS; - -const char* const InitialColorModifierParamsFactory::vptr = - NvParameterized::getVptr<InitialColorModifierParams, InitialColorModifierParams::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_VEC4, false, (size_t)(&((ParametersStruct*)0)->color), NULL, 0 }, // color -}; - - -bool InitialColorModifierParams::mBuiltFlag = false; -NvParameterized::MutexType InitialColorModifierParams::mBuiltFlagMutex; - -InitialColorModifierParams::InitialColorModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &InitialColorModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -InitialColorModifierParams::~InitialColorModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void InitialColorModifierParams::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->~InitialColorModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* InitialColorModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* InitialColorModifierParams::getParameterDefinitionTree(void) const -{ - InitialColorModifierParams* tmpParam = const_cast<InitialColorModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType InitialColorModifierParams::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 InitialColorModifierParams::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 InitialColorModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<InitialColorModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void InitialColorModifierParams::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 InitialColorModifierParams::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", "InitialColor modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="color" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("color", TYPE_VEC4, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("COLOR", uint64_t(1), true); - HintTable[1].init("max", uint64_t(1), true); - HintTable[2].init("min", uint64_t(0), true); - ParamDefTable[1].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("COLOR", uint64_t(1), true); - HintTable[1].init("max", uint64_t(1), true); - HintTable[2].init("min", uint64_t(0), true); - HintTable[3].init("shortDescription", "Color is formatted x=R, y=G, z=B, w=A", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#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 InitialColorModifierParams::initStrings(void) -{ -} - -void InitialColorModifierParams::initDynamicArrays(void) -{ -} - -void InitialColorModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - color = physx::PxVec4(initVec4(1, 1, 1, 1)); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void InitialColorModifierParams::initReferences(void) -{ -} - -void InitialColorModifierParams::freeDynamicArrays(void) -{ -} - -void InitialColorModifierParams::freeStrings(void) -{ -} - -void InitialColorModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/IofxAssetParameters.cpp b/APEX_1.4/module/iofx/src/autogen/IofxAssetParameters.cpp deleted file mode 100644 index 5d29be2d..00000000 --- a/APEX_1.4/module/iofx/src/autogen/IofxAssetParameters.cpp +++ /dev/null @@ -1,425 +0,0 @@ -// 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 "IofxAssetParameters.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace IofxAssetParametersNS; - -const char* const IofxAssetParametersFactory::vptr = - NvParameterized::getVptr<IofxAssetParameters, IofxAssetParameters::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), 2 }, - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->iofxType), NULL, 0 }, // iofxType - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->renderOutput), CHILDREN(2), 2 }, // renderOutput - { TYPE_BOOL, false, (size_t)(&((outputProperties_Type*)0)->useUserSemantic), NULL, 0 }, // renderOutput.useUserSemantic - { TYPE_BOOL, false, (size_t)(&((outputProperties_Type*)0)->useFloat4Color), NULL, 0 }, // renderOutput.useFloat4Color -}; - - -bool IofxAssetParameters::mBuiltFlag = false; -NvParameterized::MutexType IofxAssetParameters::mBuiltFlagMutex; - -IofxAssetParameters::IofxAssetParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &IofxAssetParametersFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -IofxAssetParameters::~IofxAssetParameters() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void IofxAssetParameters::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->~IofxAssetParameters(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* IofxAssetParameters::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* IofxAssetParameters::getParameterDefinitionTree(void) const -{ - IofxAssetParameters* tmpParam = const_cast<IofxAssetParameters*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType IofxAssetParameters::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 IofxAssetParameters::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 IofxAssetParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<IofxAssetParameters::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void IofxAssetParameters::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 IofxAssetParameters::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", "Contains the asset properties for an IOFX", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="iofxType" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("iofxType", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Contains the mesh or sprite IOFX parameters, only one may be selected", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "MeshIofxParameters", "SpriteIofxParameters" }; - ParamDefTable[1].setRefVariantVals((const char**)RefVariantVals, 2); - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="renderOutput" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("renderOutput", TYPE_STRUCT, "outputProperties", 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[2].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", "render output properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="renderOutput.useUserSemantic" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("useUserSemantic", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "use user semantic in render output", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="renderOutput.useFloat4Color" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("useFloat4Color", TYPE_BOOL, 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[4].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", "use float4 color in render output", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=2, longName="renderOutput" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void IofxAssetParameters::initStrings(void) -{ -} - -void IofxAssetParameters::initDynamicArrays(void) -{ -} - -void IofxAssetParameters::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - renderOutput.useUserSemantic = bool(false); - renderOutput.useFloat4Color = bool(false); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void IofxAssetParameters::initReferences(void) -{ - iofxType = NULL; - -} - -void IofxAssetParameters::freeDynamicArrays(void) -{ -} - -void IofxAssetParameters::freeStrings(void) -{ -} - -void IofxAssetParameters::freeReferences(void) -{ - if (iofxType) - { - iofxType->destroy(); - } - -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/IofxDebugRenderParams.cpp b/APEX_1.4/module/iofx/src/autogen/IofxDebugRenderParams.cpp deleted file mode 100644 index 73271f70..00000000 --- a/APEX_1.4/module/iofx/src/autogen/IofxDebugRenderParams.cpp +++ /dev/null @@ -1,358 +0,0 @@ -// 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 "IofxDebugRenderParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace IofxDebugRenderParamsNS; - -const char* const IofxDebugRenderParamsFactory::vptr = - NvParameterized::getVptr<IofxDebugRenderParams, IofxDebugRenderParams::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_IOFX_ACTOR), NULL, 0 }, // VISUALIZE_IOFX_ACTOR - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->VISUALIZE_IOFX_BOUNDING_BOX), NULL, 0 }, // VISUALIZE_IOFX_BOUNDING_BOX - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->VISUALIZE_IOFX_ACTOR_NAME), NULL, 0 }, // VISUALIZE_IOFX_ACTOR_NAME -}; - - -bool IofxDebugRenderParams::mBuiltFlag = false; -NvParameterized::MutexType IofxDebugRenderParams::mBuiltFlagMutex; - -IofxDebugRenderParams::IofxDebugRenderParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &IofxDebugRenderParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -IofxDebugRenderParams::~IofxDebugRenderParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void IofxDebugRenderParams::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->~IofxDebugRenderParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* IofxDebugRenderParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* IofxDebugRenderParams::getParameterDefinitionTree(void) const -{ - IofxDebugRenderParams* tmpParam = const_cast<IofxDebugRenderParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType IofxDebugRenderParams::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 IofxDebugRenderParams::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 IofxDebugRenderParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<IofxDebugRenderParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void IofxDebugRenderParams::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 IofxDebugRenderParams::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_IOFX_ACTOR" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("VISUALIZE_IOFX_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 IOFX 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_IOFX_BOUNDING_BOX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("VISUALIZE_IOFX_BOUNDING_BOX", 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 IOFX bounding box in view window", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="VISUALIZE_IOFX_ACTOR_NAME" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("VISUALIZE_IOFX_ACTOR_NAME", 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 IOFX actor name in 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 IofxDebugRenderParams::initStrings(void) -{ -} - -void IofxDebugRenderParams::initDynamicArrays(void) -{ -} - -void IofxDebugRenderParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - VISUALIZE_IOFX_ACTOR = bool(false); - VISUALIZE_IOFX_BOUNDING_BOX = bool(true); - VISUALIZE_IOFX_ACTOR_NAME = bool(true); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void IofxDebugRenderParams::initReferences(void) -{ -} - -void IofxDebugRenderParams::freeDynamicArrays(void) -{ -} - -void IofxDebugRenderParams::freeStrings(void) -{ -} - -void IofxDebugRenderParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/IofxModuleParameters.cpp b/APEX_1.4/module/iofx/src/autogen/IofxModuleParameters.cpp deleted file mode 100644 index 4bae7ae3..00000000 --- a/APEX_1.4/module/iofx/src/autogen/IofxModuleParameters.cpp +++ /dev/null @@ -1,318 +0,0 @@ -// 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 "IofxModuleParameters.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace IofxModuleParametersNS; - -const char* const IofxModuleParametersFactory::vptr = - NvParameterized::getVptr<IofxModuleParameters, IofxModuleParameters::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 IofxModuleParameters::mBuiltFlag = false; -NvParameterized::MutexType IofxModuleParameters::mBuiltFlagMutex; - -IofxModuleParameters::IofxModuleParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &IofxModuleParametersFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -IofxModuleParameters::~IofxModuleParameters() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void IofxModuleParameters::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->~IofxModuleParameters(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* IofxModuleParameters::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* IofxModuleParameters::getParameterDefinitionTree(void) const -{ - IofxModuleParameters* tmpParam = const_cast<IofxModuleParameters*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType IofxModuleParameters::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 IofxModuleParameters::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 IofxModuleParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<IofxModuleParameters::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void IofxModuleParameters::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 IofxModuleParameters::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 ModuleIofx.", 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 IofxModuleParameters::initStrings(void) -{ -} - -void IofxModuleParameters::initDynamicArrays(void) -{ -} - -void IofxModuleParameters::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - unused = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void IofxModuleParameters::initReferences(void) -{ -} - -void IofxModuleParameters::freeDynamicArrays(void) -{ -} - -void IofxModuleParameters::freeStrings(void) -{ -} - -void IofxModuleParameters::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/MeshIofxParameters.cpp b/APEX_1.4/module/iofx/src/autogen/MeshIofxParameters.cpp deleted file mode 100644 index 05fd8458..00000000 --- a/APEX_1.4/module/iofx/src/autogen/MeshIofxParameters.cpp +++ /dev/null @@ -1,623 +0,0 @@ -// 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 "MeshIofxParameters.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace MeshIofxParametersNS; - -const char* const MeshIofxParametersFactory::vptr = - NvParameterized::getVptr<MeshIofxParameters, MeshIofxParameters::ClassAlignment>(); - -const uint32_t NumParamDefs = 9; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 5, 7, 2, 3, 4, 6, 8, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 3 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->renderMeshList), CHILDREN(3), 1 }, // renderMeshList - { TYPE_STRUCT, false, 1 * sizeof(meshProperties_Type), CHILDREN(4), 2 }, // renderMeshList[] - { TYPE_REF, false, (size_t)(&((meshProperties_Type*)0)->meshAssetName), NULL, 0 }, // renderMeshList[].meshAssetName - { TYPE_U32, false, (size_t)(&((meshProperties_Type*)0)->weight), NULL, 0 }, // renderMeshList[].weight - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->spawnModifierList), CHILDREN(6), 1 }, // spawnModifierList - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // spawnModifierList[] - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->continuousModifierList), CHILDREN(7), 1 }, // continuousModifierList - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // continuousModifierList[] -}; - - -bool MeshIofxParameters::mBuiltFlag = false; -NvParameterized::MutexType MeshIofxParameters::mBuiltFlagMutex; - -MeshIofxParameters::MeshIofxParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &MeshIofxParametersFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -MeshIofxParameters::~MeshIofxParameters() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void MeshIofxParameters::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->~MeshIofxParameters(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters::getParameterDefinitionTree(void) const -{ - MeshIofxParameters* tmpParam = const_cast<MeshIofxParameters*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType MeshIofxParameters::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 MeshIofxParameters::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 MeshIofxParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<MeshIofxParameters::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [1,0] - renderMeshList.meshAssetName */ -/* [0] - spawnModifierList (not an array of structs) */ -/* [0] - continuousModifierList (not an array of structs) */ - -void MeshIofxParameters::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 MeshIofxParameters::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="renderMeshList" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("renderMeshList", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An array of mesh asset names with their respective weights (if this is a render mesh IOFX)", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[2] = { 1, 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 2); - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="renderMeshList[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("renderMeshList", TYPE_STRUCT, "meshProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An array of mesh asset names with their respective weights (if this is a render mesh IOFX)", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="renderMeshList[].meshAssetName" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("meshAssetName", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The render mesh asset name or opaque mesh name", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ApexRenderMesh", "ApexOpaqueMesh" }; - ParamDefTable[3].setRefVariantVals((const char**)RefVariantVals, 2); - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="renderMeshList[].weight" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("weight", TYPE_U32, 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[4].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", "The weight for this mesh (weighed against other meshes)", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="spawnModifierList" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("spawnModifierList", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("longDescription", "These modifiers are applied to the instanced objects at object creation.", true); - HintTable[2].init("shortDescription", "Spawn modifier list", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "SimpleScaleModifierParams", "RandomScaleModifierParams", "InitialColorModifierParams", "ScaleByMassModifierParams" }; - ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 5); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="spawnModifierList[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("spawnModifierList", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("longDescription", "These modifiers are applied to the instanced objects at object creation.", true); - HintTable[2].init("shortDescription", "Spawn modifier list", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "SimpleScaleModifierParams", "RandomScaleModifierParams", "InitialColorModifierParams", "ScaleByMassModifierParams" }; - ParamDefTable[6].setRefVariantVals((const char**)RefVariantVals, 5); - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="continuousModifierList" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("continuousModifierList", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("HIDE_CLASS1", "ScaleVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ScaleVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("HIDE_CLASS4", "ScaleVsTemperatureModifierParams", true); - HintTable[4].init("INCLUDED", uint64_t(1), true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("HIDE_CLASS1", "ScaleVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ScaleVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("HIDE_CLASS4", "ScaleVsTemperatureModifierParams", true); - HintTable[4].init("INCLUDED", uint64_t(1), true); - HintTable[5].init("longDescription", "These modifiers are applied to the instanced objects every frame.", true); - HintTable[6].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "ScaleVsLife3DModifierParams", "ScaleVsDensity3DModifierParams", "ScaleVsTemperature3DModifierParams", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ColorVsTemperatureCompositeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsTemperatureModifierParams", "ScaleVsCameraDistanceModifierParams", "ColorVsVelocityCompositeModifierParams" }; - ParamDefTable[7].setRefVariantVals((const char**)RefVariantVals, 15); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="continuousModifierList[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("continuousModifierList", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("HIDE_CLASS1", "ScaleVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ScaleVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("HIDE_CLASS4", "ScaleVsTemperatureModifierParams", true); - HintTable[4].init("INCLUDED", uint64_t(1), true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("HIDE_CLASS1", "ScaleVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ScaleVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("HIDE_CLASS4", "ScaleVsTemperatureModifierParams", true); - HintTable[4].init("INCLUDED", uint64_t(1), true); - HintTable[5].init("longDescription", "These modifiers are applied to the instanced objects every frame.", true); - HintTable[6].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "ScaleVsLife3DModifierParams", "ScaleVsDensity3DModifierParams", "ScaleVsTemperature3DModifierParams", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ColorVsTemperatureCompositeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsTemperatureModifierParams", "ScaleVsCameraDistanceModifierParams", "ColorVsVelocityCompositeModifierParams" }; - ParamDefTable[8].setRefVariantVals((const char**)RefVariantVals, 15); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(5); - Children[2] = PDEF_PTR(7); - - ParamDefTable[0].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=1, longName="renderMeshList" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="renderMeshList[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=5, longName="spawnModifierList" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(6); - - ParamDefTable[5].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=7, longName="continuousModifierList" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(8); - - ParamDefTable[7].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void MeshIofxParameters::initStrings(void) -{ -} - -void MeshIofxParameters::initDynamicArrays(void) -{ - renderMeshList.buf = NULL; - renderMeshList.isAllocated = true; - renderMeshList.elementSize = sizeof(meshProperties_Type); - renderMeshList.arraySizes[0] = 0; - spawnModifierList.buf = NULL; - spawnModifierList.isAllocated = true; - spawnModifierList.elementSize = sizeof(NvParameterized::Interface*); - spawnModifierList.arraySizes[0] = 0; - continuousModifierList.buf = NULL; - continuousModifierList.isAllocated = true; - continuousModifierList.elementSize = sizeof(NvParameterized::Interface*); - continuousModifierList.arraySizes[0] = 0; -} - -void MeshIofxParameters::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void MeshIofxParameters::initReferences(void) -{ -} - -void MeshIofxParameters::freeDynamicArrays(void) -{ - if (renderMeshList.isAllocated && renderMeshList.buf) - { - mParameterizedTraits->free(renderMeshList.buf); - } - if (spawnModifierList.isAllocated && spawnModifierList.buf) - { - mParameterizedTraits->free(spawnModifierList.buf); - } - if (continuousModifierList.isAllocated && continuousModifierList.buf) - { - mParameterizedTraits->free(continuousModifierList.buf); - } -} - -void MeshIofxParameters::freeStrings(void) -{ -} - -void MeshIofxParameters::freeReferences(void) -{ - - for (int i = 0; i < renderMeshList.arraySizes[0]; i++) - { - if (renderMeshList.buf[i].meshAssetName) - { - renderMeshList.buf[i].meshAssetName->destroy(); - } - } - - for (int i = 0; i < spawnModifierList.arraySizes[0]; ++i) - { - if (spawnModifierList.buf[i]) - { - spawnModifierList.buf[i]->destroy(); - } - } - - for (int i = 0; i < continuousModifierList.arraySizes[0]; ++i) - { - if (continuousModifierList.buf[i]) - { - continuousModifierList.buf[i]->destroy(); - } - } -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/OrientAlongVelocityModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/OrientAlongVelocityModifierParams.cpp deleted file mode 100644 index e2e456b5..00000000 --- a/APEX_1.4/module/iofx/src/autogen/OrientAlongVelocityModifierParams.cpp +++ /dev/null @@ -1,318 +0,0 @@ -// 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 "OrientAlongVelocityModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace OrientAlongVelocityModifierParamsNS; - -const char* const OrientAlongVelocityModifierParamsFactory::vptr = - NvParameterized::getVptr<OrientAlongVelocityModifierParams, OrientAlongVelocityModifierParams::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_VEC3, false, (size_t)(&((ParametersStruct*)0)->modelForward), NULL, 0 }, // modelForward -}; - - -bool OrientAlongVelocityModifierParams::mBuiltFlag = false; -NvParameterized::MutexType OrientAlongVelocityModifierParams::mBuiltFlagMutex; - -OrientAlongVelocityModifierParams::OrientAlongVelocityModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &OrientAlongVelocityModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -OrientAlongVelocityModifierParams::~OrientAlongVelocityModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void OrientAlongVelocityModifierParams::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->~OrientAlongVelocityModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* OrientAlongVelocityModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* OrientAlongVelocityModifierParams::getParameterDefinitionTree(void) const -{ - OrientAlongVelocityModifierParams* tmpParam = const_cast<OrientAlongVelocityModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType OrientAlongVelocityModifierParams::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 OrientAlongVelocityModifierParams::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 OrientAlongVelocityModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<OrientAlongVelocityModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void OrientAlongVelocityModifierParams::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 OrientAlongVelocityModifierParams::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", "OrientAlongVelocity modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="modelForward" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("modelForward", TYPE_VEC3, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Model forward", 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 OrientAlongVelocityModifierParams::initStrings(void) -{ -} - -void OrientAlongVelocityModifierParams::initDynamicArrays(void) -{ -} - -void OrientAlongVelocityModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - modelForward = physx::PxVec3(init(0, 1, 0)); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void OrientAlongVelocityModifierParams::initReferences(void) -{ -} - -void OrientAlongVelocityModifierParams::freeDynamicArrays(void) -{ -} - -void OrientAlongVelocityModifierParams::freeStrings(void) -{ -} - -void OrientAlongVelocityModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/OrientScaleAlongScreenVelocityModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/OrientScaleAlongScreenVelocityModifierParams.cpp deleted file mode 100644 index e18ecf54..00000000 --- a/APEX_1.4/module/iofx/src/autogen/OrientScaleAlongScreenVelocityModifierParams.cpp +++ /dev/null @@ -1,395 +0,0 @@ -// 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 "OrientScaleAlongScreenVelocityModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace OrientScaleAlongScreenVelocityModifierParamsNS; - -const char* const OrientScaleAlongScreenVelocityModifierParamsFactory::vptr = - NvParameterized::getVptr<OrientScaleAlongScreenVelocityModifierParams, OrientScaleAlongScreenVelocityModifierParams::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_F32, false, (size_t)(&((ParametersStruct*)0)->scalePerVelocity), NULL, 0 }, // scalePerVelocity - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->scaleChangeLimit), NULL, 0 }, // scaleChangeLimit - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->scaleChangeDelay), NULL, 0 }, // scaleChangeDelay -}; - - -bool OrientScaleAlongScreenVelocityModifierParams::mBuiltFlag = false; -NvParameterized::MutexType OrientScaleAlongScreenVelocityModifierParams::mBuiltFlagMutex; - -OrientScaleAlongScreenVelocityModifierParams::OrientScaleAlongScreenVelocityModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &OrientScaleAlongScreenVelocityModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -OrientScaleAlongScreenVelocityModifierParams::~OrientScaleAlongScreenVelocityModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void OrientScaleAlongScreenVelocityModifierParams::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->~OrientScaleAlongScreenVelocityModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* OrientScaleAlongScreenVelocityModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* OrientScaleAlongScreenVelocityModifierParams::getParameterDefinitionTree(void) const -{ - OrientScaleAlongScreenVelocityModifierParams* tmpParam = const_cast<OrientScaleAlongScreenVelocityModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType OrientScaleAlongScreenVelocityModifierParams::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 OrientScaleAlongScreenVelocityModifierParams::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 OrientScaleAlongScreenVelocityModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<OrientScaleAlongScreenVelocityModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void OrientScaleAlongScreenVelocityModifierParams::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 OrientScaleAlongScreenVelocityModifierParams::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", "OrientScaleAlongScreenVelocity modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="scalePerVelocity" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("scalePerVelocity", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", uint64_t(0), 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("defaultValue", uint64_t(0), true); - HintTable[1].init("longDescription", "Scale(Velocity) = 1 + |Velocity| * scalePerVelocity", true); - HintTable[2].init("min", uint64_t(0), true); - HintTable[3].init("shortDescription", "Scale per velocity", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="scaleChangeLimit" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("scaleChangeLimit", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", uint64_t(0), 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("defaultValue", uint64_t(0), true); - HintTable[1].init("longDescription", "This value limits the scale change per unit time, set to 0 to disable the limit", true); - HintTable[2].init("min", uint64_t(0), true); - HintTable[3].init("shortDescription", "Scale change limimt", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="scaleChangeDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("scaleChangeDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", uint64_t(0), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[3].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("defaultValue", uint64_t(0), true); - HintTable[1].init("longDescription", "This value is proportional to a delay in time of the scale change, set to 0 to disable the delay", true); - HintTable[2].init("min", uint64_t(0), true); - HintTable[3].init("shortDescription", "Scale change delay", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#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 OrientScaleAlongScreenVelocityModifierParams::initStrings(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams::initDynamicArrays(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scalePerVelocity = float(0.0f); - scaleChangeLimit = float(0.0f); - scaleChangeDelay = float(0.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void OrientScaleAlongScreenVelocityModifierParams::initReferences(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams::freeDynamicArrays(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams::freeStrings(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/RandomRotationModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/RandomRotationModifierParams.cpp deleted file mode 100644 index 0f0fe9d5..00000000 --- a/APEX_1.4/module/iofx/src/autogen/RandomRotationModifierParams.cpp +++ /dev/null @@ -1,355 +0,0 @@ -// 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 "RandomRotationModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace RandomRotationModifierParamsNS; - -const char* const RandomRotationModifierParamsFactory::vptr = - NvParameterized::getVptr<RandomRotationModifierParams, RandomRotationModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 3; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->minRotation), NULL, 0 }, // minRotation - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxRotation), NULL, 0 }, // maxRotation -}; - - -bool RandomRotationModifierParams::mBuiltFlag = false; -NvParameterized::MutexType RandomRotationModifierParams::mBuiltFlagMutex; - -RandomRotationModifierParams::RandomRotationModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RandomRotationModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RandomRotationModifierParams::~RandomRotationModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RandomRotationModifierParams::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->~RandomRotationModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RandomRotationModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RandomRotationModifierParams::getParameterDefinitionTree(void) const -{ - RandomRotationModifierParams* tmpParam = const_cast<RandomRotationModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RandomRotationModifierParams::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 RandomRotationModifierParams::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 RandomRotationModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RandomRotationModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RandomRotationModifierParams::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 RandomRotationModifierParams::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", "RandomRotation modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="minRotation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("minRotation", TYPE_F32, 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[1].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", "Minimum rotation in degrees", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="maxRotation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("maxRotation", TYPE_F32, 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[2].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", "Maximum rotation in degrees", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void RandomRotationModifierParams::initStrings(void) -{ -} - -void RandomRotationModifierParams::initDynamicArrays(void) -{ -} - -void RandomRotationModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - minRotation = float(0.0f); - maxRotation = float(0.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RandomRotationModifierParams::initReferences(void) -{ -} - -void RandomRotationModifierParams::freeDynamicArrays(void) -{ -} - -void RandomRotationModifierParams::freeStrings(void) -{ -} - -void RandomRotationModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/RandomScaleModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/RandomScaleModifierParams.cpp deleted file mode 100644 index 9403c5a3..00000000 --- a/APEX_1.4/module/iofx/src/autogen/RandomScaleModifierParams.cpp +++ /dev/null @@ -1,355 +0,0 @@ -// 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 "RandomScaleModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace RandomScaleModifierParamsNS; - -const char* const RandomScaleModifierParamsFactory::vptr = - NvParameterized::getVptr<RandomScaleModifierParams, RandomScaleModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 3; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->minScaleFactor), NULL, 0 }, // minScaleFactor - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxScaleFactor), NULL, 0 }, // maxScaleFactor -}; - - -bool RandomScaleModifierParams::mBuiltFlag = false; -NvParameterized::MutexType RandomScaleModifierParams::mBuiltFlagMutex; - -RandomScaleModifierParams::RandomScaleModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RandomScaleModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RandomScaleModifierParams::~RandomScaleModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RandomScaleModifierParams::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->~RandomScaleModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RandomScaleModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RandomScaleModifierParams::getParameterDefinitionTree(void) const -{ - RandomScaleModifierParams* tmpParam = const_cast<RandomScaleModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RandomScaleModifierParams::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 RandomScaleModifierParams::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 RandomScaleModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RandomScaleModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RandomScaleModifierParams::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 RandomScaleModifierParams::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", "RandomScale modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="minScaleFactor" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("minScaleFactor", TYPE_F32, 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[1].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", "Scale factor", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="maxScaleFactor" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("maxScaleFactor", TYPE_F32, 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[2].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", "Scale factor", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void RandomScaleModifierParams::initStrings(void) -{ -} - -void RandomScaleModifierParams::initDynamicArrays(void) -{ -} - -void RandomScaleModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - minScaleFactor = float(1.0f); - maxScaleFactor = float(1.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RandomScaleModifierParams::initReferences(void) -{ -} - -void RandomScaleModifierParams::freeDynamicArrays(void) -{ -} - -void RandomScaleModifierParams::freeStrings(void) -{ -} - -void RandomScaleModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/RandomSubtextureModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/RandomSubtextureModifierParams.cpp deleted file mode 100644 index 624d925b..00000000 --- a/APEX_1.4/module/iofx/src/autogen/RandomSubtextureModifierParams.cpp +++ /dev/null @@ -1,355 +0,0 @@ -// 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 "RandomSubtextureModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace RandomSubtextureModifierParamsNS; - -const char* const RandomSubtextureModifierParamsFactory::vptr = - NvParameterized::getVptr<RandomSubtextureModifierParams, RandomSubtextureModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 3; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->minSubtexture), NULL, 0 }, // minSubtexture - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxSubtexture), NULL, 0 }, // maxSubtexture -}; - - -bool RandomSubtextureModifierParams::mBuiltFlag = false; -NvParameterized::MutexType RandomSubtextureModifierParams::mBuiltFlagMutex; - -RandomSubtextureModifierParams::RandomSubtextureModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RandomSubtextureModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RandomSubtextureModifierParams::~RandomSubtextureModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RandomSubtextureModifierParams::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->~RandomSubtextureModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RandomSubtextureModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RandomSubtextureModifierParams::getParameterDefinitionTree(void) const -{ - RandomSubtextureModifierParams* tmpParam = const_cast<RandomSubtextureModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RandomSubtextureModifierParams::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 RandomSubtextureModifierParams::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 RandomSubtextureModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RandomSubtextureModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RandomSubtextureModifierParams::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 RandomSubtextureModifierParams::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", "RandomSubtexture modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="minSubtexture" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("minSubtexture", TYPE_F32, 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[1].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", "Minimum subtexture index", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="maxSubtexture" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("maxSubtexture", TYPE_F32, 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[2].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", "Maximum subtexture index", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void RandomSubtextureModifierParams::initStrings(void) -{ -} - -void RandomSubtextureModifierParams::initDynamicArrays(void) -{ -} - -void RandomSubtextureModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - minSubtexture = float(0.0f); - maxSubtexture = float(0.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RandomSubtextureModifierParams::initReferences(void) -{ -} - -void RandomSubtextureModifierParams::freeDynamicArrays(void) -{ -} - -void RandomSubtextureModifierParams::freeStrings(void) -{ -} - -void RandomSubtextureModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/RotationModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/RotationModifierParams.cpp deleted file mode 100644 index 6c363524..00000000 --- a/APEX_1.4/module/iofx/src/autogen/RotationModifierParams.cpp +++ /dev/null @@ -1,481 +0,0 @@ -// 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 "RotationModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace RotationModifierParamsNS; - -const char* const RotationModifierParamsFactory::vptr = - NvParameterized::getVptr<RotationModifierParams, RotationModifierParams::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_ENUM, false, (size_t)(&((ParametersStruct*)0)->rollType), NULL, 0 }, // rollType - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxRotationRatePerSec), NULL, 0 }, // maxRotationRatePerSec - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxSettleRatePerSec), NULL, 0 }, // maxSettleRatePerSec - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->inAirRotationMultiplier), NULL, 0 }, // inAirRotationMultiplier - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->collisionRotationMultiplier), NULL, 0 }, // collisionRotationMultiplier - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->includeVerticalDirection), NULL, 0 }, // includeVerticalDirection -}; - - -bool RotationModifierParams::mBuiltFlag = false; -NvParameterized::MutexType RotationModifierParams::mBuiltFlagMutex; - -RotationModifierParams::RotationModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RotationModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RotationModifierParams::~RotationModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RotationModifierParams::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->~RotationModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RotationModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RotationModifierParams::getParameterDefinitionTree(void) const -{ - RotationModifierParams* tmpParam = const_cast<RotationModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RotationModifierParams::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 RotationModifierParams::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 RotationModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RotationModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RotationModifierParams::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 RotationModifierParams::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", "Rotation modifier parameters.", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="rollType" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("rollType", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "SPHERICAL", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "SPHERICAL", true); - HintTable[1].init("shortDescription", "Roll type", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "SPHERICAL", "CUBIC", "FLAT_X", "FLAT_Y", "FLAT_Z", "LONG_X", "LONG_Y", "LONG_Z" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 8); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="maxRotationRatePerSec" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("maxRotationRatePerSec", TYPE_F32, 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[2].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", "Maximum rotation rate for instanced mesh objects", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="maxSettleRatePerSec" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("maxSettleRatePerSec", TYPE_F32, 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[3].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", "Maximum settle rate for instanced mesh objects", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="inAirRotationMultiplier" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("inAirRotationMultiplier", TYPE_F32, 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[4].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", "This value is multiplied by the rotation delta to increase or decrease rotations/frame if there are no particle collisions", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="collisionRotationMultiplier" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("collisionRotationMultiplier", TYPE_F32, 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[5].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", "This value is multiplied by the rotation delta to increase or decrease rotations/frame while colliding objects", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="includeVerticalDirection" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("includeVerticalDirection", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "false", 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("defaultValue", "false", true); - HintTable[1].init("shortDescription", "If false, the vertical speed of the object does not affect the rotation", 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 RotationModifierParams::initStrings(void) -{ -} - -void RotationModifierParams::initDynamicArrays(void) -{ -} - -void RotationModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - rollType = (const char*)"SPHERICAL"; - maxRotationRatePerSec = float(0.0f); - maxSettleRatePerSec = float(1.0f); - inAirRotationMultiplier = float(1.0f); - collisionRotationMultiplier = float(1.0f); - includeVerticalDirection = bool(false); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RotationModifierParams::initReferences(void) -{ -} - -void RotationModifierParams::freeDynamicArrays(void) -{ -} - -void RotationModifierParams::freeStrings(void) -{ -} - -void RotationModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/RotationRateModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/RotationRateModifierParams.cpp deleted file mode 100644 index 7d2ea83d..00000000 --- a/APEX_1.4/module/iofx/src/autogen/RotationRateModifierParams.cpp +++ /dev/null @@ -1,324 +0,0 @@ -// 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 "RotationRateModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace RotationRateModifierParamsNS; - -const char* const RotationRateModifierParamsFactory::vptr = - NvParameterized::getVptr<RotationRateModifierParams, RotationRateModifierParams::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_F32, false, (size_t)(&((ParametersStruct*)0)->rotationRate), NULL, 0 }, // rotationRate -}; - - -bool RotationRateModifierParams::mBuiltFlag = false; -NvParameterized::MutexType RotationRateModifierParams::mBuiltFlagMutex; - -RotationRateModifierParams::RotationRateModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RotationRateModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RotationRateModifierParams::~RotationRateModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RotationRateModifierParams::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->~RotationRateModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RotationRateModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RotationRateModifierParams::getParameterDefinitionTree(void) const -{ - RotationRateModifierParams* tmpParam = const_cast<RotationRateModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RotationRateModifierParams::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 RotationRateModifierParams::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 RotationRateModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RotationRateModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RotationRateModifierParams::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 RotationRateModifierParams::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", "RotationRate modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="rotationRate" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("rotationRate", TYPE_F32, 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[1].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", "Rotation Rate (revs/sec) for sprite objects", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void RotationRateModifierParams::initStrings(void) -{ -} - -void RotationRateModifierParams::initDynamicArrays(void) -{ -} - -void RotationRateModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - rotationRate = float(0.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RotationRateModifierParams::initReferences(void) -{ -} - -void RotationRateModifierParams::freeDynamicArrays(void) -{ -} - -void RotationRateModifierParams::freeStrings(void) -{ -} - -void RotationRateModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/RotationRateVsLifeModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/RotationRateVsLifeModifierParams.cpp deleted file mode 100644 index 47a3142b..00000000 --- a/APEX_1.4/module/iofx/src/autogen/RotationRateVsLifeModifierParams.cpp +++ /dev/null @@ -1,441 +0,0 @@ -// 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 "RotationRateVsLifeModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace RotationRateVsLifeModifierParamsNS; - -const char* const RotationRateVsLifeModifierParamsFactory::vptr = - NvParameterized::getVptr<RotationRateVsLifeModifierParams, RotationRateVsLifeModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool RotationRateVsLifeModifierParams::mBuiltFlag = false; -NvParameterized::MutexType RotationRateVsLifeModifierParams::mBuiltFlagMutex; - -RotationRateVsLifeModifierParams::RotationRateVsLifeModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RotationRateVsLifeModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RotationRateVsLifeModifierParams::~RotationRateVsLifeModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RotationRateVsLifeModifierParams::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->~RotationRateVsLifeModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RotationRateVsLifeModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RotationRateVsLifeModifierParams::getParameterDefinitionTree(void) const -{ - RotationRateVsLifeModifierParams* tmpParam = const_cast<RotationRateVsLifeModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RotationRateVsLifeModifierParams::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 RotationRateVsLifeModifierParams::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 RotationRateVsLifeModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RotationRateVsLifeModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RotationRateVsLifeModifierParams::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 RotationRateVsLifeModifierParams::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", "RotationRateVsLife modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(16), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Rotation Rate (revs/sec)", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(16), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[4].init("shortDescription", "Control points for a curve", true); - HintTable[5].init("xAxisLabel", "Life Time", true); - HintTable[6].init("yAxisLabel", "Rotation Rate (revs/sec)", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(16), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Rotation Rate (revs/sec)", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(16), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[4].init("shortDescription", "Control points for a curve", true); - HintTable[5].init("xAxisLabel", "Life Time", true); - HintTable[6].init("yAxisLabel", "Rotation Rate (revs/sec)", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Life time", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Rotation rate (revs/sec)", true); - ParamDefTable[4].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); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void RotationRateVsLifeModifierParams::initStrings(void) -{ -} - -void RotationRateVsLifeModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void RotationRateVsLifeModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RotationRateVsLifeModifierParams::initReferences(void) -{ -} - -void RotationRateVsLifeModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void RotationRateVsLifeModifierParams::freeStrings(void) -{ -} - -void RotationRateVsLifeModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleAlongVelocityModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleAlongVelocityModifierParams.cpp deleted file mode 100644 index 89e034e4..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleAlongVelocityModifierParams.cpp +++ /dev/null @@ -1,324 +0,0 @@ -// 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 "ScaleAlongVelocityModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleAlongVelocityModifierParamsNS; - -const char* const ScaleAlongVelocityModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleAlongVelocityModifierParams, ScaleAlongVelocityModifierParams::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_F32, false, (size_t)(&((ParametersStruct*)0)->scaleFactor), NULL, 0 }, // scaleFactor -}; - - -bool ScaleAlongVelocityModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleAlongVelocityModifierParams::mBuiltFlagMutex; - -ScaleAlongVelocityModifierParams::ScaleAlongVelocityModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleAlongVelocityModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleAlongVelocityModifierParams::~ScaleAlongVelocityModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleAlongVelocityModifierParams::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->~ScaleAlongVelocityModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleAlongVelocityModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleAlongVelocityModifierParams::getParameterDefinitionTree(void) const -{ - ScaleAlongVelocityModifierParams* tmpParam = const_cast<ScaleAlongVelocityModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleAlongVelocityModifierParams::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 ScaleAlongVelocityModifierParams::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 ScaleAlongVelocityModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleAlongVelocityModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleAlongVelocityModifierParams::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 ScaleAlongVelocityModifierParams::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", "ScaleAlongVelocity modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="scaleFactor" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("scaleFactor", TYPE_F32, 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[1].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", "Scale factor", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void ScaleAlongVelocityModifierParams::initStrings(void) -{ -} - -void ScaleAlongVelocityModifierParams::initDynamicArrays(void) -{ -} - -void ScaleAlongVelocityModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleFactor = float(1.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleAlongVelocityModifierParams::initReferences(void) -{ -} - -void ScaleAlongVelocityModifierParams::freeDynamicArrays(void) -{ -} - -void ScaleAlongVelocityModifierParams::freeStrings(void) -{ -} - -void ScaleAlongVelocityModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleByMassModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleByMassModifierParams.cpp deleted file mode 100644 index a0e5f01c..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleByMassModifierParams.cpp +++ /dev/null @@ -1,280 +0,0 @@ -// 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 "ScaleByMassModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleByMassModifierParamsNS; - -const char* const ScaleByMassModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleByMassModifierParams, ScaleByMassModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 1; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, NULL, 0 }, -}; - - -bool ScaleByMassModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleByMassModifierParams::mBuiltFlagMutex; - -ScaleByMassModifierParams::ScaleByMassModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleByMassModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleByMassModifierParams::~ScaleByMassModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleByMassModifierParams::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->~ScaleByMassModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleByMassModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleByMassModifierParams::getParameterDefinitionTree(void) const -{ - ScaleByMassModifierParams* tmpParam = const_cast<ScaleByMassModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleByMassModifierParams::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 ScaleByMassModifierParams::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 ScaleByMassModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleByMassModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleByMassModifierParams::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 ScaleByMassModifierParams::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", "ScaleByMass modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - mBuiltFlag = true; - -} -void ScaleByMassModifierParams::initStrings(void) -{ -} - -void ScaleByMassModifierParams::initDynamicArrays(void) -{ -} - -void ScaleByMassModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleByMassModifierParams::initReferences(void) -{ -} - -void ScaleByMassModifierParams::freeDynamicArrays(void) -{ -} - -void ScaleByMassModifierParams::freeStrings(void) -{ -} - -void ScaleByMassModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsCameraDistance2DModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsCameraDistance2DModifierParams.cpp deleted file mode 100644 index c30f2a94..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsCameraDistance2DModifierParams.cpp +++ /dev/null @@ -1,451 +0,0 @@ -// 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 "ScaleVsCameraDistance2DModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsCameraDistance2DModifierParamsNS; - -const char* const ScaleVsCameraDistance2DModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsCameraDistance2DModifierParams, ScaleVsCameraDistance2DModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(scaleCameraDistanceStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((scaleCameraDistanceStruct_Type*)0)->cameraDistance), NULL, 0 }, // controlPoints[].cameraDistance - { TYPE_VEC2, false, (size_t)(&((scaleCameraDistanceStruct_Type*)0)->scale), NULL, 0 }, // controlPoints[].scale -}; - - -bool ScaleVsCameraDistance2DModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsCameraDistance2DModifierParams::mBuiltFlagMutex; - -ScaleVsCameraDistance2DModifierParams::ScaleVsCameraDistance2DModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsCameraDistance2DModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsCameraDistance2DModifierParams::~ScaleVsCameraDistance2DModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsCameraDistance2DModifierParams::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->~ScaleVsCameraDistance2DModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistance2DModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistance2DModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsCameraDistance2DModifierParams* tmpParam = const_cast<ScaleVsCameraDistance2DModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsCameraDistance2DModifierParams::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 ScaleVsCameraDistance2DModifierParams::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 ScaleVsCameraDistance2DModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsCameraDistance2DModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsCameraDistance2DModifierParams::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 ScaleVsCameraDistance2DModifierParams::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", "ScaleVsCameraDistance2D modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Camera Distance", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite 2D scale vs camera distance curve", true); - HintTable[4].init("xAxisLabel", "Camera Distance", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "scaleCameraDistanceStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Camera Distance", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite 2D scale vs camera distance curve", true); - HintTable[4].init("xAxisLabel", "Camera Distance", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].cameraDistance" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("cameraDistance", 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[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", "Camera distance", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("scale", TYPE_VEC2, 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[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", uint64_t(0), true); - HintTable[1].init("shortDescription", "Scale", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsCameraDistance2DModifierParams::initStrings(void) -{ -} - -void ScaleVsCameraDistance2DModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleCameraDistanceStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsCameraDistance2DModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsCameraDistance2DModifierParams::initReferences(void) -{ -} - -void ScaleVsCameraDistance2DModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsCameraDistance2DModifierParams::freeStrings(void) -{ -} - -void ScaleVsCameraDistance2DModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsCameraDistance3DModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsCameraDistance3DModifierParams.cpp deleted file mode 100644 index 87ea4207..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsCameraDistance3DModifierParams.cpp +++ /dev/null @@ -1,451 +0,0 @@ -// 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 "ScaleVsCameraDistance3DModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsCameraDistance3DModifierParamsNS; - -const char* const ScaleVsCameraDistance3DModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsCameraDistance3DModifierParams, ScaleVsCameraDistance3DModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(scaleCameraDistanceStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((scaleCameraDistanceStruct_Type*)0)->cameraDistance), NULL, 0 }, // controlPoints[].cameraDistance - { TYPE_VEC3, false, (size_t)(&((scaleCameraDistanceStruct_Type*)0)->scale), NULL, 0 }, // controlPoints[].scale -}; - - -bool ScaleVsCameraDistance3DModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsCameraDistance3DModifierParams::mBuiltFlagMutex; - -ScaleVsCameraDistance3DModifierParams::ScaleVsCameraDistance3DModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsCameraDistance3DModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsCameraDistance3DModifierParams::~ScaleVsCameraDistance3DModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsCameraDistance3DModifierParams::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->~ScaleVsCameraDistance3DModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistance3DModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistance3DModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsCameraDistance3DModifierParams* tmpParam = const_cast<ScaleVsCameraDistance3DModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsCameraDistance3DModifierParams::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 ScaleVsCameraDistance3DModifierParams::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 ScaleVsCameraDistance3DModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsCameraDistance3DModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsCameraDistance3DModifierParams::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 ScaleVsCameraDistance3DModifierParams::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", "ScaleVsCameraDistance3D modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Camera Distance", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite 3D scale vs camera distance curve", true); - HintTable[4].init("xAxisLabel", "Camera Distance", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "scaleCameraDistanceStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Camera Distance", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite 3D scale vs camera distance curve", true); - HintTable[4].init("xAxisLabel", "Camera Distance", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].cameraDistance" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("cameraDistance", 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[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", "Camera distance", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("scale", TYPE_VEC3, 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[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", uint64_t(0), true); - HintTable[1].init("shortDescription", "Scale", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsCameraDistance3DModifierParams::initStrings(void) -{ -} - -void ScaleVsCameraDistance3DModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleCameraDistanceStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsCameraDistance3DModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsCameraDistance3DModifierParams::initReferences(void) -{ -} - -void ScaleVsCameraDistance3DModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsCameraDistance3DModifierParams::freeStrings(void) -{ -} - -void ScaleVsCameraDistance3DModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsCameraDistanceModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsCameraDistanceModifierParams.cpp deleted file mode 100644 index b3c69217..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsCameraDistanceModifierParams.cpp +++ /dev/null @@ -1,466 +0,0 @@ -// 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 "ScaleVsCameraDistanceModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsCameraDistanceModifierParamsNS; - -const char* const ScaleVsCameraDistanceModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsCameraDistanceModifierParams, ScaleVsCameraDistanceModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 6; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->scaleAxis), NULL, 0 }, // scaleAxis - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(2), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(3), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool ScaleVsCameraDistanceModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsCameraDistanceModifierParams::mBuiltFlagMutex; - -ScaleVsCameraDistanceModifierParams::ScaleVsCameraDistanceModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsCameraDistanceModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsCameraDistanceModifierParams::~ScaleVsCameraDistanceModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsCameraDistanceModifierParams::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->~ScaleVsCameraDistanceModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistanceModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistanceModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsCameraDistanceModifierParams* tmpParam = const_cast<ScaleVsCameraDistanceModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsCameraDistanceModifierParams::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 ScaleVsCameraDistanceModifierParams::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 ScaleVsCameraDistanceModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsCameraDistanceModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsCameraDistanceModifierParams::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 ScaleVsCameraDistanceModifierParams::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", "ScaleVsCameraDistance modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="scaleAxis" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("scaleAxis", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "xAxis", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "xAxis", true); - HintTable[1].init("shortDescription", "Scale axis to which the curve will be applied", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "xAxis", "yAxis", "zAxis" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Camera Distance", true); - HintTable[2].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Camera Distance", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Camera Distance", true); - HintTable[2].init("yAxisLabel", "Scale", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Camera Distance", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Camera distance", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Scale", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(3); - - ParamDefTable[2].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=3, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(4); - Children[1] = PDEF_PTR(5); - - ParamDefTable[3].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsCameraDistanceModifierParams::initStrings(void) -{ -} - -void ScaleVsCameraDistanceModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsCameraDistanceModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleAxis = (const char*)"xAxis"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsCameraDistanceModifierParams::initReferences(void) -{ -} - -void ScaleVsCameraDistanceModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsCameraDistanceModifierParams::freeStrings(void) -{ -} - -void ScaleVsCameraDistanceModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsDensity2DModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsDensity2DModifierParams.cpp deleted file mode 100644 index 13191419..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsDensity2DModifierParams.cpp +++ /dev/null @@ -1,455 +0,0 @@ -// 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 "ScaleVsDensity2DModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsDensity2DModifierParamsNS; - -const char* const ScaleVsDensity2DModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsDensity2DModifierParams, ScaleVsDensity2DModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(scaleDensityStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((scaleDensityStruct_Type*)0)->density), NULL, 0 }, // controlPoints[].density - { TYPE_VEC2, false, (size_t)(&((scaleDensityStruct_Type*)0)->scale), NULL, 0 }, // controlPoints[].scale -}; - - -bool ScaleVsDensity2DModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsDensity2DModifierParams::mBuiltFlagMutex; - -ScaleVsDensity2DModifierParams::ScaleVsDensity2DModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsDensity2DModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsDensity2DModifierParams::~ScaleVsDensity2DModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsDensity2DModifierParams::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->~ScaleVsDensity2DModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensity2DModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensity2DModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsDensity2DModifierParams* tmpParam = const_cast<ScaleVsDensity2DModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsDensity2DModifierParams::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 ScaleVsDensity2DModifierParams::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 ScaleVsDensity2DModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsDensity2DModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsDensity2DModifierParams::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 ScaleVsDensity2DModifierParams::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", "ScaleVsDensity2D modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Density", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite 2D scale vs density curve", true); - HintTable[5].init("xAxisLabel", "Density", true); - HintTable[6].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "scaleDensityStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Density", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1000), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite 2D scale vs density curve", true); - HintTable[5].init("xAxisLabel", "Density", true); - HintTable[6].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].density" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("density", 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[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", "Density", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("scale", TYPE_VEC2, 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[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", uint64_t(0), true); - HintTable[1].init("shortDescription", "Scale", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsDensity2DModifierParams::initStrings(void) -{ -} - -void ScaleVsDensity2DModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleDensityStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsDensity2DModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsDensity2DModifierParams::initReferences(void) -{ -} - -void ScaleVsDensity2DModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsDensity2DModifierParams::freeStrings(void) -{ -} - -void ScaleVsDensity2DModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsDensity3DModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsDensity3DModifierParams.cpp deleted file mode 100644 index 5f1852ef..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsDensity3DModifierParams.cpp +++ /dev/null @@ -1,455 +0,0 @@ -// 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 "ScaleVsDensity3DModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsDensity3DModifierParamsNS; - -const char* const ScaleVsDensity3DModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsDensity3DModifierParams, ScaleVsDensity3DModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(scaleDensityStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((scaleDensityStruct_Type*)0)->density), NULL, 0 }, // controlPoints[].density - { TYPE_VEC3, false, (size_t)(&((scaleDensityStruct_Type*)0)->scale), NULL, 0 }, // controlPoints[].scale -}; - - -bool ScaleVsDensity3DModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsDensity3DModifierParams::mBuiltFlagMutex; - -ScaleVsDensity3DModifierParams::ScaleVsDensity3DModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsDensity3DModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsDensity3DModifierParams::~ScaleVsDensity3DModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsDensity3DModifierParams::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->~ScaleVsDensity3DModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensity3DModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensity3DModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsDensity3DModifierParams* tmpParam = const_cast<ScaleVsDensity3DModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsDensity3DModifierParams::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 ScaleVsDensity3DModifierParams::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 ScaleVsDensity3DModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsDensity3DModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsDensity3DModifierParams::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 ScaleVsDensity3DModifierParams::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", "ScaleVsDensity3D modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Density", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite 3D scale vs density curve", true); - HintTable[5].init("xAxisLabel", "Density", true); - HintTable[6].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "scaleDensityStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("xAxisLabel", "Density", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_X_SCALE_PHYSX3", uint64_t(1), true); - HintTable[2].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[3].init("editorCurve", uint64_t(1), true); - HintTable[4].init("shortDescription", "Control points for a composite 3D scale vs density curve", true); - HintTable[5].init("xAxisLabel", "Density", true); - HintTable[6].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].density" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("density", 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[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", "Density", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("scale", TYPE_VEC3, 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[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", uint64_t(0), true); - HintTable[1].init("shortDescription", "Scale", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsDensity3DModifierParams::initStrings(void) -{ -} - -void ScaleVsDensity3DModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleDensityStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsDensity3DModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsDensity3DModifierParams::initReferences(void) -{ -} - -void ScaleVsDensity3DModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsDensity3DModifierParams::freeStrings(void) -{ -} - -void ScaleVsDensity3DModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsDensityModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsDensityModifierParams.cpp deleted file mode 100644 index e451646a..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsDensityModifierParams.cpp +++ /dev/null @@ -1,466 +0,0 @@ -// 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 "ScaleVsDensityModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsDensityModifierParamsNS; - -const char* const ScaleVsDensityModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsDensityModifierParams, ScaleVsDensityModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 6; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->scaleAxis), NULL, 0 }, // scaleAxis - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(2), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(3), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool ScaleVsDensityModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsDensityModifierParams::mBuiltFlagMutex; - -ScaleVsDensityModifierParams::ScaleVsDensityModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsDensityModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsDensityModifierParams::~ScaleVsDensityModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsDensityModifierParams::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->~ScaleVsDensityModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensityModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensityModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsDensityModifierParams* tmpParam = const_cast<ScaleVsDensityModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsDensityModifierParams::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 ScaleVsDensityModifierParams::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 ScaleVsDensityModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsDensityModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsDensityModifierParams::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 ScaleVsDensityModifierParams::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", "ScaleVsDensity modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="scaleAxis" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("scaleAxis", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "xAxis", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "xAxis", true); - HintTable[1].init("shortDescription", "Scale axis to which the curve will be applied", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "xAxis", "yAxis", "zAxis" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Density", true); - HintTable[2].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Density", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Density", true); - HintTable[2].init("yAxisLabel", "Scale", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Density", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Density", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Scale", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(3); - - ParamDefTable[2].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=3, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(4); - Children[1] = PDEF_PTR(5); - - ParamDefTable[3].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsDensityModifierParams::initStrings(void) -{ -} - -void ScaleVsDensityModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsDensityModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleAxis = (const char*)"xAxis"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsDensityModifierParams::initReferences(void) -{ -} - -void ScaleVsDensityModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsDensityModifierParams::freeStrings(void) -{ -} - -void ScaleVsDensityModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsLife2DModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsLife2DModifierParams.cpp deleted file mode 100644 index f4166d50..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsLife2DModifierParams.cpp +++ /dev/null @@ -1,453 +0,0 @@ -// 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 "ScaleVsLife2DModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsLife2DModifierParamsNS; - -const char* const ScaleVsLife2DModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsLife2DModifierParams, ScaleVsLife2DModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(scaleLifeStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((scaleLifeStruct_Type*)0)->lifeRemaining), NULL, 0 }, // controlPoints[].lifeRemaining - { TYPE_VEC2, false, (size_t)(&((scaleLifeStruct_Type*)0)->scale), NULL, 0 }, // controlPoints[].scale -}; - - -bool ScaleVsLife2DModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsLife2DModifierParams::mBuiltFlagMutex; - -ScaleVsLife2DModifierParams::ScaleVsLife2DModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsLife2DModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsLife2DModifierParams::~ScaleVsLife2DModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsLife2DModifierParams::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->~ScaleVsLife2DModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsLife2DModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsLife2DModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsLife2DModifierParams* tmpParam = const_cast<ScaleVsLife2DModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsLife2DModifierParams::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 ScaleVsLife2DModifierParams::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 ScaleVsLife2DModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsLife2DModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsLife2DModifierParams::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 ScaleVsLife2DModifierParams::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", "ScaleVsLife2D modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite scale vs life curve", true); - HintTable[4].init("xAxisLabel", "Life Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "scaleLifeStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite scale vs life curve", true); - HintTable[4].init("xAxisLabel", "Life Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].lifeRemaining" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("lifeRemaining", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Life remaining", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("scale", TYPE_VEC2, 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[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", uint64_t(0), true); - HintTable[1].init("shortDescription", "Scale", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsLife2DModifierParams::initStrings(void) -{ -} - -void ScaleVsLife2DModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleLifeStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsLife2DModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsLife2DModifierParams::initReferences(void) -{ -} - -void ScaleVsLife2DModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsLife2DModifierParams::freeStrings(void) -{ -} - -void ScaleVsLife2DModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsLife3DModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsLife3DModifierParams.cpp deleted file mode 100644 index a53da682..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsLife3DModifierParams.cpp +++ /dev/null @@ -1,453 +0,0 @@ -// 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 "ScaleVsLife3DModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsLife3DModifierParamsNS; - -const char* const ScaleVsLife3DModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsLife3DModifierParams, ScaleVsLife3DModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(scaleLifeStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((scaleLifeStruct_Type*)0)->lifeRemaining), NULL, 0 }, // controlPoints[].lifeRemaining - { TYPE_VEC3, false, (size_t)(&((scaleLifeStruct_Type*)0)->scale), NULL, 0 }, // controlPoints[].scale -}; - - -bool ScaleVsLife3DModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsLife3DModifierParams::mBuiltFlagMutex; - -ScaleVsLife3DModifierParams::ScaleVsLife3DModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsLife3DModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsLife3DModifierParams::~ScaleVsLife3DModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsLife3DModifierParams::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->~ScaleVsLife3DModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsLife3DModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsLife3DModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsLife3DModifierParams* tmpParam = const_cast<ScaleVsLife3DModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsLife3DModifierParams::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 ScaleVsLife3DModifierParams::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 ScaleVsLife3DModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsLife3DModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsLife3DModifierParams::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 ScaleVsLife3DModifierParams::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", "ScaleVsLife3D modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite scale vs life curve", true); - HintTable[4].init("xAxisLabel", "Life Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "scaleLifeStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite scale vs life curve", true); - HintTable[4].init("xAxisLabel", "Life Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].lifeRemaining" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("lifeRemaining", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Life remaining", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("scale", TYPE_VEC3, 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[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", uint64_t(0), true); - HintTable[1].init("shortDescription", "Scale", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsLife3DModifierParams::initStrings(void) -{ -} - -void ScaleVsLife3DModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleLifeStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsLife3DModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsLife3DModifierParams::initReferences(void) -{ -} - -void ScaleVsLife3DModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsLife3DModifierParams::freeStrings(void) -{ -} - -void ScaleVsLife3DModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsLifeModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsLifeModifierParams.cpp deleted file mode 100644 index 364cded7..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsLifeModifierParams.cpp +++ /dev/null @@ -1,474 +0,0 @@ -// 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 "ScaleVsLifeModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsLifeModifierParamsNS; - -const char* const ScaleVsLifeModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsLifeModifierParams, ScaleVsLifeModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 6; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->scaleAxis), NULL, 0 }, // scaleAxis - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(2), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(3), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool ScaleVsLifeModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsLifeModifierParams::mBuiltFlagMutex; - -ScaleVsLifeModifierParams::ScaleVsLifeModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsLifeModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsLifeModifierParams::~ScaleVsLifeModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsLifeModifierParams::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->~ScaleVsLifeModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsLifeModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsLifeModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsLifeModifierParams* tmpParam = const_cast<ScaleVsLifeModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsLifeModifierParams::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 ScaleVsLifeModifierParams::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 ScaleVsLifeModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsLifeModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsLifeModifierParams::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 ScaleVsLifeModifierParams::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", "ScaleVsLife modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="scaleAxis" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("scaleAxis", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "xAxis", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "xAxis", true); - HintTable[1].init("shortDescription", "Scale axis to which the curve will be applied", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "xAxis", "yAxis", "zAxis" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Life Time", true); - HintTable[2].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Life Time", true); - HintTable[2].init("yAxisLabel", "Scale", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Life", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Scale", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(3); - - ParamDefTable[2].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=3, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(4); - Children[1] = PDEF_PTR(5); - - ParamDefTable[3].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsLifeModifierParams::initStrings(void) -{ -} - -void ScaleVsLifeModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsLifeModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleAxis = (const char*)"xAxis"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsLifeModifierParams::initReferences(void) -{ -} - -void ScaleVsLifeModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsLifeModifierParams::freeStrings(void) -{ -} - -void ScaleVsLifeModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsTemperature2DModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsTemperature2DModifierParams.cpp deleted file mode 100644 index d5c70695..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsTemperature2DModifierParams.cpp +++ /dev/null @@ -1,451 +0,0 @@ -// 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 "ScaleVsTemperature2DModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsTemperature2DModifierParamsNS; - -const char* const ScaleVsTemperature2DModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsTemperature2DModifierParams, ScaleVsTemperature2DModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(scaleTemperatureStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((scaleTemperatureStruct_Type*)0)->temperature), NULL, 0 }, // controlPoints[].temperature - { TYPE_VEC2, false, (size_t)(&((scaleTemperatureStruct_Type*)0)->scale), NULL, 0 }, // controlPoints[].scale -}; - - -bool ScaleVsTemperature2DModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsTemperature2DModifierParams::mBuiltFlagMutex; - -ScaleVsTemperature2DModifierParams::ScaleVsTemperature2DModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsTemperature2DModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsTemperature2DModifierParams::~ScaleVsTemperature2DModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsTemperature2DModifierParams::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->~ScaleVsTemperature2DModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperature2DModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperature2DModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsTemperature2DModifierParams* tmpParam = const_cast<ScaleVsTemperature2DModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsTemperature2DModifierParams::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 ScaleVsTemperature2DModifierParams::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 ScaleVsTemperature2DModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsTemperature2DModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsTemperature2DModifierParams::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 ScaleVsTemperature2DModifierParams::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", "ScaleVsTemperature2D modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Temperature", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite 2D scale vs Temperature curve", true); - HintTable[4].init("xAxisLabel", "Temperature", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "scaleTemperatureStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Temperature", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite 2D scale vs Temperature curve", true); - HintTable[4].init("xAxisLabel", "Temperature", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].temperature" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("temperature", 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[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", "Temperature", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("scale", TYPE_VEC2, 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[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", uint64_t(0), true); - HintTable[1].init("shortDescription", "Scale", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsTemperature2DModifierParams::initStrings(void) -{ -} - -void ScaleVsTemperature2DModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleTemperatureStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsTemperature2DModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsTemperature2DModifierParams::initReferences(void) -{ -} - -void ScaleVsTemperature2DModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsTemperature2DModifierParams::freeStrings(void) -{ -} - -void ScaleVsTemperature2DModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsTemperature3DModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsTemperature3DModifierParams.cpp deleted file mode 100644 index f66a52e7..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsTemperature3DModifierParams.cpp +++ /dev/null @@ -1,451 +0,0 @@ -// 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 "ScaleVsTemperature3DModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsTemperature3DModifierParamsNS; - -const char* const ScaleVsTemperature3DModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsTemperature3DModifierParams, ScaleVsTemperature3DModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(scaleTemperatureStruct_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((scaleTemperatureStruct_Type*)0)->temperature), NULL, 0 }, // controlPoints[].temperature - { TYPE_VEC3, false, (size_t)(&((scaleTemperatureStruct_Type*)0)->scale), NULL, 0 }, // controlPoints[].scale -}; - - -bool ScaleVsTemperature3DModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsTemperature3DModifierParams::mBuiltFlagMutex; - -ScaleVsTemperature3DModifierParams::ScaleVsTemperature3DModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsTemperature3DModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsTemperature3DModifierParams::~ScaleVsTemperature3DModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsTemperature3DModifierParams::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->~ScaleVsTemperature3DModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperature3DModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperature3DModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsTemperature3DModifierParams* tmpParam = const_cast<ScaleVsTemperature3DModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsTemperature3DModifierParams::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 ScaleVsTemperature3DModifierParams::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 ScaleVsTemperature3DModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsTemperature3DModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsTemperature3DModifierParams::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 ScaleVsTemperature3DModifierParams::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", "ScaleVsTemperature3D modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Temperature", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite 3D scale vs Temperature curve", true); - HintTable[4].init("xAxisLabel", "Temperature", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "scaleTemperatureStruct", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Temperature", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "Control points for a composite 3D scale vs Temperature curve", true); - HintTable[4].init("xAxisLabel", "Temperature", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].temperature" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("temperature", 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[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", "Temperature", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("scale", TYPE_VEC3, 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[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", uint64_t(0), true); - HintTable[1].init("shortDescription", "Scale", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsTemperature3DModifierParams::initStrings(void) -{ -} - -void ScaleVsTemperature3DModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleTemperatureStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsTemperature3DModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsTemperature3DModifierParams::initReferences(void) -{ -} - -void ScaleVsTemperature3DModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsTemperature3DModifierParams::freeStrings(void) -{ -} - -void ScaleVsTemperature3DModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ScaleVsTemperatureModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ScaleVsTemperatureModifierParams.cpp deleted file mode 100644 index cea69421..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ScaleVsTemperatureModifierParams.cpp +++ /dev/null @@ -1,466 +0,0 @@ -// 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 "ScaleVsTemperatureModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ScaleVsTemperatureModifierParamsNS; - -const char* const ScaleVsTemperatureModifierParamsFactory::vptr = - NvParameterized::getVptr<ScaleVsTemperatureModifierParams, ScaleVsTemperatureModifierParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 6; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->scaleAxis), NULL, 0 }, // scaleAxis - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(2), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(3), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool ScaleVsTemperatureModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsTemperatureModifierParams::mBuiltFlagMutex; - -ScaleVsTemperatureModifierParams::ScaleVsTemperatureModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsTemperatureModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsTemperatureModifierParams::~ScaleVsTemperatureModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsTemperatureModifierParams::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->~ScaleVsTemperatureModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperatureModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperatureModifierParams::getParameterDefinitionTree(void) const -{ - ScaleVsTemperatureModifierParams* tmpParam = const_cast<ScaleVsTemperatureModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsTemperatureModifierParams::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 ScaleVsTemperatureModifierParams::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 ScaleVsTemperatureModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsTemperatureModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsTemperatureModifierParams::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 ScaleVsTemperatureModifierParams::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", "ScaleVsTemperature modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="scaleAxis" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("scaleAxis", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "xAxis", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "xAxis", true); - HintTable[1].init("shortDescription", "Scale axis to which the curve will be applied", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "xAxis", "yAxis", "zAxis" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Temperature", true); - HintTable[2].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Temperature", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("xAxisLabel", "Temperature", true); - HintTable[2].init("yAxisLabel", "Scale", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("editorCurve", uint64_t(1), true); - HintTable[1].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[2].init("shortDescription", "Control points for a curve", true); - HintTable[3].init("xAxisLabel", "Temperature", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Temperature", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Scale", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(3); - - ParamDefTable[2].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=3, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(4); - Children[1] = PDEF_PTR(5); - - ParamDefTable[3].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ScaleVsTemperatureModifierParams::initStrings(void) -{ -} - -void ScaleVsTemperatureModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsTemperatureModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleAxis = (const char*)"xAxis"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsTemperatureModifierParams::initReferences(void) -{ -} - -void ScaleVsTemperatureModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsTemperatureModifierParams::freeStrings(void) -{ -} - -void ScaleVsTemperatureModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/SimpleScaleModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/SimpleScaleModifierParams.cpp deleted file mode 100644 index d6071a72..00000000 --- a/APEX_1.4/module/iofx/src/autogen/SimpleScaleModifierParams.cpp +++ /dev/null @@ -1,318 +0,0 @@ -// 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 "SimpleScaleModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace SimpleScaleModifierParamsNS; - -const char* const SimpleScaleModifierParamsFactory::vptr = - NvParameterized::getVptr<SimpleScaleModifierParams, SimpleScaleModifierParams::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_VEC3, false, (size_t)(&((ParametersStruct*)0)->scaleFactor), NULL, 0 }, // scaleFactor -}; - - -bool SimpleScaleModifierParams::mBuiltFlag = false; -NvParameterized::MutexType SimpleScaleModifierParams::mBuiltFlagMutex; - -SimpleScaleModifierParams::SimpleScaleModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SimpleScaleModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SimpleScaleModifierParams::~SimpleScaleModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SimpleScaleModifierParams::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->~SimpleScaleModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SimpleScaleModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SimpleScaleModifierParams::getParameterDefinitionTree(void) const -{ - SimpleScaleModifierParams* tmpParam = const_cast<SimpleScaleModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SimpleScaleModifierParams::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 SimpleScaleModifierParams::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 SimpleScaleModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SimpleScaleModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void SimpleScaleModifierParams::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 SimpleScaleModifierParams::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", "SimpleScale modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="scaleFactor" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("scaleFactor", TYPE_VEC3, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Scale factor", 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 SimpleScaleModifierParams::initStrings(void) -{ -} - -void SimpleScaleModifierParams::initDynamicArrays(void) -{ -} - -void SimpleScaleModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleFactor = physx::PxVec3(init(1, 1, 1)); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SimpleScaleModifierParams::initReferences(void) -{ -} - -void SimpleScaleModifierParams::freeDynamicArrays(void) -{ -} - -void SimpleScaleModifierParams::freeStrings(void) -{ -} - -void SimpleScaleModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/SpriteIofxParameters.cpp b/APEX_1.4/module/iofx/src/autogen/SpriteIofxParameters.cpp deleted file mode 100644 index 99c3c81b..00000000 --- a/APEX_1.4/module/iofx/src/autogen/SpriteIofxParameters.cpp +++ /dev/null @@ -1,534 +0,0 @@ -// 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 "SpriteIofxParameters.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace SpriteIofxParametersNS; - -const char* const SpriteIofxParametersFactory::vptr = - NvParameterized::getVptr<SpriteIofxParameters, SpriteIofxParameters::ClassAlignment>(); - -const uint32_t NumParamDefs = 6; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 4, 3, 5, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 3 }, - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->spriteMaterialName), NULL, 0 }, // spriteMaterialName - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->spawnModifierList), CHILDREN(3), 1 }, // spawnModifierList - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // spawnModifierList[] - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->continuousModifierList), CHILDREN(4), 1 }, // continuousModifierList - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // continuousModifierList[] -}; - - -bool SpriteIofxParameters::mBuiltFlag = false; -NvParameterized::MutexType SpriteIofxParameters::mBuiltFlagMutex; - -SpriteIofxParameters::SpriteIofxParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SpriteIofxParametersFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SpriteIofxParameters::~SpriteIofxParameters() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SpriteIofxParameters::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->~SpriteIofxParameters(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters::getParameterDefinitionTree(void) const -{ - SpriteIofxParameters* tmpParam = const_cast<SpriteIofxParameters*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SpriteIofxParameters::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 SpriteIofxParameters::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 SpriteIofxParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SpriteIofxParameters::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - spawnModifierList (not an array of structs) */ -/* [0] - continuousModifierList (not an array of structs) */ - -void SpriteIofxParameters::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 SpriteIofxParameters::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="spriteMaterialName" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("spriteMaterialName", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The sprite material name (if this is a sprite IOFX)", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ApexMaterials" }; - ParamDefTable[1].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="spawnModifierList" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("spawnModifierList", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("HIDE_CLASS1", "ColorVsLifeModifierParams", true); - HintTable[1].init("INCLUDED", uint64_t(1), 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("HIDE_CLASS1", "ColorVsLifeModifierParams", true); - HintTable[1].init("INCLUDED", uint64_t(1), true); - HintTable[2].init("longDescription", "These modifiers are applied to the instanced objects at object creation. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[3].init("shortDescription", "Spawn modifier list", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "SimpleScaleModifierParams", "RandomScaleModifierParams", "InitialColorModifierParams", "RandomSubtextureModifierParams", "RandomRotationModifierParams", "ColorVsLifeModifierParams", "ScaleByMassModifierParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 7); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="spawnModifierList[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("spawnModifierList", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("HIDE_CLASS1", "ColorVsLifeModifierParams", true); - HintTable[1].init("INCLUDED", uint64_t(1), true); - ParamDefTable[3].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("HIDE_CLASS1", "ColorVsLifeModifierParams", true); - HintTable[1].init("INCLUDED", uint64_t(1), true); - HintTable[2].init("longDescription", "These modifiers are applied to the instanced objects at object creation. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[3].init("shortDescription", "Spawn modifier list", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "SimpleScaleModifierParams", "RandomScaleModifierParams", "InitialColorModifierParams", "RandomSubtextureModifierParams", "RandomRotationModifierParams", "ColorVsLifeModifierParams", "ScaleByMassModifierParams" }; - ParamDefTable[3].setRefVariantVals((const char**)RefVariantVals, 7); - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="continuousModifierList" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("continuousModifierList", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[8]; - static Hint* HintPtrTable[8] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], }; - HintTable[0].init("HIDE_CLASS1", "ColorVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ColorVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("HIDE_CLASS4", "ScaleVsDensityModifierParams", true); - HintTable[4].init("HIDE_CLASS5", "ScaleVsLifeModifierParams", true); - HintTable[5].init("HIDE_CLASS6", "ColorVsTemperatureModifierParams", true); - HintTable[6].init("HIDE_CLASS7", "ScaleVsTemperatureModifierParams", true); - HintTable[7].init("INCLUDED", uint64_t(1), true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#else - - static HintImpl HintTable[10]; - static Hint* HintPtrTable[10] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], &HintTable[8], &HintTable[9], }; - HintTable[0].init("HIDE_CLASS1", "ColorVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ColorVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("HIDE_CLASS4", "ScaleVsDensityModifierParams", true); - HintTable[4].init("HIDE_CLASS5", "ScaleVsLifeModifierParams", true); - HintTable[5].init("HIDE_CLASS6", "ColorVsTemperatureModifierParams", true); - HintTable[6].init("HIDE_CLASS7", "ScaleVsTemperatureModifierParams", true); - HintTable[7].init("INCLUDED", uint64_t(1), true); - HintTable[8].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[9].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 10); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ColorVsTemperatureCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsTemperature2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ColorVsTemperatureModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsTemperatureModifierParams", "ScaleVsCameraDistanceModifierParams", "RotationRateModifierParams", "RotationRateVsLifeModifierParams", "OrientScaleAlongScreenVelocityModifierParams", "ColorVsVelocityCompositeModifierParams" }; - ParamDefTable[4].setRefVariantVals((const char**)RefVariantVals, 20); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="continuousModifierList[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("continuousModifierList", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[8]; - static Hint* HintPtrTable[8] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], }; - HintTable[0].init("HIDE_CLASS1", "ColorVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ColorVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("HIDE_CLASS4", "ScaleVsDensityModifierParams", true); - HintTable[4].init("HIDE_CLASS5", "ScaleVsLifeModifierParams", true); - HintTable[5].init("HIDE_CLASS6", "ColorVsTemperatureModifierParams", true); - HintTable[6].init("HIDE_CLASS7", "ScaleVsTemperatureModifierParams", true); - HintTable[7].init("INCLUDED", uint64_t(1), true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#else - - static HintImpl HintTable[10]; - static Hint* HintPtrTable[10] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], &HintTable[7], &HintTable[8], &HintTable[9], }; - HintTable[0].init("HIDE_CLASS1", "ColorVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ColorVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("HIDE_CLASS4", "ScaleVsDensityModifierParams", true); - HintTable[4].init("HIDE_CLASS5", "ScaleVsLifeModifierParams", true); - HintTable[5].init("HIDE_CLASS6", "ColorVsTemperatureModifierParams", true); - HintTable[6].init("HIDE_CLASS7", "ScaleVsTemperatureModifierParams", true); - HintTable[7].init("INCLUDED", uint64_t(1), true); - HintTable[8].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[9].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 10); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ColorVsTemperatureCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsTemperature2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ColorVsTemperatureModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsTemperatureModifierParams", "ScaleVsCameraDistanceModifierParams", "RotationRateModifierParams", "RotationRateVsLifeModifierParams", "OrientScaleAlongScreenVelocityModifierParams", "ColorVsVelocityCompositeModifierParams" }; - ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 20); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - Children[2] = PDEF_PTR(4); - - ParamDefTable[0].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=2, longName="spawnModifierList" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(3); - - ParamDefTable[2].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=4, longName="continuousModifierList" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(5); - - ParamDefTable[4].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void SpriteIofxParameters::initStrings(void) -{ -} - -void SpriteIofxParameters::initDynamicArrays(void) -{ - spawnModifierList.buf = NULL; - spawnModifierList.isAllocated = true; - spawnModifierList.elementSize = sizeof(NvParameterized::Interface*); - spawnModifierList.arraySizes[0] = 0; - continuousModifierList.buf = NULL; - continuousModifierList.isAllocated = true; - continuousModifierList.elementSize = sizeof(NvParameterized::Interface*); - continuousModifierList.arraySizes[0] = 0; -} - -void SpriteIofxParameters::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SpriteIofxParameters::initReferences(void) -{ - spriteMaterialName = NULL; - -} - -void SpriteIofxParameters::freeDynamicArrays(void) -{ - if (spawnModifierList.isAllocated && spawnModifierList.buf) - { - mParameterizedTraits->free(spawnModifierList.buf); - } - if (continuousModifierList.isAllocated && continuousModifierList.buf) - { - mParameterizedTraits->free(continuousModifierList.buf); - } -} - -void SpriteIofxParameters::freeStrings(void) -{ -} - -void SpriteIofxParameters::freeReferences(void) -{ - if (spriteMaterialName) - { - spriteMaterialName->destroy(); - } - - - for (int i = 0; i < spawnModifierList.arraySizes[0]; ++i) - { - if (spawnModifierList.buf[i]) - { - spawnModifierList.buf[i]->destroy(); - } - } - - for (int i = 0; i < continuousModifierList.arraySizes[0]; ++i) - { - if (continuousModifierList.buf[i]) - { - continuousModifierList.buf[i]->destroy(); - } - } -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/SubtextureVsLifeModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/SubtextureVsLifeModifierParams.cpp deleted file mode 100644 index 95d8e868..00000000 --- a/APEX_1.4/module/iofx/src/autogen/SubtextureVsLifeModifierParams.cpp +++ /dev/null @@ -1,449 +0,0 @@ -// 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 "SubtextureVsLifeModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace SubtextureVsLifeModifierParamsNS; - -const char* const SubtextureVsLifeModifierParamsFactory::vptr = - NvParameterized::getVptr<SubtextureVsLifeModifierParams, SubtextureVsLifeModifierParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->controlPoints), CHILDREN(1), 1 }, // controlPoints - { TYPE_STRUCT, false, 1 * sizeof(vec2_Type), CHILDREN(2), 2 }, // controlPoints[] - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->x), NULL, 0 }, // controlPoints[].x - { TYPE_F32, false, (size_t)(&((vec2_Type*)0)->y), NULL, 0 }, // controlPoints[].y -}; - - -bool SubtextureVsLifeModifierParams::mBuiltFlag = false; -NvParameterized::MutexType SubtextureVsLifeModifierParams::mBuiltFlagMutex; - -SubtextureVsLifeModifierParams::SubtextureVsLifeModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SubtextureVsLifeModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SubtextureVsLifeModifierParams::~SubtextureVsLifeModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SubtextureVsLifeModifierParams::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->~SubtextureVsLifeModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SubtextureVsLifeModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SubtextureVsLifeModifierParams::getParameterDefinitionTree(void) const -{ - SubtextureVsLifeModifierParams* tmpParam = const_cast<SubtextureVsLifeModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SubtextureVsLifeModifierParams::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 SubtextureVsLifeModifierParams::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 SubtextureVsLifeModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SubtextureVsLifeModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void SubtextureVsLifeModifierParams::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 SubtextureVsLifeModifierParams::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", "SubtextureVsLife modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="controlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("controlPoints", TYPE_ARRAY, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(16), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "SubTexture", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(16), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[4].init("shortDescription", "Control points for a curve", true); - HintTable[5].init("xAxisLabel", "Life Time", true); - HintTable[6].init("yAxisLabel", "SubTexture", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="controlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("controlPoints", TYPE_STRUCT, "vec2", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(16), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Life Time", true); - HintTable[4].init("yAxisLabel", "SubTexture", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#else - - static HintImpl HintTable[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - HintTable[0].init("CURVE_X_SCALE", uint64_t(1), true); - HintTable[1].init("CURVE_Y_SCALE", uint64_t(16), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("longDescription", "controlPoints is a sorted list of control points for a curve. Currently, the curve is a lame\nlirp'd curve. We could add support for other curvetypes in the future, either bezier curves,\nsplines, etc.\n", true); - HintTable[4].init("shortDescription", "Control points for a curve", true); - HintTable[5].init("xAxisLabel", "Life Time", true); - HintTable[6].init("yAxisLabel", "SubTexture", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="controlPoints[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("x", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(1), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Life time", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="controlPoints[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("y", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Subtexture id", true); - ParamDefTable[4].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); - } - - // SetChildren for: nodeIndex=1, longName="controlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=2, longName="controlPoints[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(3); - Children[1] = PDEF_PTR(4); - - ParamDefTable[2].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void SubtextureVsLifeModifierParams::initStrings(void) -{ -} - -void SubtextureVsLifeModifierParams::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void SubtextureVsLifeModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SubtextureVsLifeModifierParams::initReferences(void) -{ -} - -void SubtextureVsLifeModifierParams::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void SubtextureVsLifeModifierParams::freeStrings(void) -{ -} - -void SubtextureVsLifeModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia diff --git a/APEX_1.4/module/iofx/src/autogen/ViewDirectionSortingModifierParams.cpp b/APEX_1.4/module/iofx/src/autogen/ViewDirectionSortingModifierParams.cpp deleted file mode 100644 index 528175bb..00000000 --- a/APEX_1.4/module/iofx/src/autogen/ViewDirectionSortingModifierParams.cpp +++ /dev/null @@ -1,326 +0,0 @@ -// 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 "ViewDirectionSortingModifierParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace iofx -{ - -using namespace ViewDirectionSortingModifierParamsNS; - -const char* const ViewDirectionSortingModifierParamsFactory::vptr = - NvParameterized::getVptr<ViewDirectionSortingModifierParams, ViewDirectionSortingModifierParams::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_ENUM, false, (size_t)(&((ParametersStruct*)0)->sortType), NULL, 0 }, // sortType -}; - - -bool ViewDirectionSortingModifierParams::mBuiltFlag = false; -NvParameterized::MutexType ViewDirectionSortingModifierParams::mBuiltFlagMutex; - -ViewDirectionSortingModifierParams::ViewDirectionSortingModifierParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ViewDirectionSortingModifierParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ViewDirectionSortingModifierParams::~ViewDirectionSortingModifierParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ViewDirectionSortingModifierParams::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->~ViewDirectionSortingModifierParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ViewDirectionSortingModifierParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ViewDirectionSortingModifierParams::getParameterDefinitionTree(void) const -{ - ViewDirectionSortingModifierParams* tmpParam = const_cast<ViewDirectionSortingModifierParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ViewDirectionSortingModifierParams::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 ViewDirectionSortingModifierParams::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 ViewDirectionSortingModifierParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ViewDirectionSortingModifierParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ViewDirectionSortingModifierParams::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 ViewDirectionSortingModifierParams::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", "ViewDirectionSorting modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="sortType" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("sortType", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("defaultValue", "default", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("defaultValue", "default", true); - HintTable[1].init("shortDescription", "Sort type", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "default" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 1); - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void ViewDirectionSortingModifierParams::initStrings(void) -{ -} - -void ViewDirectionSortingModifierParams::initDynamicArrays(void) -{ -} - -void ViewDirectionSortingModifierParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - sortType = (const char*)"default"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ViewDirectionSortingModifierParams::initReferences(void) -{ -} - -void ViewDirectionSortingModifierParams::freeDynamicArrays(void) -{ -} - -void ViewDirectionSortingModifierParams::freeStrings(void) -{ -} - -void ViewDirectionSortingModifierParams::freeReferences(void) -{ -} - -} // namespace iofx -} // namespace nvidia |