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_legacy/src | |
| 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_legacy/src')
54 files changed, 0 insertions, 24213 deletions
diff --git a/APEX_1.4/module/iofx_legacy/src/IofxLegacyRender.cpp b/APEX_1.4/module/iofx_legacy/src/IofxLegacyRender.cpp deleted file mode 100644 index d1ab0ab3..00000000 --- a/APEX_1.4/module/iofx_legacy/src/IofxLegacyRender.cpp +++ /dev/null @@ -1,693 +0,0 @@ -/* - * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. - * - * NVIDIA CORPORATION and its licensors retain all intellectual property - * and proprietary rights in and to this software, related documentation - * and any modifications thereto. Any use, reproduction, disclosure or - * distribution of this software and related documentation without an express - * license agreement from NVIDIA CORPORATION is strictly prohibited. - */ - - -#include "Apex.h" -#include "IofxLegacyRender.h" -#include "ApexActor.h" -#include "PxGpuDispatcher.h" - -namespace nvidia -{ -namespace apex -{ -namespace legacy -{ - - -class IofxLegacyRenderData : public UserRenderData, public UserAllocated -{ -public: - virtual void release() - { - if (--mRefCount == 0) - { - PX_DELETE(this); - } - } - virtual void addRef() - { - ++mRefCount; - } -protected: - IofxLegacyRenderData() - : mRefCount(0) - { - } - virtual ~IofxLegacyRenderData() {} - - uint32_t mRefCount; -}; - -class IofxLegacySpriteRenderData : public IofxLegacyRenderData -{ -public: - IofxLegacySpriteRenderData() - : mSpriteBuffer(NULL) - , mSurfaceRefCount(0) - { - } - virtual ~IofxLegacySpriteRenderData() - { - PX_ASSERT(mSurfaceRefCount == 0 && mSpriteBuffer == NULL); - } - - uint32_t onAllocSurface() - { - if (mSpriteBuffer == NULL) - { - UserRenderResourceManager* rrm = GetInternalApexSDK()->getUserRenderResourceManager(); - mSpriteBuffer = rrm->createSpriteBuffer(mSpriteBufferDesc); - } - return mSurfaceRefCount++; - } - void onReleaseSurface(uint32_t) - { - if (--mSurfaceRefCount == 0) - { - UserRenderResourceManager* rrm = GetInternalApexSDK()->getUserRenderResourceManager(); - rrm->releaseSpriteBuffer(*mSpriteBuffer); - mSpriteBuffer = NULL; - } - } - - UserRenderSpriteBufferDesc mSpriteBufferDesc; - UserRenderSpriteBuffer* mSpriteBuffer; - uint32_t mSurfaceRefCount; -}; - -class IofxLegacyInstanceRenderData : public IofxLegacyRenderData -{ -public: - UserRenderInstanceBufferDesc mInstanceBufferDesc; -}; - - -class IofxLegacySpriteRenderSurface : public UserRenderSurface, public UserAllocated -{ -public: - IofxLegacySpriteRenderSurface(const UserRenderSurfaceDesc& desc) - : mDesc(desc) - , mMapBuffer(NULL) - { - IofxLegacySpriteRenderData* spriteUserData = static_cast<IofxLegacySpriteRenderData*>(mDesc.getUserData()); - mIndex = spriteUserData->onAllocSurface(); - } - - virtual ~IofxLegacySpriteRenderSurface() - { - if (mMapBuffer) - { - physx::shdfnd::getAllocator().deallocate(mMapBuffer); - } - - IofxLegacySpriteRenderData* spriteUserData = static_cast<IofxLegacySpriteRenderData*>(mDesc.getUserData()); - spriteUserData->onReleaseSurface(mIndex); - } - - virtual void release() - { - PX_DELETE(this); - } - - PX_INLINE UserRenderSpriteBuffer* getSpriteBuffer() - { - IofxLegacySpriteRenderData* spriteUserData = static_cast<IofxLegacySpriteRenderData*>(mDesc.getUserData()); - PX_ASSERT(spriteUserData->mSpriteBuffer); - return spriteUserData->mSpriteBuffer; - } - - - virtual bool map(RenderMapType::Enum mapType, MappedInfo& info) - { - PX_UNUSED(mapType); - IofxLegacySpriteRenderData* spriteUserData = static_cast<IofxLegacySpriteRenderData*>(mDesc.getUserData()); - info.rowPitch = spriteUserData->mSpriteBufferDesc.textureDescs[mIndex].pitchBytes; - info.depthPitch = 0; - if (mMapBuffer == NULL) - { - size_t size = info.rowPitch * mDesc.height; - mMapBuffer = physx::shdfnd::getAllocator().allocate(size, "StagingBuffer", __FILE__, __LINE__); - } - info.pData = mMapBuffer; - return true; - } - virtual void unmap() - { - IofxLegacySpriteRenderData* spriteUserData = static_cast<IofxLegacySpriteRenderData*>(mDesc.getUserData()); - uint32_t rowPitch = spriteUserData->mSpriteBufferDesc.textureDescs[mIndex].pitchBytes; - //TODO: copy only needed amount! - getSpriteBuffer()->writeTexture(mIndex, uint32_t(mDesc.width * mDesc.height), mMapBuffer, rowPitch * mDesc.height); - } - - virtual bool getCUDAgraphicsResource(CUgraphicsResource &ret) - { - CUgraphicsResource handleList[UserRenderSpriteBufferDesc::MAX_SPRITE_TEXTURES]; - if (getSpriteBuffer()->getInteropTextureHandleList(handleList)) - { - ret = handleList[mIndex]; - return true; - } - return false; - } - -private: - UserRenderSurfaceDesc mDesc; - uint32_t mIndex; - void* mMapBuffer; -}; - -class IofxLegacyRenderBuffer : public UserRenderBuffer, public UserAllocated -{ -public: - enum Flags - { - NONE = 0, - SPRITE_BUFFER, - INSTANCE_BUFFER - }; - - virtual void release() - { - PX_DELETE(this); - } - - virtual ~IofxLegacyRenderBuffer() - { - if (mStagingBuffer) - { - physx::shdfnd::getAllocator().deallocate(mStagingBuffer); - } - } - - virtual void* map(RenderMapType::Enum mapType, size_t offset, size_t size) - { - PX_UNUSED(mapType); - if (mStagingBuffer == NULL) - { - mStagingBuffer = physx::shdfnd::getAllocator().allocate(mDesc.size, "StagingBuffer", __FILE__, __LINE__); - } - mMapOffset = PxMin(offset, mDesc.size); - mMapSize = PxMin(size, mDesc.size - mMapOffset); - return static_cast<uint8_t*>(mStagingBuffer) + offset; - } - -protected: - IofxLegacyRenderBuffer(const UserRenderBufferDesc& desc) - : mDesc(desc) - , mStagingBuffer(NULL) - , mMapOffset(0) - , mMapSize(0) - { - } - - UserRenderBufferDesc mDesc; - void* mStagingBuffer; - - size_t mMapOffset; - size_t mMapSize; -}; - -class IofxLegacySpriteRenderBuffer : public IofxLegacyRenderBuffer -{ -public: - IofxLegacySpriteRenderBuffer(const UserRenderBufferDesc& desc) - : IofxLegacyRenderBuffer(desc) - { - const UserRenderSpriteBufferDesc& spriteBufferDesc = - static_cast<IofxLegacySpriteRenderData*>(desc.getUserData())->mSpriteBufferDesc; - - UserRenderResourceManager* rrm = GetInternalApexSDK()->getUserRenderResourceManager(); - mSpriteBuffer = rrm->createSpriteBuffer(spriteBufferDesc); - } - virtual ~IofxLegacySpriteRenderBuffer() - { - if (mSpriteBuffer) - { - UserRenderResourceManager* rrm = GetInternalApexSDK()->getUserRenderResourceManager(); - rrm->releaseSpriteBuffer(*mSpriteBuffer); - } - } - UserRenderSpriteBuffer* getSpriteBuffer() - { - return mSpriteBuffer; - } - - virtual void unmap() - { - if (mSpriteBuffer && mMapSize > 0) - { - const UserRenderSpriteBufferDesc& spriteBufferDesc = - static_cast<IofxLegacySpriteRenderData*>(mDesc.getUserData())->mSpriteBufferDesc; - PX_ASSERT(spriteBufferDesc.stride > 0); - const uint32_t firstSprite = uint32_t(mMapOffset / spriteBufferDesc.stride); - const uint32_t numSprites = uint32_t(mMapSize / spriteBufferDesc.stride); - PX_ASSERT(firstSprite + numSprites <= spriteBufferDesc.maxSprites); - mSpriteBuffer->writeBuffer(static_cast<uint8_t*>(mStagingBuffer) + mMapOffset, firstSprite, numSprites); - } - } - - //GPU access - virtual bool getCUDAgraphicsResource(CUgraphicsResource &ret) - { - if (mSpriteBuffer) - { - return mSpriteBuffer->getInteropResourceHandle(ret); - } - return false; - } - -private: - UserRenderSpriteBuffer* mSpriteBuffer; -}; - -class IofxLegacyInstanceRenderBuffer : public IofxLegacyRenderBuffer -{ -public: - IofxLegacyInstanceRenderBuffer(const UserRenderBufferDesc& desc) - : IofxLegacyRenderBuffer(desc) - { - const UserRenderInstanceBufferDesc& instanceBufferDesc = - static_cast<IofxLegacyInstanceRenderData*>(desc.getUserData())->mInstanceBufferDesc; - - UserRenderResourceManager* rrm = GetInternalApexSDK()->getUserRenderResourceManager(); - mInstanceBuffer = rrm->createInstanceBuffer(instanceBufferDesc); - } - virtual ~IofxLegacyInstanceRenderBuffer() - { - if (mInstanceBuffer) - { - UserRenderResourceManager* rrm = GetInternalApexSDK()->getUserRenderResourceManager(); - rrm->releaseInstanceBuffer(*mInstanceBuffer); - } - } - - UserRenderInstanceBuffer* getInstanceBuffer() - { - return mInstanceBuffer; - } - - //CPU access - virtual void unmap() - { - if (mInstanceBuffer && mMapSize > 0) - { - const UserRenderInstanceBufferDesc& instanceBufferDesc = - static_cast<IofxLegacyInstanceRenderData*>(mDesc.getUserData())->mInstanceBufferDesc; - PX_ASSERT(instanceBufferDesc.stride > 0); - const uint32_t firstInstance = uint32_t(mMapOffset / instanceBufferDesc.stride); - const uint32_t numInstances = uint32_t(mMapSize / instanceBufferDesc.stride); - PX_ASSERT(firstInstance + numInstances <= instanceBufferDesc.maxInstances); - mInstanceBuffer->writeBuffer(static_cast<uint8_t*>(mStagingBuffer) + mMapOffset, firstInstance, numInstances); - } - } - - //GPU access - virtual bool getCUDAgraphicsResource(CUgraphicsResource &ret) - { - if (mInstanceBuffer) - { - return mInstanceBuffer->getInteropResourceHandle(ret); - } - return false; - } - -private: - UserRenderInstanceBuffer* mInstanceBuffer; -}; - - -void IofxLegacySpriteRenderable::updateRenderResources(bool rewriteBuffers, void* userRenderData) -{ - URR_SCOPE; - PX_UNUSED(rewriteBuffers); - - const IofxSpriteRenderData* spriteRenderData = mRenderable.getSpriteRenderData(); - if (spriteRenderData == NULL) - { - PX_ALWAYS_ASSERT(); - return; - } - UserRenderSpriteBuffer* spriteBuffer = NULL; - if (spriteRenderData->sharedRenderData->spriteRenderBuffer) - { - IofxLegacyRenderBuffer* legacyRenderBuffer = static_cast<IofxLegacyRenderBuffer*>(spriteRenderData->sharedRenderData->spriteRenderBuffer); - spriteBuffer = static_cast<IofxLegacySpriteRenderBuffer*>(legacyRenderBuffer)->getSpriteBuffer(); - } - else if (spriteRenderData->sharedRenderData->spriteRenderSurfaces[0]) - { - IofxLegacySpriteRenderSurface* legacySpriteRenderSurface = static_cast<IofxLegacySpriteRenderSurface*>(spriteRenderData->sharedRenderData->spriteRenderSurfaces[0]); - spriteBuffer = legacySpriteRenderSurface->getSpriteBuffer(); - } - - if (mRenderResource == NULL || mRenderResource->getSpriteBuffer() != spriteBuffer) - { - UserRenderResourceManager* rrm = GetInternalApexSDK()->getUserRenderResourceManager(); - - if (mRenderResource != NULL) - { - /* The sprite buffer was re-allocated for more semantics. We - * must release our old render resource and allocate a new one. - */ - rrm->releaseResource(*mRenderResource); - mRenderResource = NULL; - } - - if (spriteBuffer != NULL) - { - UserRenderResourceDesc rDesc; - rDesc.spriteBuffer = spriteBuffer; - rDesc.firstSprite = 0; - rDesc.numSprites = spriteRenderData->sharedRenderData->maxObjectCount; - rDesc.userRenderData = userRenderData; - rDesc.primitives = RenderPrimitiveType::POINT_SPRITES; - rDesc.material = spriteRenderData->renderResource; - - mRenderResource = rrm->createResource(rDesc); - } - } - - if (mRenderResource != NULL) - { - PX_ASSERT( mRenderResource->getSpriteBuffer() == spriteBuffer ); - - mRenderResource->setSpriteBufferRange(spriteRenderData->startIndex, spriteRenderData->objectCount); - mRenderResource->setSpriteVisibleCount(spriteRenderData->visibleCount); - } -} - -void IofxLegacySpriteRenderable::dispatchRenderResources(UserRenderer& renderer) -{ - if (mRenderResource != NULL) - { - RenderContext context; - context.world2local = physx::PxMat44(physx::PxIdentity); - context.local2world = physx::PxMat44(physx::PxIdentity); - context.renderResource = mRenderResource; - renderer.renderResource(context); - } -} - - -void IofxLegacyMeshRenderable::updateRenderResources(bool rewriteBuffers, void* userRenderData) -{ - URR_SCOPE; - - const IofxMeshRenderData* meshRenderData = mRenderable.getMeshRenderData(); - if (meshRenderData == NULL) - { - PX_ALWAYS_ASSERT(); - return; - } - - IofxLegacyRenderBuffer* legacyRenderBuffer = static_cast<IofxLegacyRenderBuffer*>(meshRenderData->sharedRenderData->meshRenderBuffer); - UserRenderInstanceBuffer* instanceBuffer = static_cast<IofxLegacyInstanceRenderBuffer*>(legacyRenderBuffer)->getInstanceBuffer(); - - if (mRenderMeshActor == NULL) - { - mRenderMeshActor = loadRenderMeshActor(meshRenderData); - } - if (mRenderMeshActor != NULL) - { - if (mRenderMeshActor->getInstanceBuffer() != instanceBuffer) - { - mRenderMeshActor->setInstanceBuffer(instanceBuffer); - } - - PX_ASSERT( mRenderMeshActor->getInstanceBuffer() == instanceBuffer ); - - mRenderMeshActor->setInstanceBufferRange(meshRenderData->startIndex, meshRenderData->objectCount); - mRenderMeshActor->updateRenderResources(rewriteBuffers, userRenderData); - } -} - -void IofxLegacyMeshRenderable::dispatchRenderResources(UserRenderer& renderer) -{ - PX_ASSERT(mRenderMeshActor != NULL); - if (mRenderMeshActor != NULL) - { - mRenderMeshActor->dispatchRenderResources(renderer); - } -} - -RenderMeshActor* IofxLegacyMeshRenderable::loadRenderMeshActor(const IofxMeshRenderData* meshRenderData) -{ - RenderMeshActor* rmactor = NULL; - if (meshRenderData) - { - RenderMeshActorDesc renderableMeshDesc; - renderableMeshDesc.maxInstanceCount = meshRenderData->sharedRenderData->maxObjectCount; - - RenderMeshAsset* meshAsset = static_cast<RenderMeshAsset*>(meshRenderData->renderResource); - if (meshAsset) - { - rmactor = meshAsset->createActor(renderableMeshDesc); - if (rmactor) - { - //this call is important to prevent renderResource release in case when there are no instances! - rmactor->setReleaseResourcesIfNothingToRender(false); - } - } - } - return rmactor; -} - - -bool IofxLegacyRenderCallback::getIofxSpriteRenderLayout(IofxSpriteRenderLayout& spriteRenderLayout, uint32_t spriteCount, uint32_t spriteSemanticsBitmap, RenderInteropFlags::Enum interopFlags) -{ - IofxLegacySpriteRenderData* spriteRenderData = PX_NEW(IofxLegacySpriteRenderData)(); - UserRenderSpriteBufferDesc& spriteBufferDesc = spriteRenderData->mSpriteBufferDesc; - - uint32_t legacySemanticsBitmap = 0; - if (spriteSemanticsBitmap & (1 << IofxRenderSemantic::POSITION)) - { - legacySemanticsBitmap |= (1 << RenderSpriteSemantic::POSITION); - } - if (spriteSemanticsBitmap & (1 << IofxRenderSemantic::COLOR)) - { - legacySemanticsBitmap |= (1 << RenderSpriteSemantic::COLOR); - } - if (spriteSemanticsBitmap & (1 << IofxRenderSemantic::VELOCITY)) - { - legacySemanticsBitmap |= (1 << RenderSpriteSemantic::VELOCITY); - } - if (spriteSemanticsBitmap & (1 << IofxRenderSemantic::SCALE)) - { - legacySemanticsBitmap |= (1 << RenderSpriteSemantic::SCALE); - } - if (spriteSemanticsBitmap & (1 << IofxRenderSemantic::LIFE_REMAIN)) - { - legacySemanticsBitmap |= (1 << RenderSpriteSemantic::LIFE_REMAIN); - } - if (spriteSemanticsBitmap & (1 << IofxRenderSemantic::DENSITY)) - { - legacySemanticsBitmap |= (1 << RenderSpriteSemantic::DENSITY); - } - if (spriteSemanticsBitmap & (1 << IofxRenderSemantic::SUBTEXTURE)) - { - legacySemanticsBitmap |= (1 << RenderSpriteSemantic::SUBTEXTURE); - } - if (spriteSemanticsBitmap & (1 << IofxRenderSemantic::ORIENTATION)) - { - legacySemanticsBitmap |= (1 << RenderSpriteSemantic::ORIENTATION); - } - if (spriteSemanticsBitmap & (1 << IofxRenderSemantic::USER_DATA)) - { - legacySemanticsBitmap |= (1 << RenderSpriteSemantic::USER_DATA); - } - - UserRenderResourceManager* rrm = GetInternalApexSDK()->getUserRenderResourceManager(); - spriteBufferDesc.registerInCUDA = (interopFlags & RenderInteropFlags::CUDA_INTEROP) != 0; - if (spriteBufferDesc.registerInCUDA) - { - spriteBufferDesc.interopContext = mGpuDispatcher->getCudaContextManager(); - } - spriteBufferDesc.hint = RenderBufferHint::DYNAMIC; - if (!rrm->getSpriteLayoutData(spriteCount, legacySemanticsBitmap, &spriteBufferDesc)) - { - RenderDataFormat::Enum positionFormat = RenderSpriteLayoutElement::getSemanticFormat(RenderSpriteLayoutElement::POSITION_FLOAT3); - RenderDataFormat::Enum colorFormat = RenderSpriteLayoutElement::getSemanticFormat(RenderSpriteLayoutElement::COLOR_BGRA8); - const uint32_t positionElementSize = RenderDataFormat::getFormatDataSize(positionFormat); - const uint32_t colorElementSize = RenderDataFormat::getFormatDataSize(colorFormat); - spriteBufferDesc.semanticOffsets[RenderSpriteLayoutElement::POSITION_FLOAT3] = 0; - spriteBufferDesc.semanticOffsets[RenderSpriteLayoutElement::COLOR_BGRA8] = positionElementSize; - spriteBufferDesc.stride = positionElementSize + colorElementSize; - spriteBufferDesc.maxSprites = spriteCount; - spriteBufferDesc.textureCount = 0; - } - - if (spriteBufferDesc.textureCount > 0) - { - static IofxSpriteRenderLayoutSurfaceElement::Enum convertTable[RenderSpriteTextureLayout::NUM_LAYOUTS] = { - IofxSpriteRenderLayoutSurfaceElement::MAX_COUNT, - IofxSpriteRenderLayoutSurfaceElement::POSITION_FLOAT4, - IofxSpriteRenderLayoutSurfaceElement::SCALE_ORIENT_SUBTEX_FLOAT4, - IofxSpriteRenderLayoutSurfaceElement::COLOR_RGBA8, - IofxSpriteRenderLayoutSurfaceElement::COLOR_BGRA8, - IofxSpriteRenderLayoutSurfaceElement::COLOR_FLOAT4 - }; - - spriteRenderLayout.surfaceCount = spriteBufferDesc.textureCount; - for (uint32_t i = 0; i < spriteRenderLayout.surfaceCount; ++i) - { - spriteRenderLayout.surfaceElements[i] = convertTable[ spriteBufferDesc.textureDescs[i].layout ]; - spriteRenderLayout.surfaceDescs[i].width = spriteBufferDesc.textureDescs[i].width; - spriteRenderLayout.surfaceDescs[i].height = spriteBufferDesc.textureDescs[i].height; - spriteRenderLayout.surfaceDescs[i].format = IofxSpriteRenderLayoutSurfaceElement::getFormat( spriteRenderLayout.surfaceElements[i] ); - - spriteRenderLayout.surfaceDescs[i].interopFlags = spriteBufferDesc.registerInCUDA ? - RenderInteropFlags::CUDA_INTEROP : RenderInteropFlags::NO_INTEROP; - - spriteRenderLayout.surfaceDescs[i].userFlags = 0; - spriteRenderLayout.surfaceDescs[i].setUserData(spriteRenderData); - } - } - else - { - static RenderSpriteLayoutElement::Enum convertTable[IofxSpriteRenderLayoutElement::MAX_COUNT] = { - RenderSpriteLayoutElement::POSITION_FLOAT3, - RenderSpriteLayoutElement::COLOR_RGBA8, - RenderSpriteLayoutElement::COLOR_BGRA8, - RenderSpriteLayoutElement::COLOR_FLOAT4, - RenderSpriteLayoutElement::VELOCITY_FLOAT3, - RenderSpriteLayoutElement::SCALE_FLOAT2, - RenderSpriteLayoutElement::LIFE_REMAIN_FLOAT1, - RenderSpriteLayoutElement::DENSITY_FLOAT1, - RenderSpriteLayoutElement::SUBTEXTURE_FLOAT1, - RenderSpriteLayoutElement::ORIENTATION_FLOAT1, - RenderSpriteLayoutElement::USER_DATA_UINT1 - }; - for (uint32_t dstElem = 0; dstElem < IofxSpriteRenderLayoutElement::MAX_COUNT; ++dstElem) - { - RenderSpriteLayoutElement::Enum srcElem = convertTable[dstElem]; - if (srcElem < RenderSpriteLayoutElement::NUM_SEMANTICS) - { - spriteRenderLayout.offsets[dstElem] = spriteBufferDesc.semanticOffsets[srcElem]; - } - } - spriteRenderLayout.stride = spriteBufferDesc.stride; - spriteRenderLayout.surfaceCount = 0; - - spriteRenderLayout.bufferDesc.size = spriteRenderLayout.stride * spriteCount; - spriteRenderLayout.bufferDesc.interopFlags = spriteBufferDesc.registerInCUDA ? - RenderInteropFlags::CUDA_INTEROP : RenderInteropFlags::NO_INTEROP; - - spriteRenderLayout.bufferDesc.userFlags = IofxLegacyRenderBuffer::SPRITE_BUFFER; - spriteRenderLayout.bufferDesc.setUserData(spriteRenderData); - } - return true; -} - -bool IofxLegacyRenderCallback::getIofxMeshRenderLayout(IofxMeshRenderLayout& meshRenderLayout, uint32_t meshCount, uint32_t meshSemanticsBitmap, RenderInteropFlags::Enum interopFlags) -{ - IofxLegacyInstanceRenderData* instanceRenderData = PX_NEW(IofxLegacyInstanceRenderData)(); - UserRenderInstanceBufferDesc& instanceBufferDesc = instanceRenderData->mInstanceBufferDesc; - - uint32_t legacySemanticsBitmap = 0; - if (meshSemanticsBitmap & (1 << IofxRenderSemantic::POSITION)) - { - legacySemanticsBitmap |= (1 << RenderInstanceSemantic::POSITION); - } - if (meshSemanticsBitmap & ((1 << IofxRenderSemantic::ROTATION) | (1 << IofxRenderSemantic::SCALE))) - { - legacySemanticsBitmap |= (1 << RenderInstanceSemantic::ROTATION_SCALE); - } - if (meshSemanticsBitmap & ((1 << IofxRenderSemantic::VELOCITY) | (1 << IofxRenderSemantic::LIFE_REMAIN))) - { - legacySemanticsBitmap |= (1 << RenderInstanceSemantic::VELOCITY_LIFE); - } - if (meshSemanticsBitmap & (1 << IofxRenderSemantic::DENSITY)) - { - legacySemanticsBitmap |= (1 << RenderInstanceSemantic::DENSITY); - } - if (meshSemanticsBitmap & (1 << IofxRenderSemantic::COLOR)) - { - legacySemanticsBitmap |= (1 << RenderInstanceSemantic::COLOR); - } - if (meshSemanticsBitmap & (1 << IofxRenderSemantic::USER_DATA)) - { - legacySemanticsBitmap |= (1 << RenderInstanceSemantic::USER_DATA); - } - UserRenderResourceManager* rrm = GetInternalApexSDK()->getUserRenderResourceManager(); - instanceBufferDesc.registerInCUDA = (interopFlags & RenderInteropFlags::CUDA_INTEROP) != 0; - if (instanceBufferDesc.registerInCUDA) - { - instanceBufferDesc.interopContext = mGpuDispatcher->getCudaContextManager(); - } - instanceBufferDesc.hint = RenderBufferHint::DYNAMIC; - if (!rrm->getInstanceLayoutData(meshCount, legacySemanticsBitmap, &instanceBufferDesc)) - { - RenderDataFormat::Enum positionFormat = RenderInstanceLayoutElement::getSemanticFormat(RenderInstanceLayoutElement::POSITION_FLOAT3); - RenderDataFormat::Enum rotationFormat = RenderInstanceLayoutElement::getSemanticFormat(RenderInstanceLayoutElement::ROTATION_SCALE_FLOAT3x3); - RenderDataFormat::Enum velocityFormat = RenderInstanceLayoutElement::getSemanticFormat(RenderInstanceLayoutElement::VELOCITY_LIFE_FLOAT4); - const uint32_t positionElementSize = RenderDataFormat::getFormatDataSize(positionFormat); - const uint32_t rotationElementSize = RenderDataFormat::getFormatDataSize(rotationFormat); - const uint32_t velocityElementSize = RenderDataFormat::getFormatDataSize(velocityFormat); - instanceBufferDesc.semanticOffsets[RenderInstanceLayoutElement::POSITION_FLOAT3] = 0; - instanceBufferDesc.semanticOffsets[RenderInstanceLayoutElement::ROTATION_SCALE_FLOAT3x3] = positionElementSize; - instanceBufferDesc.semanticOffsets[RenderInstanceLayoutElement::VELOCITY_LIFE_FLOAT4] = positionElementSize + rotationElementSize; - instanceBufferDesc.stride = positionElementSize + rotationElementSize + velocityElementSize; - instanceBufferDesc.maxInstances = meshCount; - } - - { - static RenderInstanceLayoutElement::Enum convertTable[IofxMeshRenderLayoutElement::MAX_COUNT] = { - RenderInstanceLayoutElement::POSITION_FLOAT3, - RenderInstanceLayoutElement::ROTATION_SCALE_FLOAT3x3, - RenderInstanceLayoutElement::POSE_FLOAT3x4, - RenderInstanceLayoutElement::VELOCITY_LIFE_FLOAT4, - RenderInstanceLayoutElement::DENSITY_FLOAT1, - RenderInstanceLayoutElement::COLOR_RGBA8, - RenderInstanceLayoutElement::COLOR_BGRA8, - RenderInstanceLayoutElement::COLOR_FLOAT4, - RenderInstanceLayoutElement::USER_DATA_UINT1 - }; - for (uint32_t dstElem = 0; dstElem < IofxMeshRenderLayoutElement::MAX_COUNT; ++dstElem) - { - RenderInstanceLayoutElement::Enum srcElem = convertTable[dstElem]; - if (srcElem < RenderInstanceLayoutElement::NUM_SEMANTICS) - { - meshRenderLayout.offsets[dstElem] = instanceBufferDesc.semanticOffsets[srcElem]; - } - } - meshRenderLayout.stride = instanceBufferDesc.stride; - - meshRenderLayout.bufferDesc.size = meshRenderLayout.stride * meshCount; - meshRenderLayout.bufferDesc.interopFlags = instanceBufferDesc.registerInCUDA ? - RenderInteropFlags::CUDA_INTEROP : RenderInteropFlags::NO_INTEROP; - - meshRenderLayout.bufferDesc.userFlags = IofxLegacyRenderBuffer::INSTANCE_BUFFER; - meshRenderLayout.bufferDesc.setUserData(instanceRenderData); - } - return true; -} - -UserRenderBuffer* IofxLegacyRenderCallback::createRenderBuffer(const UserRenderBufferDesc& bufferDesc) -{ - switch (bufferDesc.userFlags) - { - case IofxLegacyRenderBuffer::SPRITE_BUFFER: - return PX_NEW(IofxLegacySpriteRenderBuffer)(bufferDesc); - case IofxLegacyRenderBuffer::INSTANCE_BUFFER: - return PX_NEW(IofxLegacyInstanceRenderBuffer)(bufferDesc); - default: - return NULL; - }; -} - -UserRenderSurface* IofxLegacyRenderCallback::createRenderSurface(const UserRenderSurfaceDesc& bufferDesc) -{ - return PX_NEW(IofxLegacySpriteRenderSurface)(bufferDesc); -} - - -} -} -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsDensityCompositeModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsDensityCompositeModifierParams_0p0.cpp deleted file mode 100644 index fa530b38..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsDensityCompositeModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ColorVsDensityCompositeModifierParams_0p0NS; - -const char* const ColorVsDensityCompositeModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ColorVsDensityCompositeModifierParams_0p0, ColorVsDensityCompositeModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ColorVsDensityCompositeModifierParams_0p0::mBuiltFlagMutex; - -ColorVsDensityCompositeModifierParams_0p0::ColorVsDensityCompositeModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsDensityCompositeModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsDensityCompositeModifierParams_0p0::~ColorVsDensityCompositeModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsDensityCompositeModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ColorVsDensityCompositeModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsDensityCompositeModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsDensityCompositeModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ColorVsDensityCompositeModifierParams_0p0* tmpParam = const_cast<ColorVsDensityCompositeModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsDensityCompositeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ColorVsDensityCompositeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ColorVsDensityCompositeModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsDensityCompositeModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsDensityCompositeModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ColorVsDensityCompositeModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ColorVsDensityCompositeModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(colorDensityStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsDensityCompositeModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsDensityCompositeModifierParams_0p0::initReferences(void) -{ -} - -void ColorVsDensityCompositeModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsDensityCompositeModifierParams_0p0::freeStrings(void) -{ -} - -void ColorVsDensityCompositeModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsDensityModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsDensityModifierParams_0p0.cpp deleted file mode 100644 index 54999f5c..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsDensityModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ColorVsDensityModifierParams_0p0NS; - -const char* const ColorVsDensityModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ColorVsDensityModifierParams_0p0, ColorVsDensityModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ColorVsDensityModifierParams_0p0::mBuiltFlagMutex; - -ColorVsDensityModifierParams_0p0::ColorVsDensityModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsDensityModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsDensityModifierParams_0p0::~ColorVsDensityModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsDensityModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ColorVsDensityModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsDensityModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsDensityModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ColorVsDensityModifierParams_0p0* tmpParam = const_cast<ColorVsDensityModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsDensityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ColorVsDensityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ColorVsDensityModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsDensityModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsDensityModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ColorVsDensityModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ColorVsDensityModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsDensityModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - colorChannel = (const char*)"alpha"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsDensityModifierParams_0p0::initReferences(void) -{ -} - -void ColorVsDensityModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsDensityModifierParams_0p0::freeStrings(void) -{ -} - -void ColorVsDensityModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsLifeCompositeModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsLifeCompositeModifierParams_0p0.cpp deleted file mode 100644 index 9b4b840c..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsLifeCompositeModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ColorVsLifeCompositeModifierParams_0p0NS; - -const char* const ColorVsLifeCompositeModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ColorVsLifeCompositeModifierParams_0p0, ColorVsLifeCompositeModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ColorVsLifeCompositeModifierParams_0p0::mBuiltFlagMutex; - -ColorVsLifeCompositeModifierParams_0p0::ColorVsLifeCompositeModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsLifeCompositeModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsLifeCompositeModifierParams_0p0::~ColorVsLifeCompositeModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsLifeCompositeModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ColorVsLifeCompositeModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsLifeCompositeModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsLifeCompositeModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ColorVsLifeCompositeModifierParams_0p0* tmpParam = const_cast<ColorVsLifeCompositeModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsLifeCompositeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ColorVsLifeCompositeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ColorVsLifeCompositeModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsLifeCompositeModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsLifeCompositeModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ColorVsLifeCompositeModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ColorVsLifeCompositeModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(colorLifeStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsLifeCompositeModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsLifeCompositeModifierParams_0p0::initReferences(void) -{ -} - -void ColorVsLifeCompositeModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsLifeCompositeModifierParams_0p0::freeStrings(void) -{ -} - -void ColorVsLifeCompositeModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsLifeModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsLifeModifierParams_0p0.cpp deleted file mode 100644 index dc44d8ab..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsLifeModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ColorVsLifeModifierParams_0p0NS; - -const char* const ColorVsLifeModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ColorVsLifeModifierParams_0p0, ColorVsLifeModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ColorVsLifeModifierParams_0p0::mBuiltFlagMutex; - -ColorVsLifeModifierParams_0p0::ColorVsLifeModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsLifeModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsLifeModifierParams_0p0::~ColorVsLifeModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsLifeModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ColorVsLifeModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsLifeModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsLifeModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ColorVsLifeModifierParams_0p0* tmpParam = const_cast<ColorVsLifeModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsLifeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ColorVsLifeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ColorVsLifeModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsLifeModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsLifeModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ColorVsLifeModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ColorVsLifeModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsLifeModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - colorChannel = (const char*)"alpha"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsLifeModifierParams_0p0::initReferences(void) -{ -} - -void ColorVsLifeModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsLifeModifierParams_0p0::freeStrings(void) -{ -} - -void ColorVsLifeModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsTemperatureCompositeModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsTemperatureCompositeModifierParams_0p0.cpp deleted file mode 100644 index c0fe788b..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsTemperatureCompositeModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ColorVsTemperatureCompositeModifierParams_0p0NS; - -const char* const ColorVsTemperatureCompositeModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ColorVsTemperatureCompositeModifierParams_0p0, ColorVsTemperatureCompositeModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ColorVsTemperatureCompositeModifierParams_0p0::mBuiltFlagMutex; - -ColorVsTemperatureCompositeModifierParams_0p0::ColorVsTemperatureCompositeModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsTemperatureCompositeModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsTemperatureCompositeModifierParams_0p0::~ColorVsTemperatureCompositeModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsTemperatureCompositeModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ColorVsTemperatureCompositeModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsTemperatureCompositeModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsTemperatureCompositeModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ColorVsTemperatureCompositeModifierParams_0p0* tmpParam = const_cast<ColorVsTemperatureCompositeModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsTemperatureCompositeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ColorVsTemperatureCompositeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ColorVsTemperatureCompositeModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsTemperatureCompositeModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsTemperatureCompositeModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ColorVsTemperatureCompositeModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ColorVsTemperatureCompositeModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(colorTemperatureStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsTemperatureCompositeModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsTemperatureCompositeModifierParams_0p0::initReferences(void) -{ -} - -void ColorVsTemperatureCompositeModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsTemperatureCompositeModifierParams_0p0::freeStrings(void) -{ -} - -void ColorVsTemperatureCompositeModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsTemperatureModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsTemperatureModifierParams_0p0.cpp deleted file mode 100644 index e7bd0ac5..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsTemperatureModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ColorVsTemperatureModifierParams_0p0NS; - -const char* const ColorVsTemperatureModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ColorVsTemperatureModifierParams_0p0, ColorVsTemperatureModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ColorVsTemperatureModifierParams_0p0::mBuiltFlagMutex; - -ColorVsTemperatureModifierParams_0p0::ColorVsTemperatureModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsTemperatureModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsTemperatureModifierParams_0p0::~ColorVsTemperatureModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsTemperatureModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ColorVsTemperatureModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsTemperatureModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsTemperatureModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ColorVsTemperatureModifierParams_0p0* tmpParam = const_cast<ColorVsTemperatureModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsTemperatureModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ColorVsTemperatureModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ColorVsTemperatureModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsTemperatureModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsTemperatureModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ColorVsTemperatureModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ColorVsTemperatureModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsTemperatureModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - colorChannel = (const char*)"alpha"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsTemperatureModifierParams_0p0::initReferences(void) -{ -} - -void ColorVsTemperatureModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsTemperatureModifierParams_0p0::freeStrings(void) -{ -} - -void ColorVsTemperatureModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsVelocityCompositeModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsVelocityCompositeModifierParams_0p0.cpp deleted file mode 100644 index 9722609a..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsVelocityCompositeModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ColorVsVelocityCompositeModifierParams_0p0NS; - -const char* const ColorVsVelocityCompositeModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ColorVsVelocityCompositeModifierParams_0p0, ColorVsVelocityCompositeModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ColorVsVelocityCompositeModifierParams_0p0::mBuiltFlagMutex; - -ColorVsVelocityCompositeModifierParams_0p0::ColorVsVelocityCompositeModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsVelocityCompositeModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsVelocityCompositeModifierParams_0p0::~ColorVsVelocityCompositeModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsVelocityCompositeModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ColorVsVelocityCompositeModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsVelocityCompositeModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsVelocityCompositeModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ColorVsVelocityCompositeModifierParams_0p0* tmpParam = const_cast<ColorVsVelocityCompositeModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsVelocityCompositeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ColorVsVelocityCompositeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ColorVsVelocityCompositeModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsVelocityCompositeModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsVelocityCompositeModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ColorVsVelocityCompositeModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ColorVsVelocityCompositeModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(colorVelocityStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsVelocityCompositeModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - velocity0 = float(0); - velocity1 = float(1); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsVelocityCompositeModifierParams_0p0::initReferences(void) -{ -} - -void ColorVsVelocityCompositeModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsVelocityCompositeModifierParams_0p0::freeStrings(void) -{ -} - -void ColorVsVelocityCompositeModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsVelocityModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsVelocityModifierParams_0p0.cpp deleted file mode 100644 index 488fa6e1..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ColorVsVelocityModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ColorVsVelocityModifierParams_0p0NS; - -const char* const ColorVsVelocityModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ColorVsVelocityModifierParams_0p0, ColorVsVelocityModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ColorVsVelocityModifierParams_0p0::mBuiltFlagMutex; - -ColorVsVelocityModifierParams_0p0::ColorVsVelocityModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ColorVsVelocityModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ColorVsVelocityModifierParams_0p0::~ColorVsVelocityModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ColorVsVelocityModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ColorVsVelocityModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ColorVsVelocityModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ColorVsVelocityModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ColorVsVelocityModifierParams_0p0* tmpParam = const_cast<ColorVsVelocityModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ColorVsVelocityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ColorVsVelocityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ColorVsVelocityModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ColorVsVelocityModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ColorVsVelocityModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ColorVsVelocityModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ColorVsVelocityModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ColorVsVelocityModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - colorChannel = (const char*)"alpha"; - velocity0 = float(0); - velocity1 = float(1); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ColorVsVelocityModifierParams_0p0::initReferences(void) -{ -} - -void ColorVsVelocityModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ColorVsVelocityModifierParams_0p0::freeStrings(void) -{ -} - -void ColorVsVelocityModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/InitialColorModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/InitialColorModifierParams_0p0.cpp deleted file mode 100644 index 32cf5a05..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/InitialColorModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace InitialColorModifierParams_0p0NS; - -const char* const InitialColorModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<InitialColorModifierParams_0p0, InitialColorModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 2; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, - { TYPE_VEC4, false, (size_t)(&((ParametersStruct*)0)->color), NULL, 0 }, // color -}; - - -bool InitialColorModifierParams_0p0::mBuiltFlag = false; -NvParameterized::MutexType InitialColorModifierParams_0p0::mBuiltFlagMutex; - -InitialColorModifierParams_0p0::InitialColorModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &InitialColorModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -InitialColorModifierParams_0p0::~InitialColorModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void InitialColorModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~InitialColorModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* InitialColorModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* InitialColorModifierParams_0p0::getParameterDefinitionTree(void) const -{ - InitialColorModifierParams_0p0* tmpParam = const_cast<InitialColorModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType InitialColorModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType InitialColorModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void InitialColorModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<InitialColorModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void InitialColorModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void InitialColorModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void InitialColorModifierParams_0p0::initDynamicArrays(void) -{ -} - -void InitialColorModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - color = physx::PxVec4(initVec4(1, 1, 1, 1)); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void InitialColorModifierParams_0p0::initReferences(void) -{ -} - -void InitialColorModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void InitialColorModifierParams_0p0::freeStrings(void) -{ -} - -void InitialColorModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/IofxAssetParameters_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/IofxAssetParameters_0p0.cpp deleted file mode 100644 index ef8d1109..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/IofxAssetParameters_0p0.cpp +++ /dev/null @@ -1,640 +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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace IofxAssetParameters_0p0NS; - -const char* const IofxAssetParameters_0p0Factory::vptr = - NvParameterized::getVptr<IofxAssetParameters_0p0, IofxAssetParameters_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 10; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 5, 6, 8, 2, 3, 4, 7, 9, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 4 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->renderMeshList), CHILDREN(4), 1 }, // renderMeshList - { TYPE_STRUCT, false, 1 * sizeof(meshProperties_Type), CHILDREN(5), 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_REF, false, (size_t)(&((ParametersStruct*)0)->spriteMaterialName), NULL, 0 }, // spriteMaterialName - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->spawnModifierList), CHILDREN(7), 1 }, // spawnModifierList - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // spawnModifierList[] - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->continuousModifierList), CHILDREN(8), 1 }, // continuousModifierList - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // continuousModifierList[] -}; - - -bool IofxAssetParameters_0p0::mBuiltFlag = false; -NvParameterized::MutexType IofxAssetParameters_0p0::mBuiltFlagMutex; - -IofxAssetParameters_0p0::IofxAssetParameters_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &IofxAssetParameters_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -IofxAssetParameters_0p0::~IofxAssetParameters_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void IofxAssetParameters_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~IofxAssetParameters_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* IofxAssetParameters_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* IofxAssetParameters_0p0::getParameterDefinitionTree(void) const -{ - IofxAssetParameters_0p0* tmpParam = const_cast<IofxAssetParameters_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType IofxAssetParameters_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType IofxAssetParameters_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void IofxAssetParameters_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<IofxAssetParameters_0p0::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 IofxAssetParameters_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void IofxAssetParameters_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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="spriteMaterialName" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - 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[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ApexMaterials" }; - ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="spawnModifierList" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - 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[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", "ColorVsLifeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "ColorVsDensityModifierParams", "SubtextureVsLifeModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "RandomSubtextureModifierParams", "RandomRotationModifierParams" }; - ParamDefTable[6].setRefVariantVals((const char**)RefVariantVals, 13); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="spawnModifierList[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - 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[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("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[7].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "SimpleScaleModifierParams", "RandomScaleModifierParams", "ColorVsLifeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "ColorVsDensityModifierParams", "SubtextureVsLifeModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "RandomSubtextureModifierParams", "RandomRotationModifierParams" }; - ParamDefTable[7].setRefVariantVals((const char**)RefVariantVals, 13); - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="continuousModifierList" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("continuousModifierList", 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[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("longDescription", "These modifiers are applied to the instanced objects every frame.", true); - HintTable[2].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "SimpleScaleModifierParams", "RandomScaleModifierParams", "ColorVsLifeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "ColorVsDensityModifierParams", "SubtextureVsLifeModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "RandomSubtextureModifierParams", "RandomRotationModifierParams", "ViewDirectionSortingModifierParams" }; - ParamDefTable[8].setRefVariantVals((const char**)RefVariantVals, 14); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="continuousModifierList[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("continuousModifierList", 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[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("longDescription", "These modifiers are applied to the instanced objects every frame.", true); - HintTable[2].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "SimpleScaleModifierParams", "RandomScaleModifierParams", "ColorVsLifeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "ColorVsDensityModifierParams", "SubtextureVsLifeModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "RandomSubtextureModifierParams", "RandomRotationModifierParams", "ViewDirectionSortingModifierParams" }; - ParamDefTable[9].setRefVariantVals((const char**)RefVariantVals, 14); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[4]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(5); - Children[2] = PDEF_PTR(6); - Children[3] = PDEF_PTR(8); - - ParamDefTable[0].setChildren(Children, 4); - } - - // 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=6, longName="spawnModifierList" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(7); - - ParamDefTable[6].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=8, longName="continuousModifierList" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(9); - - ParamDefTable[8].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void IofxAssetParameters_0p0::initStrings(void) -{ -} - -void IofxAssetParameters_0p0::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 IofxAssetParameters_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void IofxAssetParameters_0p0::initReferences(void) -{ - spriteMaterialName = NULL; - -} - -void IofxAssetParameters_0p0::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 IofxAssetParameters_0p0::freeStrings(void) -{ -} - -void IofxAssetParameters_0p0::freeReferences(void) -{ - - for (int i = 0; i < renderMeshList.arraySizes[0]; i++) - { - if (renderMeshList.buf[i].meshAssetName) - { - renderMeshList.buf[i].meshAssetName->destroy(); - } - } - 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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/IofxAssetParameters_0p1.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/IofxAssetParameters_0p1.cpp deleted file mode 100644 index ba9fd1b7..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/IofxAssetParameters_0p1.cpp +++ /dev/null @@ -1,322 +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_0p1.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace IofxAssetParameters_0p1NS; - -const char* const IofxAssetParameters_0p1Factory::vptr = - NvParameterized::getVptr<IofxAssetParameters_0p1, IofxAssetParameters_0p1::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_REF, false, (size_t)(&((ParametersStruct*)0)->iofxType), NULL, 0 }, // iofxType -}; - - -bool IofxAssetParameters_0p1::mBuiltFlag = false; -NvParameterized::MutexType IofxAssetParameters_0p1::mBuiltFlagMutex; - -IofxAssetParameters_0p1::IofxAssetParameters_0p1(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &IofxAssetParameters_0p1FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -IofxAssetParameters_0p1::~IofxAssetParameters_0p1() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void IofxAssetParameters_0p1::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~IofxAssetParameters_0p1(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* IofxAssetParameters_0p1::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* IofxAssetParameters_0p1::getParameterDefinitionTree(void) const -{ - IofxAssetParameters_0p1* tmpParam = const_cast<IofxAssetParameters_0p1*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType IofxAssetParameters_0p1::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType IofxAssetParameters_0p1::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void IofxAssetParameters_0p1::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<IofxAssetParameters_0p1::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void IofxAssetParameters_0p1::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void IofxAssetParameters_0p1::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void IofxAssetParameters_0p1::initStrings(void) -{ -} - -void IofxAssetParameters_0p1::initDynamicArrays(void) -{ -} - -void IofxAssetParameters_0p1::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void IofxAssetParameters_0p1::initReferences(void) -{ - iofxType = NULL; - -} - -void IofxAssetParameters_0p1::freeDynamicArrays(void) -{ -} - -void IofxAssetParameters_0p1::freeStrings(void) -{ -} - -void IofxAssetParameters_0p1::freeReferences(void) -{ - if (iofxType) - { - iofxType->destroy(); - } - -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/IofxAssetParameters_0p2.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/IofxAssetParameters_0p2.cpp deleted file mode 100644 index a673092d..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/IofxAssetParameters_0p2.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_0p2.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace IofxAssetParameters_0p2NS; - -const char* const IofxAssetParameters_0p2Factory::vptr = - NvParameterized::getVptr<IofxAssetParameters_0p2, IofxAssetParameters_0p2::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_0p2::mBuiltFlag = false; -NvParameterized::MutexType IofxAssetParameters_0p2::mBuiltFlagMutex; - -IofxAssetParameters_0p2::IofxAssetParameters_0p2(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &IofxAssetParameters_0p2FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -IofxAssetParameters_0p2::~IofxAssetParameters_0p2() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void IofxAssetParameters_0p2::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~IofxAssetParameters_0p2(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* IofxAssetParameters_0p2::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* IofxAssetParameters_0p2::getParameterDefinitionTree(void) const -{ - IofxAssetParameters_0p2* tmpParam = const_cast<IofxAssetParameters_0p2*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType IofxAssetParameters_0p2::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType IofxAssetParameters_0p2::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void IofxAssetParameters_0p2::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<IofxAssetParameters_0p2::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void IofxAssetParameters_0p2::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void IofxAssetParameters_0p2::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#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_0p2::initStrings(void) -{ -} - -void IofxAssetParameters_0p2::initDynamicArrays(void) -{ -} - -void IofxAssetParameters_0p2::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - renderOutput.useUserSemantic = bool(false); - renderOutput.useFloat4Color = bool(false); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void IofxAssetParameters_0p2::initReferences(void) -{ - iofxType = NULL; - -} - -void IofxAssetParameters_0p2::freeDynamicArrays(void) -{ -} - -void IofxAssetParameters_0p2::freeStrings(void) -{ -} - -void IofxAssetParameters_0p2::freeReferences(void) -{ - if (iofxType) - { - iofxType->destroy(); - } - -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/IofxDebugRenderParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/IofxDebugRenderParams_0p0.cpp deleted file mode 100644 index b0493e95..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/IofxDebugRenderParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace IofxDebugRenderParams_0p0NS; - -const char* const IofxDebugRenderParams_0p0Factory::vptr = - NvParameterized::getVptr<IofxDebugRenderParams_0p0, IofxDebugRenderParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 4; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 3 }, - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->VISUALIZE_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_0p0::mBuiltFlag = false; -NvParameterized::MutexType IofxDebugRenderParams_0p0::mBuiltFlagMutex; - -IofxDebugRenderParams_0p0::IofxDebugRenderParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &IofxDebugRenderParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -IofxDebugRenderParams_0p0::~IofxDebugRenderParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void IofxDebugRenderParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~IofxDebugRenderParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* IofxDebugRenderParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* IofxDebugRenderParams_0p0::getParameterDefinitionTree(void) const -{ - IofxDebugRenderParams_0p0* tmpParam = const_cast<IofxDebugRenderParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType IofxDebugRenderParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType IofxDebugRenderParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void IofxDebugRenderParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<IofxDebugRenderParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void IofxDebugRenderParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void IofxDebugRenderParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="VISUALIZE_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_0p0::initStrings(void) -{ -} - -void IofxDebugRenderParams_0p0::initDynamicArrays(void) -{ -} - -void IofxDebugRenderParams_0p0::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_0p0::initReferences(void) -{ -} - -void IofxDebugRenderParams_0p0::freeDynamicArrays(void) -{ -} - -void IofxDebugRenderParams_0p0::freeStrings(void) -{ -} - -void IofxDebugRenderParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/IofxModuleParameters_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/IofxModuleParameters_0p0.cpp deleted file mode 100644 index 87266fde..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/IofxModuleParameters_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace IofxModuleParameters_0p0NS; - -const char* const IofxModuleParameters_0p0Factory::vptr = - NvParameterized::getVptr<IofxModuleParameters_0p0, IofxModuleParameters_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 2; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, - { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->unused), NULL, 0 }, // unused -}; - - -bool IofxModuleParameters_0p0::mBuiltFlag = false; -NvParameterized::MutexType IofxModuleParameters_0p0::mBuiltFlagMutex; - -IofxModuleParameters_0p0::IofxModuleParameters_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &IofxModuleParameters_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -IofxModuleParameters_0p0::~IofxModuleParameters_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void IofxModuleParameters_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~IofxModuleParameters_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* IofxModuleParameters_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* IofxModuleParameters_0p0::getParameterDefinitionTree(void) const -{ - IofxModuleParameters_0p0* tmpParam = const_cast<IofxModuleParameters_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType IofxModuleParameters_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType IofxModuleParameters_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void IofxModuleParameters_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<IofxModuleParameters_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void IofxModuleParameters_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void IofxModuleParameters_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "This class is used for initializing the 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_0p0::initStrings(void) -{ -} - -void IofxModuleParameters_0p0::initDynamicArrays(void) -{ -} - -void IofxModuleParameters_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - unused = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void IofxModuleParameters_0p0::initReferences(void) -{ -} - -void IofxModuleParameters_0p0::freeDynamicArrays(void) -{ -} - -void IofxModuleParameters_0p0::freeStrings(void) -{ -} - -void IofxModuleParameters_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p0.cpp deleted file mode 100644 index 98180b36..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace MeshIofxParameters_0p0NS; - -const char* const MeshIofxParameters_0p0Factory::vptr = - NvParameterized::getVptr<MeshIofxParameters_0p0, MeshIofxParameters_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType MeshIofxParameters_0p0::mBuiltFlagMutex; - -MeshIofxParameters_0p0::MeshIofxParameters_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &MeshIofxParameters_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -MeshIofxParameters_0p0::~MeshIofxParameters_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void MeshIofxParameters_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~MeshIofxParameters_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p0::getParameterDefinitionTree(void) const -{ - MeshIofxParameters_0p0* tmpParam = const_cast<MeshIofxParameters_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType MeshIofxParameters_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType MeshIofxParameters_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void MeshIofxParameters_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<MeshIofxParameters_0p0::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_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void MeshIofxParameters_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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" }; - ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 3); - - - 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" }; - ParamDefTable[6].setRefVariantVals((const char**)RefVariantVals, 3); - - - - } - - // 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", "RotationModifierParams", 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", "RotationModifierParams", 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", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams" }; - ParamDefTable[7].setRefVariantVals((const char**)RefVariantVals, 9); - - - 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", "RotationModifierParams", 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", "RotationModifierParams", 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", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams" }; - ParamDefTable[8].setRefVariantVals((const char**)RefVariantVals, 9); - - - - } - - // 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_0p0::initStrings(void) -{ -} - -void MeshIofxParameters_0p0::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_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void MeshIofxParameters_0p0::initReferences(void) -{ -} - -void MeshIofxParameters_0p0::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_0p0::freeStrings(void) -{ -} - -void MeshIofxParameters_0p0::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p1.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p1.cpp deleted file mode 100644 index dd210742..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p1.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_0p1.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace MeshIofxParameters_0p1NS; - -const char* const MeshIofxParameters_0p1Factory::vptr = - NvParameterized::getVptr<MeshIofxParameters_0p1, MeshIofxParameters_0p1::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_0p1::mBuiltFlag = false; -NvParameterized::MutexType MeshIofxParameters_0p1::mBuiltFlagMutex; - -MeshIofxParameters_0p1::MeshIofxParameters_0p1(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &MeshIofxParameters_0p1FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -MeshIofxParameters_0p1::~MeshIofxParameters_0p1() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void MeshIofxParameters_0p1::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~MeshIofxParameters_0p1(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p1::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p1::getParameterDefinitionTree(void) const -{ - MeshIofxParameters_0p1* tmpParam = const_cast<MeshIofxParameters_0p1*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType MeshIofxParameters_0p1::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType MeshIofxParameters_0p1::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void MeshIofxParameters_0p1::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<MeshIofxParameters_0p1::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_0p1::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void MeshIofxParameters_0p1::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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" }; - ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 4); - - - 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" }; - ParamDefTable[6].setRefVariantVals((const char**)RefVariantVals, 4); - - - - } - - // 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", "RotationModifierParams", 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", "RotationModifierParams", 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", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams" }; - ParamDefTable[7].setRefVariantVals((const char**)RefVariantVals, 11); - - - 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", "RotationModifierParams", 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", "RotationModifierParams", 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", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams" }; - ParamDefTable[8].setRefVariantVals((const char**)RefVariantVals, 11); - - - - } - - // 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_0p1::initStrings(void) -{ -} - -void MeshIofxParameters_0p1::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_0p1::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void MeshIofxParameters_0p1::initReferences(void) -{ -} - -void MeshIofxParameters_0p1::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_0p1::freeStrings(void) -{ -} - -void MeshIofxParameters_0p1::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p2.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p2.cpp deleted file mode 100644 index 3d164a69..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p2.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_0p2.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace MeshIofxParameters_0p2NS; - -const char* const MeshIofxParameters_0p2Factory::vptr = - NvParameterized::getVptr<MeshIofxParameters_0p2, MeshIofxParameters_0p2::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_0p2::mBuiltFlag = false; -NvParameterized::MutexType MeshIofxParameters_0p2::mBuiltFlagMutex; - -MeshIofxParameters_0p2::MeshIofxParameters_0p2(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &MeshIofxParameters_0p2FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -MeshIofxParameters_0p2::~MeshIofxParameters_0p2() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void MeshIofxParameters_0p2::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~MeshIofxParameters_0p2(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p2::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p2::getParameterDefinitionTree(void) const -{ - MeshIofxParameters_0p2* tmpParam = const_cast<MeshIofxParameters_0p2*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType MeshIofxParameters_0p2::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType MeshIofxParameters_0p2::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void MeshIofxParameters_0p2::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<MeshIofxParameters_0p2::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_0p2::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void MeshIofxParameters_0p2::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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", "RotationModifierParams", 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", "RotationModifierParams", 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", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams" }; - ParamDefTable[7].setRefVariantVals((const char**)RefVariantVals, 11); - - - 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", "RotationModifierParams", 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", "RotationModifierParams", 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", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams" }; - ParamDefTable[8].setRefVariantVals((const char**)RefVariantVals, 11); - - - - } - - // 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_0p2::initStrings(void) -{ -} - -void MeshIofxParameters_0p2::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_0p2::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void MeshIofxParameters_0p2::initReferences(void) -{ -} - -void MeshIofxParameters_0p2::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_0p2::freeStrings(void) -{ -} - -void MeshIofxParameters_0p2::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p3.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p3.cpp deleted file mode 100644 index 13fa484a..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p3.cpp +++ /dev/null @@ -1,619 +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_0p3.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace MeshIofxParameters_0p3NS; - -const char* const MeshIofxParameters_0p3Factory::vptr = - NvParameterized::getVptr<MeshIofxParameters_0p3, MeshIofxParameters_0p3::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_0p3::mBuiltFlag = false; -NvParameterized::MutexType MeshIofxParameters_0p3::mBuiltFlagMutex; - -MeshIofxParameters_0p3::MeshIofxParameters_0p3(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &MeshIofxParameters_0p3FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -MeshIofxParameters_0p3::~MeshIofxParameters_0p3() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void MeshIofxParameters_0p3::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~MeshIofxParameters_0p3(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p3::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p3::getParameterDefinitionTree(void) const -{ - MeshIofxParameters_0p3* tmpParam = const_cast<MeshIofxParameters_0p3*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType MeshIofxParameters_0p3::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType MeshIofxParameters_0p3::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void MeshIofxParameters_0p3::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<MeshIofxParameters_0p3::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_0p3::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void MeshIofxParameters_0p3::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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[4]; - static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; - HintTable[0].init("HIDE_CLASS1", "ScaleVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ScaleVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("INCLUDED", uint64_t(1), true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("HIDE_CLASS1", "ScaleVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ScaleVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("INCLUDED", uint64_t(1), true); - HintTable[4].init("longDescription", "These modifiers are applied to the instanced objects every frame.", true); - HintTable[5].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "ScaleVsLife3DModifierParams", "ScaleVsDensity3DModifierParams", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "ColorVsVelocityCompositeModifierParams" }; - ParamDefTable[7].setRefVariantVals((const char**)RefVariantVals, 12); - - - 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[4]; - static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], }; - HintTable[0].init("HIDE_CLASS1", "ScaleVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ScaleVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("INCLUDED", uint64_t(1), true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#else - - static HintImpl HintTable[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - HintTable[0].init("HIDE_CLASS1", "ScaleVsLifeModifierParams", true); - HintTable[1].init("HIDE_CLASS2", "ScaleVsDensityModifierParams", true); - HintTable[2].init("HIDE_CLASS3", "ScaleVsCameraDistanceModifierParams", true); - HintTable[3].init("INCLUDED", uint64_t(1), true); - HintTable[4].init("longDescription", "These modifiers are applied to the instanced objects every frame.", true); - HintTable[5].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "ScaleVsLife3DModifierParams", "ScaleVsDensity3DModifierParams", "ScaleVsCameraDistance3DModifierParams", "OrientAlongVelocityModifierParams", "ScaleAlongVelocityModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "ColorVsVelocityCompositeModifierParams" }; - ParamDefTable[8].setRefVariantVals((const char**)RefVariantVals, 12); - - - - } - - // 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_0p3::initStrings(void) -{ -} - -void MeshIofxParameters_0p3::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_0p3::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void MeshIofxParameters_0p3::initReferences(void) -{ -} - -void MeshIofxParameters_0p3::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_0p3::freeStrings(void) -{ -} - -void MeshIofxParameters_0p3::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p4.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p4.cpp deleted file mode 100644 index 1d19c4ce..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/MeshIofxParameters_0p4.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_0p4.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace MeshIofxParameters_0p4NS; - -const char* const MeshIofxParameters_0p4Factory::vptr = - NvParameterized::getVptr<MeshIofxParameters_0p4, MeshIofxParameters_0p4::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_0p4::mBuiltFlag = false; -NvParameterized::MutexType MeshIofxParameters_0p4::mBuiltFlagMutex; - -MeshIofxParameters_0p4::MeshIofxParameters_0p4(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &MeshIofxParameters_0p4FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -MeshIofxParameters_0p4::~MeshIofxParameters_0p4() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void MeshIofxParameters_0p4::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~MeshIofxParameters_0p4(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p4::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* MeshIofxParameters_0p4::getParameterDefinitionTree(void) const -{ - MeshIofxParameters_0p4* tmpParam = const_cast<MeshIofxParameters_0p4*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType MeshIofxParameters_0p4::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType MeshIofxParameters_0p4::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void MeshIofxParameters_0p4::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<MeshIofxParameters_0p4::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_0p4::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void MeshIofxParameters_0p4::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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_0p4::initStrings(void) -{ -} - -void MeshIofxParameters_0p4::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_0p4::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void MeshIofxParameters_0p4::initReferences(void) -{ -} - -void MeshIofxParameters_0p4::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_0p4::freeStrings(void) -{ -} - -void MeshIofxParameters_0p4::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ModuleIOFXLegacy.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ModuleIOFXLegacy.cpp deleted file mode 100644 index 6d615d4b..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ModuleIOFXLegacy.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -* -* This code was autogenerated from ModuleIOFXLegacy.template -*/ - -#include "ApexUsingNamespace.h" -#include "Apex.h" -#include "ApexLegacyModule.h" -#include "ApexRWLockable.h" -#include "legacy/ModuleIofxLegacy.h" -#include "IofxLegacyRender.h" -#include "PsHashMap.h" - -#include "ModuleIOFXLegacyRegistration.h" - -namespace nvidia -{ -namespace apex -{ -namespace legacy -{ - -class ModuleIOFXLegacy : public TApexLegacyModule<ModuleIofxLegacy>, public ApexRWLockable -{ -public: - APEX_RW_LOCKABLE_BOILERPLATE - - ModuleIOFXLegacy(ApexSDKIntl* inSdk) - { - mName = "IOFX_Legacy"; - mSdk = inSdk; - mApiProxy = this; - ModuleIOFXLegacyRegistration::invokeRegistration(mSdk->getParameterizedTraits()); - } - - virtual nvidia::apex::IofxRenderCallback* getIofxLegacyRenderCallback(const Scene& apexScene) - { - IofxLegacyRenderCallback* &renderCallback = mSceneCallbackMap[&apexScene]; - if (renderCallback == NULL) - { - renderCallback = PX_NEW(IofxLegacyRenderCallback)(&apexScene); - } - return renderCallback; - } - - - virtual ~ModuleIOFXLegacy() - { - for (SceneCallbackMap_t::Iterator it = mSceneCallbackMap.getIterator(); !it.done(); ++it) - { - IofxLegacyRenderCallback* renderCallback = it->second; - if (renderCallback) - { - PX_DELETE(renderCallback); - } - } - } - -protected: - void releaseLegacyObjects() - { - ModuleIOFXLegacyRegistration::invokeUnregistration(mSdk->getParameterizedTraits()); - } - -private: - typedef nvidia::shdfnd::HashMap<const Scene*, IofxLegacyRenderCallback*> SceneCallbackMap_t; - SceneCallbackMap_t mSceneCallbackMap; -}; - -void instantiateModuleIOFXLegacy() -{ - ApexSDKIntl *sdk = GetInternalApexSDK(); - ModuleIOFXLegacy *impl = PX_NEW(ModuleIOFXLegacy)(sdk); - sdk->registerExternalModule((Module *) impl, (ModuleIntl *) impl); -} - -} -} -} diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/OrientAlongVelocityModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/OrientAlongVelocityModifierParams_0p0.cpp deleted file mode 100644 index c3126dd8..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/OrientAlongVelocityModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace OrientAlongVelocityModifierParams_0p0NS; - -const char* const OrientAlongVelocityModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<OrientAlongVelocityModifierParams_0p0, OrientAlongVelocityModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 2; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, - { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->modelForward), NULL, 0 }, // modelForward -}; - - -bool OrientAlongVelocityModifierParams_0p0::mBuiltFlag = false; -NvParameterized::MutexType OrientAlongVelocityModifierParams_0p0::mBuiltFlagMutex; - -OrientAlongVelocityModifierParams_0p0::OrientAlongVelocityModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &OrientAlongVelocityModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -OrientAlongVelocityModifierParams_0p0::~OrientAlongVelocityModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void OrientAlongVelocityModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~OrientAlongVelocityModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* OrientAlongVelocityModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* OrientAlongVelocityModifierParams_0p0::getParameterDefinitionTree(void) const -{ - OrientAlongVelocityModifierParams_0p0* tmpParam = const_cast<OrientAlongVelocityModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType OrientAlongVelocityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType OrientAlongVelocityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void OrientAlongVelocityModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<OrientAlongVelocityModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void OrientAlongVelocityModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void OrientAlongVelocityModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void OrientAlongVelocityModifierParams_0p0::initDynamicArrays(void) -{ -} - -void OrientAlongVelocityModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - modelForward = physx::PxVec3(init(0, 1, 0)); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void OrientAlongVelocityModifierParams_0p0::initReferences(void) -{ -} - -void OrientAlongVelocityModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void OrientAlongVelocityModifierParams_0p0::freeStrings(void) -{ -} - -void OrientAlongVelocityModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/OrientScaleAlongScreenVelocityModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/OrientScaleAlongScreenVelocityModifierParams_0p0.cpp deleted file mode 100644 index e9f3f6ca..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/OrientScaleAlongScreenVelocityModifierParams_0p0.cpp +++ /dev/null @@ -1,325 +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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace OrientScaleAlongScreenVelocityModifierParams_0p0NS; - -const char* const OrientScaleAlongScreenVelocityModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<OrientScaleAlongScreenVelocityModifierParams_0p0, OrientScaleAlongScreenVelocityModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 2; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->scalePerVelocity), NULL, 0 }, // scalePerVelocity -}; - - -bool OrientScaleAlongScreenVelocityModifierParams_0p0::mBuiltFlag = false; -NvParameterized::MutexType OrientScaleAlongScreenVelocityModifierParams_0p0::mBuiltFlagMutex; - -OrientScaleAlongScreenVelocityModifierParams_0p0::OrientScaleAlongScreenVelocityModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &OrientScaleAlongScreenVelocityModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -OrientScaleAlongScreenVelocityModifierParams_0p0::~OrientScaleAlongScreenVelocityModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void OrientScaleAlongScreenVelocityModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~OrientScaleAlongScreenVelocityModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* OrientScaleAlongScreenVelocityModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* OrientScaleAlongScreenVelocityModifierParams_0p0::getParameterDefinitionTree(void) const -{ - OrientScaleAlongScreenVelocityModifierParams_0p0* tmpParam = const_cast<OrientScaleAlongScreenVelocityModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType OrientScaleAlongScreenVelocityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType OrientScaleAlongScreenVelocityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void OrientScaleAlongScreenVelocityModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<OrientScaleAlongScreenVelocityModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void OrientScaleAlongScreenVelocityModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void OrientScaleAlongScreenVelocityModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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[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[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("defaultValue", uint64_t(0), true); - HintTable[1].init("longDescription", "Scale(Velocity) = 1 + |Velocity| * scalePerVelocity", true); - HintTable[2].init("shortDescription", "Scale per velocity", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#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 OrientScaleAlongScreenVelocityModifierParams_0p0::initStrings(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p0::initDynamicArrays(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scalePerVelocity = float(0.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void OrientScaleAlongScreenVelocityModifierParams_0p0::initReferences(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p0::freeStrings(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/OrientScaleAlongScreenVelocityModifierParams_0p1.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/OrientScaleAlongScreenVelocityModifierParams_0p1.cpp deleted file mode 100644 index 195d33d0..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/OrientScaleAlongScreenVelocityModifierParams_0p1.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_0p1.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace OrientScaleAlongScreenVelocityModifierParams_0p1NS; - -const char* const OrientScaleAlongScreenVelocityModifierParams_0p1Factory::vptr = - NvParameterized::getVptr<OrientScaleAlongScreenVelocityModifierParams_0p1, OrientScaleAlongScreenVelocityModifierParams_0p1::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_0p1::mBuiltFlag = false; -NvParameterized::MutexType OrientScaleAlongScreenVelocityModifierParams_0p1::mBuiltFlagMutex; - -OrientScaleAlongScreenVelocityModifierParams_0p1::OrientScaleAlongScreenVelocityModifierParams_0p1(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &OrientScaleAlongScreenVelocityModifierParams_0p1FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -OrientScaleAlongScreenVelocityModifierParams_0p1::~OrientScaleAlongScreenVelocityModifierParams_0p1() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void OrientScaleAlongScreenVelocityModifierParams_0p1::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~OrientScaleAlongScreenVelocityModifierParams_0p1(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* OrientScaleAlongScreenVelocityModifierParams_0p1::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* OrientScaleAlongScreenVelocityModifierParams_0p1::getParameterDefinitionTree(void) const -{ - OrientScaleAlongScreenVelocityModifierParams_0p1* tmpParam = const_cast<OrientScaleAlongScreenVelocityModifierParams_0p1*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType OrientScaleAlongScreenVelocityModifierParams_0p1::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType OrientScaleAlongScreenVelocityModifierParams_0p1::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void OrientScaleAlongScreenVelocityModifierParams_0p1::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<OrientScaleAlongScreenVelocityModifierParams_0p1::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void OrientScaleAlongScreenVelocityModifierParams_0p1::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void OrientScaleAlongScreenVelocityModifierParams_0p1::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#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_0p1::initStrings(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p1::initDynamicArrays(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p1::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scalePerVelocity = float(0.0f); - scaleChangeLimit = float(0.0f); - scaleChangeDelay = float(0.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void OrientScaleAlongScreenVelocityModifierParams_0p1::initReferences(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p1::freeDynamicArrays(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p1::freeStrings(void) -{ -} - -void OrientScaleAlongScreenVelocityModifierParams_0p1::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/RandomRotationModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/RandomRotationModifierParams_0p0.cpp deleted file mode 100644 index 23a204e3..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/RandomRotationModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace RandomRotationModifierParams_0p0NS; - -const char* const RandomRotationModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<RandomRotationModifierParams_0p0, RandomRotationModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType RandomRotationModifierParams_0p0::mBuiltFlagMutex; - -RandomRotationModifierParams_0p0::RandomRotationModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RandomRotationModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RandomRotationModifierParams_0p0::~RandomRotationModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RandomRotationModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~RandomRotationModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RandomRotationModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RandomRotationModifierParams_0p0::getParameterDefinitionTree(void) const -{ - RandomRotationModifierParams_0p0* tmpParam = const_cast<RandomRotationModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RandomRotationModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType RandomRotationModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void RandomRotationModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RandomRotationModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RandomRotationModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void RandomRotationModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void RandomRotationModifierParams_0p0::initDynamicArrays(void) -{ -} - -void RandomRotationModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - minRotation = float(0.0f); - maxRotation = float(0.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RandomRotationModifierParams_0p0::initReferences(void) -{ -} - -void RandomRotationModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void RandomRotationModifierParams_0p0::freeStrings(void) -{ -} - -void RandomRotationModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/RandomScaleModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/RandomScaleModifierParams_0p0.cpp deleted file mode 100644 index 28b2636b..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/RandomScaleModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace RandomScaleModifierParams_0p0NS; - -const char* const RandomScaleModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<RandomScaleModifierParams_0p0, RandomScaleModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType RandomScaleModifierParams_0p0::mBuiltFlagMutex; - -RandomScaleModifierParams_0p0::RandomScaleModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RandomScaleModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RandomScaleModifierParams_0p0::~RandomScaleModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RandomScaleModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~RandomScaleModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RandomScaleModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RandomScaleModifierParams_0p0::getParameterDefinitionTree(void) const -{ - RandomScaleModifierParams_0p0* tmpParam = const_cast<RandomScaleModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RandomScaleModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType RandomScaleModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void RandomScaleModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RandomScaleModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RandomScaleModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void RandomScaleModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void RandomScaleModifierParams_0p0::initDynamicArrays(void) -{ -} - -void RandomScaleModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - minScaleFactor = float(1.0f); - maxScaleFactor = float(1.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RandomScaleModifierParams_0p0::initReferences(void) -{ -} - -void RandomScaleModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void RandomScaleModifierParams_0p0::freeStrings(void) -{ -} - -void RandomScaleModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/RandomSubtextureModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/RandomSubtextureModifierParams_0p0.cpp deleted file mode 100644 index 8dd3145e..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/RandomSubtextureModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace RandomSubtextureModifierParams_0p0NS; - -const char* const RandomSubtextureModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<RandomSubtextureModifierParams_0p0, RandomSubtextureModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType RandomSubtextureModifierParams_0p0::mBuiltFlagMutex; - -RandomSubtextureModifierParams_0p0::RandomSubtextureModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RandomSubtextureModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RandomSubtextureModifierParams_0p0::~RandomSubtextureModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RandomSubtextureModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~RandomSubtextureModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RandomSubtextureModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RandomSubtextureModifierParams_0p0::getParameterDefinitionTree(void) const -{ - RandomSubtextureModifierParams_0p0* tmpParam = const_cast<RandomSubtextureModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RandomSubtextureModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType RandomSubtextureModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void RandomSubtextureModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RandomSubtextureModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RandomSubtextureModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void RandomSubtextureModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void RandomSubtextureModifierParams_0p0::initDynamicArrays(void) -{ -} - -void RandomSubtextureModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - minSubtexture = float(0.0f); - maxSubtexture = float(0.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RandomSubtextureModifierParams_0p0::initReferences(void) -{ -} - -void RandomSubtextureModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void RandomSubtextureModifierParams_0p0::freeStrings(void) -{ -} - -void RandomSubtextureModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/RotationModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/RotationModifierParams_0p0.cpp deleted file mode 100644 index 14f4079c..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/RotationModifierParams_0p0.cpp +++ /dev/null @@ -1,440 +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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace RotationModifierParams_0p0NS; - -const char* const RotationModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<RotationModifierParams_0p0, RotationModifierParams_0p0::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), 5 }, - { 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 -}; - - -bool RotationModifierParams_0p0::mBuiltFlag = false; -NvParameterized::MutexType RotationModifierParams_0p0::mBuiltFlagMutex; - -RotationModifierParams_0p0::RotationModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RotationModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RotationModifierParams_0p0::~RotationModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RotationModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~RotationModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RotationModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RotationModifierParams_0p0::getParameterDefinitionTree(void) const -{ - RotationModifierParams_0p0* tmpParam = const_cast<RotationModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RotationModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType RotationModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void RotationModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RotationModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RotationModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void RotationModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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", "SPRITE" }; - ParamDefTable[1].setEnumVals((const char**)EnumVals, 9); - - - - - } - - // 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 */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[5]; - 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); - - ParamDefTable[0].setChildren(Children, 5); - } - - mBuiltFlag = true; - -} -void RotationModifierParams_0p0::initStrings(void) -{ -} - -void RotationModifierParams_0p0::initDynamicArrays(void) -{ -} - -void RotationModifierParams_0p0::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); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RotationModifierParams_0p0::initReferences(void) -{ -} - -void RotationModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void RotationModifierParams_0p0::freeStrings(void) -{ -} - -void RotationModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/RotationModifierParams_0p1.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/RotationModifierParams_0p1.cpp deleted file mode 100644 index 38188961..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/RotationModifierParams_0p1.cpp +++ /dev/null @@ -1,440 +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_0p1.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace RotationModifierParams_0p1NS; - -const char* const RotationModifierParams_0p1Factory::vptr = - NvParameterized::getVptr<RotationModifierParams_0p1, RotationModifierParams_0p1::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), 5 }, - { 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 -}; - - -bool RotationModifierParams_0p1::mBuiltFlag = false; -NvParameterized::MutexType RotationModifierParams_0p1::mBuiltFlagMutex; - -RotationModifierParams_0p1::RotationModifierParams_0p1(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RotationModifierParams_0p1FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RotationModifierParams_0p1::~RotationModifierParams_0p1() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RotationModifierParams_0p1::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~RotationModifierParams_0p1(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RotationModifierParams_0p1::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RotationModifierParams_0p1::getParameterDefinitionTree(void) const -{ - RotationModifierParams_0p1* tmpParam = const_cast<RotationModifierParams_0p1*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RotationModifierParams_0p1::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType RotationModifierParams_0p1::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void RotationModifierParams_0p1::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RotationModifierParams_0p1::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RotationModifierParams_0p1::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void RotationModifierParams_0p1::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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 */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[5]; - 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); - - ParamDefTable[0].setChildren(Children, 5); - } - - mBuiltFlag = true; - -} -void RotationModifierParams_0p1::initStrings(void) -{ -} - -void RotationModifierParams_0p1::initDynamicArrays(void) -{ -} - -void RotationModifierParams_0p1::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); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RotationModifierParams_0p1::initReferences(void) -{ -} - -void RotationModifierParams_0p1::freeDynamicArrays(void) -{ -} - -void RotationModifierParams_0p1::freeStrings(void) -{ -} - -void RotationModifierParams_0p1::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/RotationModifierParams_0p2.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/RotationModifierParams_0p2.cpp deleted file mode 100644 index 5d46b21a..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/RotationModifierParams_0p2.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_0p2.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace RotationModifierParams_0p2NS; - -const char* const RotationModifierParams_0p2Factory::vptr = - NvParameterized::getVptr<RotationModifierParams_0p2, RotationModifierParams_0p2::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_0p2::mBuiltFlag = false; -NvParameterized::MutexType RotationModifierParams_0p2::mBuiltFlagMutex; - -RotationModifierParams_0p2::RotationModifierParams_0p2(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RotationModifierParams_0p2FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RotationModifierParams_0p2::~RotationModifierParams_0p2() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RotationModifierParams_0p2::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~RotationModifierParams_0p2(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RotationModifierParams_0p2::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RotationModifierParams_0p2::getParameterDefinitionTree(void) const -{ - RotationModifierParams_0p2* tmpParam = const_cast<RotationModifierParams_0p2*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RotationModifierParams_0p2::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType RotationModifierParams_0p2::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void RotationModifierParams_0p2::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RotationModifierParams_0p2::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RotationModifierParams_0p2::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void RotationModifierParams_0p2::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#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_0p2::initStrings(void) -{ -} - -void RotationModifierParams_0p2::initDynamicArrays(void) -{ -} - -void RotationModifierParams_0p2::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_0p2::initReferences(void) -{ -} - -void RotationModifierParams_0p2::freeDynamicArrays(void) -{ -} - -void RotationModifierParams_0p2::freeStrings(void) -{ -} - -void RotationModifierParams_0p2::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/RotationRateModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/RotationRateModifierParams_0p0.cpp deleted file mode 100644 index b68150ea..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/RotationRateModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace RotationRateModifierParams_0p0NS; - -const char* const RotationRateModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<RotationRateModifierParams_0p0, RotationRateModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 2; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->rotationRate), NULL, 0 }, // rotationRate -}; - - -bool RotationRateModifierParams_0p0::mBuiltFlag = false; -NvParameterized::MutexType RotationRateModifierParams_0p0::mBuiltFlagMutex; - -RotationRateModifierParams_0p0::RotationRateModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RotationRateModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RotationRateModifierParams_0p0::~RotationRateModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RotationRateModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~RotationRateModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RotationRateModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RotationRateModifierParams_0p0::getParameterDefinitionTree(void) const -{ - RotationRateModifierParams_0p0* tmpParam = const_cast<RotationRateModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RotationRateModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType RotationRateModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void RotationRateModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RotationRateModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RotationRateModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void RotationRateModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void RotationRateModifierParams_0p0::initDynamicArrays(void) -{ -} - -void RotationRateModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - rotationRate = float(0.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RotationRateModifierParams_0p0::initReferences(void) -{ -} - -void RotationRateModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void RotationRateModifierParams_0p0::freeStrings(void) -{ -} - -void RotationRateModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/RotationRateVsLifeModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/RotationRateVsLifeModifierParams_0p0.cpp deleted file mode 100644 index f96b4687..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/RotationRateVsLifeModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace RotationRateVsLifeModifierParams_0p0NS; - -const char* const RotationRateVsLifeModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<RotationRateVsLifeModifierParams_0p0, RotationRateVsLifeModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType RotationRateVsLifeModifierParams_0p0::mBuiltFlagMutex; - -RotationRateVsLifeModifierParams_0p0::RotationRateVsLifeModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RotationRateVsLifeModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RotationRateVsLifeModifierParams_0p0::~RotationRateVsLifeModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RotationRateVsLifeModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~RotationRateVsLifeModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RotationRateVsLifeModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RotationRateVsLifeModifierParams_0p0::getParameterDefinitionTree(void) const -{ - RotationRateVsLifeModifierParams_0p0* tmpParam = const_cast<RotationRateVsLifeModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RotationRateVsLifeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType RotationRateVsLifeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void RotationRateVsLifeModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RotationRateVsLifeModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RotationRateVsLifeModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void RotationRateVsLifeModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void RotationRateVsLifeModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void RotationRateVsLifeModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RotationRateVsLifeModifierParams_0p0::initReferences(void) -{ -} - -void RotationRateVsLifeModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void RotationRateVsLifeModifierParams_0p0::freeStrings(void) -{ -} - -void RotationRateVsLifeModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleAlongVelocityModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleAlongVelocityModifierParams_0p0.cpp deleted file mode 100644 index 8359aa61..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleAlongVelocityModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleAlongVelocityModifierParams_0p0NS; - -const char* const ScaleAlongVelocityModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleAlongVelocityModifierParams_0p0, ScaleAlongVelocityModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 2; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->scaleFactor), NULL, 0 }, // scaleFactor -}; - - -bool ScaleAlongVelocityModifierParams_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleAlongVelocityModifierParams_0p0::mBuiltFlagMutex; - -ScaleAlongVelocityModifierParams_0p0::ScaleAlongVelocityModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleAlongVelocityModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleAlongVelocityModifierParams_0p0::~ScaleAlongVelocityModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleAlongVelocityModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleAlongVelocityModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleAlongVelocityModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleAlongVelocityModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleAlongVelocityModifierParams_0p0* tmpParam = const_cast<ScaleAlongVelocityModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleAlongVelocityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleAlongVelocityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleAlongVelocityModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleAlongVelocityModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleAlongVelocityModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleAlongVelocityModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleAlongVelocityModifierParams_0p0::initDynamicArrays(void) -{ -} - -void ScaleAlongVelocityModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleFactor = float(1.0f); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleAlongVelocityModifierParams_0p0::initReferences(void) -{ -} - -void ScaleAlongVelocityModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void ScaleAlongVelocityModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleAlongVelocityModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleByMassModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleByMassModifierParams_0p0.cpp deleted file mode 100644 index 30bc5297..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleByMassModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleByMassModifierParams_0p0NS; - -const char* const ScaleByMassModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleByMassModifierParams_0p0, ScaleByMassModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleByMassModifierParams_0p0::mBuiltFlagMutex; - -ScaleByMassModifierParams_0p0::ScaleByMassModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleByMassModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleByMassModifierParams_0p0::~ScaleByMassModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleByMassModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleByMassModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleByMassModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleByMassModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleByMassModifierParams_0p0* tmpParam = const_cast<ScaleByMassModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleByMassModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleByMassModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleByMassModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleByMassModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleByMassModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleByMassModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "ScaleByMass modifier parameters", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - mBuiltFlag = true; - -} -void ScaleByMassModifierParams_0p0::initStrings(void) -{ -} - -void ScaleByMassModifierParams_0p0::initDynamicArrays(void) -{ -} - -void ScaleByMassModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleByMassModifierParams_0p0::initReferences(void) -{ -} - -void ScaleByMassModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void ScaleByMassModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleByMassModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsCameraDistance2DModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsCameraDistance2DModifierParams_0p0.cpp deleted file mode 100644 index 1899c83b..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsCameraDistance2DModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsCameraDistance2DModifierParams_0p0NS; - -const char* const ScaleVsCameraDistance2DModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsCameraDistance2DModifierParams_0p0, ScaleVsCameraDistance2DModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsCameraDistance2DModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsCameraDistance2DModifierParams_0p0::ScaleVsCameraDistance2DModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsCameraDistance2DModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsCameraDistance2DModifierParams_0p0::~ScaleVsCameraDistance2DModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsCameraDistance2DModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsCameraDistance2DModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistance2DModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistance2DModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsCameraDistance2DModifierParams_0p0* tmpParam = const_cast<ScaleVsCameraDistance2DModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsCameraDistance2DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsCameraDistance2DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsCameraDistance2DModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsCameraDistance2DModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsCameraDistance2DModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsCameraDistance2DModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsCameraDistance2DModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleCameraDistanceStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsCameraDistance2DModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsCameraDistance2DModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsCameraDistance2DModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsCameraDistance2DModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsCameraDistance2DModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsCameraDistance3DModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsCameraDistance3DModifierParams_0p0.cpp deleted file mode 100644 index 9ae166d2..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsCameraDistance3DModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsCameraDistance3DModifierParams_0p0NS; - -const char* const ScaleVsCameraDistance3DModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsCameraDistance3DModifierParams_0p0, ScaleVsCameraDistance3DModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsCameraDistance3DModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsCameraDistance3DModifierParams_0p0::ScaleVsCameraDistance3DModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsCameraDistance3DModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsCameraDistance3DModifierParams_0p0::~ScaleVsCameraDistance3DModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsCameraDistance3DModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsCameraDistance3DModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistance3DModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistance3DModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsCameraDistance3DModifierParams_0p0* tmpParam = const_cast<ScaleVsCameraDistance3DModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsCameraDistance3DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsCameraDistance3DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsCameraDistance3DModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsCameraDistance3DModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsCameraDistance3DModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsCameraDistance3DModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsCameraDistance3DModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleCameraDistanceStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsCameraDistance3DModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsCameraDistance3DModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsCameraDistance3DModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsCameraDistance3DModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsCameraDistance3DModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsCameraDistanceModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsCameraDistanceModifierParams_0p0.cpp deleted file mode 100644 index e62e6f4c..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsCameraDistanceModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsCameraDistanceModifierParams_0p0NS; - -const char* const ScaleVsCameraDistanceModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsCameraDistanceModifierParams_0p0, ScaleVsCameraDistanceModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsCameraDistanceModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsCameraDistanceModifierParams_0p0::ScaleVsCameraDistanceModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsCameraDistanceModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsCameraDistanceModifierParams_0p0::~ScaleVsCameraDistanceModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsCameraDistanceModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsCameraDistanceModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistanceModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsCameraDistanceModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsCameraDistanceModifierParams_0p0* tmpParam = const_cast<ScaleVsCameraDistanceModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsCameraDistanceModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsCameraDistanceModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsCameraDistanceModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsCameraDistanceModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsCameraDistanceModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsCameraDistanceModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsCameraDistanceModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsCameraDistanceModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleAxis = (const char*)"xAxis"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsCameraDistanceModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsCameraDistanceModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsCameraDistanceModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsCameraDistanceModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsDensity2DModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsDensity2DModifierParams_0p0.cpp deleted file mode 100644 index 157079cb..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsDensity2DModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsDensity2DModifierParams_0p0NS; - -const char* const ScaleVsDensity2DModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsDensity2DModifierParams_0p0, ScaleVsDensity2DModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsDensity2DModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsDensity2DModifierParams_0p0::ScaleVsDensity2DModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsDensity2DModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsDensity2DModifierParams_0p0::~ScaleVsDensity2DModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsDensity2DModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsDensity2DModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensity2DModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensity2DModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsDensity2DModifierParams_0p0* tmpParam = const_cast<ScaleVsDensity2DModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsDensity2DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsDensity2DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsDensity2DModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsDensity2DModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsDensity2DModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsDensity2DModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsDensity2DModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleDensityStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsDensity2DModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsDensity2DModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsDensity2DModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsDensity2DModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsDensity2DModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsDensity3DModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsDensity3DModifierParams_0p0.cpp deleted file mode 100644 index 42c857dd..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsDensity3DModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsDensity3DModifierParams_0p0NS; - -const char* const ScaleVsDensity3DModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsDensity3DModifierParams_0p0, ScaleVsDensity3DModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsDensity3DModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsDensity3DModifierParams_0p0::ScaleVsDensity3DModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsDensity3DModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsDensity3DModifierParams_0p0::~ScaleVsDensity3DModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsDensity3DModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsDensity3DModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensity3DModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensity3DModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsDensity3DModifierParams_0p0* tmpParam = const_cast<ScaleVsDensity3DModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsDensity3DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsDensity3DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsDensity3DModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsDensity3DModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsDensity3DModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsDensity3DModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsDensity3DModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleDensityStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsDensity3DModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsDensity3DModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsDensity3DModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsDensity3DModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsDensity3DModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsDensityModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsDensityModifierParams_0p0.cpp deleted file mode 100644 index 4e53b5a2..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsDensityModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsDensityModifierParams_0p0NS; - -const char* const ScaleVsDensityModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsDensityModifierParams_0p0, ScaleVsDensityModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsDensityModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsDensityModifierParams_0p0::ScaleVsDensityModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsDensityModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsDensityModifierParams_0p0::~ScaleVsDensityModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsDensityModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsDensityModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensityModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsDensityModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsDensityModifierParams_0p0* tmpParam = const_cast<ScaleVsDensityModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsDensityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsDensityModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsDensityModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsDensityModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsDensityModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsDensityModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsDensityModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsDensityModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleAxis = (const char*)"xAxis"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsDensityModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsDensityModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsDensityModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsDensityModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsLife2DModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsLife2DModifierParams_0p0.cpp deleted file mode 100644 index d88d2411..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsLife2DModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsLife2DModifierParams_0p0NS; - -const char* const ScaleVsLife2DModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsLife2DModifierParams_0p0, ScaleVsLife2DModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsLife2DModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsLife2DModifierParams_0p0::ScaleVsLife2DModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsLife2DModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsLife2DModifierParams_0p0::~ScaleVsLife2DModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsLife2DModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsLife2DModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsLife2DModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsLife2DModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsLife2DModifierParams_0p0* tmpParam = const_cast<ScaleVsLife2DModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsLife2DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsLife2DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsLife2DModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsLife2DModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsLife2DModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsLife2DModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsLife2DModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleLifeStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsLife2DModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsLife2DModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsLife2DModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsLife2DModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsLife2DModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsLife3DModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsLife3DModifierParams_0p0.cpp deleted file mode 100644 index 20ecece9..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsLife3DModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsLife3DModifierParams_0p0NS; - -const char* const ScaleVsLife3DModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsLife3DModifierParams_0p0, ScaleVsLife3DModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsLife3DModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsLife3DModifierParams_0p0::ScaleVsLife3DModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsLife3DModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsLife3DModifierParams_0p0::~ScaleVsLife3DModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsLife3DModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsLife3DModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsLife3DModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsLife3DModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsLife3DModifierParams_0p0* tmpParam = const_cast<ScaleVsLife3DModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsLife3DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsLife3DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsLife3DModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsLife3DModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsLife3DModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsLife3DModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsLife3DModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleLifeStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsLife3DModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsLife3DModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsLife3DModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsLife3DModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsLife3DModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsLifeModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsLifeModifierParams_0p0.cpp deleted file mode 100644 index 6a95d8f4..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsLifeModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsLifeModifierParams_0p0NS; - -const char* const ScaleVsLifeModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsLifeModifierParams_0p0, ScaleVsLifeModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsLifeModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsLifeModifierParams_0p0::ScaleVsLifeModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsLifeModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsLifeModifierParams_0p0::~ScaleVsLifeModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsLifeModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsLifeModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsLifeModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsLifeModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsLifeModifierParams_0p0* tmpParam = const_cast<ScaleVsLifeModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsLifeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsLifeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsLifeModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsLifeModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsLifeModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsLifeModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsLifeModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsLifeModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleAxis = (const char*)"xAxis"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsLifeModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsLifeModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsLifeModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsLifeModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsTemperature2DModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsTemperature2DModifierParams_0p0.cpp deleted file mode 100644 index d1be816d..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsTemperature2DModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsTemperature2DModifierParams_0p0NS; - -const char* const ScaleVsTemperature2DModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsTemperature2DModifierParams_0p0, ScaleVsTemperature2DModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsTemperature2DModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsTemperature2DModifierParams_0p0::ScaleVsTemperature2DModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsTemperature2DModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsTemperature2DModifierParams_0p0::~ScaleVsTemperature2DModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsTemperature2DModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsTemperature2DModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperature2DModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperature2DModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsTemperature2DModifierParams_0p0* tmpParam = const_cast<ScaleVsTemperature2DModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsTemperature2DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsTemperature2DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsTemperature2DModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsTemperature2DModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsTemperature2DModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsTemperature2DModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsTemperature2DModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleTemperatureStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsTemperature2DModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsTemperature2DModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsTemperature2DModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsTemperature2DModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsTemperature2DModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsTemperature3DModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsTemperature3DModifierParams_0p0.cpp deleted file mode 100644 index 47b2b18f..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsTemperature3DModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsTemperature3DModifierParams_0p0NS; - -const char* const ScaleVsTemperature3DModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsTemperature3DModifierParams_0p0, ScaleVsTemperature3DModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsTemperature3DModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsTemperature3DModifierParams_0p0::ScaleVsTemperature3DModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsTemperature3DModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsTemperature3DModifierParams_0p0::~ScaleVsTemperature3DModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsTemperature3DModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsTemperature3DModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperature3DModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperature3DModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsTemperature3DModifierParams_0p0* tmpParam = const_cast<ScaleVsTemperature3DModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsTemperature3DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsTemperature3DModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsTemperature3DModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsTemperature3DModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsTemperature3DModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsTemperature3DModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsTemperature3DModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(scaleTemperatureStruct_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsTemperature3DModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsTemperature3DModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsTemperature3DModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsTemperature3DModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsTemperature3DModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsTemperatureModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsTemperatureModifierParams_0p0.cpp deleted file mode 100644 index 9617d569..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ScaleVsTemperatureModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ScaleVsTemperatureModifierParams_0p0NS; - -const char* const ScaleVsTemperatureModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ScaleVsTemperatureModifierParams_0p0, ScaleVsTemperatureModifierParams_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType ScaleVsTemperatureModifierParams_0p0::mBuiltFlagMutex; - -ScaleVsTemperatureModifierParams_0p0::ScaleVsTemperatureModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ScaleVsTemperatureModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ScaleVsTemperatureModifierParams_0p0::~ScaleVsTemperatureModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ScaleVsTemperatureModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ScaleVsTemperatureModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperatureModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ScaleVsTemperatureModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ScaleVsTemperatureModifierParams_0p0* tmpParam = const_cast<ScaleVsTemperatureModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ScaleVsTemperatureModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ScaleVsTemperatureModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ScaleVsTemperatureModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ScaleVsTemperatureModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ScaleVsTemperatureModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ScaleVsTemperatureModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ScaleVsTemperatureModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void ScaleVsTemperatureModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleAxis = (const char*)"xAxis"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ScaleVsTemperatureModifierParams_0p0::initReferences(void) -{ -} - -void ScaleVsTemperatureModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void ScaleVsTemperatureModifierParams_0p0::freeStrings(void) -{ -} - -void ScaleVsTemperatureModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/SimpleScaleModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/SimpleScaleModifierParams_0p0.cpp deleted file mode 100644 index a67a5aef..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/SimpleScaleModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace SimpleScaleModifierParams_0p0NS; - -const char* const SimpleScaleModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<SimpleScaleModifierParams_0p0, SimpleScaleModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 2; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, - { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->scaleFactor), NULL, 0 }, // scaleFactor -}; - - -bool SimpleScaleModifierParams_0p0::mBuiltFlag = false; -NvParameterized::MutexType SimpleScaleModifierParams_0p0::mBuiltFlagMutex; - -SimpleScaleModifierParams_0p0::SimpleScaleModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SimpleScaleModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SimpleScaleModifierParams_0p0::~SimpleScaleModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SimpleScaleModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~SimpleScaleModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SimpleScaleModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SimpleScaleModifierParams_0p0::getParameterDefinitionTree(void) const -{ - SimpleScaleModifierParams_0p0* tmpParam = const_cast<SimpleScaleModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SimpleScaleModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType SimpleScaleModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void SimpleScaleModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SimpleScaleModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void SimpleScaleModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void SimpleScaleModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void SimpleScaleModifierParams_0p0::initDynamicArrays(void) -{ -} - -void SimpleScaleModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - scaleFactor = physx::PxVec3(init(1, 1, 1)); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SimpleScaleModifierParams_0p0::initReferences(void) -{ -} - -void SimpleScaleModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void SimpleScaleModifierParams_0p0::freeStrings(void) -{ -} - -void SimpleScaleModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p0.cpp deleted file mode 100644 index 5c5978d6..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p0.cpp +++ /dev/null @@ -1,530 +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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace SpriteIofxParameters_0p0NS; - -const char* const SpriteIofxParameters_0p0Factory::vptr = - NvParameterized::getVptr<SpriteIofxParameters_0p0, SpriteIofxParameters_0p0::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_0p0::mBuiltFlag = false; -NvParameterized::MutexType SpriteIofxParameters_0p0::mBuiltFlagMutex; - -SpriteIofxParameters_0p0::SpriteIofxParameters_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SpriteIofxParameters_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SpriteIofxParameters_0p0::~SpriteIofxParameters_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SpriteIofxParameters_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~SpriteIofxParameters_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p0::getParameterDefinitionTree(void) const -{ - SpriteIofxParameters_0p0* tmpParam = const_cast<SpriteIofxParameters_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void SpriteIofxParameters_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SpriteIofxParameters_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - spawnModifierList (not an array of structs) */ -/* [0] - continuousModifierList (not an array of structs) */ - -void SpriteIofxParameters_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void SpriteIofxParameters_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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[] = { "RotationModifierParams", "SimpleScaleModifierParams", "RandomScaleModifierParams", "InitialColorModifierParams", "RandomSubtextureModifierParams", "RandomRotationModifierParams", "ColorVsLifeModifierParams" }; - 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[] = { "RotationModifierParams", "SimpleScaleModifierParams", "RandomScaleModifierParams", "InitialColorModifierParams", "RandomSubtextureModifierParams", "RandomRotationModifierParams", "ColorVsLifeModifierParams" }; - 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[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - 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", "RotationModifierParams", true); - HintTable[6].init("INCLUDED", uint64_t(1), true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#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("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", "RotationModifierParams", true); - HintTable[6].init("INCLUDED", uint64_t(1), true); - HintTable[7].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[8].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 9); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams" }; - ParamDefTable[4].setRefVariantVals((const char**)RefVariantVals, 13); - - - 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[7]; - static Hint* HintPtrTable[7] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], &HintTable[6], }; - 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", "RotationModifierParams", true); - HintTable[6].init("INCLUDED", uint64_t(1), true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 7); - -#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("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", "RotationModifierParams", true); - HintTable[6].init("INCLUDED", uint64_t(1), true); - HintTable[7].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[8].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 9); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "RotationModifierParams", "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams" }; - ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 13); - - - - } - - // 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_0p0::initStrings(void) -{ -} - -void SpriteIofxParameters_0p0::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_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SpriteIofxParameters_0p0::initReferences(void) -{ - spriteMaterialName = NULL; - -} - -void SpriteIofxParameters_0p0::freeDynamicArrays(void) -{ - if (spawnModifierList.isAllocated && spawnModifierList.buf) - { - mParameterizedTraits->free(spawnModifierList.buf); - } - if (continuousModifierList.isAllocated && continuousModifierList.buf) - { - mParameterizedTraits->free(continuousModifierList.buf); - } -} - -void SpriteIofxParameters_0p0::freeStrings(void) -{ -} - -void SpriteIofxParameters_0p0::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p1.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p1.cpp deleted file mode 100644 index 50bf9118..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p1.cpp +++ /dev/null @@ -1,526 +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_0p1.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace SpriteIofxParameters_0p1NS; - -const char* const SpriteIofxParameters_0p1Factory::vptr = - NvParameterized::getVptr<SpriteIofxParameters_0p1, SpriteIofxParameters_0p1::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_0p1::mBuiltFlag = false; -NvParameterized::MutexType SpriteIofxParameters_0p1::mBuiltFlagMutex; - -SpriteIofxParameters_0p1::SpriteIofxParameters_0p1(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SpriteIofxParameters_0p1FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SpriteIofxParameters_0p1::~SpriteIofxParameters_0p1() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SpriteIofxParameters_0p1::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~SpriteIofxParameters_0p1(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p1::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p1::getParameterDefinitionTree(void) const -{ - SpriteIofxParameters_0p1* tmpParam = const_cast<SpriteIofxParameters_0p1*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p1::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p1::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void SpriteIofxParameters_0p1::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SpriteIofxParameters_0p1::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - spawnModifierList (not an array of structs) */ -/* [0] - continuousModifierList (not an array of structs) */ - -void SpriteIofxParameters_0p1::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void SpriteIofxParameters_0p1::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 6); - - - 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" }; - ParamDefTable[3].setRefVariantVals((const char**)RefVariantVals, 6); - - - - } - - // 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[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - 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("INCLUDED", uint64_t(1), true); - ParamDefTable[4].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("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("INCLUDED", uint64_t(1), true); - HintTable[6].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[7].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "RotationRateModifierParams", "RotationRateVsLifeModifierParams", "OrientScaleAlongScreenVelocityModifierParams" }; - ParamDefTable[4].setRefVariantVals((const char**)RefVariantVals, 15); - - - 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[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - 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("INCLUDED", uint64_t(1), true); - ParamDefTable[5].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("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("INCLUDED", uint64_t(1), true); - HintTable[6].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[7].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "RotationRateModifierParams", "RotationRateVsLifeModifierParams", "OrientScaleAlongScreenVelocityModifierParams" }; - ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 15); - - - - } - - // 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_0p1::initStrings(void) -{ -} - -void SpriteIofxParameters_0p1::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_0p1::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SpriteIofxParameters_0p1::initReferences(void) -{ - spriteMaterialName = NULL; - -} - -void SpriteIofxParameters_0p1::freeDynamicArrays(void) -{ - if (spawnModifierList.isAllocated && spawnModifierList.buf) - { - mParameterizedTraits->free(spawnModifierList.buf); - } - if (continuousModifierList.isAllocated && continuousModifierList.buf) - { - mParameterizedTraits->free(continuousModifierList.buf); - } -} - -void SpriteIofxParameters_0p1::freeStrings(void) -{ -} - -void SpriteIofxParameters_0p1::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p2.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p2.cpp deleted file mode 100644 index 629b9cb9..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p2.cpp +++ /dev/null @@ -1,526 +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_0p2.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace SpriteIofxParameters_0p2NS; - -const char* const SpriteIofxParameters_0p2Factory::vptr = - NvParameterized::getVptr<SpriteIofxParameters_0p2, SpriteIofxParameters_0p2::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_0p2::mBuiltFlag = false; -NvParameterized::MutexType SpriteIofxParameters_0p2::mBuiltFlagMutex; - -SpriteIofxParameters_0p2::SpriteIofxParameters_0p2(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SpriteIofxParameters_0p2FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SpriteIofxParameters_0p2::~SpriteIofxParameters_0p2() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SpriteIofxParameters_0p2::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~SpriteIofxParameters_0p2(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p2::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p2::getParameterDefinitionTree(void) const -{ - SpriteIofxParameters_0p2* tmpParam = const_cast<SpriteIofxParameters_0p2*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p2::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p2::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void SpriteIofxParameters_0p2::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SpriteIofxParameters_0p2::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - spawnModifierList (not an array of structs) */ -/* [0] - continuousModifierList (not an array of structs) */ - -void SpriteIofxParameters_0p2::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void SpriteIofxParameters_0p2::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - 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("INCLUDED", uint64_t(1), true); - ParamDefTable[4].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("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("INCLUDED", uint64_t(1), true); - HintTable[6].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[7].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "RotationRateModifierParams", "RotationRateVsLifeModifierParams", "OrientScaleAlongScreenVelocityModifierParams" }; - ParamDefTable[4].setRefVariantVals((const char**)RefVariantVals, 15); - - - 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[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - 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("INCLUDED", uint64_t(1), true); - ParamDefTable[5].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("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("INCLUDED", uint64_t(1), true); - HintTable[6].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[7].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "RotationRateModifierParams", "RotationRateVsLifeModifierParams", "OrientScaleAlongScreenVelocityModifierParams" }; - ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 15); - - - - } - - // 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_0p2::initStrings(void) -{ -} - -void SpriteIofxParameters_0p2::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_0p2::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SpriteIofxParameters_0p2::initReferences(void) -{ - spriteMaterialName = NULL; - -} - -void SpriteIofxParameters_0p2::freeDynamicArrays(void) -{ - if (spawnModifierList.isAllocated && spawnModifierList.buf) - { - mParameterizedTraits->free(spawnModifierList.buf); - } - if (continuousModifierList.isAllocated && continuousModifierList.buf) - { - mParameterizedTraits->free(continuousModifierList.buf); - } -} - -void SpriteIofxParameters_0p2::freeStrings(void) -{ -} - -void SpriteIofxParameters_0p2::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p3.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p3.cpp deleted file mode 100644 index 93af26e1..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p3.cpp +++ /dev/null @@ -1,526 +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_0p3.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace SpriteIofxParameters_0p3NS; - -const char* const SpriteIofxParameters_0p3Factory::vptr = - NvParameterized::getVptr<SpriteIofxParameters_0p3, SpriteIofxParameters_0p3::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_0p3::mBuiltFlag = false; -NvParameterized::MutexType SpriteIofxParameters_0p3::mBuiltFlagMutex; - -SpriteIofxParameters_0p3::SpriteIofxParameters_0p3(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SpriteIofxParameters_0p3FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SpriteIofxParameters_0p3::~SpriteIofxParameters_0p3() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SpriteIofxParameters_0p3::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~SpriteIofxParameters_0p3(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p3::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p3::getParameterDefinitionTree(void) const -{ - SpriteIofxParameters_0p3* tmpParam = const_cast<SpriteIofxParameters_0p3*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p3::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p3::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void SpriteIofxParameters_0p3::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SpriteIofxParameters_0p3::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - spawnModifierList (not an array of structs) */ -/* [0] - continuousModifierList (not an array of structs) */ - -void SpriteIofxParameters_0p3::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void SpriteIofxParameters_0p3::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - 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("INCLUDED", uint64_t(1), true); - ParamDefTable[4].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("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("INCLUDED", uint64_t(1), true); - HintTable[6].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[7].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "RotationRateModifierParams", "RotationRateVsLifeModifierParams", "OrientScaleAlongScreenVelocityModifierParams", "ColorVsVelocityCompositeModifierParams" }; - ParamDefTable[4].setRefVariantVals((const char**)RefVariantVals, 16); - - - 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[6]; - static Hint* HintPtrTable[6] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], &HintTable[5], }; - 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("INCLUDED", uint64_t(1), true); - ParamDefTable[5].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("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("INCLUDED", uint64_t(1), true); - HintTable[6].init("longDescription", "These modifiers are applied to the instanced objects every frame. (Currently RotationModifierParams is unsupported for sprites)", true); - HintTable[7].init("shortDescription", "Continuous modifier list", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 8); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ColorVsLifeCompositeModifierParams", "ColorVsDensityCompositeModifierParams", "ScaleVsLife2DModifierParams", "ScaleVsDensity2DModifierParams", "ScaleVsCameraDistance2DModifierParams", "SubtextureVsLifeModifierParams", "ViewDirectionSortingModifierParams", "ColorVsLifeModifierParams", "ColorVsDensityModifierParams", "ScaleVsLifeModifierParams", "ScaleVsDensityModifierParams", "ScaleVsCameraDistanceModifierParams", "RotationRateModifierParams", "RotationRateVsLifeModifierParams", "OrientScaleAlongScreenVelocityModifierParams", "ColorVsVelocityCompositeModifierParams" }; - ParamDefTable[5].setRefVariantVals((const char**)RefVariantVals, 16); - - - - } - - // 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_0p3::initStrings(void) -{ -} - -void SpriteIofxParameters_0p3::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_0p3::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SpriteIofxParameters_0p3::initReferences(void) -{ - spriteMaterialName = NULL; - -} - -void SpriteIofxParameters_0p3::freeDynamicArrays(void) -{ - if (spawnModifierList.isAllocated && spawnModifierList.buf) - { - mParameterizedTraits->free(spawnModifierList.buf); - } - if (continuousModifierList.isAllocated && continuousModifierList.buf) - { - mParameterizedTraits->free(continuousModifierList.buf); - } -} - -void SpriteIofxParameters_0p3::freeStrings(void) -{ -} - -void SpriteIofxParameters_0p3::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p4.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p4.cpp deleted file mode 100644 index ac6214eb..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/SpriteIofxParameters_0p4.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_0p4.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace SpriteIofxParameters_0p4NS; - -const char* const SpriteIofxParameters_0p4Factory::vptr = - NvParameterized::getVptr<SpriteIofxParameters_0p4, SpriteIofxParameters_0p4::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_0p4::mBuiltFlag = false; -NvParameterized::MutexType SpriteIofxParameters_0p4::mBuiltFlagMutex; - -SpriteIofxParameters_0p4::SpriteIofxParameters_0p4(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SpriteIofxParameters_0p4FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SpriteIofxParameters_0p4::~SpriteIofxParameters_0p4() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SpriteIofxParameters_0p4::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~SpriteIofxParameters_0p4(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p4::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SpriteIofxParameters_0p4::getParameterDefinitionTree(void) const -{ - SpriteIofxParameters_0p4* tmpParam = const_cast<SpriteIofxParameters_0p4*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p4::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType SpriteIofxParameters_0p4::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void SpriteIofxParameters_0p4::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SpriteIofxParameters_0p4::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - spawnModifierList (not an array of structs) */ -/* [0] - continuousModifierList (not an array of structs) */ - -void SpriteIofxParameters_0p4::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void SpriteIofxParameters_0p4::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="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_0p4::initStrings(void) -{ -} - -void SpriteIofxParameters_0p4::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_0p4::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SpriteIofxParameters_0p4::initReferences(void) -{ - spriteMaterialName = NULL; - -} - -void SpriteIofxParameters_0p4::freeDynamicArrays(void) -{ - if (spawnModifierList.isAllocated && spawnModifierList.buf) - { - mParameterizedTraits->free(spawnModifierList.buf); - } - if (continuousModifierList.isAllocated && continuousModifierList.buf) - { - mParameterizedTraits->free(continuousModifierList.buf); - } -} - -void SpriteIofxParameters_0p4::freeStrings(void) -{ -} - -void SpriteIofxParameters_0p4::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 parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/SubtextureVsLifeModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/SubtextureVsLifeModifierParams_0p0.cpp deleted file mode 100644 index 8b2cd794..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/SubtextureVsLifeModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace SubtextureVsLifeModifierParams_0p0NS; - -const char* const SubtextureVsLifeModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<SubtextureVsLifeModifierParams_0p0, SubtextureVsLifeModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 5; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 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_0p0::mBuiltFlag = false; -NvParameterized::MutexType SubtextureVsLifeModifierParams_0p0::mBuiltFlagMutex; - -SubtextureVsLifeModifierParams_0p0::SubtextureVsLifeModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SubtextureVsLifeModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SubtextureVsLifeModifierParams_0p0::~SubtextureVsLifeModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SubtextureVsLifeModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~SubtextureVsLifeModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SubtextureVsLifeModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SubtextureVsLifeModifierParams_0p0::getParameterDefinitionTree(void) const -{ - SubtextureVsLifeModifierParams_0p0* tmpParam = const_cast<SubtextureVsLifeModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SubtextureVsLifeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType SubtextureVsLifeModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void SubtextureVsLifeModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SubtextureVsLifeModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void SubtextureVsLifeModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void SubtextureVsLifeModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void SubtextureVsLifeModifierParams_0p0::initDynamicArrays(void) -{ - controlPoints.buf = NULL; - controlPoints.isAllocated = true; - controlPoints.elementSize = sizeof(vec2_Type); - controlPoints.arraySizes[0] = 0; -} - -void SubtextureVsLifeModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SubtextureVsLifeModifierParams_0p0::initReferences(void) -{ -} - -void SubtextureVsLifeModifierParams_0p0::freeDynamicArrays(void) -{ - if (controlPoints.isAllocated && controlPoints.buf) - { - mParameterizedTraits->free(controlPoints.buf); - } -} - -void SubtextureVsLifeModifierParams_0p0::freeStrings(void) -{ -} - -void SubtextureVsLifeModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia diff --git a/APEX_1.4/module/iofx_legacy/src/autogen/ViewDirectionSortingModifierParams_0p0.cpp b/APEX_1.4/module/iofx_legacy/src/autogen/ViewDirectionSortingModifierParams_0p0.cpp deleted file mode 100644 index 4c28b19b..00000000 --- a/APEX_1.4/module/iofx_legacy/src/autogen/ViewDirectionSortingModifierParams_0p0.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_0p0.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace parameterized -{ - -using namespace ViewDirectionSortingModifierParams_0p0NS; - -const char* const ViewDirectionSortingModifierParams_0p0Factory::vptr = - NvParameterized::getVptr<ViewDirectionSortingModifierParams_0p0, ViewDirectionSortingModifierParams_0p0::ClassAlignment>(); - -const uint32_t NumParamDefs = 2; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 1 }, - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->sortType), NULL, 0 }, // sortType -}; - - -bool ViewDirectionSortingModifierParams_0p0::mBuiltFlag = false; -NvParameterized::MutexType ViewDirectionSortingModifierParams_0p0::mBuiltFlagMutex; - -ViewDirectionSortingModifierParams_0p0::ViewDirectionSortingModifierParams_0p0(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ViewDirectionSortingModifierParams_0p0FactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ViewDirectionSortingModifierParams_0p0::~ViewDirectionSortingModifierParams_0p0() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ViewDirectionSortingModifierParams_0p0::destroy() -{ - // We cache these fields here to avoid overwrite in destructor - bool doDeallocateSelf = mDoDeallocateSelf; - NvParameterized::Traits* traits = mParameterizedTraits; - int32_t* refCount = mRefCount; - void* buf = mBuffer; - - this->~ViewDirectionSortingModifierParams_0p0(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ViewDirectionSortingModifierParams_0p0::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ViewDirectionSortingModifierParams_0p0::getParameterDefinitionTree(void) const -{ - ViewDirectionSortingModifierParams_0p0* tmpParam = const_cast<ViewDirectionSortingModifierParams_0p0*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ViewDirectionSortingModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) const -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -NvParameterized::ErrorType ViewDirectionSortingModifierParams_0p0::getParameterHandle(const char* long_name, Handle& handle) -{ - ErrorType Ret = NvParameters::getParameterHandle(long_name, handle); - if (Ret != ERROR_NONE) - { - return(Ret); - } - - size_t offset; - void* ptr; - - getVarPtr(handle, ptr, offset); - - if (ptr == NULL) - { - return(ERROR_INDEX_OUT_OF_RANGE); - } - - return(ERROR_NONE); -} - -void ViewDirectionSortingModifierParams_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ViewDirectionSortingModifierParams_0p0::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ViewDirectionSortingModifierParams_0p0::freeParameterDefinitionTable(NvParameterized::Traits* traits) -{ - if (!traits) - { - return; - } - - if (!mBuiltFlag) // Double-checked lock - { - return; - } - - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - - if (!mBuiltFlag) - { - return; - } - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - ParamDefTable[i].~DefinitionImpl(); - } - - traits->free(ParamDefTable); - - mBuiltFlag = false; -} - -#define PDEF_PTR(index) (&ParamDefTable[index]) - -void ViewDirectionSortingModifierParams_0p0::buildTree(void) -{ - - uint32_t allocSize = sizeof(NvParameterized::DefinitionImpl) * NumParamDefs; - ParamDefTable = (NvParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize)); - memset(ParamDefTable, 0, allocSize); - - for (uint32_t i = 0; i < NumParamDefs; ++i) - { - NV_PARAM_PLACEMENT_NEW(ParamDefTable + i, NvParameterized::DefinitionImpl)(*mParameterizedTraits); - } - - // Initialize DefinitionImpl node: nodeIndex=0, longName="" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0]; - ParamDef->init("", TYPE_STRUCT, "STRUCT", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "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_0p0::initStrings(void) -{ -} - -void ViewDirectionSortingModifierParams_0p0::initDynamicArrays(void) -{ -} - -void ViewDirectionSortingModifierParams_0p0::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - sortType = (const char*)"default"; - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ViewDirectionSortingModifierParams_0p0::initReferences(void) -{ -} - -void ViewDirectionSortingModifierParams_0p0::freeDynamicArrays(void) -{ -} - -void ViewDirectionSortingModifierParams_0p0::freeStrings(void) -{ -} - -void ViewDirectionSortingModifierParams_0p0::freeReferences(void) -{ -} - -} // namespace parameterized -} // namespace nvidia |