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/particles | |
| 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/particles')
91 files changed, 0 insertions, 51238 deletions
diff --git a/APEX_1.4/module/particles/include/EffectPackageActorImpl.h b/APEX_1.4/module/particles/include/EffectPackageActorImpl.h deleted file mode 100644 index f1aa168d..00000000 --- a/APEX_1.4/module/particles/include/EffectPackageActorImpl.h +++ /dev/null @@ -1,922 +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. - */ - - -#ifndef PARTICLES_EFFECT_PACKAGE_ACTOR_H - -#define PARTICLES_EFFECT_PACKAGE_ACTOR_H - -#include "ApexActor.h" -#include "EffectPackageActor.h" -#include "EffectPackageAssetImpl.h" -#include "ParticlesBase.h" -#include "Spline.h" -#include "PxTransform.h" -#include "ReadCheck.h" -#include "WriteCheck.h" - -namespace nvidia -{ -namespace apex -{ -class Scene; -} -namespace turbulencefs -{ -class ModuleTurbulenceFS; -} - -namespace particles -{ - -enum VisState -{ - VS_TOO_CLOSE, - VS_ON_SCREEN, - VS_BEHIND_SCREEN, - VS_OFF_SCREEN, -}; - -class EffectPath : public shdfnd::UserAllocated -{ -public: - enum Mode - { - EM_LOOP, - EM_PLAY_ONCE, - EM_PING_PONG - }; - EffectPath(void); - ~EffectPath(void); - - bool init(RigidBodyEffectNS::EffectPath_Type &path); - float getSampleScaleSpline(void) const { return mSampleScaleSpline; }; - float getSampleSpeedSpline(void) const { return mSampleSpeedSpline; }; - - void getSamplePoseSpline(PxTransform &pose) - { - if ( mPathSpline ) - { - pose = pose * mSamplePoseSpline; - } - } - - float sampleSpline(float stime); - - Mode getMode(void) const - { - return mMode; - } - - void computeSampleTime(float ctime,float duration); - - float getPathDuration(void) - { - return mPathDuration; - } - -private: - Mode mMode; - float mPathDuration; - Spline *mScaleSpline; - float mSampleScaleSpline; // the scale value sampled from the spline curve - float mSampleSpeedSpline; - Spline *mSpeedSpline; - PxTransform mPathRoot; - PxTransform mSamplePoseSpline; - uint32_t mRotationCount; - PxQuat *mRotations; - SplineCurve *mPathSpline; -}; - -class EffectData : public shdfnd::UserAllocated -{ -public: - enum EffectState - { - ES_INITIAL_DELAY, - ES_ACTIVE, - ES_REPEAT_DELAY, - ES_DONE - }; - - EffectData(EffectType type, - ApexSDK* sdk, - Scene* scene, - ParticlesScene* dscene, - const char* assetName, - const char* nameSpace, - RigidBodyEffectNS::EffectProperties_Type &effectProperties); - - virtual ~EffectData(void); - void releaseActor(void); - - float getRandomTime(float baseTime); - - EffectType getType(void) const - { - return mType; - } - virtual void release(void) = 0; - virtual void visualize(RenderDebugInterface* callback, bool solid) const = 0; - virtual bool refresh(const PxTransform& parent, - bool parentEnabled, - bool fromSetPose, - RenderVolume* renderVolume, - EmitterActor::EmitterValidateCallback *callback) = 0; - - bool isDead(void) const - { - return mState == ES_DONE; - } - - Actor* getEffectActor(void) const - { - return mActor; - } - Asset* getEffectAsset(void) const - { - return mAsset; - } - - bool isEnabled(void) const - { - return mEnabled; - } - - void setEnabled(bool state) - { - mEnabled = state; - } - - bool simulate(float dtime, bool& reset); - - uint32_t getRepeatCount(void) const - { - return mRepeatCount; - }; - float getDuration(void) const - { - return mDuration; - }; - - float getRealDuration(void) const; - - void setLocalPose(const PxTransform& p) - { - mLocalPose = p; - } - const PxTransform& getWorldPose(void) const - { - return mPose; - }; - const PxTransform& getLocalPose(void) const - { - return mLocalPose; - }; - - Asset * getAsset(void) const { return mAsset; }; - - void setForceRenableEmitter(bool state) - { - mForceRenableEmitter = state; - } - - bool getForceRenableEmitterSemaphore(void) - { - bool ret = mForceRenableEmitter; - mForceRenableEmitter = false; - return ret; - } - - void setCurrentScale(float objectScale,EffectPath *parentPath) - { - mParentPath = parentPath; - mObjectScale = objectScale; - } - - nvidia::apex::Scene *getApexScene(void) const - { - return mApexScene; - } - - void getSamplePoseSpline(PxTransform &pose) - { - if ( mParentPath ) - { - mParentPath->getSamplePoseSpline(pose); - } - if ( mEffectPath ) - { - mEffectPath->getSamplePoseSpline(pose); - } - } - - float getSampleScaleSpline(void) const - { - float parentScale = mParentPath ? mParentPath->getSampleScaleSpline() : 1; - float myScale = mEffectPath ? mEffectPath->getSampleScaleSpline() : 1; - return myScale*parentScale; - } - - bool activePath(void) const - { - bool ret = false; - if ( mEffectPath || mParentPath ) - { - ret = true; - } - return ret; - } - - bool mFirstRate: 1; - float mObjectScale; - EffectPath *mParentPath; - EffectPath *mEffectPath; - -protected: - bool mUseEmitterPool: 1; - bool mEnabled: 1; - bool mForceRenableEmitter:1; - EffectState mState; - float mRandomDeviation; - float mSimulationTime; - float mStateTime; - uint32_t mStateCount; - const char* mNameSpace; - ParticlesScene* mParticlesScene; - Scene* mApexScene; - ApexSDK* mApexSDK; - Asset* mAsset; - Actor* mActor; - float mInitialDelayTime; - float mDuration; - uint32_t mRepeatCount; - float mRepeatDelay; - EffectType mType; - PxTransform mPose; // world space pose - PxTransform mLocalPose; // local space pose -}; - -class EffectForceField : public EffectData -{ -public: - EffectForceField(const char* parentName, - ForceFieldEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled); - - virtual ~EffectForceField(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPos, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - ForceFieldEffect* mData; -}; - - - -class EffectEmitter : public EffectData -{ -public: - EffectEmitter(const char* parentName, - const EmitterEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled); - - virtual ~EffectEmitter(void); - - virtual void release(void) - { - delete this; - } - void computeVelocity(float dtime); - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - float mRate; - float mLifetimeLow; - float mLifetimeHigh; - const EmitterEffect* mData; - bool mFirstVelocityFrame: 1; - bool mHaveSetPosition; - PxVec3 mLastEmitterPosition; - float mVelocityTime; - PxVec3 mEmitterVelocity; -}; - -class EffectHeatSource : public EffectData -{ -public: - EffectHeatSource(const char* parentName, - HeatSourceEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled); - - virtual ~EffectHeatSource(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - - float mAverageTemperature; - float mStandardDeviationTemperature; - - ModuleTurbulenceFS* mModuleTurbulenceFS; - HeatSourceEffect* mData; -}; - -class EffectSubstanceSource : public EffectData -{ -public: - EffectSubstanceSource(const char* parentName, - SubstanceSourceEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled); - - virtual ~EffectSubstanceSource(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - - float mAverageDensity; - float mStandardDeviationDensity; - - ModuleTurbulenceFS* mModuleTurbulenceFS; - SubstanceSourceEffect* mData; -}; - -class EffectVelocitySource : public EffectData -{ -public: - EffectVelocitySource(const char* parentName, - VelocitySourceEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled); - - virtual ~EffectVelocitySource(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - - float mAverageVelocity; - float mStandardDeviationVelocity; - ModuleTurbulenceFS* mModuleTurbulenceFS; - VelocitySourceEffect* mData; -}; - -class EffectFlameEmitter : public EffectData -{ -public: - EffectFlameEmitter(const char* parentName, - FlameEmitterEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled); - - virtual ~EffectFlameEmitter(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - - ModuleTurbulenceFS* mModuleTurbulenceFS; - FlameEmitterEffect* mData; -}; - - -class EffectTurbulenceFS : public EffectData -{ -public: - EffectTurbulenceFS(const char* parentName, - TurbulenceFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled); - - virtual ~EffectTurbulenceFS(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - ModuleTurbulenceFS* mModuleTurbulenceFS; - TurbulenceFieldSamplerEffect* mData; -}; - -class EffectJetFS : public EffectData -{ -public: - EffectJetFS(const char* parentName, - JetFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled); - virtual ~EffectJetFS(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - JetFieldSamplerEffect* mData; -}; - - -class EffectWindFS : public EffectData -{ -public: - EffectWindFS(const char* parentName, - WindFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled); - virtual ~EffectWindFS(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - WindFieldSamplerEffect* mData; -}; - -class EffectRigidBody : public EffectData -{ -public: - EffectRigidBody(const char* parentName, - RigidBodyEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled); - virtual ~EffectRigidBody(void); - - virtual void release(void) - { - delete this; - } - - void releaseRigidBody(void); - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - RigidBodyEffect* mData; - PxRigidDynamic *mRigidDynamic; -}; - -class EffectNoiseFS : public EffectData -{ -public: - EffectNoiseFS(const char* parentName, - NoiseFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled); - virtual ~EffectNoiseFS(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - NoiseFieldSamplerEffect* mData; -}; - - -class EffectVortexFS : public EffectData -{ -public: - EffectVortexFS(const char* parentName, - VortexFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled); - virtual ~EffectVortexFS(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - VortexFieldSamplerEffect* mData; -}; - - - -class EffectAttractorFS : public EffectData -{ -public: - EffectAttractorFS(const char* parentName, - AttractorFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled); - - virtual ~EffectAttractorFS(void); - - virtual void release(void) - { - delete this; - } - - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - virtual bool refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback); - - AttractorFieldSamplerEffect* mData; -}; - - -class EffectPackageActorImpl : public EffectPackageActor, public shdfnd::UserAllocated, public ParticlesBase, public ApexRWLockable -{ -public: - APEX_RW_LOCKABLE_BOILERPLATE - - EffectPackageActorImpl(EffectPackageAsset* asset, - const EffectPackageAssetParams* assetParams, - const EffectPackageActorParams* actorParams, - nvidia::apex::ApexSDK& sdk, - nvidia::apex::Scene& scene, - ParticlesScene& dynamicSystemScene, - ModuleTurbulenceFS* moduleTurbulenceFS); - - virtual ~EffectPackageActorImpl(void); - - virtual ParticlesType getParticlesType(void) const - { - return ParticlesBase::DST_EFFECT_PACKAGE_ACTOR; - } - - void updateParticles(float dtime); - void updatePoseAndBounds(bool screenCulling, bool znegative); - - virtual void setPose(const PxTransform& pose); - virtual const PxTransform& getPose(void) const; - virtual void visualize(RenderDebugInterface* callback, bool solid) const; - - virtual void refresh(void); - virtual void release(void); - - virtual const char* getName(void) const; - - virtual uint32_t getEffectCount(void) const; // returns the number of effects in the effect package - virtual EffectType getEffectType(uint32_t effectIndex) const; // return the type of effect. - virtual Actor* getEffectActor(uint32_t effectIndex) const; // return the base Actor pointer - virtual void setEmitterState(bool state); // set the state for all emitters in this effect package. - virtual uint32_t getActiveParticleCount(void) const; // return the total number of particles still active in this effect package. - virtual bool isStillEmitting(void) const; // return true if any emitters are still actively emitting particles. - - - /** - \brief Returns the name of the effect at this index. - - \param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount - */ - virtual const char* getEffectName(uint32_t effectIndex) const; - - /** - \brief Returns true if this sub-effect is currently enabled. - - \param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount - */ - virtual bool isEffectEnabled(uint32_t effectIndex) const; - - /** - \brief Set's the enabled state of this sub-effect - - \param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount - \param [in] state : Whether the effect should be enabled or not. - */ - virtual bool setEffectEnabled(uint32_t effectIndex, bool state); - - /** - \brief Returns the pose of this sub-effect; returns as a a bool the active state of this effect. - - \param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount - \param [pose] : Contains the pose requested - \param [worldSpace] : Whether to return the pose in world-space or in parent-relative space. - */ - virtual bool getEffectPose(uint32_t effectIndex, PxTransform& pose, bool worldSpace); - - /** - \brief Sets the pose of this sub-effect; returns as a a bool the active state of this effect. - - \param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount - \param [pose] : Contains the pose to be set - \param [worldSpace] : Whether to return the pose in world-space or in parent-relative space. - */ - virtual bool setEffectPose(uint32_t effectIndex, const PxTransform& pose, bool worldSpace); - - virtual void setCurrentScale(float scale); - - virtual float getCurrentScale(void) const - { - return mObjectScale; - } - - virtual PxRigidDynamic* getEffectRigidDynamic(uint32_t effectIndex) const; - - /** - \brief Returns the current lifetime of the particle. - */ - virtual float getCurrentLife(void) const; - - - virtual float getDuration(void) const; - - /** - \brief Returns the owning asset - */ - virtual Asset* getOwner() const - { - READ_ZONE(); - return mAsset; - } - - /** - \brief Returns the range of possible values for physical Lod overwrite - - \param [out] min The minimum lod value - \param [out] max The maximum lod value - \param [out] intOnly Only integers are allowed if this is true, gets rounded to nearest - - \note The max value can change with different graphical Lods - \see Actor::forceLod() - */ - virtual void getLodRange(float& min, float& max, bool& intOnly) const - { - READ_ZONE(); - min = 0; - max = 100000; - intOnly = false; - } - - /** - \brief Get current physical lod. - */ - virtual float getActiveLod() const - { - READ_ZONE(); - return 0; - } - - /** - \brief Force an APEX Actor to use a certian physical Lod - - \param [in] lod Overwrite the Lod system to use this Lod. - - \note Setting the lod value to a negative number will turn off the overwrite and proceed with regular Lod computations - \see Actor::getLodRange() - */ - virtual void forceLod(float lod) - { - WRITE_ZONE(); - PX_UNUSED(lod); - } - - /** - \brief Selectively enables/disables debug visualization of a specific APEX actor. Default value it true. - */ - virtual void setEnableDebugVisualization(bool state) - { - WRITE_ZONE(); - ApexActor::setEnableDebugVisualization(state); - } - - /** - \brief Ensure that all module-cached data is cached. - */ - virtual void cacheModuleData() const - { - - } - - virtual void setEnabled(bool state) - { - WRITE_ZONE(); - mEnabled = state; - refresh(); - } - - bool getEnabled(void) const - { - READ_ZONE(); - return mEnabled; - } - - virtual void setPhysXScene(PxScene* s) - { - mPhysXScene = s; - } - virtual PxScene* getPhysXScene() const - { - return mPhysXScene; - } - - float internalGetDuration(void); - - virtual bool isAlive(void) const - { - READ_ZONE(); - return mAlive; - } - - virtual void fadeOut(float fadeTime) - { - WRITE_ZONE(); - if (!mFadeOut) - { - mFadeOutTime = fadeTime; - mFadeOutDuration = 0; - - if (mFadeIn) - { - float fadeLerp = mFadeInDuration / mFadeInTime; - if (fadeLerp > 1) - { - fadeLerp = 1; - } - mFadeOutDuration = 1 - (fadeLerp * mFadeOutTime); - mFadeIn = false; - } - - mFadeOut = true; - } - } - - virtual void fadeIn(float fadeTime) - { - WRITE_ZONE(); - if (!mFadeIn) - { - mFadeInTime = fadeTime; - mFadeInDuration = 0; - mFadeIn = true; - if (mFadeOut) - { - float fadeLerp = mFadeOutDuration / mFadeOutTime; - if (fadeLerp > 1) - { - fadeLerp = 1; - } - mFadeInDuration = 1 - (fadeLerp * mFadeInTime); - mFadeOut = false; - } - } - } - - virtual void setPreferredRenderVolume(RenderVolume* volume); - - virtual const char * hasVolumeRenderMaterial(uint32_t &index) const; - - virtual void setApexEmitterValidateCallback(EmitterActor::EmitterValidateCallback *callback) - { - WRITE_ZONE(); - mEmitterValidateCallback = callback; - } - - float getSampleScaleSpline(void) const - { - return mEffectPath ? mEffectPath->getSampleScaleSpline() : 1; - } - - void getSamplePoseSpline(PxTransform &pose) - { - if ( mEffectPath ) - { - mEffectPath->getSamplePoseSpline(pose); - } - } - -private: - - physx::PxScene* mPhysXScene; - - EffectType getEffectType(const NvParameterized::Interface* iface); - - bool mAlive:1; - bool mEnabled: 1; - bool mVisible: 1; - bool mEverVisible: 1; - bool mFirstFrame: 1; - bool mFadeOut: 1; - float mFadeOutTime; - float mFadeOutDuration; - - bool mFadeIn: 1; - float mFadeInTime; - float mFadeInDuration; - - EmitterActor::EmitterValidateCallback *mEmitterValidateCallback; - - float mFadeTime; - float mNotVisibleTime; - VisState mVisState; - float mOffScreenTime; - - PxTransform mPose; - float mObjectScale; - const EffectPackageAssetParams* mData; - Array< EffectData* > mEffects; - float mSimTime; - float mCurrentLifeTime; - EffectPath *mEffectPath; - - nvidia::apex::Scene *mScene; - ModuleTurbulenceFS *mModuleTurbulenceFS; - EffectPackageAsset *mAsset; - RenderVolume *mRenderVolume; - bool mRigidBodyChange; -}; - -} // end of particles namespace -} // end of nvidia namespace - -#endif diff --git a/APEX_1.4/module/particles/include/EffectPackageAssetImpl.h b/APEX_1.4/module/particles/include/EffectPackageAssetImpl.h deleted file mode 100644 index 17ec14e9..00000000 --- a/APEX_1.4/module/particles/include/EffectPackageAssetImpl.h +++ /dev/null @@ -1,238 +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. - */ - - -#ifndef PARTICLES_EFFECT_PACKAGE_ASSET_H -#define PARTICLES_EFFECT_PACKAGE_ASSET_H - -#include "Apex.h" -#include "ApexUsingNamespace.h" -#include "EffectPackageAsset.h" -#include "EffectPackageActor.h" -#include "ApexSDKHelpers.h" -#include "ModuleParticlesImpl.h" -#include "ApexAssetAuthoring.h" -#include "ApexString.h" -#include "ApexAssetTracker.h" -#include "ApexAuthorableObject.h" -#include "EffectPackageAssetParams.h" -#include "ApexRWLockable.h" - -#include "ReadCheck.h" -#include "WriteCheck.h" -#include "ApexAuthorableObject.h" - -namespace nvidia -{ -namespace particles -{ - -class EffectPackageActorImpl; -class ModuleParticlesImpl; - -class EffectPackageAssetImpl : public EffectPackageAsset, public ApexResourceInterface, public ApexResource, public ApexRWLockable -{ - friend class EffectPackageAssetDummyAuthoring; -public: - APEX_RW_LOCKABLE_BOILERPLATE - - EffectPackageAssetImpl(ModuleParticlesImpl*, ResourceList&, const char* name); - EffectPackageAssetImpl(ModuleParticlesImpl*, ResourceList&, NvParameterized::Interface*, const char*); - - ~EffectPackageAssetImpl(); - - /* Asset */ - const char* getName() const - { - READ_ZONE(); - return mName.c_str(); - } - AuthObjTypeID getObjTypeID() const - { - READ_ZONE(); - return mAssetTypeID; - } - const char* getObjTypeName() const - { - READ_ZONE(); - return getClassName(); - } - - uint32_t forceLoadAssets(); - - /* ApexResource */ - virtual void release(); - - /* ApexResourceInterface, ApexResource */ - uint32_t getListIndex() const - { - return m_listIndex; - } - - void setListIndex(class ResourceList& list, uint32_t index) - { - m_list = &list; - m_listIndex = index; - } - - /* EffectPackageAsset specific methods */ - void releaseEffectPackageActor(EffectPackageActor&); - const EffectPackageAssetParams& getEffectPackageParameters() const - { - return *mParams; - } - float getDefaultScale() const - { - return 1; - } - void destroy(); - - const NvParameterized::Interface* getAssetNvParameterized() const - { - READ_ZONE(); - return mParams; - } - - virtual float getDuration() const; - virtual bool useUniqueRenderVolume() const; - - /** - * \brief Releases the ApexAsset but returns the NvParameterized::Interface and *ownership* to the caller. - */ - virtual NvParameterized::Interface* releaseAndReturnNvParameterizedInterface() - { - WRITE_ZONE(); - NvParameterized::Interface* ret = mParams; - mParams = NULL; - release(); - return ret; - } - NvParameterized::Interface* getDefaultActorDesc(); - NvParameterized::Interface* getDefaultAssetPreviewDesc(); - virtual Actor* createApexActor(const NvParameterized::Interface& /*parms*/, Scene& /*apexScene*/); - virtual AssetPreview* createApexAssetPreview(const ::NvParameterized::Interface& /*params*/, AssetPreviewScene* /*previewScene*/) - { - WRITE_ZONE(); - PX_ALWAYS_ASSERT(); - return NULL; - } - - virtual bool isValidForActorCreation(const ::NvParameterized::Interface& /*parms*/, Scene& /*apexScene*/) const - { - READ_ZONE(); - return true; // TODO implement this method - } - - virtual bool isDirty() const - { - READ_ZONE(); - return false; - } - - static AuthObjTypeID mAssetTypeID; - -protected: - static const char* getClassName() - { - return PARTICLES_EFFECT_PACKAGE_AUTHORING_TYPE_NAME; - } - - ModuleParticlesImpl* mModule; - - ResourceList mEffectPackageActors; - ApexSimpleString mName; - EffectPackageAssetParams* mParams; - EffectPackageActorParams* mDefaultActorParams; - - void initializeAssetNameTable(); - - friend class ModuleParticlesE; - friend class EffectPackageActorImpl; - template <class T_Module, class T_Asset, class T_AssetAuthoring> friend class nvidia::apex::ApexAuthorableObject; -}; - -#ifndef WITHOUT_APEX_AUTHORING -class EffectPackageAssetAuthoringImpl : public EffectPackageAssetImpl, public ApexAssetAuthoring, public EffectPackageAssetAuthoring -{ -public: - APEX_RW_LOCKABLE_BOILERPLATE - - /* EffectPackageAssetAuthoring */ - EffectPackageAssetAuthoringImpl(ModuleParticlesImpl* m, ResourceList& l) : - EffectPackageAssetImpl(m, l, "EffectPackageAssetAuthoringImpl") {} - - EffectPackageAssetAuthoringImpl(ModuleParticlesImpl* m, ResourceList& l, const char* name) : - EffectPackageAssetImpl(m, l, name) {} - - EffectPackageAssetAuthoringImpl(ModuleParticlesImpl* m, ResourceList& l, NvParameterized::Interface* params, const char* name) : - EffectPackageAssetImpl(m, l, params, name) {} - - ~EffectPackageAssetAuthoringImpl() {} - - void destroy() - { - delete this; - } - - /* AssetAuthoring */ - const char* getName() const - { - READ_ZONE(); - return EffectPackageAssetImpl::getName(); - } - const char* getObjTypeName() const - { - READ_ZONE(); - return EffectPackageAssetImpl::getClassName(); - } - virtual bool prepareForPlatform(nvidia::apex::PlatformTag) - { - WRITE_ZONE(); - APEX_INVALID_OPERATION("Not Implemented."); - return false; - } - - void setToolString(const char* toolName, const char* toolVersion, uint32_t toolChangelist) - { - WRITE_ZONE(); - ApexAssetAuthoring::setToolString(toolName, toolVersion, toolChangelist); - } - - // from ApexAssetAuthoring - virtual void setToolString(const char* toolString); - - /* ApexResource */ - virtual void release() - { - mModule->mSdk->releaseAssetAuthoring(*this); - } - - NvParameterized::Interface* getNvParameterized() const - { - return (NvParameterized::Interface*)getAssetNvParameterized(); - } - /** - * \brief Releases the ApexAsset but returns the NvParameterized::Interface and *ownership* to the caller. - */ - virtual NvParameterized::Interface* releaseAndReturnNvParameterizedInterface() - { - WRITE_ZONE(); - NvParameterized::Interface* ret = mParams; - mParams = NULL; - release(); - return ret; - } -}; -#endif - -} -} // end namespace nvidia - -#endif // PARTICLES_EFFECT_PACKAGE_ASSET_H diff --git a/APEX_1.4/module/particles/include/ModuleParticlesImpl.h b/APEX_1.4/module/particles/include/ModuleParticlesImpl.h deleted file mode 100644 index 5375a340..00000000 --- a/APEX_1.4/module/particles/include/ModuleParticlesImpl.h +++ /dev/null @@ -1,308 +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. - */ - - -#ifndef __MODULE_PARTICLES_IMPL_H__ -#define __MODULE_PARTICLES_IMPL_H__ - -#include "Apex.h" -#include "ModuleParticles.h" -#include "ApexSDKIntl.h" -#include "ModuleIntl.h" -#include "ModuleBase.h" - -#include "ApexRWLockable.h" -#include "ApexSDKHelpers.h" -#include "ParticlesDebugRenderParams.h" -#include "ParticlesModuleParameters.h" -#include "EffectPackageGraphicsMaterialsParams.h" - -#include "EffectPackageAssetParams.h" -#include "EffectPackageActorParams.h" - -#include "GraphicsMaterialData.h" -#include "VolumeRenderMaterialData.h" -#include "EmitterEffect.h" -#include "RigidBodyEffect.h" - -#include "HeatSourceEffect.h" -#include "SubstanceSourceEffect.h" -#include "VelocitySourceEffect.h" -#include "ForceFieldEffect.h" -#include "JetFieldSamplerEffect.h" -#include "WindFieldSamplerEffect.h" -#include "NoiseFieldSamplerEffect.h" -#include "VortexFieldSamplerEffect.h" -#include "AttractorFieldSamplerEffect.h" -#include "TurbulenceFieldSamplerEffect.h" -#include "FlameEmitterEffect.h" - -#include "EffectPackageData.h" -#include "AttractorFieldSamplerData.h" -#include "JetFieldSamplerData.h" -#include "WindFieldSamplerData.h" -#include "NoiseFieldSamplerData.h" -#include "VortexFieldSamplerData.h" -#include "TurbulenceFieldSamplerData.h" -#include "HeatSourceData.h" -#include "SubstanceSourceData.h" -#include "VelocitySourceData.h" -#include "ForceFieldData.h" -#include "EmitterData.h" -#include "GraphicsEffectData.h" -#include "ParticleSimulationData.h" -#include "FlameEmitterData.h" - -#include "EffectPackageIOSDatabaseParams.h" -#include "EffectPackageIOFXDatabaseParams.h" -#include "EffectPackageEmitterDatabaseParams.h" -#include "EffectPackageDatabaseParams.h" -#include "EffectPackageFieldSamplerDatabaseParams.h" - -#include "ReadCheck.h" -#include "WriteCheck.h" - -namespace nvidia -{ -namespace apex -{ -class SceneIntl; -class ModuleTurbulenceFS; -class EmitterActor; -class EmitterAsset; -} -namespace particles -{ -class ParticlesAsset; -class ParticlesAssetAuthoring; -class ParticlesScene; - -typedef Array< ModuleSceneIntl* > ModuleSceneVector; - -class ModuleParticlesDesc : public ApexDesc -{ -public: - - /** - \brief Constructor sets to default. - */ - PX_INLINE ModuleParticlesDesc() - { - setToDefault(); - } - /** - \brief (re)sets the structure to the default. - */ - PX_INLINE void setToDefault() - { - ApexDesc::setToDefault(); - moduleValue = 0; - } - - /** - Returns true if an object can be created using this descriptor. - */ - PX_INLINE bool isValid() const - { - return ApexDesc::isValid(); - } - - /** - ModuleBase configurable parameter. - */ - uint32_t moduleValue; -}; - - -class ModuleParticlesImpl : public ModuleParticles, public ModuleIntl, public ModuleBase, public ApexRWLockable -{ -public: - APEX_RW_LOCKABLE_BOILERPLATE - - ModuleParticlesImpl(ApexSDKIntl* sdk); - ~ModuleParticlesImpl(); - - void init(const ModuleParticlesDesc& desc); - - // base class methods - void init(NvParameterized::Interface&) {} - NvParameterized::Interface* getDefaultModuleDesc(); - void release() - { - ModuleBase::release(); - } - void destroy(); - const char* getName() const - { - READ_ZONE(); - return ModuleBase::getName(); - } - - virtual bool setEffectPackageGraphicsMaterialsDatabase(const NvParameterized::Interface* dataBase); - - virtual const NvParameterized::Interface* getEffectPackageGraphicsMaterialsDatabase() const; - - virtual bool setEffectPackageIOSDatabase(const NvParameterized::Interface* dataBase); - virtual bool setEffectPackageIOFXDatabase(const NvParameterized::Interface* dataBase); - virtual bool setEffectPackageEmitterDatabase(const NvParameterized::Interface* dataBase); - virtual bool setEffectPackageDatabase(const NvParameterized::Interface* dataBase); - virtual bool setEffectPackageFieldSamplerDatabase(const NvParameterized::Interface* dataBase); - - virtual const NvParameterized::Interface* getEffectPackageIOSDatabase(void) const - { - READ_ZONE(); - return mEffectPackageIOSDatabaseParams; - }; - virtual const NvParameterized::Interface* getEffectPackageIOFXDatabase(void) const - { - READ_ZONE(); - return mEffectPackageIOFXDatabaseParams; - }; - virtual const NvParameterized::Interface* getEffectPackageEmitterDatabase(void) const - { - READ_ZONE(); - return mEffectPackageEmitterDatabaseParams; - }; - virtual const NvParameterized::Interface* getEffectPackageDatabase(void) const - { - READ_ZONE(); - return mEffectPackageDatabaseParams; - }; - virtual const NvParameterized::Interface* getEffectPackageFieldSamplerDatabase(void) const - { - READ_ZONE(); - return mEffectPackageFieldSamplerDatabaseParams; - }; - - bool initParticleSimulationData(ParticleSimulationData* ed); - - virtual NvParameterized::Interface* locateResource(const char* resourceName, // the name of the resource - const char* nameSpace); - - virtual const char** getResourceNames(const char* nameSpace, uint32_t& nameCount, const char** &variants); - - virtual const NvParameterized::Interface* locateGraphicsMaterialData(const char* name) const; - virtual const NvParameterized::Interface* locateVolumeRenderMaterialData(const char* name) const; - - - ModuleSceneIntl* createInternalModuleScene(SceneIntl&, RenderDebugInterface*); - void releaseModuleSceneIntl(ModuleSceneIntl&); - uint32_t forceLoadAssets(); - AuthObjTypeID getModuleID() const; - RenderableIterator* createRenderableIterator(const Scene&); - - AuthObjTypeID getParticlesAssetTypeID() const; - - uint32_t getModuleValue() const - { - return mModuleValue; - } - - ModuleTurbulenceFS* getModuleTurbulenceFS(void) - { - return mTurbulenceModule; - } - - ParticlesScene* getParticlesScene(const Scene& apexScene); - - virtual void setEnableScreenCulling(bool state, bool znegative) - { - WRITE_ZONE(); - mEnableScreenCulling = state; - mZnegative = znegative; - } - - bool getEnableScreenCulling(void) const - { - return mEnableScreenCulling; - } - - bool getZnegative(void) const - { - return mZnegative; - } - - virtual void resetEmitterPool(void); - - virtual void setUseEmitterPool(bool state) - { - WRITE_ZONE(); - mUseEmitterPool = state; - } - - virtual bool getUseEmitterPool(void) const - { - READ_ZONE(); - return mUseEmitterPool; - } - - PxMaterial *getDefaultMaterial(void) const - { - return mDefaultMaterial; - } - - virtual void notifyReleaseSDK(void); - - virtual void notifyChildGone(ModuleIntl* imodule); - -protected: - bool mUseEmitterPool; - bool mEnableScreenCulling; - bool mZnegative; - - ResourceList mAuthorableObjects; - ResourceList mEffectPackageAuthorableObjects; - - ResourceList mParticlesScenes; - - uint32_t mModuleValue; - - friend class ParticlesAsset; - - /** - \brief Used by the ParticleEffectTool to initialize the default database values for the editor - */ - virtual void initializeDefaultDatabases(void); - - virtual nvidia::apex::Module* getModule(const char* moduleName); - -private: - - bool fixFieldSamplerCollisionFilterNames(NvParameterized::Interface *fs); - - bool fixupNamedReferences(void); - - NvParameterized::Interface* mEffectPackageIOSDatabaseParams; - NvParameterized::Interface* mEffectPackageIOFXDatabaseParams; - NvParameterized::Interface* mEffectPackageEmitterDatabaseParams; - NvParameterized::Interface* mEffectPackageDatabaseParams; - NvParameterized::Interface* mEffectPackageFieldSamplerDatabaseParams; - - ParticlesModuleParameters* mModuleParams; - NvParameterized::Interface* mGraphicsMaterialsDatabase; - ModuleTurbulenceFS* mTurbulenceModule; - ModuleSceneVector mScenes; - Array< const char*> mTempNames; - Array< const char*> mTempVariantNames; - - nvidia::apex::Module* mModuleBasicIos; // Instantiate the BasicIOS module statically - nvidia::apex::Module* mModuleEmitter; // Instantiate the Emitter module statically - nvidia::apex::Module* mModuleIofx; // Instantiate the IOFX module statically - nvidia::apex::Module* mModuleFieldSampler; // Instantiate the field sampler module statically - nvidia::apex::Module* mModuleBasicFS; // Instantiate the BasicFS module statically - nvidia::apex::Module* mModuleParticleIos; // PhysX 3.x only : Instantiate the ParticleIOS module - nvidia::apex::Module* mModuleForceField; // PhysX 3.x only : Instantiate the ForceField module - PxMaterial *mDefaultMaterial; -}; - -} -} // end namespace nvidia - -#endif // __MODULE_PARTICLES_H__ diff --git a/APEX_1.4/module/particles/include/ModulePerfScope.h b/APEX_1.4/module/particles/include/ModulePerfScope.h deleted file mode 100644 index b3e30094..00000000 --- a/APEX_1.4/module/particles/include/ModulePerfScope.h +++ /dev/null @@ -1,18 +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. - */ - - -#ifndef __MODULE_PERF_SCOPE_H___ -#define __MODULE_PERF_SCOPE_H___ - -#define MODULE_NAMESPACE particles -#include "ModuleProfileCommon.h" - -#endif diff --git a/APEX_1.4/module/particles/include/ParticlesBase.h b/APEX_1.4/module/particles/include/ParticlesBase.h deleted file mode 100644 index 282934d8..00000000 --- a/APEX_1.4/module/particles/include/ParticlesBase.h +++ /dev/null @@ -1,39 +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. - */ - - -#ifndef PARTICLES_BASE_H - -#define PARTICLES_BASE_H - -#include "ApexActor.h" - -namespace nvidia -{ -namespace particles -{ - -class ParticlesBase : public ApexActor -{ -public: - enum ParticlesType - { - DST_EFFECT_PACKAGE_ACTOR, - DST_LAST - }; - - virtual ParticlesType getParticlesType() const = 0; - -}; - -} -} - -#endif diff --git a/APEX_1.4/module/particles/include/ParticlesScene.h b/APEX_1.4/module/particles/include/ParticlesScene.h deleted file mode 100644 index 0715e03d..00000000 --- a/APEX_1.4/module/particles/include/ParticlesScene.h +++ /dev/null @@ -1,192 +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. - */ - - -#ifndef __PARTICLES_SCENE_H__ -#define __PARTICLES_SCENE_H__ - -#include "Apex.h" -#include "PairFilter.h" -#include "ModuleParticlesImpl.h" - -#include "ApexResource.h" -#include "ApexContext.h" -#include "ApexSDKHelpers.h" - -#include "RenderDebugInterface.h" -#include "ApexSDKIntl.h" -#include "ModuleIntl.h" - -#include "DebugRenderParams.h" -#include "ParticlesDebugRenderParams.h" -#include "PxTask.h" - -namespace nvidia -{ - -namespace apex -{ -class SceneIntl; -} -namespace emitter -{ -class EmitterActor; -class EmitterAsset; -} - -namespace particles -{ - -class ModuleParticlesImpl; - -#define EMITTER_FORGET_TIME 30 - -class EmitterPool -{ -public: - EmitterPool() - { - mEmitter = NULL; - mEmitterTime = 0; - } - - EmitterPool(EmitterActor* emitterActor, float simTime); - - ~EmitterPool() - { - } - - bool process(float simTime); - void releaseEmitter(); - - EmitterActor* mEmitter; - float mEmitterTime; -}; - -typedef Array< EmitterPool > EmitterPoolVector; - -class ParticlesScene : public ModuleSceneIntl, public ApexContext, public ApexResourceInterface, public ApexResource -{ -public: - - - ParticlesScene(ModuleParticlesImpl& module, SceneIntl& scene, RenderDebugInterface* renderDebug, ResourceList& list); - ~ParticlesScene(); - - - - /* ModuleSceneIntl */ - void updateActors(float deltaTime); - void submitTasks(float elapsedTime, float substepSize, uint32_t numSubSteps); - virtual void updateFromSimulate(float dt); - - virtual void visualize(); - virtual void fetchResults(); - virtual void fetchResultsPostRenderUnlock(); - - virtual void setModulePhysXScene(PxScene* s); - virtual PxScene* getModulePhysXScene() const - { - return mPhysXScene; - } - - virtual Module* getModule() - { - return mModule; - } - - bool lockRenderResources() - { - renderLockAllActors(); // Lock options not implemented yet - return true; - } - - bool unlockRenderResources() - { - renderUnLockAllActors(); // Lock options not implemented yet - return true; - } - - /* ApexResourceInterface */ - uint32_t getListIndex() const - { - return m_listIndex; - } - void setListIndex(ResourceList& list, uint32_t index) - { - m_listIndex = index; - m_list = &list; - } - virtual void release() - { - mModule->releaseModuleSceneIntl(*this); - } - - virtual SceneStats* getStats() - { - return NULL; - } - - - SceneIntl* mApexScene; - - ModuleParticlesImpl* getModuleParticles() const - { - return mModule; - } - - void addToEmitterPool(EmitterActor* emitterActor); - EmitterActor* getEmitterFromPool(EmitterAsset* assert); - - void resetEmitterPool(); - -private: - void destroy(); - - ModuleParticlesImpl* mModule; - - PxScene* mPhysXScene; - RenderDebugInterface* mRenderDebug; - - DebugRenderParams* mDebugRenderParams; - ParticlesDebugRenderParams* mParticlesDebugRenderParams; - - class TaskUpdate : public PxTask - { - public: - TaskUpdate(ParticlesScene& owner) : mOwner(owner) {} - const char* getName() const - { - return "ParticlesScene::Update"; - } - void run(); - - protected: - ParticlesScene& mOwner; - - private: - TaskUpdate& operator=(const TaskUpdate&); - }; - - TaskUpdate mUpdateTask; - friend class ModuleParticlesImpl; - friend class ParticlesActor; - friend class TaskUpdate; - - - float mCheckTime; - float mSimTime; - EmitterPoolVector mEmitterPool; -}; - -} -} // end namespace nvidia - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/AttractorFieldSamplerData.h b/APEX_1.4/module/particles/include/autogen/AttractorFieldSamplerData.h deleted file mode 100644 index 1cd14d6c..00000000 --- a/APEX_1.4/module/particles/include/autogen/AttractorFieldSamplerData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_AttractorFieldSamplerData_h -#define HEADER_AttractorFieldSamplerData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace AttractorFieldSamplerDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* AttractorFieldSampler; - -}; - -static const uint32_t checksum[] = { 0xad0ce7f8, 0x2fb85c3b, 0x5bd65a2b, 0x570e1992, }; - -} // namespace AttractorFieldSamplerDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class AttractorFieldSamplerData : public NvParameterized::NvParameters, public AttractorFieldSamplerDataNS::ParametersStruct -{ -public: - AttractorFieldSamplerData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~AttractorFieldSamplerData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("AttractorFieldSamplerData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(AttractorFieldSamplerDataNS::checksum); - return AttractorFieldSamplerDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const AttractorFieldSamplerDataNS::ParametersStruct& parameters(void) const - { - AttractorFieldSamplerData* tmpThis = const_cast<AttractorFieldSamplerData*>(this); - return *(static_cast<AttractorFieldSamplerDataNS::ParametersStruct*>(tmpThis)); - } - - AttractorFieldSamplerDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<AttractorFieldSamplerDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class AttractorFieldSamplerDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - AttractorFieldSamplerData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(AttractorFieldSamplerData), AttractorFieldSamplerData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, AttractorFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class AttractorFieldSamplerData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(AttractorFieldSamplerData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, AttractorFieldSamplerData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, AttractorFieldSamplerData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, AttractorFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class AttractorFieldSamplerData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of AttractorFieldSamplerData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (AttractorFieldSamplerData*)bufObj; - } - - virtual const char* getClassName() - { - return (AttractorFieldSamplerData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (AttractorFieldSamplerData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (AttractorFieldSamplerData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (AttractorFieldSamplerData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/AttractorFieldSamplerEffect.h b/APEX_1.4/module/particles/include/autogen/AttractorFieldSamplerEffect.h deleted file mode 100644 index 45856b33..00000000 --- a/APEX_1.4/module/particles/include/autogen/AttractorFieldSamplerEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_AttractorFieldSamplerEffect_h -#define HEADER_AttractorFieldSamplerEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace AttractorFieldSamplerEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* AttractorFieldSampler; - -}; - -static const uint32_t checksum[] = { 0x360b5cf0, 0x2facb742, 0x97891fde, 0xc949869a, }; - -} // namespace AttractorFieldSamplerEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class AttractorFieldSamplerEffect : public NvParameterized::NvParameters, public AttractorFieldSamplerEffectNS::ParametersStruct -{ -public: - AttractorFieldSamplerEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~AttractorFieldSamplerEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("AttractorFieldSamplerEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(AttractorFieldSamplerEffectNS::checksum); - return AttractorFieldSamplerEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const AttractorFieldSamplerEffectNS::ParametersStruct& parameters(void) const - { - AttractorFieldSamplerEffect* tmpThis = const_cast<AttractorFieldSamplerEffect*>(this); - return *(static_cast<AttractorFieldSamplerEffectNS::ParametersStruct*>(tmpThis)); - } - - AttractorFieldSamplerEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<AttractorFieldSamplerEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class AttractorFieldSamplerEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - AttractorFieldSamplerEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(AttractorFieldSamplerEffect), AttractorFieldSamplerEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, AttractorFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class AttractorFieldSamplerEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(AttractorFieldSamplerEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, AttractorFieldSamplerEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, AttractorFieldSamplerEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, AttractorFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class AttractorFieldSamplerEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of AttractorFieldSamplerEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (AttractorFieldSamplerEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (AttractorFieldSamplerEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (AttractorFieldSamplerEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (AttractorFieldSamplerEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (AttractorFieldSamplerEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EffectPackageActorParams.h b/APEX_1.4/module/particles/include/autogen/EffectPackageActorParams.h deleted file mode 100644 index 1ea8d499..00000000 --- a/APEX_1.4/module/particles/include/autogen/EffectPackageActorParams.h +++ /dev/null @@ -1,232 +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 - - -#ifndef HEADER_EffectPackageActorParams_h -#define HEADER_EffectPackageActorParams_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EffectPackageActorParamsNS -{ - - - -struct ParametersStruct -{ - - physx::PxTransform InitialPose; - float objectScale; - bool Enabled; - -}; - -static const uint32_t checksum[] = { 0xb5e9f529, 0x94a2ff3d, 0x5955c2b8, 0x14b06ba4, }; - -} // namespace EffectPackageActorParamsNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EffectPackageActorParams : public NvParameterized::NvParameters, public EffectPackageActorParamsNS::ParametersStruct -{ -public: - EffectPackageActorParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EffectPackageActorParams(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EffectPackageActorParams"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EffectPackageActorParamsNS::checksum); - return EffectPackageActorParamsNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EffectPackageActorParamsNS::ParametersStruct& parameters(void) const - { - EffectPackageActorParams* tmpThis = const_cast<EffectPackageActorParams*>(this); - return *(static_cast<EffectPackageActorParamsNS::ParametersStruct*>(tmpThis)); - } - - EffectPackageActorParamsNS::ParametersStruct& parameters(void) - { - return *(static_cast<EffectPackageActorParamsNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EffectPackageActorParamsFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EffectPackageActorParams::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EffectPackageActorParams), EffectPackageActorParams::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EffectPackageActorParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageActorParams"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EffectPackageActorParams)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EffectPackageActorParams)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EffectPackageActorParams::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EffectPackageActorParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageActorParams"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EffectPackageActorParams here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EffectPackageActorParams*)bufObj; - } - - virtual const char* getClassName() - { - return (EffectPackageActorParams::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EffectPackageActorParams::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EffectPackageActorParams::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EffectPackageActorParams::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EffectPackageAssetParams.h b/APEX_1.4/module/particles/include/autogen/EffectPackageAssetParams.h deleted file mode 100644 index e23bf878..00000000 --- a/APEX_1.4/module/particles/include/autogen/EffectPackageAssetParams.h +++ /dev/null @@ -1,298 +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 - - -#ifndef HEADER_EffectPackageAssetParams_h -#define HEADER_EffectPackageAssetParams_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EffectPackageAssetParamsNS -{ - -struct ControlPoint_Type; -struct EffectPath_Type; -struct LevelOfDetailSettings_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct REF_DynamicArray1D_Type -{ - NvParameterized::Interface** buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_Type -{ - float x; - float y; -}; -struct LevelOfDetailSettings_Type -{ - bool UniqueRenderVolume; - float FadeDistanceBegin; - float FadeDistanceEnd; - bool RandomizeEmitterRate; - float FadeOutRate; - bool CullByDistance; - bool CullOffScreen; - float OffScreenCullTime; - float NonVisibleDeleteTime; - float ScreenCullSize; - float ScreenCullDistance; - bool FadeEmitterRate; - bool FadeAttractorFieldStrength; - bool FadeJetFieldStrength; - bool FadeTurbulenceVelocity; - bool FadeTurbulenceNoise; - bool FadeTurbulenceExternalVelocity; - bool FadeTurbulenceVelocityWeight; - bool FadeHeatSourceTemperature; - bool FadeForceFieldStrength; - bool FadeForceFieldScale; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; - -struct ParametersStruct -{ - - LevelOfDetailSettings_Type LODSettings; - EffectPath_Type Path; - REF_DynamicArray1D_Type Effects; - NvParameterized::DummyStringStruct toolString; - -}; - -static const uint32_t checksum[] = { 0xdfc6da4d, 0xdcc561ad, 0x411cf278, 0x3bdc08bc, }; - -} // namespace EffectPackageAssetParamsNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EffectPackageAssetParams : public NvParameterized::NvParameters, public EffectPackageAssetParamsNS::ParametersStruct -{ -public: - EffectPackageAssetParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EffectPackageAssetParams(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EffectPackageAssetParams"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)1; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EffectPackageAssetParamsNS::checksum); - return EffectPackageAssetParamsNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EffectPackageAssetParamsNS::ParametersStruct& parameters(void) const - { - EffectPackageAssetParams* tmpThis = const_cast<EffectPackageAssetParams*>(this); - return *(static_cast<EffectPackageAssetParamsNS::ParametersStruct*>(tmpThis)); - } - - EffectPackageAssetParamsNS::ParametersStruct& parameters(void) - { - return *(static_cast<EffectPackageAssetParamsNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EffectPackageAssetParamsFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EffectPackageAssetParams::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EffectPackageAssetParams), EffectPackageAssetParams::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EffectPackageAssetParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageAssetParams"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EffectPackageAssetParams)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EffectPackageAssetParams)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EffectPackageAssetParams::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EffectPackageAssetParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageAssetParams"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EffectPackageAssetParams here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EffectPackageAssetParams*)bufObj; - } - - virtual const char* getClassName() - { - return (EffectPackageAssetParams::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EffectPackageAssetParams::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EffectPackageAssetParams::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EffectPackageAssetParams::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EffectPackageData.h b/APEX_1.4/module/particles/include/autogen/EffectPackageData.h deleted file mode 100644 index bff5bd6d..00000000 --- a/APEX_1.4/module/particles/include/autogen/EffectPackageData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_EffectPackageData_h -#define HEADER_EffectPackageData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EffectPackageDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* EffectPackage; - -}; - -static const uint32_t checksum[] = { 0x5f619c90, 0xacc5a650, 0x66393099, 0x47b4a900, }; - -} // namespace EffectPackageDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EffectPackageData : public NvParameterized::NvParameters, public EffectPackageDataNS::ParametersStruct -{ -public: - EffectPackageData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EffectPackageData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EffectPackageData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EffectPackageDataNS::checksum); - return EffectPackageDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EffectPackageDataNS::ParametersStruct& parameters(void) const - { - EffectPackageData* tmpThis = const_cast<EffectPackageData*>(this); - return *(static_cast<EffectPackageDataNS::ParametersStruct*>(tmpThis)); - } - - EffectPackageDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<EffectPackageDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EffectPackageDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EffectPackageData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EffectPackageData), EffectPackageData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EffectPackageData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EffectPackageData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EffectPackageData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EffectPackageData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EffectPackageData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EffectPackageData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EffectPackageData*)bufObj; - } - - virtual const char* getClassName() - { - return (EffectPackageData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EffectPackageData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EffectPackageData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EffectPackageData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EffectPackageDatabaseParams.h b/APEX_1.4/module/particles/include/autogen/EffectPackageDatabaseParams.h deleted file mode 100644 index 0a3a674e..00000000 --- a/APEX_1.4/module/particles/include/autogen/EffectPackageDatabaseParams.h +++ /dev/null @@ -1,238 +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 - - -#ifndef HEADER_EffectPackageDatabaseParams_h -#define HEADER_EffectPackageDatabaseParams_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EffectPackageDatabaseParamsNS -{ - - -struct REF_DynamicArray1D_Type -{ - NvParameterized::Interface** buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - - -struct ParametersStruct -{ - - REF_DynamicArray1D_Type EffectPackages; - -}; - -static const uint32_t checksum[] = { 0xce64f369, 0x2fc860a4, 0x3c19c701, 0xcc66c5b3, }; - -} // namespace EffectPackageDatabaseParamsNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EffectPackageDatabaseParams : public NvParameterized::NvParameters, public EffectPackageDatabaseParamsNS::ParametersStruct -{ -public: - EffectPackageDatabaseParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EffectPackageDatabaseParams(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EffectPackageDatabaseParams"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)1; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EffectPackageDatabaseParamsNS::checksum); - return EffectPackageDatabaseParamsNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EffectPackageDatabaseParamsNS::ParametersStruct& parameters(void) const - { - EffectPackageDatabaseParams* tmpThis = const_cast<EffectPackageDatabaseParams*>(this); - return *(static_cast<EffectPackageDatabaseParamsNS::ParametersStruct*>(tmpThis)); - } - - EffectPackageDatabaseParamsNS::ParametersStruct& parameters(void) - { - return *(static_cast<EffectPackageDatabaseParamsNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EffectPackageDatabaseParamsFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EffectPackageDatabaseParams::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EffectPackageDatabaseParams), EffectPackageDatabaseParams::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EffectPackageDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageDatabaseParams"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EffectPackageDatabaseParams)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EffectPackageDatabaseParams)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EffectPackageDatabaseParams::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EffectPackageDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageDatabaseParams"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EffectPackageDatabaseParams here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EffectPackageDatabaseParams*)bufObj; - } - - virtual const char* getClassName() - { - return (EffectPackageDatabaseParams::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EffectPackageDatabaseParams::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EffectPackageDatabaseParams::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EffectPackageDatabaseParams::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EffectPackageEmitterDatabaseParams.h b/APEX_1.4/module/particles/include/autogen/EffectPackageEmitterDatabaseParams.h deleted file mode 100644 index 01278e96..00000000 --- a/APEX_1.4/module/particles/include/autogen/EffectPackageEmitterDatabaseParams.h +++ /dev/null @@ -1,238 +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 - - -#ifndef HEADER_EffectPackageEmitterDatabaseParams_h -#define HEADER_EffectPackageEmitterDatabaseParams_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EffectPackageEmitterDatabaseParamsNS -{ - - -struct REF_DynamicArray1D_Type -{ - NvParameterized::Interface** buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - - -struct ParametersStruct -{ - - REF_DynamicArray1D_Type Emitters; - -}; - -static const uint32_t checksum[] = { 0x03542e55, 0x98562f65, 0x397b5760, 0xc62eb3f2, }; - -} // namespace EffectPackageEmitterDatabaseParamsNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EffectPackageEmitterDatabaseParams : public NvParameterized::NvParameters, public EffectPackageEmitterDatabaseParamsNS::ParametersStruct -{ -public: - EffectPackageEmitterDatabaseParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EffectPackageEmitterDatabaseParams(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EffectPackageEmitterDatabaseParams"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EffectPackageEmitterDatabaseParamsNS::checksum); - return EffectPackageEmitterDatabaseParamsNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EffectPackageEmitterDatabaseParamsNS::ParametersStruct& parameters(void) const - { - EffectPackageEmitterDatabaseParams* tmpThis = const_cast<EffectPackageEmitterDatabaseParams*>(this); - return *(static_cast<EffectPackageEmitterDatabaseParamsNS::ParametersStruct*>(tmpThis)); - } - - EffectPackageEmitterDatabaseParamsNS::ParametersStruct& parameters(void) - { - return *(static_cast<EffectPackageEmitterDatabaseParamsNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EffectPackageEmitterDatabaseParamsFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EffectPackageEmitterDatabaseParams::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EffectPackageEmitterDatabaseParams), EffectPackageEmitterDatabaseParams::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EffectPackageEmitterDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageEmitterDatabaseParams"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EffectPackageEmitterDatabaseParams)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EffectPackageEmitterDatabaseParams)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EffectPackageEmitterDatabaseParams::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EffectPackageEmitterDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageEmitterDatabaseParams"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EffectPackageEmitterDatabaseParams here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EffectPackageEmitterDatabaseParams*)bufObj; - } - - virtual const char* getClassName() - { - return (EffectPackageEmitterDatabaseParams::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EffectPackageEmitterDatabaseParams::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EffectPackageEmitterDatabaseParams::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EffectPackageEmitterDatabaseParams::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EffectPackageFieldSamplerDatabaseParams.h b/APEX_1.4/module/particles/include/autogen/EffectPackageFieldSamplerDatabaseParams.h deleted file mode 100644 index 6248964f..00000000 --- a/APEX_1.4/module/particles/include/autogen/EffectPackageFieldSamplerDatabaseParams.h +++ /dev/null @@ -1,238 +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 - - -#ifndef HEADER_EffectPackageFieldSamplerDatabaseParams_h -#define HEADER_EffectPackageFieldSamplerDatabaseParams_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EffectPackageFieldSamplerDatabaseParamsNS -{ - - -struct REF_DynamicArray1D_Type -{ - NvParameterized::Interface** buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - - -struct ParametersStruct -{ - - REF_DynamicArray1D_Type FieldSamplers; - -}; - -static const uint32_t checksum[] = { 0x25f62eeb, 0xf4cccc87, 0xdcd32c61, 0x8fe20316, }; - -} // namespace EffectPackageFieldSamplerDatabaseParamsNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EffectPackageFieldSamplerDatabaseParams : public NvParameterized::NvParameters, public EffectPackageFieldSamplerDatabaseParamsNS::ParametersStruct -{ -public: - EffectPackageFieldSamplerDatabaseParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EffectPackageFieldSamplerDatabaseParams(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EffectPackageFieldSamplerDatabaseParams"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EffectPackageFieldSamplerDatabaseParamsNS::checksum); - return EffectPackageFieldSamplerDatabaseParamsNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EffectPackageFieldSamplerDatabaseParamsNS::ParametersStruct& parameters(void) const - { - EffectPackageFieldSamplerDatabaseParams* tmpThis = const_cast<EffectPackageFieldSamplerDatabaseParams*>(this); - return *(static_cast<EffectPackageFieldSamplerDatabaseParamsNS::ParametersStruct*>(tmpThis)); - } - - EffectPackageFieldSamplerDatabaseParamsNS::ParametersStruct& parameters(void) - { - return *(static_cast<EffectPackageFieldSamplerDatabaseParamsNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EffectPackageFieldSamplerDatabaseParamsFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EffectPackageFieldSamplerDatabaseParams::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EffectPackageFieldSamplerDatabaseParams), EffectPackageFieldSamplerDatabaseParams::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EffectPackageFieldSamplerDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageFieldSamplerDatabaseParams"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EffectPackageFieldSamplerDatabaseParams)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EffectPackageFieldSamplerDatabaseParams)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EffectPackageFieldSamplerDatabaseParams::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EffectPackageFieldSamplerDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageFieldSamplerDatabaseParams"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EffectPackageFieldSamplerDatabaseParams here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EffectPackageFieldSamplerDatabaseParams*)bufObj; - } - - virtual const char* getClassName() - { - return (EffectPackageFieldSamplerDatabaseParams::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EffectPackageFieldSamplerDatabaseParams::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EffectPackageFieldSamplerDatabaseParams::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EffectPackageFieldSamplerDatabaseParams::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EffectPackageGraphicsMaterialsParams.h b/APEX_1.4/module/particles/include/autogen/EffectPackageGraphicsMaterialsParams.h deleted file mode 100644 index 868b861b..00000000 --- a/APEX_1.4/module/particles/include/autogen/EffectPackageGraphicsMaterialsParams.h +++ /dev/null @@ -1,238 +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 - - -#ifndef HEADER_EffectPackageGraphicsMaterialsParams_h -#define HEADER_EffectPackageGraphicsMaterialsParams_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EffectPackageGraphicsMaterialsParamsNS -{ - - -struct REF_DynamicArray1D_Type -{ - NvParameterized::Interface** buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - - -struct ParametersStruct -{ - - REF_DynamicArray1D_Type GraphicsMaterials; - -}; - -static const uint32_t checksum[] = { 0x2d879f87, 0x7b8f475b, 0xd42bfe31, 0x27efcd68, }; - -} // namespace EffectPackageGraphicsMaterialsParamsNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EffectPackageGraphicsMaterialsParams : public NvParameterized::NvParameters, public EffectPackageGraphicsMaterialsParamsNS::ParametersStruct -{ -public: - EffectPackageGraphicsMaterialsParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EffectPackageGraphicsMaterialsParams(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EffectPackageGraphicsMaterialsParams"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EffectPackageGraphicsMaterialsParamsNS::checksum); - return EffectPackageGraphicsMaterialsParamsNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EffectPackageGraphicsMaterialsParamsNS::ParametersStruct& parameters(void) const - { - EffectPackageGraphicsMaterialsParams* tmpThis = const_cast<EffectPackageGraphicsMaterialsParams*>(this); - return *(static_cast<EffectPackageGraphicsMaterialsParamsNS::ParametersStruct*>(tmpThis)); - } - - EffectPackageGraphicsMaterialsParamsNS::ParametersStruct& parameters(void) - { - return *(static_cast<EffectPackageGraphicsMaterialsParamsNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EffectPackageGraphicsMaterialsParamsFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EffectPackageGraphicsMaterialsParams::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EffectPackageGraphicsMaterialsParams), EffectPackageGraphicsMaterialsParams::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EffectPackageGraphicsMaterialsParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageGraphicsMaterialsParams"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EffectPackageGraphicsMaterialsParams)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EffectPackageGraphicsMaterialsParams)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EffectPackageGraphicsMaterialsParams::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EffectPackageGraphicsMaterialsParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageGraphicsMaterialsParams"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EffectPackageGraphicsMaterialsParams here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EffectPackageGraphicsMaterialsParams*)bufObj; - } - - virtual const char* getClassName() - { - return (EffectPackageGraphicsMaterialsParams::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EffectPackageGraphicsMaterialsParams::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EffectPackageGraphicsMaterialsParams::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EffectPackageGraphicsMaterialsParams::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EffectPackageIOFXDatabaseParams.h b/APEX_1.4/module/particles/include/autogen/EffectPackageIOFXDatabaseParams.h deleted file mode 100644 index 0f778a42..00000000 --- a/APEX_1.4/module/particles/include/autogen/EffectPackageIOFXDatabaseParams.h +++ /dev/null @@ -1,238 +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 - - -#ifndef HEADER_EffectPackageIOFXDatabaseParams_h -#define HEADER_EffectPackageIOFXDatabaseParams_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EffectPackageIOFXDatabaseParamsNS -{ - - -struct REF_DynamicArray1D_Type -{ - NvParameterized::Interface** buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - - -struct ParametersStruct -{ - - REF_DynamicArray1D_Type GraphicsEffects; - -}; - -static const uint32_t checksum[] = { 0x012bd755, 0x3845c426, 0x155f44aa, 0xeba55527, }; - -} // namespace EffectPackageIOFXDatabaseParamsNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EffectPackageIOFXDatabaseParams : public NvParameterized::NvParameters, public EffectPackageIOFXDatabaseParamsNS::ParametersStruct -{ -public: - EffectPackageIOFXDatabaseParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EffectPackageIOFXDatabaseParams(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EffectPackageIOFXDatabaseParams"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EffectPackageIOFXDatabaseParamsNS::checksum); - return EffectPackageIOFXDatabaseParamsNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EffectPackageIOFXDatabaseParamsNS::ParametersStruct& parameters(void) const - { - EffectPackageIOFXDatabaseParams* tmpThis = const_cast<EffectPackageIOFXDatabaseParams*>(this); - return *(static_cast<EffectPackageIOFXDatabaseParamsNS::ParametersStruct*>(tmpThis)); - } - - EffectPackageIOFXDatabaseParamsNS::ParametersStruct& parameters(void) - { - return *(static_cast<EffectPackageIOFXDatabaseParamsNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EffectPackageIOFXDatabaseParamsFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EffectPackageIOFXDatabaseParams::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EffectPackageIOFXDatabaseParams), EffectPackageIOFXDatabaseParams::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EffectPackageIOFXDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageIOFXDatabaseParams"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EffectPackageIOFXDatabaseParams)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EffectPackageIOFXDatabaseParams)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EffectPackageIOFXDatabaseParams::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EffectPackageIOFXDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageIOFXDatabaseParams"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EffectPackageIOFXDatabaseParams here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EffectPackageIOFXDatabaseParams*)bufObj; - } - - virtual const char* getClassName() - { - return (EffectPackageIOFXDatabaseParams::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EffectPackageIOFXDatabaseParams::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EffectPackageIOFXDatabaseParams::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EffectPackageIOFXDatabaseParams::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EffectPackageIOSDatabaseParams.h b/APEX_1.4/module/particles/include/autogen/EffectPackageIOSDatabaseParams.h deleted file mode 100644 index 9e89b754..00000000 --- a/APEX_1.4/module/particles/include/autogen/EffectPackageIOSDatabaseParams.h +++ /dev/null @@ -1,238 +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 - - -#ifndef HEADER_EffectPackageIOSDatabaseParams_h -#define HEADER_EffectPackageIOSDatabaseParams_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EffectPackageIOSDatabaseParamsNS -{ - - -struct REF_DynamicArray1D_Type -{ - NvParameterized::Interface** buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - - -struct ParametersStruct -{ - - REF_DynamicArray1D_Type ParticleSimulations; - -}; - -static const uint32_t checksum[] = { 0x82cbc94b, 0xb6f4c8a5, 0x5a46ce63, 0x4663e5ca, }; - -} // namespace EffectPackageIOSDatabaseParamsNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EffectPackageIOSDatabaseParams : public NvParameterized::NvParameters, public EffectPackageIOSDatabaseParamsNS::ParametersStruct -{ -public: - EffectPackageIOSDatabaseParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EffectPackageIOSDatabaseParams(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EffectPackageIOSDatabaseParams"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EffectPackageIOSDatabaseParamsNS::checksum); - return EffectPackageIOSDatabaseParamsNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EffectPackageIOSDatabaseParamsNS::ParametersStruct& parameters(void) const - { - EffectPackageIOSDatabaseParams* tmpThis = const_cast<EffectPackageIOSDatabaseParams*>(this); - return *(static_cast<EffectPackageIOSDatabaseParamsNS::ParametersStruct*>(tmpThis)); - } - - EffectPackageIOSDatabaseParamsNS::ParametersStruct& parameters(void) - { - return *(static_cast<EffectPackageIOSDatabaseParamsNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EffectPackageIOSDatabaseParamsFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EffectPackageIOSDatabaseParams::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EffectPackageIOSDatabaseParams), EffectPackageIOSDatabaseParams::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EffectPackageIOSDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageIOSDatabaseParams"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EffectPackageIOSDatabaseParams)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EffectPackageIOSDatabaseParams)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EffectPackageIOSDatabaseParams::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EffectPackageIOSDatabaseParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EffectPackageIOSDatabaseParams"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EffectPackageIOSDatabaseParams here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EffectPackageIOSDatabaseParams*)bufObj; - } - - virtual const char* getClassName() - { - return (EffectPackageIOSDatabaseParams::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EffectPackageIOSDatabaseParams::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EffectPackageIOSDatabaseParams::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EffectPackageIOSDatabaseParams::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EmitterData.h b/APEX_1.4/module/particles/include/autogen/EmitterData.h deleted file mode 100644 index 7833a2ff..00000000 --- a/APEX_1.4/module/particles/include/autogen/EmitterData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_EmitterData_h -#define HEADER_EmitterData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EmitterDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* Emitter; - -}; - -static const uint32_t checksum[] = { 0xeb7077c8, 0xa36b4a9f, 0x9095c1de, 0xc60abbf7, }; - -} // namespace EmitterDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EmitterData : public NvParameterized::NvParameters, public EmitterDataNS::ParametersStruct -{ -public: - EmitterData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EmitterData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EmitterData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EmitterDataNS::checksum); - return EmitterDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EmitterDataNS::ParametersStruct& parameters(void) const - { - EmitterData* tmpThis = const_cast<EmitterData*>(this); - return *(static_cast<EmitterDataNS::ParametersStruct*>(tmpThis)); - } - - EmitterDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<EmitterDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EmitterDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EmitterData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EmitterData), EmitterData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EmitterData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EmitterData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EmitterData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EmitterData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EmitterData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EmitterData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EmitterData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EmitterData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EmitterData*)bufObj; - } - - virtual const char* getClassName() - { - return (EmitterData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EmitterData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EmitterData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EmitterData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/EmitterEffect.h b/APEX_1.4/module/particles/include/autogen/EmitterEffect.h deleted file mode 100644 index 50f8916f..00000000 --- a/APEX_1.4/module/particles/include/autogen/EmitterEffect.h +++ /dev/null @@ -1,307 +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 - - -#ifndef HEADER_EmitterEffect_h -#define HEADER_EmitterEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace EmitterEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; -struct EmitterVelocityAdjust_Type; -struct EmitterVelocityProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct EmitterVelocityAdjust_Type -{ - bool AdjustEnabled; - float VelocityLow; - float VelocityHigh; - float LowValue; - float HighValue; -}; -struct EmitterVelocityProperties_Type -{ - EmitterVelocityAdjust_Type AdjustLifetime; - EmitterVelocityAdjust_Type AdjustEmitterRate; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - EmitterVelocityProperties_Type EmitterVelocityChanges; - NvParameterized::Interface* Emitter; - -}; - -static const uint32_t checksum[] = { 0x6625c413, 0xed57cae4, 0x3c9d8836, 0xf4105a87, }; - -} // namespace EmitterEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class EmitterEffect : public NvParameterized::NvParameters, public EmitterEffectNS::ParametersStruct -{ -public: - EmitterEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~EmitterEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("EmitterEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(EmitterEffectNS::checksum); - return EmitterEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const EmitterEffectNS::ParametersStruct& parameters(void) const - { - EmitterEffect* tmpThis = const_cast<EmitterEffect*>(this); - return *(static_cast<EmitterEffectNS::ParametersStruct*>(tmpThis)); - } - - EmitterEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<EmitterEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class EmitterEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - EmitterEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(EmitterEffect), EmitterEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, EmitterEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EmitterEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(EmitterEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, EmitterEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, EmitterEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, EmitterEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class EmitterEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of EmitterEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (EmitterEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (EmitterEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (EmitterEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (EmitterEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (EmitterEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/FlameEmitterData.h b/APEX_1.4/module/particles/include/autogen/FlameEmitterData.h deleted file mode 100644 index 863eb4f3..00000000 --- a/APEX_1.4/module/particles/include/autogen/FlameEmitterData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_FlameEmitterData_h -#define HEADER_FlameEmitterData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace FlameEmitterDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* FlameEmitter; - -}; - -static const uint32_t checksum[] = { 0x90a03422, 0x50c8e759, 0xf9df589f, 0x56836e65, }; - -} // namespace FlameEmitterDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class FlameEmitterData : public NvParameterized::NvParameters, public FlameEmitterDataNS::ParametersStruct -{ -public: - FlameEmitterData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~FlameEmitterData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("FlameEmitterData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(FlameEmitterDataNS::checksum); - return FlameEmitterDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const FlameEmitterDataNS::ParametersStruct& parameters(void) const - { - FlameEmitterData* tmpThis = const_cast<FlameEmitterData*>(this); - return *(static_cast<FlameEmitterDataNS::ParametersStruct*>(tmpThis)); - } - - FlameEmitterDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<FlameEmitterDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class FlameEmitterDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - FlameEmitterData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(FlameEmitterData), FlameEmitterData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, FlameEmitterData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class FlameEmitterData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(FlameEmitterData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, FlameEmitterData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, FlameEmitterData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, FlameEmitterData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class FlameEmitterData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of FlameEmitterData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (FlameEmitterData*)bufObj; - } - - virtual const char* getClassName() - { - return (FlameEmitterData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (FlameEmitterData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (FlameEmitterData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (FlameEmitterData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/FlameEmitterEffect.h b/APEX_1.4/module/particles/include/autogen/FlameEmitterEffect.h deleted file mode 100644 index 2fdcd943..00000000 --- a/APEX_1.4/module/particles/include/autogen/FlameEmitterEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_FlameEmitterEffect_h -#define HEADER_FlameEmitterEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace FlameEmitterEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* FlameEmitter; - -}; - -static const uint32_t checksum[] = { 0xb3b9f3eb, 0xe8fbc19a, 0xb1474af1, 0xf5ede5b6, }; - -} // namespace FlameEmitterEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class FlameEmitterEffect : public NvParameterized::NvParameters, public FlameEmitterEffectNS::ParametersStruct -{ -public: - FlameEmitterEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~FlameEmitterEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("FlameEmitterEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(FlameEmitterEffectNS::checksum); - return FlameEmitterEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const FlameEmitterEffectNS::ParametersStruct& parameters(void) const - { - FlameEmitterEffect* tmpThis = const_cast<FlameEmitterEffect*>(this); - return *(static_cast<FlameEmitterEffectNS::ParametersStruct*>(tmpThis)); - } - - FlameEmitterEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<FlameEmitterEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class FlameEmitterEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - FlameEmitterEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(FlameEmitterEffect), FlameEmitterEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, FlameEmitterEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class FlameEmitterEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(FlameEmitterEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, FlameEmitterEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, FlameEmitterEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, FlameEmitterEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class FlameEmitterEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of FlameEmitterEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (FlameEmitterEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (FlameEmitterEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (FlameEmitterEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (FlameEmitterEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (FlameEmitterEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/ForceFieldData.h b/APEX_1.4/module/particles/include/autogen/ForceFieldData.h deleted file mode 100644 index 0e081b37..00000000 --- a/APEX_1.4/module/particles/include/autogen/ForceFieldData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_ForceFieldData_h -#define HEADER_ForceFieldData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace ForceFieldDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* ForceField; - -}; - -static const uint32_t checksum[] = { 0x0c7aa318, 0x555a616b, 0x584651f3, 0xec048707, }; - -} // namespace ForceFieldDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class ForceFieldData : public NvParameterized::NvParameters, public ForceFieldDataNS::ParametersStruct -{ -public: - ForceFieldData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~ForceFieldData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("ForceFieldData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(ForceFieldDataNS::checksum); - return ForceFieldDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const ForceFieldDataNS::ParametersStruct& parameters(void) const - { - ForceFieldData* tmpThis = const_cast<ForceFieldData*>(this); - return *(static_cast<ForceFieldDataNS::ParametersStruct*>(tmpThis)); - } - - ForceFieldDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<ForceFieldDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class ForceFieldDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - ForceFieldData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(ForceFieldData), ForceFieldData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, ForceFieldData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ForceFieldData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(ForceFieldData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, ForceFieldData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, ForceFieldData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, ForceFieldData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ForceFieldData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of ForceFieldData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (ForceFieldData*)bufObj; - } - - virtual const char* getClassName() - { - return (ForceFieldData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (ForceFieldData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (ForceFieldData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (ForceFieldData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/ForceFieldEffect.h b/APEX_1.4/module/particles/include/autogen/ForceFieldEffect.h deleted file mode 100644 index 86d18114..00000000 --- a/APEX_1.4/module/particles/include/autogen/ForceFieldEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_ForceFieldEffect_h -#define HEADER_ForceFieldEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace ForceFieldEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* ForceField; - -}; - -static const uint32_t checksum[] = { 0x2b5fd898, 0x8edc0468, 0x993e03e6, 0x7223fc69, }; - -} // namespace ForceFieldEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class ForceFieldEffect : public NvParameterized::NvParameters, public ForceFieldEffectNS::ParametersStruct -{ -public: - ForceFieldEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~ForceFieldEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("ForceFieldEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(ForceFieldEffectNS::checksum); - return ForceFieldEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const ForceFieldEffectNS::ParametersStruct& parameters(void) const - { - ForceFieldEffect* tmpThis = const_cast<ForceFieldEffect*>(this); - return *(static_cast<ForceFieldEffectNS::ParametersStruct*>(tmpThis)); - } - - ForceFieldEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<ForceFieldEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class ForceFieldEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - ForceFieldEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(ForceFieldEffect), ForceFieldEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, ForceFieldEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ForceFieldEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(ForceFieldEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, ForceFieldEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, ForceFieldEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, ForceFieldEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ForceFieldEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of ForceFieldEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (ForceFieldEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (ForceFieldEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (ForceFieldEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (ForceFieldEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (ForceFieldEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/GraphicsEffectData.h b/APEX_1.4/module/particles/include/autogen/GraphicsEffectData.h deleted file mode 100644 index 85bf8bad..00000000 --- a/APEX_1.4/module/particles/include/autogen/GraphicsEffectData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_GraphicsEffectData_h -#define HEADER_GraphicsEffectData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace GraphicsEffectDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* IOFX; - -}; - -static const uint32_t checksum[] = { 0xe35d59af, 0xb5a73c73, 0x8c86843a, 0x40cac44d, }; - -} // namespace GraphicsEffectDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class GraphicsEffectData : public NvParameterized::NvParameters, public GraphicsEffectDataNS::ParametersStruct -{ -public: - GraphicsEffectData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~GraphicsEffectData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("GraphicsEffectData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(GraphicsEffectDataNS::checksum); - return GraphicsEffectDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const GraphicsEffectDataNS::ParametersStruct& parameters(void) const - { - GraphicsEffectData* tmpThis = const_cast<GraphicsEffectData*>(this); - return *(static_cast<GraphicsEffectDataNS::ParametersStruct*>(tmpThis)); - } - - GraphicsEffectDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<GraphicsEffectDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class GraphicsEffectDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - GraphicsEffectData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(GraphicsEffectData), GraphicsEffectData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, GraphicsEffectData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class GraphicsEffectData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(GraphicsEffectData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, GraphicsEffectData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, GraphicsEffectData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, GraphicsEffectData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class GraphicsEffectData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of GraphicsEffectData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (GraphicsEffectData*)bufObj; - } - - virtual const char* getClassName() - { - return (GraphicsEffectData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (GraphicsEffectData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (GraphicsEffectData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (GraphicsEffectData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/GraphicsMaterialData.h b/APEX_1.4/module/particles/include/autogen/GraphicsMaterialData.h deleted file mode 100644 index b1f49747..00000000 --- a/APEX_1.4/module/particles/include/autogen/GraphicsMaterialData.h +++ /dev/null @@ -1,252 +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 - - -#ifndef HEADER_GraphicsMaterialData_h -#define HEADER_GraphicsMaterialData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace GraphicsMaterialDataNS -{ - -struct FrustumPSM_Type; - -struct FrustumPSM_Type -{ - bool ShowFrustum; - float FrustumDepth; - float FrustumSize; -}; - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::DummyStringStruct ApplicationMaterialName; - NvParameterized::DummyStringStruct UserProperties; - const char* RenderTechnique; - NvParameterized::DummyStringStruct DiffuseTexture; - uint32_t CellColumn; - uint32_t CellRow; - uint32_t CellCount; - bool CrossBlend; - float ColorMultiplier; - bool UsePSM; - const char* Resolution; - uint32_t FullResPercent; - uint32_t HalfResPercent; - float PSM_ShadowBias; - FrustumPSM_Type PSM_Frustum; - -}; - -static const uint32_t checksum[] = { 0xbf6d3670, 0xa7e5523c, 0xb276fd23, 0x81d15eb6, }; - -} // namespace GraphicsMaterialDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class GraphicsMaterialData : public NvParameterized::NvParameters, public GraphicsMaterialDataNS::ParametersStruct -{ -public: - GraphicsMaterialData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~GraphicsMaterialData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("GraphicsMaterialData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)4; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(GraphicsMaterialDataNS::checksum); - return GraphicsMaterialDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const GraphicsMaterialDataNS::ParametersStruct& parameters(void) const - { - GraphicsMaterialData* tmpThis = const_cast<GraphicsMaterialData*>(this); - return *(static_cast<GraphicsMaterialDataNS::ParametersStruct*>(tmpThis)); - } - - GraphicsMaterialDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<GraphicsMaterialDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class GraphicsMaterialDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - GraphicsMaterialData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(GraphicsMaterialData), GraphicsMaterialData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, GraphicsMaterialData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class GraphicsMaterialData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(GraphicsMaterialData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, GraphicsMaterialData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, GraphicsMaterialData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, GraphicsMaterialData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class GraphicsMaterialData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of GraphicsMaterialData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (GraphicsMaterialData*)bufObj; - } - - virtual const char* getClassName() - { - return (GraphicsMaterialData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (GraphicsMaterialData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (GraphicsMaterialData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (GraphicsMaterialData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/HeatSourceData.h b/APEX_1.4/module/particles/include/autogen/HeatSourceData.h deleted file mode 100644 index 94a9cbaf..00000000 --- a/APEX_1.4/module/particles/include/autogen/HeatSourceData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_HeatSourceData_h -#define HEADER_HeatSourceData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace HeatSourceDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* HeatSource; - -}; - -static const uint32_t checksum[] = { 0x95cb6853, 0x83e850af, 0xe32f27b8, 0xc0ec3b33, }; - -} // namespace HeatSourceDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class HeatSourceData : public NvParameterized::NvParameters, public HeatSourceDataNS::ParametersStruct -{ -public: - HeatSourceData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~HeatSourceData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("HeatSourceData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(HeatSourceDataNS::checksum); - return HeatSourceDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const HeatSourceDataNS::ParametersStruct& parameters(void) const - { - HeatSourceData* tmpThis = const_cast<HeatSourceData*>(this); - return *(static_cast<HeatSourceDataNS::ParametersStruct*>(tmpThis)); - } - - HeatSourceDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<HeatSourceDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class HeatSourceDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - HeatSourceData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(HeatSourceData), HeatSourceData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, HeatSourceData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class HeatSourceData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(HeatSourceData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, HeatSourceData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, HeatSourceData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, HeatSourceData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class HeatSourceData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of HeatSourceData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (HeatSourceData*)bufObj; - } - - virtual const char* getClassName() - { - return (HeatSourceData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (HeatSourceData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (HeatSourceData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (HeatSourceData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/HeatSourceEffect.h b/APEX_1.4/module/particles/include/autogen/HeatSourceEffect.h deleted file mode 100644 index d8a85408..00000000 --- a/APEX_1.4/module/particles/include/autogen/HeatSourceEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_HeatSourceEffect_h -#define HEADER_HeatSourceEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace HeatSourceEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* HeatSource; - -}; - -static const uint32_t checksum[] = { 0x36c6c535, 0xacde2d3c, 0x02d6822e, 0x61a889a1, }; - -} // namespace HeatSourceEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class HeatSourceEffect : public NvParameterized::NvParameters, public HeatSourceEffectNS::ParametersStruct -{ -public: - HeatSourceEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~HeatSourceEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("HeatSourceEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(HeatSourceEffectNS::checksum); - return HeatSourceEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const HeatSourceEffectNS::ParametersStruct& parameters(void) const - { - HeatSourceEffect* tmpThis = const_cast<HeatSourceEffect*>(this); - return *(static_cast<HeatSourceEffectNS::ParametersStruct*>(tmpThis)); - } - - HeatSourceEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<HeatSourceEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class HeatSourceEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - HeatSourceEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(HeatSourceEffect), HeatSourceEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, HeatSourceEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class HeatSourceEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(HeatSourceEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, HeatSourceEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, HeatSourceEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, HeatSourceEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class HeatSourceEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of HeatSourceEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (HeatSourceEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (HeatSourceEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (HeatSourceEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (HeatSourceEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (HeatSourceEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/JetFieldSamplerData.h b/APEX_1.4/module/particles/include/autogen/JetFieldSamplerData.h deleted file mode 100644 index d54063c7..00000000 --- a/APEX_1.4/module/particles/include/autogen/JetFieldSamplerData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_JetFieldSamplerData_h -#define HEADER_JetFieldSamplerData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace JetFieldSamplerDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* JetFieldSampler; - -}; - -static const uint32_t checksum[] = { 0x03f96027, 0x2e12817c, 0xbde0a2fa, 0xc47c7a9d, }; - -} // namespace JetFieldSamplerDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class JetFieldSamplerData : public NvParameterized::NvParameters, public JetFieldSamplerDataNS::ParametersStruct -{ -public: - JetFieldSamplerData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~JetFieldSamplerData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("JetFieldSamplerData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(JetFieldSamplerDataNS::checksum); - return JetFieldSamplerDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const JetFieldSamplerDataNS::ParametersStruct& parameters(void) const - { - JetFieldSamplerData* tmpThis = const_cast<JetFieldSamplerData*>(this); - return *(static_cast<JetFieldSamplerDataNS::ParametersStruct*>(tmpThis)); - } - - JetFieldSamplerDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<JetFieldSamplerDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class JetFieldSamplerDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - JetFieldSamplerData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(JetFieldSamplerData), JetFieldSamplerData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, JetFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class JetFieldSamplerData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(JetFieldSamplerData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, JetFieldSamplerData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, JetFieldSamplerData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, JetFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class JetFieldSamplerData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of JetFieldSamplerData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (JetFieldSamplerData*)bufObj; - } - - virtual const char* getClassName() - { - return (JetFieldSamplerData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (JetFieldSamplerData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (JetFieldSamplerData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (JetFieldSamplerData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/JetFieldSamplerEffect.h b/APEX_1.4/module/particles/include/autogen/JetFieldSamplerEffect.h deleted file mode 100644 index 4823e5e7..00000000 --- a/APEX_1.4/module/particles/include/autogen/JetFieldSamplerEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_JetFieldSamplerEffect_h -#define HEADER_JetFieldSamplerEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace JetFieldSamplerEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* JetFieldSampler; - -}; - -static const uint32_t checksum[] = { 0x7b0238b8, 0xac56941a, 0x7b0fd303, 0x27182e77, }; - -} // namespace JetFieldSamplerEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class JetFieldSamplerEffect : public NvParameterized::NvParameters, public JetFieldSamplerEffectNS::ParametersStruct -{ -public: - JetFieldSamplerEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~JetFieldSamplerEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("JetFieldSamplerEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(JetFieldSamplerEffectNS::checksum); - return JetFieldSamplerEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const JetFieldSamplerEffectNS::ParametersStruct& parameters(void) const - { - JetFieldSamplerEffect* tmpThis = const_cast<JetFieldSamplerEffect*>(this); - return *(static_cast<JetFieldSamplerEffectNS::ParametersStruct*>(tmpThis)); - } - - JetFieldSamplerEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<JetFieldSamplerEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class JetFieldSamplerEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - JetFieldSamplerEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(JetFieldSamplerEffect), JetFieldSamplerEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, JetFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class JetFieldSamplerEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(JetFieldSamplerEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, JetFieldSamplerEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, JetFieldSamplerEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, JetFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class JetFieldSamplerEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of JetFieldSamplerEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (JetFieldSamplerEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (JetFieldSamplerEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (JetFieldSamplerEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (JetFieldSamplerEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (JetFieldSamplerEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/ModuleParticlesRegistration.h b/APEX_1.4/module/particles/include/autogen/ModuleParticlesRegistration.h deleted file mode 100644 index 26d65092..00000000 --- a/APEX_1.4/module/particles/include/autogen/ModuleParticlesRegistration.h +++ /dev/null @@ -1,231 +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. - */ - -#ifndef MODULE_MODULEPARTICLESREGISTRATIONH_H -#define MODULE_MODULEPARTICLESREGISTRATIONH_H - -#include "PsAllocator.h" -#include "NvRegistrationsForTraitsBase.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "PxAssert.h" -#include <stdint.h> - -// INCLUDE GENERATED FACTORIES -#include "EffectPackageActorParams.h" -#include "EffectPackageAssetParams.h" -#include "HeatSourceEffect.h" -#include "EmitterEffect.h" -#include "ForceFieldEffect.h" -#include "TurbulenceFieldSamplerEffect.h" -#include "AttractorFieldSamplerEffect.h" -#include "JetFieldSamplerEffect.h" -#include "NoiseFieldSamplerEffect.h" -#include "VortexFieldSamplerEffect.h" -#include "SubstanceSourceEffect.h" -#include "WindFieldSamplerEffect.h" -#include "RigidBodyEffect.h" -#include "VelocitySourceEffect.h" -#include "FlameEmitterEffect.h" -#include "EffectPackageDatabaseParams.h" -#include "EffectPackageData.h" -#include "ParticlesDebugRenderParams.h" -#include "EffectPackageEmitterDatabaseParams.h" -#include "EmitterData.h" -#include "EffectPackageFieldSamplerDatabaseParams.h" -#include "AttractorFieldSamplerData.h" -#include "HeatSourceData.h" -#include "JetFieldSamplerData.h" -#include "TurbulenceFieldSamplerData.h" -#include "ForceFieldData.h" -#include "NoiseFieldSamplerData.h" -#include "VortexFieldSamplerData.h" -#include "SubstanceSourceData.h" -#include "WindFieldSamplerData.h" -#include "VelocitySourceData.h" -#include "FlameEmitterData.h" -#include "EffectPackageGraphicsMaterialsParams.h" -#include "GraphicsMaterialData.h" -#include "VolumeRenderMaterialData.h" -#include "EffectPackageIOFXDatabaseParams.h" -#include "GraphicsEffectData.h" -#include "EffectPackageIOSDatabaseParams.h" -#include "ParticleSimulationData.h" -#include "ParticlesModuleParameters.h" - - -// INCLUDE GENERATED CONVERSION - - -namespace nvidia { -namespace particles { - - -class ModuleParticlesRegistration : public NvParameterized::RegistrationsForTraitsBase -{ -public: - static void invokeRegistration(NvParameterized::Traits* parameterizedTraits) - { - if (parameterizedTraits) - { - ModuleParticlesRegistration().registerAll(*parameterizedTraits); - } - } - - static void invokeUnregistration(NvParameterized::Traits* parameterizedTraits) - { - if (parameterizedTraits) - { - ModuleParticlesRegistration().unregisterAll(*parameterizedTraits); - } - } - - void registerAvailableFactories(NvParameterized::Traits& parameterizedTraits) - { - ::NvParameterized::Factory* factoriesToRegister[] = { -// REGISTER GENERATED FACTORIES - new nvidia::particles::EffectPackageActorParamsFactory(), - new nvidia::particles::EffectPackageAssetParamsFactory(), - new nvidia::particles::HeatSourceEffectFactory(), - new nvidia::particles::EmitterEffectFactory(), - new nvidia::particles::ForceFieldEffectFactory(), - new nvidia::particles::TurbulenceFieldSamplerEffectFactory(), - new nvidia::particles::AttractorFieldSamplerEffectFactory(), - new nvidia::particles::JetFieldSamplerEffectFactory(), - new nvidia::particles::NoiseFieldSamplerEffectFactory(), - new nvidia::particles::VortexFieldSamplerEffectFactory(), - new nvidia::particles::SubstanceSourceEffectFactory(), - new nvidia::particles::WindFieldSamplerEffectFactory(), - new nvidia::particles::RigidBodyEffectFactory(), - new nvidia::particles::VelocitySourceEffectFactory(), - new nvidia::particles::FlameEmitterEffectFactory(), - new nvidia::particles::EffectPackageDatabaseParamsFactory(), - new nvidia::particles::EffectPackageDataFactory(), - new nvidia::particles::ParticlesDebugRenderParamsFactory(), - new nvidia::particles::EffectPackageEmitterDatabaseParamsFactory(), - new nvidia::particles::EmitterDataFactory(), - new nvidia::particles::EffectPackageFieldSamplerDatabaseParamsFactory(), - new nvidia::particles::AttractorFieldSamplerDataFactory(), - new nvidia::particles::HeatSourceDataFactory(), - new nvidia::particles::JetFieldSamplerDataFactory(), - new nvidia::particles::TurbulenceFieldSamplerDataFactory(), - new nvidia::particles::ForceFieldDataFactory(), - new nvidia::particles::NoiseFieldSamplerDataFactory(), - new nvidia::particles::VortexFieldSamplerDataFactory(), - new nvidia::particles::SubstanceSourceDataFactory(), - new nvidia::particles::WindFieldSamplerDataFactory(), - new nvidia::particles::VelocitySourceDataFactory(), - new nvidia::particles::FlameEmitterDataFactory(), - new nvidia::particles::EffectPackageGraphicsMaterialsParamsFactory(), - new nvidia::particles::GraphicsMaterialDataFactory(), - new nvidia::particles::VolumeRenderMaterialDataFactory(), - new nvidia::particles::EffectPackageIOFXDatabaseParamsFactory(), - new nvidia::particles::GraphicsEffectDataFactory(), - new nvidia::particles::EffectPackageIOSDatabaseParamsFactory(), - new nvidia::particles::ParticleSimulationDataFactory(), - new nvidia::particles::ParticlesModuleParametersFactory(), - - }; - - for (size_t i = 0; i < sizeof(factoriesToRegister)/sizeof(factoriesToRegister[0]); ++i) - { - parameterizedTraits.registerFactory(*factoriesToRegister[i]); - } - } - - virtual void registerAvailableConverters(NvParameterized::Traits& parameterizedTraits) - { -// REGISTER GENERATED CONVERSION -PX_UNUSED(parameterizedTraits); - - } - - void unregisterAvailableFactories(NvParameterized::Traits& parameterizedTraits) - { - struct FactoryDesc - { - const char* name; - uint32_t version; - }; - - ::NvParameterized::Factory* factoriesToUnregister[] = { -// UNREGISTER GENERATED FACTORIES - new nvidia::particles::EffectPackageActorParamsFactory(), - new nvidia::particles::EffectPackageAssetParamsFactory(), - new nvidia::particles::HeatSourceEffectFactory(), - new nvidia::particles::EmitterEffectFactory(), - new nvidia::particles::ForceFieldEffectFactory(), - new nvidia::particles::TurbulenceFieldSamplerEffectFactory(), - new nvidia::particles::AttractorFieldSamplerEffectFactory(), - new nvidia::particles::JetFieldSamplerEffectFactory(), - new nvidia::particles::NoiseFieldSamplerEffectFactory(), - new nvidia::particles::VortexFieldSamplerEffectFactory(), - new nvidia::particles::SubstanceSourceEffectFactory(), - new nvidia::particles::WindFieldSamplerEffectFactory(), - new nvidia::particles::RigidBodyEffectFactory(), - new nvidia::particles::VelocitySourceEffectFactory(), - new nvidia::particles::FlameEmitterEffectFactory(), - new nvidia::particles::EffectPackageDatabaseParamsFactory(), - new nvidia::particles::EffectPackageDataFactory(), - new nvidia::particles::ParticlesDebugRenderParamsFactory(), - new nvidia::particles::EffectPackageEmitterDatabaseParamsFactory(), - new nvidia::particles::EmitterDataFactory(), - new nvidia::particles::EffectPackageFieldSamplerDatabaseParamsFactory(), - new nvidia::particles::AttractorFieldSamplerDataFactory(), - new nvidia::particles::HeatSourceDataFactory(), - new nvidia::particles::JetFieldSamplerDataFactory(), - new nvidia::particles::TurbulenceFieldSamplerDataFactory(), - new nvidia::particles::ForceFieldDataFactory(), - new nvidia::particles::NoiseFieldSamplerDataFactory(), - new nvidia::particles::VortexFieldSamplerDataFactory(), - new nvidia::particles::SubstanceSourceDataFactory(), - new nvidia::particles::WindFieldSamplerDataFactory(), - new nvidia::particles::VelocitySourceDataFactory(), - new nvidia::particles::FlameEmitterDataFactory(), - new nvidia::particles::EffectPackageGraphicsMaterialsParamsFactory(), - new nvidia::particles::GraphicsMaterialDataFactory(), - new nvidia::particles::VolumeRenderMaterialDataFactory(), - new nvidia::particles::EffectPackageIOFXDatabaseParamsFactory(), - new nvidia::particles::GraphicsEffectDataFactory(), - new nvidia::particles::EffectPackageIOSDatabaseParamsFactory(), - new nvidia::particles::ParticleSimulationDataFactory(), - new nvidia::particles::ParticlesModuleParametersFactory(), - - }; - - for (size_t i = 0; i < sizeof(factoriesToUnregister)/sizeof(factoriesToUnregister[0]); ++i) - { - ::NvParameterized::Factory* removedFactory = parameterizedTraits.removeFactory(factoriesToUnregister[i]->getClassName(), factoriesToUnregister[i]->getVersion()); - if (!removedFactory) - { - PX_ASSERT_WITH_MESSAGE(0, "Factory can not be removed!"); - } - else - { - removedFactory->freeParameterDefinitionTable(¶meterizedTraits); - delete removedFactory; - delete factoriesToUnregister[i]; - } - } - } - - virtual void unregisterAvailableConverters(NvParameterized::Traits& parameterizedTraits) - { -// UNREGISTER GENERATED CONVERSION -PX_UNUSED(parameterizedTraits); - - } - -}; - - -} -} //nvidia::particles - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/NoiseFieldSamplerData.h b/APEX_1.4/module/particles/include/autogen/NoiseFieldSamplerData.h deleted file mode 100644 index 4cc74c37..00000000 --- a/APEX_1.4/module/particles/include/autogen/NoiseFieldSamplerData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_NoiseFieldSamplerData_h -#define HEADER_NoiseFieldSamplerData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace NoiseFieldSamplerDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* NoiseFieldSampler; - -}; - -static const uint32_t checksum[] = { 0xbdfbe8fa, 0xb764fe79, 0xb6ab4054, 0x6b459674, }; - -} // namespace NoiseFieldSamplerDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class NoiseFieldSamplerData : public NvParameterized::NvParameters, public NoiseFieldSamplerDataNS::ParametersStruct -{ -public: - NoiseFieldSamplerData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~NoiseFieldSamplerData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("NoiseFieldSamplerData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(NoiseFieldSamplerDataNS::checksum); - return NoiseFieldSamplerDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const NoiseFieldSamplerDataNS::ParametersStruct& parameters(void) const - { - NoiseFieldSamplerData* tmpThis = const_cast<NoiseFieldSamplerData*>(this); - return *(static_cast<NoiseFieldSamplerDataNS::ParametersStruct*>(tmpThis)); - } - - NoiseFieldSamplerDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<NoiseFieldSamplerDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class NoiseFieldSamplerDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - NoiseFieldSamplerData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(NoiseFieldSamplerData), NoiseFieldSamplerData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, NoiseFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class NoiseFieldSamplerData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(NoiseFieldSamplerData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, NoiseFieldSamplerData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, NoiseFieldSamplerData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, NoiseFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class NoiseFieldSamplerData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of NoiseFieldSamplerData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (NoiseFieldSamplerData*)bufObj; - } - - virtual const char* getClassName() - { - return (NoiseFieldSamplerData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (NoiseFieldSamplerData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (NoiseFieldSamplerData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (NoiseFieldSamplerData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/NoiseFieldSamplerEffect.h b/APEX_1.4/module/particles/include/autogen/NoiseFieldSamplerEffect.h deleted file mode 100644 index 01aa6ef2..00000000 --- a/APEX_1.4/module/particles/include/autogen/NoiseFieldSamplerEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_NoiseFieldSamplerEffect_h -#define HEADER_NoiseFieldSamplerEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace NoiseFieldSamplerEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* NoiseFieldSampler; - -}; - -static const uint32_t checksum[] = { 0x5618cee8, 0xe4396e4b, 0x83c38fec, 0x332388c5, }; - -} // namespace NoiseFieldSamplerEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class NoiseFieldSamplerEffect : public NvParameterized::NvParameters, public NoiseFieldSamplerEffectNS::ParametersStruct -{ -public: - NoiseFieldSamplerEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~NoiseFieldSamplerEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("NoiseFieldSamplerEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(NoiseFieldSamplerEffectNS::checksum); - return NoiseFieldSamplerEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const NoiseFieldSamplerEffectNS::ParametersStruct& parameters(void) const - { - NoiseFieldSamplerEffect* tmpThis = const_cast<NoiseFieldSamplerEffect*>(this); - return *(static_cast<NoiseFieldSamplerEffectNS::ParametersStruct*>(tmpThis)); - } - - NoiseFieldSamplerEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<NoiseFieldSamplerEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class NoiseFieldSamplerEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - NoiseFieldSamplerEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(NoiseFieldSamplerEffect), NoiseFieldSamplerEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, NoiseFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class NoiseFieldSamplerEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(NoiseFieldSamplerEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, NoiseFieldSamplerEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, NoiseFieldSamplerEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, NoiseFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class NoiseFieldSamplerEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of NoiseFieldSamplerEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (NoiseFieldSamplerEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (NoiseFieldSamplerEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (NoiseFieldSamplerEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (NoiseFieldSamplerEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (NoiseFieldSamplerEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/ParticleSimulationData.h b/APEX_1.4/module/particles/include/autogen/ParticleSimulationData.h deleted file mode 100644 index 3e9343df..00000000 --- a/APEX_1.4/module/particles/include/autogen/ParticleSimulationData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_ParticleSimulationData_h -#define HEADER_ParticleSimulationData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace ParticleSimulationDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* IOS; - -}; - -static const uint32_t checksum[] = { 0x4ca98ba8, 0x2d988101, 0xc0f27951, 0x9b625d89, }; - -} // namespace ParticleSimulationDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class ParticleSimulationData : public NvParameterized::NvParameters, public ParticleSimulationDataNS::ParametersStruct -{ -public: - ParticleSimulationData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~ParticleSimulationData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("ParticleSimulationData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(ParticleSimulationDataNS::checksum); - return ParticleSimulationDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const ParticleSimulationDataNS::ParametersStruct& parameters(void) const - { - ParticleSimulationData* tmpThis = const_cast<ParticleSimulationData*>(this); - return *(static_cast<ParticleSimulationDataNS::ParametersStruct*>(tmpThis)); - } - - ParticleSimulationDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<ParticleSimulationDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class ParticleSimulationDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - ParticleSimulationData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(ParticleSimulationData), ParticleSimulationData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, ParticleSimulationData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ParticleSimulationData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(ParticleSimulationData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, ParticleSimulationData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, ParticleSimulationData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, ParticleSimulationData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ParticleSimulationData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of ParticleSimulationData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (ParticleSimulationData*)bufObj; - } - - virtual const char* getClassName() - { - return (ParticleSimulationData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (ParticleSimulationData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (ParticleSimulationData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (ParticleSimulationData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/ParticlesDebugRenderParams.h b/APEX_1.4/module/particles/include/autogen/ParticlesDebugRenderParams.h deleted file mode 100644 index f660872e..00000000 --- a/APEX_1.4/module/particles/include/autogen/ParticlesDebugRenderParams.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_ParticlesDebugRenderParams_h -#define HEADER_ParticlesDebugRenderParams_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace ParticlesDebugRenderParamsNS -{ - - - -struct ParametersStruct -{ - - bool VISUALIZE_HEAT_SOURCE_ACTOR; - bool VISUALIZE_EFFECT_PACKAGE_ACTOR; - -}; - -static const uint32_t checksum[] = { 0x85e707bb, 0x319491d5, 0x1be4a6e4, 0x78bfbdf4, }; - -} // namespace ParticlesDebugRenderParamsNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class ParticlesDebugRenderParams : public NvParameterized::NvParameters, public ParticlesDebugRenderParamsNS::ParametersStruct -{ -public: - ParticlesDebugRenderParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~ParticlesDebugRenderParams(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("ParticlesDebugRenderParams"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(ParticlesDebugRenderParamsNS::checksum); - return ParticlesDebugRenderParamsNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const ParticlesDebugRenderParamsNS::ParametersStruct& parameters(void) const - { - ParticlesDebugRenderParams* tmpThis = const_cast<ParticlesDebugRenderParams*>(this); - return *(static_cast<ParticlesDebugRenderParamsNS::ParametersStruct*>(tmpThis)); - } - - ParticlesDebugRenderParamsNS::ParametersStruct& parameters(void) - { - return *(static_cast<ParticlesDebugRenderParamsNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class ParticlesDebugRenderParamsFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - ParticlesDebugRenderParams::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(ParticlesDebugRenderParams), ParticlesDebugRenderParams::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, ParticlesDebugRenderParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ParticlesDebugRenderParams"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(ParticlesDebugRenderParams)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, ParticlesDebugRenderParams)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, ParticlesDebugRenderParams::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, ParticlesDebugRenderParams::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ParticlesDebugRenderParams"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of ParticlesDebugRenderParams here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (ParticlesDebugRenderParams*)bufObj; - } - - virtual const char* getClassName() - { - return (ParticlesDebugRenderParams::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (ParticlesDebugRenderParams::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (ParticlesDebugRenderParams::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (ParticlesDebugRenderParams::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/ParticlesModuleParameters.h b/APEX_1.4/module/particles/include/autogen/ParticlesModuleParameters.h deleted file mode 100644 index 87dc6397..00000000 --- a/APEX_1.4/module/particles/include/autogen/ParticlesModuleParameters.h +++ /dev/null @@ -1,230 +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 - - -#ifndef HEADER_ParticlesModuleParameters_h -#define HEADER_ParticlesModuleParameters_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace ParticlesModuleParametersNS -{ - - - -struct ParametersStruct -{ - - uint32_t unused; - -}; - -static const uint32_t checksum[] = { 0xb5f7f96c, 0x545549c7, 0xb6efe84c, 0x4bdc0f31, }; - -} // namespace ParticlesModuleParametersNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class ParticlesModuleParameters : public NvParameterized::NvParameters, public ParticlesModuleParametersNS::ParametersStruct -{ -public: - ParticlesModuleParameters(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~ParticlesModuleParameters(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("ParticlesModuleParameters"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(ParticlesModuleParametersNS::checksum); - return ParticlesModuleParametersNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const ParticlesModuleParametersNS::ParametersStruct& parameters(void) const - { - ParticlesModuleParameters* tmpThis = const_cast<ParticlesModuleParameters*>(this); - return *(static_cast<ParticlesModuleParametersNS::ParametersStruct*>(tmpThis)); - } - - ParticlesModuleParametersNS::ParametersStruct& parameters(void) - { - return *(static_cast<ParticlesModuleParametersNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class ParticlesModuleParametersFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - ParticlesModuleParameters::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(ParticlesModuleParameters), ParticlesModuleParameters::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, ParticlesModuleParameters::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ParticlesModuleParameters"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(ParticlesModuleParameters)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, ParticlesModuleParameters)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, ParticlesModuleParameters::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, ParticlesModuleParameters::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ParticlesModuleParameters"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of ParticlesModuleParameters here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (ParticlesModuleParameters*)bufObj; - } - - virtual const char* getClassName() - { - return (ParticlesModuleParameters::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (ParticlesModuleParameters::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (ParticlesModuleParameters::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (ParticlesModuleParameters::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/RigidBodyEffect.h b/APEX_1.4/module/particles/include/autogen/RigidBodyEffect.h deleted file mode 100644 index 3c3a8edb..00000000 --- a/APEX_1.4/module/particles/include/autogen/RigidBodyEffect.h +++ /dev/null @@ -1,300 +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 - - -#ifndef HEADER_RigidBodyEffect_h -#define HEADER_RigidBodyEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace RigidBodyEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - const char* Type; - NvParameterized::DummyStringStruct CollisionFilterDataName; - bool Dynamic; - bool Gravity; - physx::PxVec3 Extents; - float Mass; - physx::PxVec3 InitialLinearVelocity; - physx::PxVec3 InitialAngularVelocity; - float LinearDamping; - float AngularDamping; - -}; - -static const uint32_t checksum[] = { 0x9a107d98, 0x19620918, 0x9994ec69, 0x14939e5c, }; - -} // namespace RigidBodyEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class RigidBodyEffect : public NvParameterized::NvParameters, public RigidBodyEffectNS::ParametersStruct -{ -public: - RigidBodyEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~RigidBodyEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("RigidBodyEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(RigidBodyEffectNS::checksum); - return RigidBodyEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const RigidBodyEffectNS::ParametersStruct& parameters(void) const - { - RigidBodyEffect* tmpThis = const_cast<RigidBodyEffect*>(this); - return *(static_cast<RigidBodyEffectNS::ParametersStruct*>(tmpThis)); - } - - RigidBodyEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<RigidBodyEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class RigidBodyEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - RigidBodyEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(RigidBodyEffect), RigidBodyEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, RigidBodyEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class RigidBodyEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(RigidBodyEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, RigidBodyEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, RigidBodyEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, RigidBodyEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class RigidBodyEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of RigidBodyEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (RigidBodyEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (RigidBodyEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (RigidBodyEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (RigidBodyEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (RigidBodyEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/SubstanceSourceData.h b/APEX_1.4/module/particles/include/autogen/SubstanceSourceData.h deleted file mode 100644 index d6682bf2..00000000 --- a/APEX_1.4/module/particles/include/autogen/SubstanceSourceData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_SubstanceSourceData_h -#define HEADER_SubstanceSourceData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace SubstanceSourceDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* SubstanceSource; - -}; - -static const uint32_t checksum[] = { 0x79f6e8ac, 0x0efbf6f6, 0x9823c17d, 0x1736b4d9, }; - -} // namespace SubstanceSourceDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class SubstanceSourceData : public NvParameterized::NvParameters, public SubstanceSourceDataNS::ParametersStruct -{ -public: - SubstanceSourceData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~SubstanceSourceData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("SubstanceSourceData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(SubstanceSourceDataNS::checksum); - return SubstanceSourceDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const SubstanceSourceDataNS::ParametersStruct& parameters(void) const - { - SubstanceSourceData* tmpThis = const_cast<SubstanceSourceData*>(this); - return *(static_cast<SubstanceSourceDataNS::ParametersStruct*>(tmpThis)); - } - - SubstanceSourceDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<SubstanceSourceDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class SubstanceSourceDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - SubstanceSourceData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(SubstanceSourceData), SubstanceSourceData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, SubstanceSourceData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class SubstanceSourceData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(SubstanceSourceData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, SubstanceSourceData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, SubstanceSourceData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, SubstanceSourceData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class SubstanceSourceData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of SubstanceSourceData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (SubstanceSourceData*)bufObj; - } - - virtual const char* getClassName() - { - return (SubstanceSourceData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (SubstanceSourceData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (SubstanceSourceData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (SubstanceSourceData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/SubstanceSourceEffect.h b/APEX_1.4/module/particles/include/autogen/SubstanceSourceEffect.h deleted file mode 100644 index 48d2216a..00000000 --- a/APEX_1.4/module/particles/include/autogen/SubstanceSourceEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_SubstanceSourceEffect_h -#define HEADER_SubstanceSourceEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace SubstanceSourceEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* SubstanceSource; - -}; - -static const uint32_t checksum[] = { 0x171c45ff, 0xd18f749a, 0xeaca4f46, 0xec9ce317, }; - -} // namespace SubstanceSourceEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class SubstanceSourceEffect : public NvParameterized::NvParameters, public SubstanceSourceEffectNS::ParametersStruct -{ -public: - SubstanceSourceEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~SubstanceSourceEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("SubstanceSourceEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(SubstanceSourceEffectNS::checksum); - return SubstanceSourceEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const SubstanceSourceEffectNS::ParametersStruct& parameters(void) const - { - SubstanceSourceEffect* tmpThis = const_cast<SubstanceSourceEffect*>(this); - return *(static_cast<SubstanceSourceEffectNS::ParametersStruct*>(tmpThis)); - } - - SubstanceSourceEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<SubstanceSourceEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class SubstanceSourceEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - SubstanceSourceEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(SubstanceSourceEffect), SubstanceSourceEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, SubstanceSourceEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class SubstanceSourceEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(SubstanceSourceEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, SubstanceSourceEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, SubstanceSourceEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, SubstanceSourceEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class SubstanceSourceEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of SubstanceSourceEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (SubstanceSourceEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (SubstanceSourceEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (SubstanceSourceEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (SubstanceSourceEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (SubstanceSourceEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/TurbulenceFieldSamplerData.h b/APEX_1.4/module/particles/include/autogen/TurbulenceFieldSamplerData.h deleted file mode 100644 index 1612d87f..00000000 --- a/APEX_1.4/module/particles/include/autogen/TurbulenceFieldSamplerData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_TurbulenceFieldSamplerData_h -#define HEADER_TurbulenceFieldSamplerData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace TurbulenceFieldSamplerDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* TurbulenceFieldSampler; - -}; - -static const uint32_t checksum[] = { 0xac373033, 0x567939b2, 0xb61686da, 0x6b9b1a7b, }; - -} // namespace TurbulenceFieldSamplerDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class TurbulenceFieldSamplerData : public NvParameterized::NvParameters, public TurbulenceFieldSamplerDataNS::ParametersStruct -{ -public: - TurbulenceFieldSamplerData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~TurbulenceFieldSamplerData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("TurbulenceFieldSamplerData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(TurbulenceFieldSamplerDataNS::checksum); - return TurbulenceFieldSamplerDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const TurbulenceFieldSamplerDataNS::ParametersStruct& parameters(void) const - { - TurbulenceFieldSamplerData* tmpThis = const_cast<TurbulenceFieldSamplerData*>(this); - return *(static_cast<TurbulenceFieldSamplerDataNS::ParametersStruct*>(tmpThis)); - } - - TurbulenceFieldSamplerDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<TurbulenceFieldSamplerDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class TurbulenceFieldSamplerDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - TurbulenceFieldSamplerData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(TurbulenceFieldSamplerData), TurbulenceFieldSamplerData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, TurbulenceFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class TurbulenceFieldSamplerData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(TurbulenceFieldSamplerData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, TurbulenceFieldSamplerData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, TurbulenceFieldSamplerData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, TurbulenceFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class TurbulenceFieldSamplerData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of TurbulenceFieldSamplerData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (TurbulenceFieldSamplerData*)bufObj; - } - - virtual const char* getClassName() - { - return (TurbulenceFieldSamplerData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (TurbulenceFieldSamplerData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (TurbulenceFieldSamplerData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (TurbulenceFieldSamplerData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/TurbulenceFieldSamplerEffect.h b/APEX_1.4/module/particles/include/autogen/TurbulenceFieldSamplerEffect.h deleted file mode 100644 index 4f4b896a..00000000 --- a/APEX_1.4/module/particles/include/autogen/TurbulenceFieldSamplerEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_TurbulenceFieldSamplerEffect_h -#define HEADER_TurbulenceFieldSamplerEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace TurbulenceFieldSamplerEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* TurbulenceFieldSampler; - -}; - -static const uint32_t checksum[] = { 0x34739060, 0xd18c9ccf, 0xba454bf5, 0x78f5ddbb, }; - -} // namespace TurbulenceFieldSamplerEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class TurbulenceFieldSamplerEffect : public NvParameterized::NvParameters, public TurbulenceFieldSamplerEffectNS::ParametersStruct -{ -public: - TurbulenceFieldSamplerEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~TurbulenceFieldSamplerEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("TurbulenceFieldSamplerEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(TurbulenceFieldSamplerEffectNS::checksum); - return TurbulenceFieldSamplerEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const TurbulenceFieldSamplerEffectNS::ParametersStruct& parameters(void) const - { - TurbulenceFieldSamplerEffect* tmpThis = const_cast<TurbulenceFieldSamplerEffect*>(this); - return *(static_cast<TurbulenceFieldSamplerEffectNS::ParametersStruct*>(tmpThis)); - } - - TurbulenceFieldSamplerEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<TurbulenceFieldSamplerEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class TurbulenceFieldSamplerEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - TurbulenceFieldSamplerEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(TurbulenceFieldSamplerEffect), TurbulenceFieldSamplerEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, TurbulenceFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class TurbulenceFieldSamplerEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(TurbulenceFieldSamplerEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, TurbulenceFieldSamplerEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, TurbulenceFieldSamplerEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, TurbulenceFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class TurbulenceFieldSamplerEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of TurbulenceFieldSamplerEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (TurbulenceFieldSamplerEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (TurbulenceFieldSamplerEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (TurbulenceFieldSamplerEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (TurbulenceFieldSamplerEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (TurbulenceFieldSamplerEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/VelocitySourceData.h b/APEX_1.4/module/particles/include/autogen/VelocitySourceData.h deleted file mode 100644 index 51397dde..00000000 --- a/APEX_1.4/module/particles/include/autogen/VelocitySourceData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_VelocitySourceData_h -#define HEADER_VelocitySourceData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace VelocitySourceDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* VelocitySource; - -}; - -static const uint32_t checksum[] = { 0x1d529c10, 0x109f65ed, 0xa3531c3a, 0x99ada8f2, }; - -} // namespace VelocitySourceDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class VelocitySourceData : public NvParameterized::NvParameters, public VelocitySourceDataNS::ParametersStruct -{ -public: - VelocitySourceData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~VelocitySourceData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("VelocitySourceData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(VelocitySourceDataNS::checksum); - return VelocitySourceDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const VelocitySourceDataNS::ParametersStruct& parameters(void) const - { - VelocitySourceData* tmpThis = const_cast<VelocitySourceData*>(this); - return *(static_cast<VelocitySourceDataNS::ParametersStruct*>(tmpThis)); - } - - VelocitySourceDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<VelocitySourceDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class VelocitySourceDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - VelocitySourceData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(VelocitySourceData), VelocitySourceData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, VelocitySourceData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VelocitySourceData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(VelocitySourceData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, VelocitySourceData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, VelocitySourceData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, VelocitySourceData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VelocitySourceData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of VelocitySourceData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (VelocitySourceData*)bufObj; - } - - virtual const char* getClassName() - { - return (VelocitySourceData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (VelocitySourceData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (VelocitySourceData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (VelocitySourceData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/VelocitySourceEffect.h b/APEX_1.4/module/particles/include/autogen/VelocitySourceEffect.h deleted file mode 100644 index 60285028..00000000 --- a/APEX_1.4/module/particles/include/autogen/VelocitySourceEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_VelocitySourceEffect_h -#define HEADER_VelocitySourceEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace VelocitySourceEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* VelocitySource; - -}; - -static const uint32_t checksum[] = { 0x26b72ab9, 0x777ca701, 0x04b00529, 0xf38de506, }; - -} // namespace VelocitySourceEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class VelocitySourceEffect : public NvParameterized::NvParameters, public VelocitySourceEffectNS::ParametersStruct -{ -public: - VelocitySourceEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~VelocitySourceEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("VelocitySourceEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(VelocitySourceEffectNS::checksum); - return VelocitySourceEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const VelocitySourceEffectNS::ParametersStruct& parameters(void) const - { - VelocitySourceEffect* tmpThis = const_cast<VelocitySourceEffect*>(this); - return *(static_cast<VelocitySourceEffectNS::ParametersStruct*>(tmpThis)); - } - - VelocitySourceEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<VelocitySourceEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class VelocitySourceEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - VelocitySourceEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(VelocitySourceEffect), VelocitySourceEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, VelocitySourceEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VelocitySourceEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(VelocitySourceEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, VelocitySourceEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, VelocitySourceEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, VelocitySourceEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VelocitySourceEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of VelocitySourceEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (VelocitySourceEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (VelocitySourceEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (VelocitySourceEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (VelocitySourceEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (VelocitySourceEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/VolumeRenderMaterialData.h b/APEX_1.4/module/particles/include/autogen/VolumeRenderMaterialData.h deleted file mode 100644 index e55cf3e2..00000000 --- a/APEX_1.4/module/particles/include/autogen/VolumeRenderMaterialData.h +++ /dev/null @@ -1,275 +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 - - -#ifndef HEADER_VolumeRenderMaterialData_h -#define HEADER_VolumeRenderMaterialData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace VolumeRenderMaterialDataNS -{ - -struct colorLifeStruct_Type; - -struct colorLifeStruct_DynamicArray1D_Type -{ - colorLifeStruct_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct colorLifeStruct_Type -{ - float density; - physx::PxVec4 color; -}; - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::DummyStringStruct ApplicationMaterialName; - NvParameterized::DummyStringStruct UserProperties; - const char* RenderMode; - const char* RenderMethod; - const char* ResolutionScale; - const char* FillMode; - bool GenerateShadows; - bool BlurShadows; - bool GenerateMipmaps; - bool EnableStencilOpt; - float StepScale; - float Density; - float EdgeFade; - float OpacityThreshold; - float RayJitter; - float IsoValue; - float IsoValueSign; - uint32_t ShadowSamples; - float ShadowDistance; - float ShadowDensity; - float ShadowJitter; - float ShadowAmount; - physx::PxVec3 LightDir; - physx::PxVec4 LightColor; - float BlockEmptyThreshold; - bool ReadDepth; - float ColorMapScale; - float ColorMapOffset; - colorLifeStruct_DynamicArray1D_Type ColorMap; - float TextureRangeMin; - float TextureRangeMax; - -}; - -static const uint32_t checksum[] = { 0xfb381de2, 0xf2cfee66, 0x5b5fbef9, 0x9199ccee, }; - -} // namespace VolumeRenderMaterialDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class VolumeRenderMaterialData : public NvParameterized::NvParameters, public VolumeRenderMaterialDataNS::ParametersStruct -{ -public: - VolumeRenderMaterialData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~VolumeRenderMaterialData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("VolumeRenderMaterialData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)1; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(VolumeRenderMaterialDataNS::checksum); - return VolumeRenderMaterialDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const VolumeRenderMaterialDataNS::ParametersStruct& parameters(void) const - { - VolumeRenderMaterialData* tmpThis = const_cast<VolumeRenderMaterialData*>(this); - return *(static_cast<VolumeRenderMaterialDataNS::ParametersStruct*>(tmpThis)); - } - - VolumeRenderMaterialDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<VolumeRenderMaterialDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class VolumeRenderMaterialDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - VolumeRenderMaterialData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(VolumeRenderMaterialData), VolumeRenderMaterialData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, VolumeRenderMaterialData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VolumeRenderMaterialData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(VolumeRenderMaterialData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, VolumeRenderMaterialData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, VolumeRenderMaterialData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, VolumeRenderMaterialData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VolumeRenderMaterialData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of VolumeRenderMaterialData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (VolumeRenderMaterialData*)bufObj; - } - - virtual const char* getClassName() - { - return (VolumeRenderMaterialData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (VolumeRenderMaterialData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (VolumeRenderMaterialData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (VolumeRenderMaterialData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/VortexFieldSamplerData.h b/APEX_1.4/module/particles/include/autogen/VortexFieldSamplerData.h deleted file mode 100644 index 962e5ee4..00000000 --- a/APEX_1.4/module/particles/include/autogen/VortexFieldSamplerData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_VortexFieldSamplerData_h -#define HEADER_VortexFieldSamplerData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace VortexFieldSamplerDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* VortexFieldSampler; - -}; - -static const uint32_t checksum[] = { 0xe1494a82, 0xeb4d703f, 0xa17e8922, 0x25b15901, }; - -} // namespace VortexFieldSamplerDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class VortexFieldSamplerData : public NvParameterized::NvParameters, public VortexFieldSamplerDataNS::ParametersStruct -{ -public: - VortexFieldSamplerData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~VortexFieldSamplerData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("VortexFieldSamplerData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(VortexFieldSamplerDataNS::checksum); - return VortexFieldSamplerDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const VortexFieldSamplerDataNS::ParametersStruct& parameters(void) const - { - VortexFieldSamplerData* tmpThis = const_cast<VortexFieldSamplerData*>(this); - return *(static_cast<VortexFieldSamplerDataNS::ParametersStruct*>(tmpThis)); - } - - VortexFieldSamplerDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<VortexFieldSamplerDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class VortexFieldSamplerDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - VortexFieldSamplerData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(VortexFieldSamplerData), VortexFieldSamplerData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, VortexFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VortexFieldSamplerData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(VortexFieldSamplerData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, VortexFieldSamplerData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, VortexFieldSamplerData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, VortexFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VortexFieldSamplerData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of VortexFieldSamplerData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (VortexFieldSamplerData*)bufObj; - } - - virtual const char* getClassName() - { - return (VortexFieldSamplerData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (VortexFieldSamplerData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (VortexFieldSamplerData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (VortexFieldSamplerData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/VortexFieldSamplerEffect.h b/APEX_1.4/module/particles/include/autogen/VortexFieldSamplerEffect.h deleted file mode 100644 index 444ab3bc..00000000 --- a/APEX_1.4/module/particles/include/autogen/VortexFieldSamplerEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_VortexFieldSamplerEffect_h -#define HEADER_VortexFieldSamplerEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace VortexFieldSamplerEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* VortexFieldSampler; - -}; - -static const uint32_t checksum[] = { 0x2be885a4, 0xf50fd36f, 0xe78facab, 0xc365bd58, }; - -} // namespace VortexFieldSamplerEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class VortexFieldSamplerEffect : public NvParameterized::NvParameters, public VortexFieldSamplerEffectNS::ParametersStruct -{ -public: - VortexFieldSamplerEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~VortexFieldSamplerEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("VortexFieldSamplerEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(VortexFieldSamplerEffectNS::checksum); - return VortexFieldSamplerEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const VortexFieldSamplerEffectNS::ParametersStruct& parameters(void) const - { - VortexFieldSamplerEffect* tmpThis = const_cast<VortexFieldSamplerEffect*>(this); - return *(static_cast<VortexFieldSamplerEffectNS::ParametersStruct*>(tmpThis)); - } - - VortexFieldSamplerEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<VortexFieldSamplerEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class VortexFieldSamplerEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - VortexFieldSamplerEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(VortexFieldSamplerEffect), VortexFieldSamplerEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, VortexFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VortexFieldSamplerEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(VortexFieldSamplerEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, VortexFieldSamplerEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, VortexFieldSamplerEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, VortexFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class VortexFieldSamplerEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of VortexFieldSamplerEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (VortexFieldSamplerEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (VortexFieldSamplerEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (VortexFieldSamplerEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (VortexFieldSamplerEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (VortexFieldSamplerEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/WindFieldSamplerData.h b/APEX_1.4/module/particles/include/autogen/WindFieldSamplerData.h deleted file mode 100644 index 00876e35..00000000 --- a/APEX_1.4/module/particles/include/autogen/WindFieldSamplerData.h +++ /dev/null @@ -1,231 +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 - - -#ifndef HEADER_WindFieldSamplerData_h -#define HEADER_WindFieldSamplerData_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace WindFieldSamplerDataNS -{ - - - -struct ParametersStruct -{ - - NvParameterized::DummyStringStruct Name; - NvParameterized::Interface* WindFieldSampler; - -}; - -static const uint32_t checksum[] = { 0xe5c5674e, 0x58f8377e, 0xc3b4e486, 0x2cbdd0bc, }; - -} // namespace WindFieldSamplerDataNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class WindFieldSamplerData : public NvParameterized::NvParameters, public WindFieldSamplerDataNS::ParametersStruct -{ -public: - WindFieldSamplerData(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~WindFieldSamplerData(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("WindFieldSamplerData"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(WindFieldSamplerDataNS::checksum); - return WindFieldSamplerDataNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const WindFieldSamplerDataNS::ParametersStruct& parameters(void) const - { - WindFieldSamplerData* tmpThis = const_cast<WindFieldSamplerData*>(this); - return *(static_cast<WindFieldSamplerDataNS::ParametersStruct*>(tmpThis)); - } - - WindFieldSamplerDataNS::ParametersStruct& parameters(void) - { - return *(static_cast<WindFieldSamplerDataNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class WindFieldSamplerDataFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - WindFieldSamplerData::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(WindFieldSamplerData), WindFieldSamplerData::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, WindFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class WindFieldSamplerData"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(WindFieldSamplerData)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, WindFieldSamplerData)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, WindFieldSamplerData::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, WindFieldSamplerData::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class WindFieldSamplerData"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of WindFieldSamplerData here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (WindFieldSamplerData*)bufObj; - } - - virtual const char* getClassName() - { - return (WindFieldSamplerData::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (WindFieldSamplerData::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (WindFieldSamplerData::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (WindFieldSamplerData::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/include/autogen/WindFieldSamplerEffect.h b/APEX_1.4/module/particles/include/autogen/WindFieldSamplerEffect.h deleted file mode 100644 index 9b4c9f61..00000000 --- a/APEX_1.4/module/particles/include/autogen/WindFieldSamplerEffect.h +++ /dev/null @@ -1,291 +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 - - -#ifndef HEADER_WindFieldSamplerEffect_h -#define HEADER_WindFieldSamplerEffect_h - -#include "NvParametersTypes.h" - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -#include "nvparameterized/NvParameterized.h" -#include "nvparameterized/NvParameterizedTraits.h" -#include "NvParameters.h" -#include "NvTraitsInternal.h" -#endif - -namespace nvidia -{ -namespace particles -{ - -#if PX_VC -#pragma warning(push) -#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -#endif - -namespace WindFieldSamplerEffectNS -{ - -struct TranslateObject_Type; -struct OrientObject_Type; -struct ControlPoint_Type; -struct EffectPath_Type; -struct EffectProperties_Type; - -struct TRANSFORM_DynamicArray1D_Type -{ - physx::PxTransform* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct ControlPoint_DynamicArray1D_Type -{ - ControlPoint_Type* buf; - bool isAllocated; - int32_t elementSize; - int32_t arraySizes[1]; -}; - -struct TranslateObject_Type -{ - float TranslateX; - float TranslateY; - float TranslateZ; -}; -struct ControlPoint_Type -{ - float x; - float y; -}; -struct OrientObject_Type -{ - float RotateX; - float RotateY; - float RotateZ; -}; -struct EffectPath_Type -{ - const char* PlaybackMode; - float PathDuration; - uint32_t LoopIndex; - TRANSFORM_DynamicArray1D_Type ControlPoints; - ControlPoint_DynamicArray1D_Type Scale; - ControlPoint_DynamicArray1D_Type Speed; -}; -struct EffectProperties_Type -{ - NvParameterized::DummyStringStruct UserString; - bool Enable; - TranslateObject_Type Position; - OrientObject_Type Orientation; - float InitialDelayTime; - float Duration; - uint32_t RepeatCount; - float RepeatDelay; - float RandomizeRepeatTime; - EffectPath_Type Path; -}; - -struct ParametersStruct -{ - - EffectProperties_Type EffectProperties; - NvParameterized::Interface* WindFieldSampler; - -}; - -static const uint32_t checksum[] = { 0x98b44af2, 0xea3bf59f, 0xa34c5161, 0x0a087624, }; - -} // namespace WindFieldSamplerEffectNS - -#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS -class WindFieldSamplerEffect : public NvParameterized::NvParameters, public WindFieldSamplerEffectNS::ParametersStruct -{ -public: - WindFieldSamplerEffect(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); - - virtual ~WindFieldSamplerEffect(); - - virtual void destroy(); - - static const char* staticClassName(void) - { - return("WindFieldSamplerEffect"); - } - - const char* className(void) const - { - return(staticClassName()); - } - - static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)0; - - static uint32_t staticVersion(void) - { - return ClassVersion; - } - - uint32_t version(void) const - { - return(staticVersion()); - } - - static const uint32_t ClassAlignment = 8; - - static const uint32_t* staticChecksum(uint32_t& bits) - { - bits = 8 * sizeof(WindFieldSamplerEffectNS::checksum); - return WindFieldSamplerEffectNS::checksum; - } - - static void freeParameterDefinitionTable(NvParameterized::Traits* traits); - - const uint32_t* checksum(uint32_t& bits) const - { - return staticChecksum(bits); - } - - const WindFieldSamplerEffectNS::ParametersStruct& parameters(void) const - { - WindFieldSamplerEffect* tmpThis = const_cast<WindFieldSamplerEffect*>(this); - return *(static_cast<WindFieldSamplerEffectNS::ParametersStruct*>(tmpThis)); - } - - WindFieldSamplerEffectNS::ParametersStruct& parameters(void) - { - return *(static_cast<WindFieldSamplerEffectNS::ParametersStruct*>(this)); - } - - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle) const; - virtual NvParameterized::ErrorType getParameterHandle(const char* long_name, NvParameterized::Handle& handle); - - void initDefaults(void); - -protected: - - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void); - virtual const NvParameterized::DefinitionImpl* getParameterDefinitionTree(void) const; - - - virtual void getVarPtr(const NvParameterized::Handle& handle, void*& ptr, size_t& offset) const; - -private: - - void buildTree(void); - void initDynamicArrays(void); - void initStrings(void); - void initReferences(void); - void freeDynamicArrays(void); - void freeStrings(void); - void freeReferences(void); - - static bool mBuiltFlag; - static NvParameterized::MutexType mBuiltFlagMutex; -}; - -class WindFieldSamplerEffectFactory : public NvParameterized::Factory -{ - static const char* const vptr; - -public: - - virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) - { - WindFieldSamplerEffect::freeParameterDefinitionTable(traits); - } - - virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) - { - // placement new on this class using mParameterizedTraits - - void* newPtr = paramTraits->alloc(sizeof(WindFieldSamplerEffect), WindFieldSamplerEffect::ClassAlignment); - if (!NvParameterized::IsAligned(newPtr, WindFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class WindFieldSamplerEffect"); - paramTraits->free(newPtr); - return 0; - } - - memset(newPtr, 0, sizeof(WindFieldSamplerEffect)); // always initialize memory allocated to zero for default values - return NV_PARAM_PLACEMENT_NEW(newPtr, WindFieldSamplerEffect)(paramTraits); - } - - virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) - { - if (!NvParameterized::IsAligned(bufObj, WindFieldSamplerEffect::ClassAlignment) - || !NvParameterized::IsAligned(bufStart, WindFieldSamplerEffect::ClassAlignment)) - { - NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class WindFieldSamplerEffect"); - return 0; - } - - // Init NvParameters-part - // We used to call empty constructor of WindFieldSamplerEffect here - // but it may call default constructors of members and spoil the data - NV_PARAM_PLACEMENT_NEW(bufObj, NvParameterized::NvParameters)(paramTraits, bufStart, refCount); - - // Init vtable (everything else is already initialized) - *(const char**)bufObj = vptr; - - return (WindFieldSamplerEffect*)bufObj; - } - - virtual const char* getClassName() - { - return (WindFieldSamplerEffect::staticClassName()); - } - - virtual uint32_t getVersion() - { - return (WindFieldSamplerEffect::staticVersion()); - } - - virtual uint32_t getAlignment() - { - return (WindFieldSamplerEffect::ClassAlignment); - } - - virtual const uint32_t* getChecksum(uint32_t& bits) - { - return (WindFieldSamplerEffect::staticChecksum(bits)); - } -}; -#endif // NV_PARAMETERIZED_ONLY_LAYOUTS - -} // namespace particles -} // namespace nvidia - -#if PX_VC -#pragma warning(pop) -#endif - -#endif diff --git a/APEX_1.4/module/particles/src/EffectPackageActorImpl.cpp b/APEX_1.4/module/particles/src/EffectPackageActorImpl.cpp deleted file mode 100644 index 77bfb300..00000000 --- a/APEX_1.4/module/particles/src/EffectPackageActorImpl.cpp +++ /dev/null @@ -1,3186 +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 "EffectPackageActorImpl.h" -#include "FloatMath.h" -#include "ParticlesScene.h" -#include "SceneIntl.h" -#include "EmitterActor.h" -#include "EmitterAsset.h" -#include "TurbulenceFSActor.h" -#include "AttractorFSActor.h" -#include "JetFSActor.h" -#include "WindFSActor.h" -#include "NoiseFSActor.h" -#include "VortexFSActor.h" -#include "nvparameterized/NvParamUtils.h" -#include "ImpactEmitterActor.h" -#include "GroundEmitterActor.h" -#include "TurbulenceFSAsset.h" -#include "BasicIosAsset.h" -#include "RenderDebugInterface.h" -#include "BasicFSAsset.h" -#include "RenderDebugInterface.h" -#include "SceneIntl.h" -#include "ForceFieldAsset.h" -#include "ForceFieldActor.h" -#include "HeatSourceAsset.h" -#include "HeatSourceActor.h" -#include "HeatSourceAssetParams.h" - -#include "ApexEmitterActorParameters.h" -#include "ApexEmitterAssetParameters.h" - -#include "SubstanceSourceAsset.h" -#include "SubstanceSourceActor.h" -#include "SubstanceSourceAsset.h" -#include "SubstanceSourceAssetParams.h" - -#include "VelocitySourceAsset.h" -#include "VelocitySourceActor.h" -#include "VelocitySourceAssetParams.h" - -#include "FlameEmitterAsset.h" -#include "FlameEmitterActor.h" -#include "FlameEmitterAssetParams.h" - -#include "TurbulenceFSAssetParams.h" - -#include "ScopedPhysXLock.h" - -#include "PxPhysics.h" -#include "PxScene.h" -#include "ApexResourceHelper.h" -#include "PsMathUtils.h" - - -#pragma warning(disable:4100) - -namespace nvidia -{ -namespace particles -{ - using namespace physx; - -static PxTransform _getPose(float x, float y, float z, float rotX, float rotY, float rotZ) -{ - PxTransform ret; - ret.p = PxVec3(x, y, z); - fm_eulerToQuat(rotX * FM_DEG_TO_RAD, rotY * FM_DEG_TO_RAD, rotZ * FM_DEG_TO_RAD, &ret.q.x); - return ret; -} - -void _getRot(const PxQuat& q, float& rotX, float& rotY, float& rotZ) -{ - fm_quatToEuler((float*)&q, rotX, rotY, rotZ); - rotX *= FM_RAD_TO_DEG; - rotY *= FM_RAD_TO_DEG; - rotZ *= FM_RAD_TO_DEG; -} - -static float ranf(void) -{ - uint32_t r = (uint32_t)::rand(); - r &= 0x7FFF; - return (float)r * (1.0f / 32768.0f); -} - -static float ranf(float min, float max) -{ - return ranf() * (max - min) + min; -} - -EffectPackageActorImpl::EffectPackageActorImpl(EffectPackageAsset* apexAsset, - const EffectPackageAssetParams* assetParams, - const EffectPackageActorParams* actorParams, - nvidia::apex::ApexSDK& sdk, - nvidia::apex::Scene& scene, - ParticlesScene& dynamicSystemScene, - ModuleTurbulenceFS* moduleTurbulenceFS) -{ - mRigidBodyChange = false; - mRenderVolume = NULL; - mEmitterValidateCallback = NULL; - mAlive = true; - mSimTime = 0; - mCurrentLifeTime = 0; - mFadeIn = false; - mFadeInTime = 0; - mFadeInDuration = 0; - mFadeOut = false; - mFadeOutTime = 0; - mFadeOutDuration = 0; - mFirstFrame = true; - mData = assetParams; - mAsset = apexAsset; - mScene = &scene; - mModuleTurbulenceFS = moduleTurbulenceFS; - mEnabled = actorParams->Enabled; - mVisible = false; - mEverVisible = false; - mOffScreenTime = 0; - mVisState = VS_ON_SCREEN; - mFadeTime = 0; - mNotVisibleTime = 0; - mPose = actorParams->InitialPose; - mObjectScale = actorParams->objectScale; - mEffectPath = PX_NEW(EffectPath); - { - RigidBodyEffectNS::EffectPath_Type *path = (RigidBodyEffectNS::EffectPath_Type *)&mData->Path; - if ( !mEffectPath->init(*path)) - { - delete mEffectPath; - mEffectPath = NULL; - } - } - - for (int32_t i = 0; i < mData->Effects.arraySizes[0]; i++) - { - NvParameterized::Interface* iface = mData->Effects.buf[i]; - PX_ASSERT(iface); - if (iface) - { - EffectType type = getEffectType(iface); - switch (type) - { - case ET_EMITTER: - { - EmitterEffect* ed = static_cast< EmitterEffect*>(iface); - if (ed->Emitter) - { - EffectEmitter* ee = PX_NEW(EffectEmitter)(ed->Emitter->name(), ed, sdk, scene, dynamicSystemScene, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - } - break; - case ET_HEAT_SOURCE: - { - HeatSourceEffect* ed = static_cast< HeatSourceEffect*>(iface); - EffectHeatSource* ee = PX_NEW(EffectHeatSource)(ed->HeatSource->name(), ed, sdk, scene, dynamicSystemScene, moduleTurbulenceFS, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_SUBSTANCE_SOURCE: - { - SubstanceSourceEffect* ed = static_cast< SubstanceSourceEffect*>(iface); - EffectSubstanceSource* ee = PX_NEW(EffectSubstanceSource)(ed->SubstanceSource->name(), ed, sdk, scene, dynamicSystemScene, moduleTurbulenceFS, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_VELOCITY_SOURCE: - { - VelocitySourceEffect* ed = static_cast< VelocitySourceEffect*>(iface); - EffectVelocitySource* ee = PX_NEW(EffectVelocitySource)(ed->VelocitySource->name(), ed, sdk, scene, dynamicSystemScene, moduleTurbulenceFS, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_FLAME_EMITTER: - { - FlameEmitterEffect* ed = static_cast< FlameEmitterEffect*>(iface); - EffectFlameEmitter* ee = PX_NEW(EffectFlameEmitter)(ed->FlameEmitter->name(), ed, sdk, scene, dynamicSystemScene, moduleTurbulenceFS, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_TURBULENCE_FS: - { - TurbulenceFieldSamplerEffect* ed = static_cast< TurbulenceFieldSamplerEffect*>(iface); - EffectTurbulenceFS* ee = PX_NEW(EffectTurbulenceFS)(ed->TurbulenceFieldSampler->name(), ed, sdk, scene, dynamicSystemScene, moduleTurbulenceFS, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_JET_FS: - { - JetFieldSamplerEffect* ed = static_cast< JetFieldSamplerEffect*>(iface); - EffectJetFS* ee = PX_NEW(EffectJetFS)(ed->JetFieldSampler->name(), ed, sdk, scene, dynamicSystemScene, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_WIND_FS: - { - WindFieldSamplerEffect* ed = static_cast< WindFieldSamplerEffect*>(iface); - EffectWindFS* ee = PX_NEW(EffectWindFS)(ed->WindFieldSampler->name(), ed, sdk, scene, dynamicSystemScene, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_RIGID_BODY: - { - RigidBodyEffect* ed = static_cast< RigidBodyEffect*>(iface); - EffectRigidBody* ee = PX_NEW(EffectRigidBody)("RigidBody", ed, sdk, scene, dynamicSystemScene, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_NOISE_FS: - { - NoiseFieldSamplerEffect* ed = static_cast< NoiseFieldSamplerEffect*>(iface); - EffectNoiseFS* ee = PX_NEW(EffectNoiseFS)(ed->NoiseFieldSampler->name(), ed, sdk, scene, dynamicSystemScene, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_VORTEX_FS: - { - VortexFieldSamplerEffect* ed = static_cast< VortexFieldSamplerEffect*>(iface); - EffectVortexFS* ee = PX_NEW(EffectVortexFS)(ed->VortexFieldSampler->name(), ed, sdk, scene, dynamicSystemScene, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_ATTRACTOR_FS: - { - AttractorFieldSamplerEffect* ed = static_cast< AttractorFieldSamplerEffect*>(iface); - EffectAttractorFS* ee = PX_NEW(EffectAttractorFS)(ed->AttractorFieldSampler->name(), ed, sdk, scene, dynamicSystemScene, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - case ET_FORCE_FIELD: - { - ForceFieldEffect* ed = static_cast< ForceFieldEffect*>(iface); - EffectForceField* ee = PX_NEW(EffectForceField)(ed->ForceField->name(), ed, sdk, scene, dynamicSystemScene, mPose, mEnabled); - ee->setCurrentScale(mObjectScale,mEffectPath); - mEffects.pushBack(static_cast< EffectData*>(ee)); - } - break; - default: - PX_ALWAYS_ASSERT(); - break; - } - } - } - addSelfToContext(*dynamicSystemScene.mApexScene->getApexContext()); // Add self to ApexScene - addSelfToContext(dynamicSystemScene); // Add self to ParticlesScene's list of actors -} - -EffectPackageActorImpl::~EffectPackageActorImpl(void) -{ - for (uint32_t i = 0; i < mEffects.size(); i++) - { - EffectData* ed = mEffects[i]; - delete ed; - } - delete mEffectPath; -} - -EffectType EffectPackageActorImpl::getEffectType(const NvParameterized::Interface* iface) -{ - EffectType ret = ET_LAST; - - if (nvidia::strcmp(iface->className(), EmitterEffect::staticClassName()) == 0) - { - ret = ET_EMITTER; - } - else if (nvidia::strcmp(iface->className(), HeatSourceEffect::staticClassName()) == 0) - { - ret = ET_HEAT_SOURCE; - } - else if (nvidia::strcmp(iface->className(), SubstanceSourceEffect::staticClassName()) == 0) - { - ret = ET_SUBSTANCE_SOURCE; - } - else if (nvidia::strcmp(iface->className(), VelocitySourceEffect::staticClassName()) == 0) - { - ret = ET_VELOCITY_SOURCE; - } - else if (nvidia::strcmp(iface->className(), FlameEmitterEffect::staticClassName()) == 0) - { - ret = ET_FLAME_EMITTER; - } - else if (nvidia::strcmp(iface->className(), ForceFieldEffect::staticClassName()) == 0) - { - ret = ET_FORCE_FIELD; - } - else if (nvidia::strcmp(iface->className(), JetFieldSamplerEffect::staticClassName()) == 0) - { - ret = ET_JET_FS; - } - else if (nvidia::strcmp(iface->className(), WindFieldSamplerEffect::staticClassName()) == 0) - { - ret = ET_WIND_FS; - } - else if (nvidia::strcmp(iface->className(), RigidBodyEffect::staticClassName()) == 0) - { - ret = ET_RIGID_BODY; - } - else if (nvidia::strcmp(iface->className(), NoiseFieldSamplerEffect::staticClassName()) == 0) - { - ret = ET_NOISE_FS; - } - else if (nvidia::strcmp(iface->className(), VortexFieldSamplerEffect::staticClassName()) == 0) - { - ret = ET_VORTEX_FS; - } - else if (nvidia::strcmp(iface->className(), AttractorFieldSamplerEffect::staticClassName()) == 0) - { - ret = ET_ATTRACTOR_FS; - } - else if (nvidia::strcmp(iface->className(), TurbulenceFieldSamplerEffect::staticClassName()) == 0) - { - ret = ET_TURBULENCE_FS; - } - else - { - PX_ALWAYS_ASSERT(); - } - - return ret; -} - -const PxTransform& EffectPackageActorImpl::getPose(void) const -{ - READ_ZONE(); - return mPose; -} - -void EffectPackageActorImpl::visualize(RenderDebugInterface* callback, bool solid) const -{ - using RENDER_DEBUG::DebugRenderState; - if ( !mEnableDebugVisualization ) return; - RENDER_DEBUG_IFACE(callback)->pushRenderState(); - - RENDER_DEBUG_IFACE(callback)->addToCurrentState(DebugRenderState::CameraFacing); - RENDER_DEBUG_IFACE(callback)->addToCurrentState(DebugRenderState::CenterText); - - RENDER_DEBUG_IFACE(callback)->debugText(mPose.p - PxVec3(0, 0.35f, 0), mAsset->getName()); - - RENDER_DEBUG_IFACE(callback)->debugAxes(PxMat44(mPose)); - - for (uint32_t i = 0; i < mEffects.size(); i++) - { - mEffects[i]->visualize(callback, solid); - } - - RENDER_DEBUG_IFACE(callback)->popRenderState(); -} - -void EffectPackageActorImpl::setPose(const PxTransform& pose) -{ - WRITE_ZONE(); - mPose = pose; - - for (uint32_t i = 0; i < mEffects.size(); i++) - { - mEffects[i]->refresh(mPose, mEnabled, true, mRenderVolume,mEmitterValidateCallback); - } -} - -void EffectPackageActorImpl::refresh(void) -{ - WRITE_ZONE(); - for (uint32_t i = 0; i < mEffects.size(); i++) - { - EffectData* ed = mEffects[i]; - - if (ed->getEffectActor() ) - { - ed->refresh(mPose, mEnabled, true, mRenderVolume,mEmitterValidateCallback); - } - else if ( ed->getType() == ET_RIGID_BODY ) - { - EffectRigidBody *erb = static_cast< EffectRigidBody *>(ed); - if ( erb->mRigidDynamic ) - { - ed->refresh(mPose, mEnabled, true, mRenderVolume,mEmitterValidateCallback); - } - } - } -} - -void EffectPackageActorImpl::release(void) -{ - delete this; -} - -const char* EffectPackageActorImpl::getName(void) const -{ - READ_ZONE(); - return mAsset ? mAsset->getName() : NULL; -} - - -uint32_t EffectPackageActorImpl::getEffectCount(void) const // returns the number of effects in the effect package -{ - READ_ZONE(); - return mEffects.size(); -} - -EffectType EffectPackageActorImpl::getEffectType(uint32_t effectIndex) const // return the type of effect. -{ - READ_ZONE(); - EffectType ret = ET_LAST; - - if (effectIndex < mEffects.size()) - { - EffectData* ed = mEffects[effectIndex]; - ret = ed->getType(); - } - - return ret; -} - -Actor* EffectPackageActorImpl::getEffectActor(uint32_t effectIndex) const // return the base Actor pointer -{ - READ_ZONE(); - Actor* ret = NULL; - - if (effectIndex < mEffects.size()) - { - EffectData* ed = mEffects[effectIndex]; - ret = ed->getEffectActor(); - } - - - return ret; -} -void EffectPackageActorImpl::setEmitterState(bool state) // set the state for all emitters in this effect package. -{ - WRITE_ZONE(); - for (uint32_t i = 0; i < mEffects.size(); i++) - { - if (mEffects[i]->getType() == ET_EMITTER) - { - Actor* a = mEffects[i]->getEffectActor(); - if (a) - { - EmitterActor* ae = static_cast< EmitterActor*>(a); - if (state) - { - ae->startEmit(false); - } - else - { - ae->stopEmit(); - } - } - } - } -} - -uint32_t EffectPackageActorImpl::getActiveParticleCount(void) const // return the total number of particles still active in this effect package. -{ - READ_ZONE(); - uint32_t ret = 0; - - for (uint32_t i = 0; i < mEffects.size(); i++) - { - if (mEffects[i]->getType() == ET_EMITTER) - { - Actor* a = mEffects[i]->getEffectActor(); - if (a) - { - EmitterActor* ae = static_cast< EmitterActor*>(a); - ret += ae->getActiveParticleCount(); - } - } - } - return ret; -} - -bool EffectPackageActorImpl::isStillEmitting(void) const // return true if any emitters are still actively emitting particles. -{ - READ_ZONE(); - bool ret = false; - - for (uint32_t i = 0; i < mEffects.size(); i++) - { - if (mEffects[i]->getType() == ET_EMITTER) - { - Actor* a = mEffects[i]->getEffectActor(); - if (a) - { - EmitterActor* ae = static_cast< EmitterActor*>(a); - if (ae->isEmitting()) - { - ret = true; - break; - } - } - } - } - return ret; -} - -// Effect class implementations - -EffectEmitter::EffectEmitter(const char* parentName, - const EmitterEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), EffectData(ET_EMITTER, &sdk, - &scene, - &dscene, - parentName, - EMITTER_AUTHORING_TYPE_NAME, - *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ - mEmitterVelocity = PxVec3(0, 0, 0); - mFirstVelocityFrame = true; - mHaveSetPosition = false; - mVelocityTime = 0; - mLastEmitterPosition = PxVec3(0, 0, 0); -} - -EffectEmitter::~EffectEmitter(void) -{ -} - -EffectTurbulenceFS::EffectTurbulenceFS(const char* parentName, - TurbulenceFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled) : - mData(data), - mModuleTurbulenceFS(moduleTurbulenceFS), - EffectData(ET_TURBULENCE_FS, &sdk, &scene, &dscene, parentName, TURBULENCE_FS_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectTurbulenceFS::~EffectTurbulenceFS(void) -{ -} - -EffectJetFS::EffectJetFS(const char* parentName, - JetFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), EffectData(ET_JET_FS, &sdk, &scene, &dscene, parentName, JET_FS_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectJetFS::~EffectJetFS(void) -{ -} - -EffectWindFS::EffectWindFS(const char* parentName, - WindFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), EffectData(ET_WIND_FS, &sdk, &scene, &dscene, parentName, WIND_FS_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectWindFS::~EffectWindFS(void) -{ -} - - - -EffectAttractorFS::EffectAttractorFS(const char* parentName, - AttractorFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), EffectData(ET_ATTRACTOR_FS, &sdk, &scene, &dscene, parentName, ATTRACTOR_FS_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectAttractorFS::~EffectAttractorFS(void) -{ -} - -void EffectEmitter::visualize(RenderDebugInterface* callback, bool solid) const -{ - RENDER_DEBUG_IFACE(callback)->debugText(mPose.p, mData->Emitter->name()); - RENDER_DEBUG_IFACE(callback)->debugAxes(PxMat44(mPose)); - -} - - - -EffectHeatSource::EffectHeatSource(const char* parentName, - HeatSourceEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), - mModuleTurbulenceFS(moduleTurbulenceFS), - EffectData(ET_HEAT_SOURCE, &sdk, &scene, &dscene, parentName, HEAT_SOURCE_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectHeatSource::~EffectHeatSource(void) -{ -} - -void EffectHeatSource::visualize(RenderDebugInterface* callback, bool solid) const -{ -} - -bool EffectHeatSource::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - PxTransform myPose(parent * localPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - PxTransform pose(myPose); - bool ok = NvParameterized::setParamTransform(*descParams, "initialPose", pose); - PX_ASSERT(ok); - ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - PX_UNUSED(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - ret = true; - } - const NvParameterized::Interface* iface = mAsset->getAssetNvParameterized(); - const turbulencefs::HeatSourceAssetParams* hap = static_cast< const turbulencefs::HeatSourceAssetParams*>(iface); - mAverageTemperature = hap->averageTemperature; - mStandardDeviationTemperature = hap->stdTemperature; - } - else if (mActor) - { - HeatSourceActor* a = static_cast< HeatSourceActor*>(mActor); - nvidia::apex::Shape *s = a->getShape(); - s->setPose(myPose); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - } - else - { - if ( mActor ) - { - releaseActor(); - ret = true; - } - } - return ret; -} - -EffectSubstanceSource::EffectSubstanceSource(const char* parentName, - SubstanceSourceEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), - mModuleTurbulenceFS(moduleTurbulenceFS), - EffectData(ET_SUBSTANCE_SOURCE, &sdk, &scene, &dscene, parentName, SUBSTANCE_SOURCE_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectSubstanceSource::~EffectSubstanceSource(void) -{ -} - -void EffectSubstanceSource::visualize(RenderDebugInterface* callback, bool solid) const -{ -} - -bool EffectSubstanceSource::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - PxTransform myPose(parent * localPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - PxTransform pose(myPose); - bool ok = NvParameterized::setParamTransform(*descParams, "initialPose", pose); - PX_ASSERT(ok); - ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - PX_UNUSED(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - ret = true; - } - const NvParameterized::Interface* iface = mAsset->getAssetNvParameterized(); - const turbulencefs::SubstanceSourceAssetParams* hap = static_cast< const turbulencefs::SubstanceSourceAssetParams*>(iface); - mAverageDensity = hap->averageDensity; - mStandardDeviationDensity = hap->stdDensity; - } - else if (mActor) - { - SubstanceSourceActor* a = static_cast< SubstanceSourceActor*>(mActor); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - nvidia::apex::Shape *s = a->getShape(); - s->setPose(myPose); - } - } - else - { - if ( mActor ) - { - ret = true; - releaseActor(); - } - } - return ret; -} - -EffectVelocitySource::EffectVelocitySource(const char* parentName, - VelocitySourceEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), - mModuleTurbulenceFS(moduleTurbulenceFS), - EffectData(ET_VELOCITY_SOURCE, &sdk, &scene, &dscene, parentName, VELOCITY_SOURCE_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectVelocitySource::~EffectVelocitySource(void) -{ -} - -void EffectVelocitySource::visualize(RenderDebugInterface* callback, bool solid) const -{ -} - -bool EffectVelocitySource::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - PxTransform myPose(parent * localPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - PxTransform pose(myPose); - bool ok = NvParameterized::setParamTransform(*descParams, "initialPose", pose); - PX_ASSERT(ok); - ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - PX_UNUSED(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - ret = true; - } - const NvParameterized::Interface* iface = mAsset->getAssetNvParameterized(); - const turbulencefs::VelocitySourceAssetParams* hap = static_cast< const turbulencefs::VelocitySourceAssetParams*>(iface); - mAverageVelocity = hap->averageVelocity; - mStandardDeviationVelocity = hap->stdVelocity; - } - else if (mActor) - { - VelocitySourceActor* a = static_cast< VelocitySourceActor*>(mActor); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - nvidia::apex::Shape *s = a->getShape(); - s->setPose(myPose); - } - } - else - { - if ( mActor ) - { - ret = true; - releaseActor(); - } - } - return ret; -} - - -EffectFlameEmitter::EffectFlameEmitter(const char* parentName, - FlameEmitterEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - ModuleTurbulenceFS* moduleTurbulenceFS, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), - mModuleTurbulenceFS(moduleTurbulenceFS), - EffectData(ET_FLAME_EMITTER, &sdk, &scene, &dscene, parentName, FLAME_EMITTER_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectFlameEmitter::~EffectFlameEmitter(void) -{ -} - -void EffectFlameEmitter::visualize(RenderDebugInterface* callback, bool solid) const -{ -} - -bool EffectFlameEmitter::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - PxTransform myPose(parent * localPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - PxTransform pose(myPose); - bool ok = NvParameterized::setParamTransform(*descParams, "initialPose", pose); - PX_ASSERT(ok); - ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - PX_UNUSED(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - ret = true; - } - } - else if (mActor) - { - FlameEmitterActor* a = static_cast< FlameEmitterActor*>(mActor); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - a->setPose(myPose); - } - } - else - { - if ( mActor ) - { - ret = true; - releaseActor(); - } - } - return ret; -} - - -void EffectTurbulenceFS::visualize(RenderDebugInterface* callback, bool solid) const -{ - -} - -void EffectJetFS::visualize(RenderDebugInterface* callback, bool solid) const -{ - -} - -void EffectWindFS::visualize(RenderDebugInterface* callback, bool solid) const -{ - -} - -void EffectAttractorFS::visualize(RenderDebugInterface* callback, bool solid) const -{ - -} - -void EffectEmitter::computeVelocity(float dtime) -{ - mVelocityTime += dtime; - if (mFirstVelocityFrame) - { - if (mActor) - { - mFirstVelocityFrame = false; - mVelocityTime = 0; - EmitterActor* ea = static_cast< EmitterActor*>(mActor); - mLastEmitterPosition = ea->getGlobalPose().getPosition(); - } - } - else if (mHaveSetPosition && mActor) - { - mHaveSetPosition = false; - EmitterActor* ea = static_cast< EmitterActor*>(mActor); - PxVec3 newPos = ea->getGlobalPose().getPosition(); - mEmitterVelocity = (newPos - mLastEmitterPosition) * (1.0f / mVelocityTime); - mLastEmitterPosition = newPos; - mVelocityTime = 0; - } -} - -bool EffectEmitter::refresh(const PxTransform& parent, - bool parentEnabled, - bool fromSetPose, - RenderVolume* renderVolume, - EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - - mPose = parent * localPose; - getSamplePoseSpline(mPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - mFirstVelocityFrame = true; - mHaveSetPosition = false; - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - bool ok = NvParameterized::setParamTransform(*descParams, "initialPose", mPose); - PX_UNUSED(ok); - PX_ASSERT(ok); - ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - ok = NvParameterized::setParamBool(*descParams, "emitAssetParticles", true); - PX_ASSERT(ok); - EmitterAsset* easset = static_cast< EmitterAsset*>(mAsset); - EmitterActor* ea = mParticlesScene->getEmitterFromPool(easset); - if (ea) - { - ea->setCurrentPose(mPose); - ea->setCurrentScale(mObjectScale*getSampleScaleSpline()); - mActor = static_cast< Actor*>(ea); - } - else - { - mActor = mAsset->createApexActor(*descParams, *mApexScene); - } - if (mActor) - { - const NvParameterized::Interface* iface = mAsset->getAssetNvParameterized(); - const char* className = iface->className(); - if (nvidia::strcmp(className, "ApexEmitterAssetParameters") == 0) - { - const emitter::ApexEmitterAssetParameters* ap = static_cast<const emitter::ApexEmitterAssetParameters*>(iface); - mRate = ap->rate; - mLifetimeLow = ap->lifetimeLow; - mLifetimeHigh = ap->lifetimeHigh; - EmitterActor* ea = static_cast< EmitterActor*>(mActor); - ea->setRate(mRate); - ea->setLifetimeLow(mLifetimeLow); - ea->setLifetimeHigh(mLifetimeHigh); - ea->startEmit(false); - ea->setPreferredRenderVolume(renderVolume); - ea->setApexEmitterValidateCallback(callback); - } - ret = true; - } - } - } - else if (mActor) - { - EmitterActor* ea = static_cast< EmitterActor*>(mActor); - mHaveSetPosition = true; // set semaphore for computing the velocity. - ea->setCurrentPose(mPose); - ea->setObjectScale(mObjectScale*getSampleScaleSpline()); - ea->setPreferredRenderVolume(renderVolume); - } - } - else - { - if ( mActor ) - { - releaseActor(); - ret = true; - } - } - return ret; -} - - -bool EffectTurbulenceFS::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - PxTransform myPose(parent * localPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - bool ok = NvParameterized::setParamTransform(*descParams, "initialPose", myPose); - PX_UNUSED(ok); - PX_ASSERT(ok); - ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - ret = true; - } - } - else if (mActor) - { - TurbulenceFSActor* a = static_cast< TurbulenceFSActor*>(mActor); - a->setPose(myPose); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - } - else - { - if ( mActor ) - { - releaseActor(); - ret = true; - } - } - return ret; -} - -bool EffectJetFS::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - - PxTransform myPose(parent * localPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - bool ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - PX_UNUSED(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - if (mActor) - { - JetFSActor* fs = static_cast< JetFSActor*>(mActor); - if (fs) - { - fs->setCurrentPose(myPose); - fs->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - ret = true; - } - } - } - else if (mActor) - { - JetFSActor* a = static_cast< JetFSActor*>(mActor); - a->setCurrentPose(myPose); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - } - else - { - if ( mActor ) - { - releaseActor(); - ret = true; - } - } - return ret; -} - -bool EffectWindFS::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - PxTransform myPose(parent * localPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - bool ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - PX_UNUSED(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - if (mActor) - { - WindFSActor* fs = static_cast< WindFSActor*>(mActor); - if (fs) - { - fs->setCurrentPose(myPose); - fs->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - ret = true; - } - } - } - else if (mActor) - { - WindFSActor* a = static_cast< WindFSActor*>(mActor); - a->setCurrentPose(myPose); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - } - else - { - if ( mActor ) - { - releaseActor(); - ret = true; - } - } - return ret; -} - -bool EffectAttractorFS::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform initialPose = _getPose(mData->EffectProperties.Position.TranslateX*mObjectScale*getSampleScaleSpline(), - mData->EffectProperties.Position.TranslateY*mObjectScale*getSampleScaleSpline(), - mData->EffectProperties.Position.TranslateZ*mObjectScale*getSampleScaleSpline(), - mData->EffectProperties.Orientation.RotateX, - mData->EffectProperties.Orientation.RotateY, - mData->EffectProperties.Orientation.RotateZ); - - PxTransform myPose(parent * initialPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - - bool ok = NvParameterized::setParamTransform(*descParams, "initialPose", myPose); - PX_UNUSED(ok); - PX_ASSERT(ok); - ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - ret = true; - } - } - else if (mActor) - { - AttractorFSActor* a = static_cast< AttractorFSActor*>(mActor); - a->setCurrentPosition(myPose.p); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - } - else - { - if ( mActor ) - { - releaseActor(); - ret = true; - } - } - return ret; -} - - -EffectForceField::EffectForceField(const char* parentName, ForceFieldEffect* data, ApexSDK& sdk, Scene& scene, ParticlesScene& dscene, const PxTransform& rootPose, bool parentEnabled) : mData(data), EffectData(ET_FORCE_FIELD, &sdk, &scene, &dscene, parentName, FORCEFIELD_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectForceField::~EffectForceField(void) -{ -} - -void EffectForceField::visualize(RenderDebugInterface* callback, bool solid) const -{ - -} - -bool EffectForceField::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform initialPose = _getPose(mData->EffectProperties.Position.TranslateX*mObjectScale*getSampleScaleSpline(), - mData->EffectProperties.Position.TranslateY*mObjectScale*getSampleScaleSpline(), - mData->EffectProperties.Position.TranslateZ*mObjectScale*getSampleScaleSpline(), - mData->EffectProperties.Orientation.RotateX, - mData->EffectProperties.Orientation.RotateY, - mData->EffectProperties.Orientation.RotateZ); - PxTransform myPose(parent * initialPose); - getSamplePoseSpline(myPose); - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - bool ok = NvParameterized::setParamF32(*descParams, "scale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - PX_UNUSED(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - if (mActor) - { - ForceFieldActor* fs = static_cast< ForceFieldActor*>(mActor); - if (fs) - { - fs->setPose(myPose); - fs->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - ret = true; - } - } - } - else if (mActor) - { - ForceFieldActor* a = static_cast< ForceFieldActor*>(mActor); - a->setPose(myPose); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - } - else - { - if ( mActor ) - { - releaseActor(); - ret = true; - } - } - return ret; -} - -// Returns true if this is a type which has a named resource asset which needs to be resolved. RigidBody effects do not; all of their properties are embedded -static bool isNamedResourceType(EffectType type) -{ - bool ret = true; - - if ( type == ET_RIGID_BODY ) - { - ret = false; - } - - return ret; -} - -EffectData::EffectData(EffectType type, - ApexSDK* sdk, - Scene* scene, - ParticlesScene* dscene, - const char* assetName, - const char* nameSpace, - RigidBodyEffectNS::EffectProperties_Type &effectProperties) -{ - mEffectPath = NULL; - mParentPath = NULL; - mObjectScale = 1; - - mLocalPose = _getPose(effectProperties.Position.TranslateX, - effectProperties.Position.TranslateY, - effectProperties.Position.TranslateZ, - effectProperties.Orientation.RotateX, - effectProperties.Orientation.RotateY, - effectProperties.Orientation.RotateZ); - - mEffectPath = PX_NEW(EffectPath); - if ( !mEffectPath->init(effectProperties.Path) ) - { - delete mEffectPath; - mEffectPath = NULL; - } - - mEnabled = effectProperties.Enable; - mRandomDeviation = effectProperties.RandomizeRepeatTime; - mForceRenableEmitter = false; - mUseEmitterPool = dscene->getModuleParticles()->getUseEmitterPool(); - mFirstRate = true; - mType = type; - mState = ES_INITIAL_DELAY; - mStateTime = getRandomTime(effectProperties.InitialDelayTime); - mSimulationTime = 0; - mStateCount = 0; - mParticlesScene = dscene; - mInitialDelayTime = effectProperties.InitialDelayTime; - mDuration = effectProperties.Duration; - mRepeatCount = effectProperties.RepeatCount; - mRepeatDelay = effectProperties.RepeatDelay; - mApexSDK = sdk; - mApexScene = scene; - mActor = NULL; - mNameSpace = nameSpace; - mAsset = NULL; - if ( isNamedResourceType(mType) ) - { - mAsset = (nvidia::apex::Asset*)mApexSDK->getNamedResourceProvider()->getResource(mNameSpace, assetName); - if (mAsset) - { - if (mType == ET_EMITTER) - { - if (!mUseEmitterPool) - { - mApexSDK->getNamedResourceProvider()->setResource(mNameSpace, assetName, mAsset, true); - } - } - else - { - mApexSDK->getNamedResourceProvider()->setResource(mNameSpace, assetName, mAsset, true); - } - } - } -} - -EffectData::~EffectData(void) -{ - releaseActor(); - - delete mEffectPath; - - if (mAsset) - { - if (mType == ET_EMITTER) - { - if (!mUseEmitterPool) - { - mApexSDK->getNamedResourceProvider()->releaseResource(mNameSpace, mAsset->getName()); - } - } - else - { - mApexSDK->getNamedResourceProvider()->releaseResource(mNameSpace, mAsset->getName()); - } - } -} - -void EffectData::releaseActor(void) -{ - if (mActor) - { - if (mType == ET_EMITTER && mUseEmitterPool) - { - EmitterActor* ae = static_cast< EmitterActor*>(mActor); - mParticlesScene->addToEmitterPool(ae); - } - else - { - mActor->release(); - } - mActor = NULL; - } -} - -float EffectData::getRandomTime(float baseTime) -{ - float deviation = baseTime * mRandomDeviation; - return ranf(baseTime - deviation, baseTime + deviation); -} - -bool EffectData::simulate(float dtime, bool& reset) -{ - bool ret = false; - - if (!mEnabled) - { - return false; - } - - switch (mState) - { - case ES_INITIAL_DELAY: - mStateTime -= dtime; - if (mStateTime <= 0) - { - mState = ES_ACTIVE; // once past the initial delay, it is now active - mStateTime = getRandomTime(mDuration); // Time to the next state change... - ret = true; // set ret to true because the effect is alive - } - break; - case ES_ACTIVE: - ret = true; // it's still active.. - mStateTime -= dtime; // decrement delta time to next state change. - mSimulationTime+=dtime; - if (mStateTime <= 0) // if it's time for a state change. - { - if (mDuration == 0) // if the - { - if (mRepeatDelay > 0) // if there is a delay until the time we repeate - { - mStateTime = getRandomTime(mRepeatDelay); // set time until repeat delay - mState = ES_REPEAT_DELAY; // change state to repeat delay - } - else - { - mStateTime = getRandomTime(mDuration); // if there is no repeat delay; just continue - if (mRepeatCount > 1) - { - reset = true; // looped.. - } - } - } - else - { - mStateCount++; // increment the state change counter. - if (mStateCount >= mRepeatCount && mRepeatCount != 9999) // have we hit the total number repeat counts. - { - mState = ES_DONE; // then we are completely done; the actor is no longer alive - ret = false; - } - else - { - if (mRepeatDelay > 0) // is there a repeat delay? - { - mStateTime = getRandomTime(mRepeatDelay); - mState = ES_REPEAT_DELAY; - } - else - { - mStateTime = getRandomTime(mDuration); - reset = true; - } - } - } - } - else - { - if ( mEffectPath && mDuration != 0 ) - { - mEffectPath->computeSampleTime(mStateTime,mDuration); - } - } - if ( mDuration == 0 && mEffectPath ) - { - mEffectPath->computeSampleTime(mSimulationTime,mEffectPath->getPathDuration()); - } - break; - case ES_REPEAT_DELAY: - mStateTime -= dtime; - if (mStateTime < 0) - { - mState = ES_ACTIVE; - mStateTime = getRandomTime(mDuration); - reset = true; - ret = true; - } - break; - case ES_DONE: - break; - default: - //PX_ASSERT(0); - break; - } - - return ret; -} - -void EffectPackageActorImpl::updateParticles(float dtime) -{ - mSimTime = dtime; - mCurrentLifeTime += mSimTime; - - // If there has been some state change on one of the emitters, then we rebuild the emitter list! - if ( mRigidBodyChange ) - { - mRigidBodyChange = false; - } -} - -float EffectPackageActorImpl::internalGetDuration(void) -{ - float duration = 1000; - for (uint32_t i = 0; i < mEffects.size(); i++) - { - EffectData* ed = mEffects[i]; - if (ed->getDuration() < duration) - { - duration = ed->getDuration(); - } - } - return duration; -} - -// applies velocity adjustment to this range -static float processVelocityAdjust(const particles::EmitterEffectNS::EmitterVelocityAdjust_Type& vprops, - const PxVec3& velocity) -{ - - float r = 1; - float v = velocity.magnitude(); // compute the absolute magnitude of the current emitter velocity - if (v <= vprops.VelocityLow) // if the velocity is less than the minimum velocity adjustment range - { - r = vprops.LowValue; // Use the 'low-value' ratio adjustment - } - else if (v >= vprops.VelocityHigh) // If the velocity is greater than the high range - { - r = vprops.HighValue; // then clamp tot he high value adjustment - } - else - { - float ratio = 1; - float diff = vprops.VelocityHigh - vprops.VelocityLow; // Compute the velocity differntial - if (diff > 0) - { - ratio = 1.0f / diff; // compute the inverse velocity differential - } - float l = (v - vprops.VelocityLow) * ratio; // find out the velocity lerp rate - r = (vprops.HighValue - vprops.LowValue) * l + vprops.LowValue; - } - return r; -} - - -void EffectPackageActorImpl::updatePoseAndBounds(bool screenCulling, bool znegative) -{ - if (!mEnabled) - { - for (uint32_t i = 0; i < mEffects.size(); i++) - { - EffectData* ed = mEffects[i]; - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - else if ( ed->getType() == ET_RIGID_BODY ) - { - EffectRigidBody *erb = static_cast< EffectRigidBody *>(ed); - erb->releaseRigidBody(); - } - } - mAlive = false; - return; - } - - float ZCOMPARE = -1; - if (znegative) - { - ZCOMPARE *= -1; - } - - // - bool prevVisible = mVisible; - mVisible = true; // default visibile state is based on whether or not this effect is enabled. - float emitterRate = 1; - mVisState = VS_ON_SCREEN; // default value - if (mVisible) // if it's considered visible/enabled then let's do the LOD cacluation - { - const PxMat44& viewMatrix = mScene->getViewMatrix(); - PxVec3 pos = viewMatrix.transform(mPose.p); - float magnitudeSquared = pos.magnitudeSquared(); - if (mData->LODSettings.CullByDistance) // if distance culling is enabled - { - - // If the effect is past the maximum distance then mark it is no longer visible. - if (magnitudeSquared > mData->LODSettings.FadeDistanceEnd * mData->LODSettings.FadeDistanceEnd) - { - mVisible = false; - mVisState = VS_OFF_SCREEN; - } // if the effect is within the fade range; then compute the lerp value for it along that range as 'emitterRate' - else if (magnitudeSquared > mData->LODSettings.FadeDistanceEnd * mData->LODSettings.FadeDistanceBegin) - { - float distance = PxSqrt(magnitudeSquared); - float delta = mData->LODSettings.FadeDistanceEnd - mData->LODSettings.FadeDistanceBegin; - if (delta > 0) - { - emitterRate = 1.0f - ((distance - mData->LODSettings.FadeDistanceBegin) / delta); - } - } - } - // If it's still considered visible (i.e. in range) and off screen culling is enabled; let's test it's status on/off screen - if (mVisible && mData->LODSettings.CullOffScreen && screenCulling) - { - if (magnitudeSquared < (mData->LODSettings.ScreenCullDistance * mData->LODSettings.ScreenCullDistance)) - { - mVisState = VS_TOO_CLOSE; - } - else if (pos.z * ZCOMPARE > 0) - { - mVisState = VS_BEHIND_SCREEN; - } - else - { - const PxMat44& projMatrix = mScene->getProjMatrix(); - PxVec4 p(pos.x, pos.y, pos.z, 1); - p = projMatrix.transform(p); - float recipW = 1.0f / p.w; - - p.x = p.x * recipW; - p.y = p.y * recipW; - p.z = p.z * recipW; - - float smin = -1 - mData->LODSettings.ScreenCullSize; - float smax = 1 + mData->LODSettings.ScreenCullSize; - - if (p.x >= smin && p.x <= smax && p.y >= smin && p.y <= smax) - { - mVisState = VS_ON_SCREEN; - } - else - { - mVisState = VS_OFF_SCREEN; - } - } - } - } - if (mVisState == VS_ON_SCREEN || mVisState == VS_TOO_CLOSE) - { - mOffScreenTime = 0; - } - else - { - mOffScreenTime += mSimTime; - if (mOffScreenTime > mData->LODSettings.OffScreenCullTime) - { - mVisible = false; // mark it as non-visible due to it being off sceen too long. - mAlive = false; - } - else - { - mVisible = mEverVisible; // was it ever visible? - } - } - - if ( mEffectPath ) - { - mEffectPath->computeSampleTime(mCurrentLifeTime,mData->Path.PathDuration); - } - - if (mFirstFrame && !mVisible && screenCulling) - { - if (getDuration() != 0) - { - mEnabled = false; - return; - } - } - - - if (mVisible) - { - mEverVisible = true; - } - - - bool aliveState = mVisible; - - // do the fade in/fade out over time logic... - if (mData->LODSettings.FadeOutRate > 0) // If there is a fade in/out time. - { - if (aliveState) // if the effect is considered alive/visible then attenuate the emitterRate based on that fade in time value - { - mFadeTime += mSimTime; - if (mFadeTime < mData->LODSettings.FadeOutRate) - { - emitterRate = emitterRate * mFadeTime / mData->LODSettings.FadeOutRate; - } - else - { - mFadeTime = mData->LODSettings.FadeOutRate; - } - } - else // if the effect is not visible then attenuate it based on the fade out time - { - mFadeTime -= mSimTime; - if (mFadeTime > 0) - { - emitterRate = emitterRate * mFadeTime / mData->LODSettings.FadeOutRate; - aliveState = true; // still alive because it hasn't finsihed fading out... - } - else - { - mFadeTime = 0; - } - } - } - - if (mFadeIn) - { - mFadeInDuration += mSimTime; - if (mFadeInDuration > mFadeInTime) - { - mFadeIn = false; - } - else - { - float fadeScale = (mFadeInDuration / mFadeInTime); - emitterRate *= fadeScale; - } - } - - if (mFadeOut) - { - mFadeOutDuration += mSimTime; - if (mFadeOutDuration > mFadeOutTime) - { - aliveState = mVisible = false; - } - else - { - float fadeScale = 1.0f - (mFadeOutDuration / mFadeOutTime); - emitterRate *= fadeScale; - } - } - - if (mVisible) - { - mNotVisibleTime = 0; - } - else - { - mNotVisibleTime += mSimTime; - } - - bool anyAlive = false; - bool rigidBodyChange = false; - - for (uint32_t i = 0; i < mEffects.size(); i++) - { - bool alive = aliveState; - EffectData* ed = mEffects[i]; - // only emitters can handle a 'repeat' count. - // others have an initial delay - bool reset = false; - - if (ed->getDuration() == 0) - { - reset = !prevVisible; // if it was not previously visible then force a reset to bring it back to life. - } - if (alive) - { - alive = ed->simulate(mSimTime, reset); - if ( alive ) - { - anyAlive = true; - } - } - if (ed->isDead()) // if it's lifetime has completely expired kill it! - { - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - else if ( ed->getType() == ET_RIGID_BODY ) - { - EffectRigidBody *erb = static_cast< EffectRigidBody *>(ed); - erb->releaseRigidBody(); - rigidBodyChange = true; - } - } - else - { - switch (ed->getType()) - { - case ET_EMITTER: - { - EffectEmitter* ee = static_cast< EffectEmitter*>(ed); - ee->computeVelocity(mSimTime); - EmitterActor* ea = static_cast< EmitterActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if ( ed->getForceRenableEmitterSemaphore() && !ea->isEmitting() ) - { - reset = true; - } - if (reset) // is it time to reset it's condition? - { - ea->startEmit(false); - } - if (mData->LODSettings.FadeEmitterRate || mData->LODSettings.RandomizeEmitterRate || mFadeOut || mFadeIn) - { - // attenuate the emitter rate range based on the previously computed LOD lerp value - if (mData->LODSettings.RandomizeEmitterRate && ee->mFirstRate) - { - ee->mFirstRate = false; - } - if (mData->LODSettings.FadeEmitterRate || - mFadeOut || - mFadeIn || - ee->mData->EmitterVelocityChanges.AdjustEmitterRate.AdjustEnabled || - ee->mData->EmitterVelocityChanges.AdjustLifetime.AdjustEnabled) - { - float rate = ee->mRate * emitterRate; - if (ee->mData->EmitterVelocityChanges.AdjustEmitterRate.AdjustEnabled) - { - rate *= processVelocityAdjust(ee->mData->EmitterVelocityChanges.AdjustEmitterRate, ee->mEmitterVelocity); - } - ea->setRate(rate); - if (ee->mData->EmitterVelocityChanges.AdjustLifetime.AdjustEnabled) - { - float va = processVelocityAdjust(ee->mData->EmitterVelocityChanges.AdjustLifetime, ee->mEmitterVelocity); - ea->setLifetimeLow(ee->mLifetimeLow * va); - ea->setLifetimeLow(ee->mLifetimeHigh * va); - } - } - } - - if ( ee->activePath() ) - { - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setCurrentPose(pose); - } - - } - else - { - if (mNotVisibleTime > mData->LODSettings.NonVisibleDeleteTime) // if it's been non-visible for a long time; delete it, don't just disable it! - { - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - } - else - { - if (ea->isEmitting()) - { - ea->stopEmit(); // just stop emitting but don't destroy the actor. - } - } - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_ATTRACTOR_FS: - { - EffectAttractorFS *ee = static_cast< EffectAttractorFS *>(ed); - AttractorFSActor* ea = static_cast< AttractorFSActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setEnabled(true); - } - if (mData->LODSettings.FadeAttractorFieldStrength) - { - // TODO - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setCurrentPosition(pose.p); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - if (mNotVisibleTime > mData->LODSettings.NonVisibleDeleteTime) // if it's been non-visible for a long time; delete it, don't just disable it! - { - - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - } - else - { - ea->setEnabled(false); - } - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_JET_FS: - { - EffectJetFS *ee = static_cast< EffectJetFS *>(ed); - JetFSActor* ea = static_cast< JetFSActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setEnabled(true); - } - if (mData->LODSettings.FadeJetFieldStrength) - { - // TODO - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setCurrentPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - if (mNotVisibleTime > mData->LODSettings.NonVisibleDeleteTime) // if it's been non-visible for a long time; delete it, don't just disable it! - { - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - } - else - { - ea->setEnabled(false); - } - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_RIGID_BODY: - { - EffectRigidBody *erb = static_cast< EffectRigidBody *>(ed); - if ( alive ) - { - if ( ed->refresh(mPose, true, reset, mRenderVolume,mEmitterValidateCallback) ) - { - rigidBodyChange = true; - } - } - else - { - if ( erb->mRigidDynamic ) - { - erb->releaseRigidBody(); - rigidBodyChange = true; - } - } - } - break; - case ET_WIND_FS: - { - EffectWindFS *ee = static_cast< EffectWindFS *>(ed); - WindFSActor* ea = static_cast< WindFSActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setEnabled(true); - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setCurrentPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - if (mNotVisibleTime > mData->LODSettings.NonVisibleDeleteTime) // if it's been non-visible for a long time; delete it, don't just disable it! - { - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - } - else - { - ea->setEnabled(false); - } - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_NOISE_FS: - { - EffectNoiseFS *ee = static_cast< EffectNoiseFS *>(ed); - NoiseFSActor* ea = static_cast< NoiseFSActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setEnabled(true); - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setCurrentPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - if (mNotVisibleTime > mData->LODSettings.NonVisibleDeleteTime) // if it's been non-visible for a long time; delete it, don't just disable it! - { - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - } - else - { - ea->setEnabled(false); - } - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_VORTEX_FS: - { - EffectVortexFS *ee = static_cast< EffectVortexFS *>(ed); - VortexFSActor* ea = static_cast< VortexFSActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setEnabled(true); - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setCurrentPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - if (mNotVisibleTime > mData->LODSettings.NonVisibleDeleteTime) // if it's been non-visible for a long time; delete it, don't just disable it! - { - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - } - else - { - ea->setEnabled(false); - } - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_TURBULENCE_FS: - { - EffectTurbulenceFS *ee = static_cast< EffectTurbulenceFS *>(ed); - TurbulenceFSActor* ea = static_cast< TurbulenceFSActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setEnabled(true); - } - if (mData->LODSettings.FadeTurbulenceNoise) - { - // TODO - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - if (mNotVisibleTime > mData->LODSettings.NonVisibleDeleteTime) // if it's been non-visible for a long time; delete it, don't just disable it! - { - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - } - else - { - ea->setEnabled(false); - } - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_FORCE_FIELD: - { - EffectForceField *ee = static_cast< EffectForceField *>(ed); - ForceFieldActor* ea = static_cast< ForceFieldActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->enable(); - } - if (mData->LODSettings.FadeForceFieldStrength) - { - // TODO - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - if (mNotVisibleTime > mData->LODSettings.NonVisibleDeleteTime) // if it's been non-visible for a long time; delete it, don't just disable it! - { - if (ed->getEffectActor()) - { - ed->releaseActor(); - } - } - else - { - if (ea->isEnable()) - { - ea->disable(); - } - } - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_HEAT_SOURCE: - { - EffectHeatSource* ee = static_cast< EffectHeatSource*>(ed); - HeatSourceActor* ea = static_cast< HeatSourceActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setTemperature(ee->mAverageTemperature, ee->mStandardDeviationTemperature); - //ea->enable(); - //TODO! - } - if (mData->LODSettings.FadeHeatSourceTemperature) - { - // TODO - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - ed->releaseActor(); - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_SUBSTANCE_SOURCE: - { - EffectSubstanceSource* ee = static_cast< EffectSubstanceSource*>(ed); - SubstanceSourceActor* ea = static_cast< SubstanceSourceActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setDensity(ee->mAverageDensity, ee->mStandardDeviationDensity); - //ea->enable(); - //TODO! - } - if (mData->LODSettings.FadeHeatSourceTemperature) - { - // TODO - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - nvidia::apex::Shape *shape = ea->getShape(); - shape->setPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - ed->releaseActor(); - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_VELOCITY_SOURCE: - { - EffectVelocitySource* ee = static_cast< EffectVelocitySource*>(ed); - VelocitySourceActor* ea = static_cast< VelocitySourceActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setVelocity(ee->mAverageVelocity, ee->mStandardDeviationVelocity); - //ea->enable(); - //TODO! - } - if (mData->LODSettings.FadeHeatSourceTemperature) - { - // TODO - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - ed->releaseActor(); - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - case ET_FLAME_EMITTER: - { - EffectFlameEmitter* ee = static_cast< EffectFlameEmitter*>(ed); - FlameEmitterActor* ea = static_cast< FlameEmitterActor*>(ed->getEffectActor()); - // if there is already an emitter actor... - if (ea) - { - if (alive) // is it alive? - { - if (reset) // is it time to reset it's condition? - { - ea->setEnabled(true); - } - if ( ee->activePath() ) - { - PxTransform pose = mPose; - ee->getSamplePoseSpline(pose); - ea->setPose(pose); - ea->setCurrentScale(ee->mObjectScale*ee->getSampleScaleSpline()); - } - } - else - { - ed->releaseActor(); - } - } - else - { - if (alive) // if it is now alive but was not previously; start the initial instance. - { - ed->refresh(mPose, true, false, mRenderVolume,mEmitterValidateCallback); - } - } - } - break; - default: - PX_ALWAYS_ASSERT(); // effect type not handled! - break; - } - } - } - if ( rigidBodyChange ) - { - mRigidBodyChange = true; - } - mAlive = anyAlive; - mFirstFrame = false; -} - - -/** -\brief Returns the name of the effect at this index. - -\param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount -*/ -const char* EffectPackageActorImpl::getEffectName(uint32_t effectIndex) const -{ - READ_ZONE(); - const char* ret = NULL; - if (effectIndex < mEffects.size()) - { - EffectData* ed = mEffects[effectIndex]; - ret = ed->getEffectAsset()->getName(); - } - return ret; -} - -/** -\brief Returns true if this sub-effect is currently enabled. - -\param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount -*/ -bool EffectPackageActorImpl::isEffectEnabled(uint32_t effectIndex) const -{ - READ_ZONE(); - bool ret = false; - if (effectIndex < mEffects.size()) - { - EffectData* ed = mEffects[effectIndex]; - ret = ed->isEnabled(); - } - return ret; -} - -/** -\brief Set's the enabled state of this sub-effect - -\param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount -\param [in] state : Whether the effect should be enabled or not. -*/ -bool EffectPackageActorImpl::setEffectEnabled(uint32_t effectIndex, bool state) -{ - WRITE_ZONE(); - bool ret = false; - - if (effectIndex < mEffects.size()) - { - EffectData* ed = mEffects[effectIndex]; - ed->setEnabled(state); - if ( ed->getType() == ET_EMITTER ) - { - ed->setForceRenableEmitter(state); // set the re-enable semaphore - } - ret = true; - } - - return ret; -} - -/** -\brief Returns the pose of this sub-effect; returns as a a bool the active state of this effect. - -\param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount -\param [pose] : Contains the pose requested -\param [worldSpace] : Whether to return the pose in world-space or in parent-relative space. -*/ -bool EffectPackageActorImpl::getEffectPose(uint32_t effectIndex, PxTransform& pose, bool worldSpace) -{ - READ_ZONE(); - bool ret = false; - - if (effectIndex < mEffects.size()) - { - EffectData* ed = mEffects[effectIndex]; - - if (worldSpace) - { - pose = ed->getWorldPose(); - } - else - { - pose = ed->getLocalPose(); - } - ret = true; - } - - return ret; -} - -void EffectPackageActorImpl::setCurrentScale(float scale) -{ - WRITE_ZONE(); - mObjectScale = scale; - for (uint32_t i = 0; i < mEffects.size(); i++) - { - EffectData* ed = mEffects[i]; - ed->setCurrentScale(mObjectScale,mEffectPath); - ed->refresh(mPose, mEnabled, true, mRenderVolume,mEmitterValidateCallback); - } -} - -/** -\brief Sets the pose of this sub-effect; returns as a a bool the active state of this effect. - -\param [in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount -\param [pose] : Contains the pose to be set -\param [worldSpace] : Whether to return the pose in world-space or in parent-relative space. -*/ -bool EffectPackageActorImpl::setEffectPose(uint32_t effectIndex, const PxTransform& pose, bool worldSpace) -{ - WRITE_ZONE(); - bool ret = false; - - if (effectIndex < mEffects.size()) - { - EffectData* ed = mEffects[effectIndex]; - if (worldSpace) - { - PxTransform p = getPose(); // get root pose - PxTransform i = p.getInverse(); - PxTransform l = i * pose; - ed->setLocalPose(pose); // change the local pose - setPose(p); - } - else - { - ed->setLocalPose(pose); // change the local pose - PxTransform p = getPose(); - setPose(p); - } - ret = true; - } - return ret; -} - -/** -\brief Returns the current lifetime of the particle. -*/ -float EffectPackageActorImpl::getCurrentLife(void) const -{ - READ_ZONE(); - return mCurrentLifeTime; -} - -float EffectData::getRealDuration(void) const -{ - float ret = 0; - - if (mDuration != 0 && mRepeatCount != 9999) // if it's not an infinite lifespan... - { - ret = mInitialDelayTime + mRepeatCount * mDuration + mRepeatCount * mRepeatDelay; - } - - return ret; -} - -float EffectPackageActorImpl::getDuration(void) const -{ - READ_ZONE(); - float ret = 0; - - for (uint32_t i = 0; i < mEffects.size(); i++) - { - EffectData* ed = mEffects[i]; - if (ed->getType() == ET_EMITTER) // if it's an emitter - { - float v = ed->getRealDuration(); - if (v > ret) - { - ret = v; - } - } - } - return ret; -} - -void EffectPackageActorImpl::setPreferredRenderVolume(RenderVolume* volume) -{ - WRITE_ZONE(); - mRenderVolume = volume; - for (uint32_t i = 0; i < mEffects.size(); i++) - { - EffectData* ed = mEffects[i]; - if (ed->getType() == ET_EMITTER) // if it's an emitter - { - EffectEmitter* ee = static_cast< EffectEmitter*>(ed); - if (ee->getEffectActor()) - { - EmitterActor* ea = static_cast< EmitterActor*>(ee->getEffectActor()); - ea->setPreferredRenderVolume(volume); - } - } - } - -} - - -EffectNoiseFS::EffectNoiseFS(const char* parentName, - NoiseFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), EffectData(ET_NOISE_FS, &sdk, &scene, &dscene, parentName, NOISE_FS_AUTHORING_TYPE_NAME,*(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties) ) -{ -} - -EffectNoiseFS::~EffectNoiseFS(void) -{ -} - -void EffectNoiseFS::visualize(RenderDebugInterface* callback, bool solid) const -{ - -} - -bool EffectNoiseFS::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - PxTransform myPose(parent * localPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - bool ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - PX_UNUSED(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - if (mActor) - { - NoiseFSActor* fs = static_cast< NoiseFSActor*>(mActor); - if (fs) - { - fs->setCurrentPose(myPose); - fs->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - ret = true; - } - } - } - else if (mActor) - { - NoiseFSActor* a = static_cast< NoiseFSActor*>(mActor); - a->setCurrentPose(myPose); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - } - else - { - if ( mActor ) - { - releaseActor(); - ret = true; - } - } - return ret; -} - -EffectVortexFS::EffectVortexFS(const char* parentName, - VortexFieldSamplerEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), EffectData(ET_VORTEX_FS, &sdk, &scene, &dscene, parentName, VORTEX_FS_AUTHORING_TYPE_NAME, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ -} - -EffectVortexFS::~EffectVortexFS(void) -{ -} - -void EffectVortexFS::visualize(RenderDebugInterface* callback, bool solid) const -{ - -} - -bool EffectVortexFS::refresh(const PxTransform& parent, bool parentEnabled, bool fromSetPose, RenderVolume* renderVolume,EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - - if (parentEnabled && mEnabled && mAsset) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - PxTransform myPose(parent * localPose); - getSamplePoseSpline(myPose); - - if (mActor == NULL && mAsset && !fromSetPose) - { - NvParameterized::Interface* descParams = mAsset->getDefaultActorDesc(); - if (descParams) - { - bool ok = NvParameterized::setParamF32(*descParams, "initialScale", mObjectScale*getSampleScaleSpline() ); - PX_ASSERT(ok); - PX_UNUSED(ok); - mActor = mAsset->createApexActor(*descParams, *mApexScene); - if (mActor) - { - VortexFSActor* fs = static_cast< VortexFSActor*>(mActor); - if (fs) - { - fs->setCurrentPose(myPose); - fs->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - ret = true; - } - } - } - else if (mActor) - { - VortexFSActor* a = static_cast< VortexFSActor*>(mActor); - a->setCurrentPose(myPose); - a->setCurrentScale(mObjectScale*getSampleScaleSpline()); - } - } - else - { - if ( mActor ) - { - releaseActor(); - ret = true; - } - } - return ret; -} - -const char * EffectPackageActorImpl::hasVolumeRenderMaterial(uint32_t &index) const -{ - READ_ZONE(); - const char *ret = NULL; - - for (uint32_t i=0; i<mEffects.size(); i++) - { - EffectData *d = mEffects[i]; - if ( d->getType() == ET_TURBULENCE_FS ) - { - const NvParameterized::Interface *iface = d->getAsset()->getAssetNvParameterized(); - const turbulencefs::TurbulenceFSAssetParams *ap = static_cast< const turbulencefs::TurbulenceFSAssetParams *>(iface); - if ( ap->volumeRenderMaterialName ) - { - if ( strlen(ap->volumeRenderMaterialName->name()) > 0 ) - { - index = i; - ret = ap->volumeRenderMaterialName->name(); - break; - } - } - } - } - - return ret; -} - -EffectRigidBody::EffectRigidBody(const char* parentName, - RigidBodyEffect* data, - ApexSDK& sdk, - Scene& scene, - ParticlesScene& dscene, - const PxTransform& rootPose, - bool parentEnabled) : mData(data), EffectData(ET_RIGID_BODY, &sdk, &scene, &dscene, parentName, NULL, *(RigidBodyEffectNS::EffectProperties_Type *)(&data->EffectProperties)) -{ - mRigidDynamic = NULL; -} - -EffectRigidBody::~EffectRigidBody(void) -{ - releaseRigidBody(); -} - - -void EffectRigidBody::visualize(RenderDebugInterface* callback, bool solid) const -{ - -} - -bool EffectRigidBody::refresh(const PxTransform& parent, - bool parentEnabled, - bool fromSetPose, - RenderVolume* renderVolume, - EmitterActor::EmitterValidateCallback *callback) -{ - bool ret = false; - SCOPED_PHYSX_LOCK_WRITE(mApexScene); - if (parentEnabled && mEnabled ) - { - PxTransform localPose = mLocalPose; - localPose.p*=mObjectScale*getSampleScaleSpline(); - PxTransform myPose = parent * localPose; - getSamplePoseSpline(myPose); - - if (mRigidDynamic == NULL && !fromSetPose) - { - PxScene * scene = mApexScene->getPhysXScene(); - PxPhysics &sdk = scene->getPhysics(); - PxMaterial * material = mParticlesScene->getModuleParticles()->getDefaultMaterial(); - RigidBodyEffect *rbe = static_cast< RigidBodyEffect *>(mData); - physx::PxFilterData data = ApexResourceHelper::resolveCollisionGroup128(rbe->CollisionFilterDataName.buf); - mRigidDynamic = sdk.createRigidDynamic(myPose); - ret = true; - if ( mRigidDynamic ) - { - mRigidDynamic->setLinearVelocity(rbe->InitialLinearVelocity); - mRigidDynamic->setAngularVelocity(rbe->InitialAngularVelocity); - mRigidDynamic->setMass(rbe->Mass); - mRigidDynamic->setLinearDamping(rbe->LinearDamping); - mRigidDynamic->setAngularDamping(rbe->AngularDamping); - mRigidDynamic->setRigidBodyFlag(PxRigidBodyFlag::eKINEMATIC,!rbe->Dynamic); - - physx::PxShape *shape = NULL; - if ( nvidia::strcmp(rbe->Type,"SPHERE") == 0 ) - { - PxSphereGeometry sphere; - sphere.radius = rbe->Extents.x*getSampleScaleSpline(); - shape = mRigidDynamic->createShape(sphere,*material); - shape->setLocalPose(localPose); - } - else if ( nvidia::strcmp(rbe->Type,"CAPSULE") == 0 ) - { - PxCapsuleGeometry capsule; - capsule.radius = rbe->Extents.x*getSampleScaleSpline(); - capsule.halfHeight = rbe->Extents.y*getSampleScaleSpline(); - shape = mRigidDynamic->createShape(capsule,*material); - shape->setLocalPose(localPose); - } - else if ( nvidia::strcmp(rbe->Type,"BOX") == 0 ) - { - PxBoxGeometry box; - box.halfExtents.x = rbe->Extents.x*0.5f*getSampleScaleSpline(); - box.halfExtents.y = rbe->Extents.y*0.5f*getSampleScaleSpline(); - box.halfExtents.z = rbe->Extents.z*0.5f*getSampleScaleSpline(); - shape = mRigidDynamic->createShape(box,*material); - shape->setLocalPose(localPose); - } - else - { - PX_ALWAYS_ASSERT(); - } - if ( shape ) - { - // do stuff here... - shape->setSimulationFilterData(data); - shape->setQueryFilterData(data); - shape->setFlag(PxShapeFlag::eSIMULATION_SHAPE,true); - shape->setMaterials(&material,1); - } - mRigidDynamic->setActorFlag(PxActorFlag::eDISABLE_GRAVITY,!rbe->Gravity); - mRigidDynamic->setActorFlag(PxActorFlag::eDISABLE_SIMULATION,false); - mRigidDynamic->setActorFlag(PxActorFlag::eVISUALIZATION,true); - scene->addActor(*mRigidDynamic); - } - } - else if (mRigidDynamic && fromSetPose ) - { - if ( mRigidDynamic->getRigidBodyFlags() & PxRigidBodyFlag::eKINEMATIC ) - { - mRigidDynamic->setKinematicTarget(myPose); - } - else - { - mRigidDynamic->setGlobalPose(myPose); - } - } - if ( activePath() && mRigidDynamic ) - { - // if we are sampling a spline curve to control the scale of the object.. - RigidBodyEffect *rbe = static_cast< RigidBodyEffect *>(mData); - physx::PxShape *shape = NULL; - mRigidDynamic->getShapes(&shape,1,0); - if ( shape ) - { - if ( nvidia::strcmp(rbe->Type,"SPHERE") == 0 ) - { - PxSphereGeometry sphere; - sphere.radius = rbe->Extents.x*getSampleScaleSpline(); - shape->setGeometry(sphere); - } - else if ( nvidia::strcmp(rbe->Type,"CAPSULE") == 0 ) - { - PxCapsuleGeometry capsule; - capsule.radius = rbe->Extents.x*getSampleScaleSpline(); - capsule.halfHeight = rbe->Extents.y*getSampleScaleSpline(); - shape->setGeometry(capsule); - } - else if ( nvidia::strcmp(rbe->Type,"BOX") == 0 ) - { - PxBoxGeometry box; - box.halfExtents.x = rbe->Extents.x*0.5f*getSampleScaleSpline(); - box.halfExtents.y = rbe->Extents.y*0.5f*getSampleScaleSpline(); - box.halfExtents.z = rbe->Extents.z*0.5f*getSampleScaleSpline(); - shape->setGeometry(box); - } - } - if ( mRigidDynamic->getRigidBodyFlags() & PxRigidBodyFlag::eKINEMATIC ) - { - mRigidDynamic->setKinematicTarget(myPose); - } - else - { - mRigidDynamic->setGlobalPose(myPose); - } - } - } - else - { - //releaseActor(); - } - return ret; -} - -PxRigidDynamic* EffectPackageActorImpl::getEffectRigidDynamic(uint32_t effectIndex) const -{ - READ_ZONE(); - PxRigidDynamic *ret = NULL; - - if (effectIndex < mEffects.size()) - { - EffectData* ed = mEffects[effectIndex]; - if ( ed->getType() == ET_RIGID_BODY ) - { - EffectRigidBody *erd = static_cast< EffectRigidBody *>(ed); - ret = erd->mRigidDynamic; - } - } - - - return ret; -} - -void EffectRigidBody::releaseRigidBody(void) -{ - if ( mRigidDynamic ) - { - SCOPED_PHYSX_LOCK_WRITE(mApexScene); - mRigidDynamic->release(); - mRigidDynamic = NULL; - } -} - -EffectPath::EffectPath(void) -{ - mRotations = NULL; - mPathSpline = NULL; - mScaleSpline = NULL; - mSampleScaleSpline = 1.0f; - mSpeedSpline = NULL; - mPathDuration = 1; -} - -EffectPath::~EffectPath(void) -{ - delete mScaleSpline; - delete mSpeedSpline; - delete mPathSpline; - PX_FREE(mRotations); -} - -bool EffectPath::init(RigidBodyEffectNS::EffectPath_Type &path) -{ - bool ret = path.Scale.arraySizes[0] > 2; - - mPathDuration = path.PathDuration; - mMode = EM_LOOP; - if ( nvidia::strcmp(path.PlaybackMode,"LOOP") == 0 ) - { - mMode = EM_LOOP; - } - else if ( nvidia::strcmp(path.PlaybackMode,"PLAY_ONCE") == 0 ) - { - mMode = EM_PLAY_ONCE; - } - else if ( nvidia::strcmp(path.PlaybackMode,"PING_PONG") == 0 ) - { - mMode = EM_PING_PONG; - } - - delete mScaleSpline; - mScaleSpline = NULL; - - if ( path.Scale.arraySizes[0] == 2 ) - { - if ( path.Scale.buf[0].y != 1 || - path.Scale.buf[1].y != 1 ) - { - ret = true; - } - } - else if ( path.Scale.arraySizes[0] > 2 ) - { - ret = true; - } - - if ( ret ) - { - mScaleSpline = PX_NEW(Spline); - int32_t scount = path.Scale.arraySizes[0]; - mScaleSpline->Reserve(scount); - for (int32_t i=0; i<scount; i++) - { - float x = path.Scale.buf[i].x; - float y = path.Scale.buf[i].y; - mScaleSpline->AddNode(x,y); - } - mScaleSpline->ComputeSpline(); - uint32_t index; - float t; - mSampleScaleSpline = mScaleSpline->Evaluate(0,index,t); - } - - - bool hasSpeed = false; - - if ( path.Speed.arraySizes[0] == 2 ) - { - if ( path.Speed.buf[0].y != 1 || - path.Speed.buf[1].y != 1 ) - { - hasSpeed = true; - } - } - else if ( path.Speed.arraySizes[0] > 2 ) - { - hasSpeed = true; - } - - delete mSpeedSpline; - mSpeedSpline = NULL; - - if ( hasSpeed ) - { - ret = true; - - Spline speed; - int32_t scount = path.Speed.arraySizes[0]; - speed.Reserve(scount); - for (int32_t i=0; i<scount; i++) - { - float x = path.Speed.buf[i].x; - float y = path.Speed.buf[i].y; - speed.AddNode(x,y); - } - speed.ComputeSpline(); - - float distance = 0; - uint32_t index; - for (int32_t i=0; i<32; i++) - { - float t = (float)i/32.0f; - float fraction; - float dt = speed.Evaluate(t,index,fraction); - distance+=dt; - } - float recipDistance = 1.0f / distance; - mSpeedSpline = PX_NEW(Spline); - mSpeedSpline->Reserve(32); - distance = 0; - for (int32_t i=0; i<32; i++) - { - float t = (float)i/32.0f; - float fraction; - float dt = speed.Evaluate(t,index,fraction); - distance+=dt; - float d = distance*recipDistance; - mSpeedSpline->AddNode(t,d); - } - mSpeedSpline->ComputeSpline(); - float fraction; - mSampleSpeedSpline = mSpeedSpline->Evaluate(0,index,fraction); - } - - - PX_FREE(mRotations); - mRotations = NULL; - delete mPathSpline; - mPathSpline = NULL; - - if ( path.ControlPoints.arraySizes[0] >= 3 ) - { - mPathSpline = PX_NEW(SplineCurve); - int32_t count = path.ControlPoints.arraySizes[0]; - PxVec3Vector points; - mRotationCount = (uint32_t)count-1; - mRotations = (PxQuat *)PX_ALLOC(sizeof(PxQuat)*(count-1),"PathRotations"); - mPathRoot = path.ControlPoints.buf[0]; - for (int32_t i=1; i<count; i++) - { - const PxTransform &t = path.ControlPoints.buf[i]; - mRotations[i-1] = t.q; - points.pushBack(t.p); - } - mPathSpline->setControlPoints(points); - - float fraction; - uint32_t index; - mSamplePoseSpline.p = mPathSpline->Evaluate(0,index,fraction); - mSamplePoseSpline.q = PxQuat(PxIdentity); - mSamplePoseSpline = mPathRoot * mSamplePoseSpline; - ret = true; - } - - - - return ret; -} - -float EffectPath::sampleSpline(float x) -{ - if ( mScaleSpline ) - { - uint32_t index; - float fraction; - mSampleScaleSpline = mScaleSpline->Evaluate(x,index,fraction); - if ( mSampleScaleSpline < 0.001f ) - { - mSampleScaleSpline = 0.001f; - } - } - if ( mPathSpline ) - { - uint32_t index; - float fraction; - if ( mSpeedSpline ) - { - x = mSpeedSpline->Evaluate(x,index,fraction); - } - float duration = mPathSpline->GetLength(); - duration*=x; - mSamplePoseSpline.p = mPathSpline->Evaluate(duration,index,fraction); - PX_ASSERT( index < mRotationCount ); - PxQuat q0 = mRotations[index]; - uint32_t index2 = index+1; - if ( index2 >= mRotationCount ) - { - index2 = 0; - } - PxQuat q1 = mRotations[index2]; - - PxQuat q = physx::shdfnd::slerp(fraction,q0,q1); - - mSamplePoseSpline.q = q; - mSamplePoseSpline = mPathRoot * mSamplePoseSpline; - } - - return mSampleScaleSpline; -} - -void EffectPath::computeSampleTime(float ctime,float duration) -{ - float sampleTime=0; - switch ( mMode ) - { - case EM_PLAY_ONCE: - if ( ctime >= duration ) - { - sampleTime = 1; - } - else - { - sampleTime = ctime / duration; - } - break; - case EM_LOOP: - sampleTime = fmodf(ctime,duration) / duration; - break; - case EM_PING_PONG: - sampleTime = fmodf(ctime,duration*2) / duration; - if ( sampleTime > 1 ) - { - sampleTime = 2.0f - sampleTime; - } - break; - default: - PX_ALWAYS_ASSERT(); - break; - } - sampleSpline(sampleTime); -} -} // end of particles namespace -} // end of nvidia namespace diff --git a/APEX_1.4/module/particles/src/EffectPackageAssetImpl.cpp b/APEX_1.4/module/particles/src/EffectPackageAssetImpl.cpp deleted file mode 100644 index 926a1c32..00000000 --- a/APEX_1.4/module/particles/src/EffectPackageAssetImpl.cpp +++ /dev/null @@ -1,188 +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 "EffectPackageAssetImpl.h" -#include "EffectPackageActorParams.h" -#include "EffectPackageActorImpl.h" -#include "ModuleParticlesImpl.h" -#include "EmitterEffect.h" -#include "ReadCheck.h" -#include "WriteCheck.h" - -#pragma warning(disable:4100) - -namespace nvidia -{ - -namespace particles -{ - -EffectPackageAssetImpl::EffectPackageAssetImpl(ModuleParticlesImpl*, ResourceList&, const char* name) -{ - PX_ALWAYS_ASSERT(); -} - -EffectPackageAssetImpl::EffectPackageAssetImpl(ModuleParticlesImpl* moduleParticles, ResourceList& resourceList, NvParameterized::Interface* params, const char* name) -{ - mDefaultActorParams = NULL; - mName = name; - mModule = moduleParticles; - mParams = static_cast< EffectPackageAssetParams*>(params); - initializeAssetNameTable(); - resourceList.add(*this); -} - -EffectPackageAssetImpl::~EffectPackageAssetImpl() -{ -} - -uint32_t EffectPackageAssetImpl::forceLoadAssets() -{ - WRITE_ZONE(); - return 0; -} - -NvParameterized::Interface* EffectPackageAssetImpl::getDefaultActorDesc() -{ - READ_ZONE(); - NvParameterized::Traits* traits = GetInternalApexSDK()->getParameterizedTraits(); - PX_ASSERT(traits); - if (!traits) - { - return NULL; - } - // create if not yet created - if (!mDefaultActorParams) - { - const char* className = EffectPackageActorParams::staticClassName(); - NvParameterized::Interface* param = traits->createNvParameterized(className); - NvParameterized::Handle h(param); - mDefaultActorParams = static_cast<EffectPackageActorParams*>(param); - PX_ASSERT(param); - if (!param) - { - return NULL; - } - } - return mDefaultActorParams; - -} - -void EffectPackageAssetImpl::release() -{ - mModule->mSdk->releaseAsset(*this); -} - - -NvParameterized::Interface* EffectPackageAssetImpl::getDefaultAssetPreviewDesc() -{ - READ_ZONE(); - PX_ALWAYS_ASSERT(); - return NULL; -} - -Actor* EffectPackageAssetImpl::createApexActor(const NvParameterized::Interface& parms, Scene& apexScene) -{ - WRITE_ZONE(); - Actor* ret = NULL; - - ParticlesScene* ds = mModule->getParticlesScene(apexScene); - if (ds) - { - const EffectPackageAssetParams* assetParams = mParams; - const EffectPackageActorParams* actorParams = static_cast<const EffectPackageActorParams*>(&parms); - EffectPackageActorImpl* ea = PX_NEW(EffectPackageActorImpl)(this, assetParams, actorParams, - *GetInternalApexSDK(), - apexScene, - *ds, - mModule->getModuleTurbulenceFS()); - - ret = static_cast< Actor*>(ea); - } - return ret; -} - -void EffectPackageAssetImpl::destroy() -{ - if (mDefaultActorParams) - { - mDefaultActorParams->destroy(); - mDefaultActorParams = 0; - } - - if (mParams) - { - mParams->destroy(); - mParams = NULL; - } - - /* Actors are automatically cleaned up on deletion by ResourceList dtor */ - delete this; - -} - -void EffectPackageAssetImpl::initializeAssetNameTable() -{ -} - -float EffectPackageAssetImpl::getDuration() const -{ - READ_ZONE(); - float ret = 0; - - for (int32_t i = 0; i < mParams->Effects.arraySizes[0]; i++) - { - NvParameterized::Interface* iface = mParams->Effects.buf[i]; - if (iface && nvidia::strcmp(iface->className(), EmitterEffect::staticClassName()) == 0) - { - EmitterEffect* ee = static_cast< EmitterEffect*>(iface); - float v = 0; - if (ee->EffectProperties.Duration != 0 && ee->EffectProperties.RepeatCount != 9999) - { - v = ee->EffectProperties.InitialDelayTime + ee->EffectProperties.RepeatCount * ee->EffectProperties.Duration + ee->EffectProperties.RepeatCount * ee->EffectProperties.RepeatDelay; - } - if (v == 0) // any infinite lifespan sub-effect means the entire effect package has an infinite life - { - ret = 0; - break; - } - else if (v > ret) - { - ret = v; - } - } - } - - return ret; -} - -bool EffectPackageAssetImpl::useUniqueRenderVolume() const -{ - READ_ZONE(); - return mParams ? mParams->LODSettings.UniqueRenderVolume : false; -} - -void EffectPackageAssetAuthoringImpl::setToolString(const char* toolString) -{ - if (mParams != NULL) - { - NvParameterized::Handle handle(*mParams, "toolString"); - PX_ASSERT(handle.isValid()); - if (handle.isValid()) - { - PX_ASSERT(handle.parameterDefinition()->type() == NvParameterized::TYPE_STRING); - handle.setParamString(toolString); - } - } -} - -} // end of particles namespace -} // end of nvidia namespace diff --git a/APEX_1.4/module/particles/src/ModuleParticlesImpl.cpp b/APEX_1.4/module/particles/src/ModuleParticlesImpl.cpp deleted file mode 100644 index 79f2024a..00000000 --- a/APEX_1.4/module/particles/src/ModuleParticlesImpl.cpp +++ /dev/null @@ -1,4341 +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 "ApexDefs.h" - -#define SAFE_MODULE_RELEASE(x) if ( x ) { ModuleIntl *m = mSdk->getInternalModule(x); PX_ASSERT(m); m->setParent(NULL); x->release(); x = NULL; } - -/* === ModuleParticlesImpl DLL Setup === */ - -#pragma warning(disable:4505) - -#include "ModuleParticlesImpl.h" -#include "ModuleParticlesRegistration.h" -#include "ModulePerfScope.h" -#include "ParticlesScene.h" -#include "SceneIntl.h" -#include "PxMaterial.h" -#include "ModuleTurbulenceFS.h" -#include "PsMemoryBuffer.h" - -#include "ApexSDKIntl.h" -#include "ApexUsingNamespace.h" -#include "Apex.h" -#include "nvparameterized/NvParamUtils.h" -#include "ApexEmitterAssetParameters.h" -#include "EmitterGeomSphereParams.h" -#include "IofxAssetParameters.h" -#include "SpriteIofxParameters.h" -#include "ViewDirectionSortingModifierParams.h" -#include "SimpleScaleModifierParams.h" -#include "InitialColorModifierParams.h" -#include "TurbulenceFSAssetParams.h" -#include "BasicIOSAssetParam.h" -#include "EmitterAsset.h" -#include "GroundEmitterAsset.h" -#include "ImpactEmitterAsset.h" -#include "IofxAsset.h" -#include "BasicIosAsset.h" -#include "ParticleIosAsset.h" -#include "TurbulenceFSAsset.h" -#include "EmitterGeomBoxParams.h" -#include "RandomScaleModifierParams.h" -#include "RandomRotationModifierParams.h" -#include "ColorVsLifeCompositeModifierParams.h" -#include "ScaleVsLife2DModifierParams.h" -#include "FloatMath.h" -#include "JetFSActor.h" -#include "WindFSActor.h" -#include "AttractorFSActor.h" -#include "BasicFSAsset.h" -#include "JetFSAssetParams.h" -#include "WindFSAssetParams.h" -#include "NoiseFSAssetParams.h" -#include "VortexFSAssetParams.h" -#include "OrientScaleAlongScreenVelocityModifierParams.h" -#include "RandomRotationModifierParams.h" -#include "RotationRateModifierParams.h" -#include "RotationRateVsLifeModifierParams.h" -#include "EffectPackageActorImpl.h" -#include "AttractorFSAssetParams.h" -#include "FluidParticleSystemParams.h" -#include "ModuleParticleIosRegistration.h" -#include "MeshIofxParameters.h" -#include "SimpleScaleModifierParams.h" -#include "RotationModifierParams.h" -#include "ScaleVsLife3DModifierParams.h" -#include "ForceFieldAssetParams.h" -#include "RadialForceFieldKernelParams.h" -#include "ForceFieldFalloffParams.h" -#include "ForceFieldNoiseParams.h" -#include "HeatSourceAsset.h" -#include "SubstanceSourceAsset.h" -#include "VelocitySourceAsset.h" -#include "ForceFieldAsset.h" -#include "EffectPackageAssetParams.h" -#include "FlameEmitterAsset.h" -#include "FlameEmitterAssetParams.h" - -#include "ViewDirectionSortingModifierParams.h" -#include "RandomSubtextureModifierParams.h" -#include "UserOpaqueMesh.h" -#include "HeatSourceAssetParams.h" -#include "HeatSourceGeomSphereParams.h" -#include "SubstanceSourceAssetParams.h" -#include "VelocitySourceAssetParams.h" -#include "PxPhysics.h" -#include "EffectPackageData.h" - -#define SAFE_DESTROY(x) if ( x ) { x->destroy(); x = NULL; } - - -#if PX_X86 - -#define LINK_KERNEL(name) "/include:_"#name -#define LINK_S2_KERNEL(name) "/include:_"#name"_templ$0 /include:_"#name"_templ$1" - -#elif PX_X64 - -#define LINK_KERNEL(name) "/include:"#name -#define LINK_S2_KERNEL(name) "/include:"#name"_templ$0 /include:"#name"_templ$1" - -#endif - -#if APEX_CUDA_SUPPORT - -#pragma comment(linker, LINK_S2_KERNEL(BasicFS_fieldSamplerGridKernel)) -#pragma comment(linker, LINK_S2_KERNEL(BasicFS_fieldSamplerPointsKernel)) - -#pragma comment(linker, LINK_KERNEL(BasicIOS_compactKernel)) -#pragma comment(linker, LINK_KERNEL(BasicIOS_histogramKernel)) -#pragma comment(linker, LINK_KERNEL(BasicIOS_mergeHistogramKernel)) -#pragma comment(linker, LINK_KERNEL(BasicIOS_reduceKernel)) -#pragma comment(linker, LINK_KERNEL(BasicIOS_scanKernel)) -#pragma comment(linker, LINK_S2_KERNEL(BasicIOS_simulateApplyFieldKernel)) -#pragma comment(linker, LINK_S2_KERNEL(BasicIOS_simulateKernel)) -#pragma comment(linker, LINK_KERNEL(BasicIOS_stateKernel)) - -#pragma comment(linker, LINK_KERNEL(FieldSampler_applyParticlesKernel)) -#pragma comment(linker, LINK_KERNEL(FieldSampler_clearGridKernel)) -#pragma comment(linker, LINK_KERNEL(FieldSampler_clearKernel)) -#pragma comment(linker, LINK_KERNEL(FieldSampler_composeKernel)) - -#pragma comment(linker, LINK_S2_KERNEL(ForceField_fieldSamplerGridKernel)) -#pragma comment(linker, LINK_S2_KERNEL(ForceField_fieldSamplerPointsKernel)) - -#pragma comment(linker, LINK_KERNEL(IOFX_actorRangeKernel)) -#pragma comment(linker, LINK_KERNEL(IOFX_bboxKernel)) -#pragma comment(linker, LINK_S2_KERNEL(IOFX_meshModifiersKernel)) -#pragma comment(linker, LINK_KERNEL(IOFX_newRadixSortBlockKernel)) -#pragma comment(linker, LINK_KERNEL(IOFX_newRadixSortStepKernel)) -#pragma comment(linker, LINK_KERNEL(IOFX_radixSortStepKernel)) -#pragma comment(linker, LINK_S2_KERNEL(IOFX_makeSortKeys)) -#pragma comment(linker, LINK_S2_KERNEL(IOFX_remapKernel)) -#pragma comment(linker, LINK_S2_KERNEL(IOFX_spriteModifiersKernel)) -#pragma comment(linker, LINK_S2_KERNEL(IOFX_spriteTextureModifiersKernel)) -#pragma comment(linker, LINK_S2_KERNEL(IOFX_volumeMigrationKernel)) - -#pragma comment(linker, LINK_KERNEL(ParticleIOS_compactKernel)) -#pragma comment(linker, LINK_KERNEL(ParticleIOS_histogramKernel)) -#pragma comment(linker, LINK_KERNEL(ParticleIOS_mergeHistogramKernel)) -#pragma comment(linker, LINK_KERNEL(ParticleIOS_reduceKernel)) -#pragma comment(linker, LINK_KERNEL(ParticleIOS_scanKernel)) -#pragma comment(linker, LINK_S2_KERNEL(ParticleIOS_simulateApplyFieldKernel)) -#pragma comment(linker, LINK_S2_KERNEL(ParticleIOS_simulateKernel)) -#pragma comment(linker, LINK_KERNEL(ParticleIOS_stateKernel)) - -#endif - -namespace nvidia -{ -namespace apex -{ - - -void instantiateModuleBasicIos(); -void instantiateModuleEmitter(); -void instantiateModuleIofx(); -void instantiateModuleFieldSampler(); -void instantiateModuleParticleIos(); -void instantiateModuleForceField(); -void instantiateModuleBasicFS(); - -static const char* getAuthoringTypeName(const char* className) -{ - const char* ret = NULL; - - if (nvidia::strcmp(className, "BasicIOSAssetParam") == 0) - { - ret = BASIC_IOS_AUTHORING_TYPE_NAME; - } - else if (nvidia::strcmp(className, "IofxAssetParameters") == 0) - { - ret = IOFX_AUTHORING_TYPE_NAME; - } - else if (nvidia::strcmp(className, "ParticleIosAssetParam") == 0) - { - ret = PARTICLE_IOS_AUTHORING_TYPE_NAME; - } - - - PX_ASSERT(ret); - return ret; -} - -#if defined(_USRDLL) - -/* Modules don't have to link against the framework, they keep their own */ -ApexSDKIntl* gApexSdk = 0; -ApexSDK* GetApexSDK() -{ - return gApexSdk; -} -ApexSDKIntl* GetInternalApexSDK() -{ - return gApexSdk; -} - -static PxTransform getPose(float x, float y, float z, float rotX, float rotY, float rotZ) -{ - PxTransform ret; - ret.p = PxVec3(x, y, z); - fm_eulerToQuat(rotX * FM_DEG_TO_RAD, rotY * FM_DEG_TO_RAD, rotZ * FM_DEG_TO_RAD, &ret.q.x); - return ret; -} - -APEX_API Module* CALL_CONV createModule( - ApexSDKIntl* inSdk, - ModuleIntl** niRef, - uint32_t APEXsdkVersion, - uint32_t PhysXsdkVersion, - ApexCreateError* errorCode) -{ - if (APEXsdkVersion != APEX_SDK_VERSION) - { - if (errorCode) - { - *errorCode = APEX_CE_WRONG_VERSION; - } - return NULL; - } - - if (PhysXsdkVersion != PX_PHYSICS_VERSION) - { - if (errorCode) - { - *errorCode = APEX_CE_WRONG_VERSION; - } - return NULL; - } - - /* Setup common module global variables */ - gApexSdk = inSdk; - particles::ModuleParticlesImpl* impl = PX_NEW(particles::ModuleParticlesImpl)(inSdk); - *niRef = (ModuleIntl*) impl; - return (Module*) impl; -} - -#else -/* Statically linking entry function */ -void instantiateModuleParticles() -{ - ApexSDKIntl* sdk = GetInternalApexSDK(); - particles::ModuleParticlesImpl* impl = PX_NEW(particles::ModuleParticlesImpl)(sdk); - sdk->registerExternalModule((Module*) impl, (ModuleIntl*) impl); -} -#endif // `defined(_USRDLL) - -} - -namespace particles -{ - -/* === ModuleParticlesImpl Implementation === */ - -#ifdef WITHOUT_APEX_AUTHORING - -class ParticlesAssetDummyAuthoring : public AssetAuthoring, public UserAllocated -{ -public: - ParticlesAssetDummyAuthoring(ModuleParticlesImpl* module, ResourceList& list, NvParameterized::Interface* params, const char* name) - { - PX_UNUSED(module); - PX_UNUSED(list); - PX_UNUSED(params); - PX_UNUSED(name); - } - - ParticlesAssetDummyAuthoring(ModuleParticlesImpl* module, ResourceList& list, const char* name) - { - PX_UNUSED(module); - PX_UNUSED(list); - PX_UNUSED(name); - } - - ParticlesAssetDummyAuthoring(ModuleParticlesImpl* module, ResourceList& list) - { - PX_UNUSED(module); - PX_UNUSED(list); - } - - virtual void release() - { - destroy(); - } - - // internal - void destroy() - { - delete this; - } - - const char* getName(void) const - { - return NULL; - } - - - /** - * \brief Prepares a fully authored Asset Authoring object for a specified platform - */ - virtual bool prepareForPlatform(nvidia::apex::PlatformTag) - { - PX_ASSERT(0); - return false; - } - - /** - * \brief Save asset's NvParameterized interface, may return NULL - */ - virtual NvParameterized::Interface* getNvParameterized() - { - PX_ASSERT(0); - return NULL; - } - - virtual NvParameterized::Interface* releaseAndReturnNvParameterizedInterface(void) - { - PX_ALWAYS_ASSERT(); - return NULL; - } - - virtual void setToolString(const char* toolName, const char* toolVersion, uint32_t toolChangelist) - { - PX_ALWAYS_ASSERT(); - PX_UNUSED(toolName); - PX_UNUSED(toolVersion); - PX_UNUSED(toolChangelist); - } -}; - -typedef ApexAuthorableObject<ModuleParticlesImpl, ParticlesAsset, ParticlesAssetDummyAuthoring> ParticlesAO; - -#else -typedef ApexAuthorableObject<ModuleParticlesImpl, ParticlesAsset, ParticlesAssetAuthoring> ParticlesAO; -#endif - - -AuthObjTypeID EffectPackageAssetImpl::mAssetTypeID; // Static class member of ParticlesAsset - -#ifdef WITHOUT_APEX_AUTHORING - -class EffectPackageAssetDummyAuthoring : public AssetAuthoring, public UserAllocated -{ -public: - EffectPackageAssetDummyAuthoring(ModuleParticlesImpl* module, ResourceList& list, NvParameterized::Interface* params, const char* name) - { - PX_UNUSED(module); - PX_UNUSED(list); - PX_UNUSED(params); - PX_UNUSED(name); - } - - EffectPackageAssetDummyAuthoring(ModuleParticlesImpl* module, ResourceList& list, const char* name) - { - PX_UNUSED(module); - PX_UNUSED(list); - PX_UNUSED(name); - } - - EffectPackageAssetDummyAuthoring(ModuleParticlesImpl* module, ResourceList& list) - { - PX_UNUSED(module); - PX_UNUSED(list); - } - - virtual void release() - { - destroy(); - } - - // internal - void destroy() - { - delete this; - } - - const char* getName(void) const - { - return NULL; - } - - /** - * \brief Returns the name of this APEX authorable object type - */ - virtual const char* getObjTypeName() const - { - return EffectPackageAssetImpl::getClassName(); - } - - /** - * \brief Prepares a fully authored Asset Authoring object for a specified platform - */ - virtual bool prepareForPlatform(nvidia::apex::PlatformTag) - { - PX_ASSERT(0); - return false; - } - - /** - * \brief Save asset's NvParameterized interface, may return NULL - */ - virtual NvParameterized::Interface* getNvParameterized() - { - PX_ASSERT(0); - return NULL; - } - - virtual NvParameterized::Interface* releaseAndReturnNvParameterizedInterface(void) - { - PX_ALWAYS_ASSERT(); - return NULL; - } - - virtual void setToolString(const char* toolName, const char* toolVersion, uint32_t toolChangelist) - { - PX_ALWAYS_ASSERT(); - PX_UNUSED(toolName); - PX_UNUSED(toolVersion); - PX_UNUSED(toolChangelist); - } -}; - -typedef ApexAuthorableObject<ModuleParticlesImpl, EffectPackageAssetImpl, EffectPackageAssetDummyAuthoring> EffectPackageAO; - -#else -typedef ApexAuthorableObject<ModuleParticlesImpl, EffectPackageAssetImpl, EffectPackageAssetAuthoringImpl> EffectPackageAO; -#endif - - -//******************************************************************** - -#define MODULE_PARENT(x) if ( x ) { ModuleIntl *m = mSdk->getInternalModule(x); PX_ASSERT(m); m->setParent(this); m->setCreateOk(false); } - -ModuleParticlesImpl::ModuleParticlesImpl(ApexSDKIntl* inSdk) -{ - mSdk = inSdk; - - PxPhysics *sdk = mSdk->getPhysXSDK(); - mDefaultMaterial = sdk->createMaterial(1, 1, 1); - - instantiateModuleBasicIos(); // Instantiate the BasicIOS module statically - mModuleBasicIos = mSdk->createModule("BasicIOS"); - PX_ASSERT(mModuleBasicIos); - MODULE_PARENT(mModuleBasicIos); - - instantiateModuleEmitter(); // Instantiate the Emitter module statically - mModuleEmitter = mSdk->createModule("Emitter"); - PX_ASSERT(mModuleEmitter); - MODULE_PARENT(mModuleEmitter); - - instantiateModuleIofx(); // Instantiate the IOFX module statically - mModuleIofx = mSdk->createModule("IOFX"); - PX_ASSERT(mModuleIofx); - MODULE_PARENT(mModuleIofx); - - instantiateModuleFieldSampler(); // Instantiate the field sampler module statically - mModuleFieldSampler = mSdk->createModule("FieldSampler"); - PX_ASSERT(mModuleFieldSampler); - MODULE_PARENT(mModuleFieldSampler); - - instantiateModuleBasicFS(); // Instantiate the BasicFS module statically - mModuleBasicFS = mSdk->createModule("BasicFS"); - PX_ASSERT(mModuleBasicFS); - MODULE_PARENT(mModuleBasicFS); - - instantiateModuleParticleIos(); // PhysX 3.x only : Instantiate the ParticleIOS module - mModuleParticleIos = mSdk->createModule("ParticleIOS"); - PX_ASSERT(mModuleParticleIos); - MODULE_PARENT(mModuleParticleIos); - - instantiateModuleForceField(); // PhysX 3.x only : Instantiate the ForceField module - mModuleForceField = mSdk->createModule("ForceField"); - PX_ASSERT(mModuleForceField); - MODULE_PARENT(mModuleForceField); - - - mName = "Particles"; - mApiProxy = this; - mModuleParams = NULL; - mTurbulenceModule = NULL; - mGraphicsMaterialsDatabase = NULL; - mEnableScreenCulling = false; - mZnegative = false; - mUseEmitterPool = false; - - mEffectPackageIOSDatabaseParams = NULL; - mEffectPackageIOFXDatabaseParams = NULL; - mEffectPackageEmitterDatabaseParams = NULL; - mEffectPackageDatabaseParams = NULL; - mEffectPackageFieldSamplerDatabaseParams = NULL; - - { - /* Register asset type and create a namespace for it's assets */ - const char* pName = EffectPackageAssetParams::staticClassName(); - EffectPackageAO* eAO = PX_NEW(EffectPackageAO)(this, mEffectPackageAuthorableObjects, pName); - EffectPackageAssetImpl::mAssetTypeID = eAO->getResID(); - } - - /* Register the NvParameterized factories */ - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - ModuleParticlesRegistration::invokeRegistration(traits); - - { - uint32_t count = mSdk->getNbModules(); - Module** modules = mSdk->getModules(); - for (uint32_t i = 0; i < count; i++) - { - Module* m = modules[i]; - const char* name = m->getName(); - if (nvidia::strcmp(name, "TurbulenceFS") == 0) - { - mTurbulenceModule = static_cast< ModuleTurbulenceFS*>(m); - break; - } - } - } -} - -ModuleParticlesImpl::~ModuleParticlesImpl() -{ - if ( mDefaultMaterial ) - { - mDefaultMaterial->release(); - } -} - -void ModuleParticlesImpl::destroy() -{ - // release the NvParameterized factory - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - - if (mModuleParams) - { - mModuleParams->destroy(); - mModuleParams = NULL; - } - - SAFE_DESTROY(mEffectPackageIOSDatabaseParams); - SAFE_DESTROY(mEffectPackageIOFXDatabaseParams); - SAFE_DESTROY(mEffectPackageEmitterDatabaseParams); - SAFE_DESTROY(mEffectPackageDatabaseParams); - SAFE_DESTROY(mEffectPackageFieldSamplerDatabaseParams); - SAFE_DESTROY(mGraphicsMaterialsDatabase); - - ModuleBase::destroy(); - - if (traits) - { - /* Remove the NvParameterized factories */ - ModuleParticlesRegistration::invokeUnregistration(traits); - } - - SAFE_MODULE_RELEASE(mModuleBasicIos); - SAFE_MODULE_RELEASE(mModuleEmitter); - SAFE_MODULE_RELEASE(mModuleIofx); - SAFE_MODULE_RELEASE(mModuleFieldSampler); - SAFE_MODULE_RELEASE(mModuleBasicFS); - SAFE_MODULE_RELEASE(mModuleParticleIos); // PhysX 3.x only : Instantiate the ParticleIOS module - SAFE_MODULE_RELEASE(mModuleForceField); // PhysX 3.x only : Instantiate the ForceField module - - // clear before deletion, so that we don't call back into releaseModuleSceneIntl during "delete this" - mParticlesScenes.clear(); - - delete this; - - -} - -NvParameterized::Interface* ModuleParticlesImpl::getDefaultModuleDesc() -{ - WRITE_ZONE(); - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - - if (!mModuleParams) - { - mModuleParams = DYNAMIC_CAST(ParticlesModuleParameters*) - (traits->createNvParameterized("ParticlesModuleParameters")); - PX_ASSERT(mModuleParams); - } - else - { - mModuleParams->initDefaults(); - } - - return mModuleParams; -} - -void ModuleParticlesImpl::init(const ModuleParticlesDesc& expDesc) -{ - WRITE_ZONE(); - mModuleValue = expDesc.moduleValue; -} - -AuthObjTypeID ModuleParticlesImpl::getParticlesAssetTypeID() const -{ -// TODO return ParticlesAsset::mAssetTypeID; - return 0; -} -AuthObjTypeID ModuleParticlesImpl::getModuleID() const -{ - READ_ZONE(); -// return ParticlesAsset::mAssetTypeID; -// TODO - return 0; -} - - -/* == Particles Scene methods == */ -ModuleSceneIntl* ModuleParticlesImpl::createInternalModuleScene(SceneIntl& scene, RenderDebugInterface* renderDebug) -{ - ModuleSceneIntl* ret = PX_NEW(ParticlesScene)(*this, scene, renderDebug, mParticlesScenes); - mScenes.pushBack(ret); - - return ret; -} - -void ModuleParticlesImpl::releaseModuleSceneIntl(ModuleSceneIntl& scene) -{ - for (uint32_t i = 0; i < mScenes.size(); ++i) - { - if (mScenes[i] == &scene) - { - mScenes.remove(i); - break; - } - } - ParticlesScene* es = DYNAMIC_CAST(ParticlesScene*)(&scene); - es->destroy(); - -} - -uint32_t ModuleParticlesImpl::forceLoadAssets() -{ - uint32_t loadedAssetCount = 0; - - for (uint32_t i = 0; i < mAuthorableObjects.getSize(); i++) - { - AuthorableObjectIntl* ao = static_cast<AuthorableObjectIntl*>(mAuthorableObjects.getResource(i)); - loadedAssetCount += ao->forceLoadAssets(); - } - - for (uint32_t i = 0; i < mEffectPackageAuthorableObjects.getSize(); i++) - { - AuthorableObjectIntl* ao = static_cast<AuthorableObjectIntl*>(mEffectPackageAuthorableObjects.getResource(i)); - loadedAssetCount += ao->forceLoadAssets(); - } - - - return loadedAssetCount; -} - -ParticlesScene* ModuleParticlesImpl::getParticlesScene(const Scene& apexScene) -{ - for (uint32_t i = 0 ; i < mParticlesScenes.getSize() ; i++) - { - ParticlesScene* es = DYNAMIC_CAST(ParticlesScene*)(mParticlesScenes.getResource(i)); - if (es->mApexScene == &apexScene) - { - return es; - } - } - - PX_ASSERT(!"Unable to locate an appropriate ParticlesScene"); - return NULL; -} - -RenderableIterator* ModuleParticlesImpl::createRenderableIterator(const Scene& apexScene) -{ - WRITE_ZONE(); - ParticlesScene* es = getParticlesScene(apexScene); - if (es) - { - return es->createRenderableIterator(); - } - - return NULL; -} - -const NvParameterized::Interface* ModuleParticlesImpl::locateVolumeRenderMaterialData(const char* name) const -{ - const NvParameterized::Interface* ret = NULL; - - if (mGraphicsMaterialsDatabase) - { - EffectPackageGraphicsMaterialsParams* d = static_cast< EffectPackageGraphicsMaterialsParams*>(mGraphicsMaterialsDatabase); - for (int32_t i = 0; i < d->GraphicsMaterials.arraySizes[0]; i++) - { - NvParameterized::Interface *ei = d->GraphicsMaterials.buf[i]; - if ( ei && nvidia::strcmp(ei->className(),"VolumeRenderMaterialData") == 0 ) - { - VolumeRenderMaterialData* e = static_cast< VolumeRenderMaterialData*>(ei); - if (e) - { - if (e->Name && nvidia::stricmp(e->Name, name) == 0) - { - ret = e; - break; - } - } - } - } - } - return ret; -} - - - -const NvParameterized::Interface* ModuleParticlesImpl::locateGraphicsMaterialData(const char* name) const -{ - READ_ZONE(); - const NvParameterized::Interface* ret = NULL; - - if (mGraphicsMaterialsDatabase) - { - EffectPackageGraphicsMaterialsParams* d = static_cast< EffectPackageGraphicsMaterialsParams*>(mGraphicsMaterialsDatabase); - for (int32_t i = 0; i < d->GraphicsMaterials.arraySizes[0]; i++) - { - NvParameterized::Interface *ei = d->GraphicsMaterials.buf[i]; - if ( ei && nvidia::strcmp(ei->className(),"GraphicsMaterialData") == 0 || nvidia::strcmp(ei->className(),"VolumeRenderMaterialData") == 0 ) - { - GraphicsMaterialData* e = static_cast< GraphicsMaterialData*>(ei); - if (e) - { - if (e->Name && nvidia::stricmp(e->Name, name) == 0) - { - ret = e; - break; - } - } - } - } - } - return ret; -} - -static bool isUnique(Array< const char* > &nameList, const char* baseName) -{ - bool ret = true; - for (uint32_t i = 0; i < nameList.size(); i++) - { - if (nvidia::stricmp(baseName, nameList[i]) == 0) - { - ret = false; - break; - } - } - return ret; -} - -static const char* getUniqueName(Array< const char* > &nameList, const char* baseName) -{ - const char* ret = baseName; - - if (baseName == NULL || strlen(baseName) == 0) - { - baseName = "default"; - } - if (!isUnique(nameList, baseName)) - { - static char uniqueName[512]; - strncpy(uniqueName, baseName, 512); - for (uint32_t i = 1; i < 1000; i++) - { - sprintf_s(uniqueName, 512, "%s%d", baseName, i); - if (isUnique(nameList, uniqueName)) - { - ret = uniqueName; - break; - } - } - } - return ret; -} - - -bool ModuleParticlesImpl::setEffectPackageGraphicsMaterialsDatabase(const NvParameterized::Interface* dataBase) -{ - WRITE_ZONE(); - bool ret = false; - if (dataBase) - { - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - if (nvidia::strcmp(dataBase->className(), EffectPackageGraphicsMaterialsParams::staticClassName()) == 0 && dataBase != mGraphicsMaterialsDatabase) - { - if (mGraphicsMaterialsDatabase) - { - mGraphicsMaterialsDatabase->destroy(); - mGraphicsMaterialsDatabase = NULL; - } - dataBase->clone(mGraphicsMaterialsDatabase); - if ( mGraphicsMaterialsDatabase == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - mGraphicsMaterialsDatabase = traits->createNvParameterized(EffectPackageGraphicsMaterialsParams::staticClassName()); - } - ret = true; - } - else - { - // add it to the end of the existing array.. - if (nvidia::strcmp(dataBase->className(), GraphicsMaterialData::staticClassName()) == 0 || nvidia::strcmp(dataBase->className(), VolumeRenderMaterialData::staticClassName()) == 0 ) - { - bool revised = false; - const char* itemName = dataBase->name(); - EffectPackageGraphicsMaterialsParams* d = static_cast< EffectPackageGraphicsMaterialsParams*>(mGraphicsMaterialsDatabase); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->GraphicsMaterials.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->GraphicsMaterials.buf[i]; - if (!ei) - { - continue; - } - const char *materialName=NULL; - if ( nvidia::strcmp(ei->className(),"GraphicsMaterialData") == 0 ) - { - GraphicsMaterialData* ed = static_cast< GraphicsMaterialData*>(ei); - materialName = ed->Name.buf; - } - else if ( nvidia::strcmp(ei->className(),"VolumeRenderMaterialData") == 0 ) - { - VolumeRenderMaterialData* ed = static_cast< VolumeRenderMaterialData*>(ei); - materialName = ed->Name.buf; - } - else - { - PX_ALWAYS_ASSERT(); - } - if ( materialName && nvidia::stricmp(materialName, itemName) == 0) - { - ei->copy(*dataBase); - revised = true; - ret = true; - break; - } - } - if (!revised && mGraphicsMaterialsDatabase) - { - int32_t arraySize = d->GraphicsMaterials.arraySizes[0]; - NvParameterized::Handle handle(mGraphicsMaterialsDatabase); - NvParameterized::ErrorType err = handle.getParameter("GraphicsMaterials"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(arraySize + 1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* ei = NULL; - NvParameterized::ErrorType err = dataBase->clone(ei); - if ( err != NvParameterized::ERROR_NONE || ei == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - else - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - d->GraphicsMaterials.buf[arraySize] = ei; - } - ret = true; - } - } - } - } - } - - if (mGraphicsMaterialsDatabase) - { - EffectPackageGraphicsMaterialsParams* ds = static_cast< EffectPackageGraphicsMaterialsParams*>(mGraphicsMaterialsDatabase); - if (ds->GraphicsMaterials.arraySizes[0] == 0) - { - NvParameterized::Handle handle(mGraphicsMaterialsDatabase); - NvParameterized::ErrorType err = handle.getParameter("GraphicsMaterials"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(2); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - NvParameterized::Interface* ei; - if (err == NvParameterized::ERROR_NONE) - { - ei = traits->createNvParameterized(GraphicsMaterialData::staticClassName()); - ds->GraphicsMaterials.buf[0] = ei; - ei = traits->createNvParameterized(VolumeRenderMaterialData::staticClassName()); - ds->GraphicsMaterials.buf[1] = ei; - } - } - - Array< const char* > nameList; - for (int32_t i = 0; i < ds->GraphicsMaterials.arraySizes[0]; i++) - { - NvParameterized::Interface *ei = ds->GraphicsMaterials.buf[i]; - if ( !ei ) - continue; - const char *materialName=NULL; - if ( nvidia::strcmp(ei->className(),"GraphicsMaterialData") == 0 ) - { - GraphicsMaterialData* e = static_cast< GraphicsMaterialData*>(ei); - if (e) - { - materialName = e->Name; - } - } - else if ( nvidia::strcmp(ei->className(),"VolumeRenderMaterialData") == 0 ) - { - VolumeRenderMaterialData* e = static_cast< VolumeRenderMaterialData*>(ei); - if (e) - { - materialName = e->Name.buf; - } - } - else - { - PX_ALWAYS_ASSERT(); - } - if ( materialName ) - { - for (uint32_t j = 0; j < nameList.size(); j++) - { - if (nvidia::stricmp(nameList[j], materialName) == 0) - { - NvParameterized::Handle handle(ei); - NvParameterized::ErrorType err = handle.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - materialName = getUniqueName(nameList, materialName); - handle.setParamString(materialName); - ret = true; - break; - } - } - } - nameList.pushBack(materialName); - } - } - } - } - return ret; -} - - -const NvParameterized::Interface* ModuleParticlesImpl::getEffectPackageGraphicsMaterialsDatabase(void) const -{ - READ_ZONE(); - return mGraphicsMaterialsDatabase; -} - - -NvParameterized::Interface* ModuleParticlesImpl::locateResource(const char* resourceName, const char* nameSpace) -{ - WRITE_ZONE(); - NvParameterized::Interface* ret = NULL; - - if (mEffectPackageDatabaseParams == NULL) - { - return NULL; - } - - if (nvidia::strcmp(nameSpace, PARTICLES_EFFECT_PACKAGE_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageDatabaseParams* d = static_cast< EffectPackageDatabaseParams*>(mEffectPackageDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->EffectPackages.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->EffectPackages.buf[i]; - if (!ei) - { - continue; - } - EffectPackageData* ed = static_cast< EffectPackageData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - ret = ed->EffectPackage; - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, APEX_MATERIALS_NAME_SPACE) == 0 || nvidia::strcmp(nameSpace,"GraphicsMaterialData") == 0 ) - { - EffectPackageGraphicsMaterialsParams* d = static_cast< EffectPackageGraphicsMaterialsParams*>(mGraphicsMaterialsDatabase); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->GraphicsMaterials.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->GraphicsMaterials.buf[i]; - if (!ei) - { - continue; - } - if ( nvidia::strcmp(ei->className(),"GraphicsMaterialData") == 0 ) - { - GraphicsMaterialData* ed = static_cast< GraphicsMaterialData*>(ei); - if ( nvidia::strcmp(ed->Name,resourceName) == 0 ) - { - ret = ei; - break; - } - } - } - } - } - else if (nvidia::strcmp(nameSpace, APEX_VOLUME_RENDER_MATERIALS_NAME_SPACE) == 0 || nvidia::strcmp(nameSpace,"VolumeRenderMaterialData") == 0 ) - { - EffectPackageGraphicsMaterialsParams* d = static_cast< EffectPackageGraphicsMaterialsParams*>(mGraphicsMaterialsDatabase); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->GraphicsMaterials.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->GraphicsMaterials.buf[i]; - if (!ei) - { - continue; - } - if ( nvidia::strcmp(ei->className(),"VolumeRenderMaterialData") == 0 ) - { - VolumeRenderMaterialData* ed = static_cast< VolumeRenderMaterialData*>(ei); - if ( nvidia::strcmp(ed->Name,resourceName) == 0 ) - { - ret = ei; - break; - } - } - } - } - } - else if (nvidia::strcmp(nameSpace, IOFX_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "GraphicsEffectData") == 0 ) - { - EffectPackageIOFXDatabaseParams* d = static_cast< EffectPackageIOFXDatabaseParams*>(mEffectPackageIOFXDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->GraphicsEffects.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->GraphicsEffects.buf[i]; - if (!ei) - { - continue; - } - GraphicsEffectData* ed = static_cast< GraphicsEffectData*>(ei); - if (nvidia::stricmp(resourceName, ed->Name) == 0) - { - if (nvidia::strcmp(nameSpace, IOFX_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->IOFX; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, "ParticleSimulationData") == 0) - { - EffectPackageIOSDatabaseParams* d = static_cast< EffectPackageIOSDatabaseParams*>(mEffectPackageIOSDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->ParticleSimulations.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->ParticleSimulations.buf[i]; - if (!ei) - { - continue; - } - ParticleSimulationData* ed = static_cast< ParticleSimulationData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - ret = ei; - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, BASIC_IOS_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageIOSDatabaseParams* d = static_cast< EffectPackageIOSDatabaseParams*>(mEffectPackageIOSDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->ParticleSimulations.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->ParticleSimulations.buf[i]; - if (!ei) - { - continue; - } - ParticleSimulationData* ed = static_cast< ParticleSimulationData*>(ei); - if (nvidia::strcmp(ed->IOS->className(), basicios::BasicIOSAssetParam::staticClassName()) == 0) - { - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - ret = ed->IOS; - break; - } - } - } - } - } - else if (nvidia::strcmp(nameSpace, PARTICLE_IOS_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageIOSDatabaseParams* d = static_cast< EffectPackageIOSDatabaseParams*>(mEffectPackageIOSDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->ParticleSimulations.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->ParticleSimulations.buf[i]; - if (!ei) - { - continue; - } - ParticleSimulationData* ed = static_cast< ParticleSimulationData*>(ei); - if (nvidia::strcmp(ed->IOS->className(), pxparticleios::ParticleIosAssetParam::staticClassName()) == 0) - { - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - ret = ed->IOS; - break; - } - } - } - } - } - else if (nvidia::strcmp(nameSpace, EMITTER_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace,"EmitterData") == 0 ) - { - EffectPackageEmitterDatabaseParams* d = static_cast< EffectPackageEmitterDatabaseParams*>(mEffectPackageEmitterDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->Emitters.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->Emitters.buf[i]; - if (!ei) - { - continue; - } - EmitterData* ed = static_cast< EmitterData*>(ei); - if (nvidia::stricmp(resourceName, ed->Name) == 0) - { - if ( nvidia::strcmp(nameSpace, EMITTER_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->Emitter; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, HEAT_SOURCE_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "HeatSourceData") == 0 ) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), HeatSourceData::staticClassName()) != 0) - { - continue; - } - HeatSourceData* ed = static_cast< HeatSourceData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, HEAT_SOURCE_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->HeatSource; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, SUBSTANCE_SOURCE_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "SubstanceSourceData") == 0 ) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), SubstanceSourceData::staticClassName()) != 0) - { - continue; - } - SubstanceSourceData* ed = static_cast< SubstanceSourceData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, SUBSTANCE_SOURCE_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->SubstanceSource; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, VELOCITY_SOURCE_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "VelocitySourceData") == 0 ) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), VelocitySourceData::staticClassName()) != 0) - { - continue; - } - VelocitySourceData* ed = static_cast< VelocitySourceData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, VELOCITY_SOURCE_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->VelocitySource; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, JET_FS_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "JetFieldSamplerData") == 0 ) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), JetFieldSamplerData::staticClassName()) != 0) - { - continue; - } - JetFieldSamplerData* ed = static_cast< JetFieldSamplerData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, JET_FS_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->JetFieldSampler; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, WIND_FS_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "WindFieldSamplerData") == 0 ) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), WindFieldSamplerData::staticClassName()) != 0) - { - continue; - } - WindFieldSamplerData* ed = static_cast< WindFieldSamplerData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, WIND_FS_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->WindFieldSampler; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, VORTEX_FS_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "VortexFieldSamplerData") == 0 ) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), VortexFieldSamplerData::staticClassName()) != 0) - { - continue; - } - VortexFieldSamplerData* ed = static_cast< VortexFieldSamplerData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, VORTEX_FS_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->VortexFieldSampler; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, NOISE_FS_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "NoiseFieldSamplerData") == 0 ) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), NoiseFieldSamplerData::staticClassName()) != 0) - { - continue; - } - NoiseFieldSamplerData* ed = static_cast< NoiseFieldSamplerData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, NOISE_FS_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->NoiseFieldSampler; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, ATTRACTOR_FS_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "AttractorFieldSamplerData") == 0 ) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), AttractorFieldSamplerData::staticClassName()) != 0) - { - continue; - } - AttractorFieldSamplerData* ed = static_cast< AttractorFieldSamplerData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, ATTRACTOR_FS_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->AttractorFieldSampler; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, TURBULENCE_FS_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "TurbulenceFieldSamplerData") == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), TurbulenceFieldSamplerData::staticClassName()) != 0) - { - continue; - } - TurbulenceFieldSamplerData* ed = static_cast< TurbulenceFieldSamplerData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, TURBULENCE_FS_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->TurbulenceFieldSampler; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, FORCEFIELD_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "ForceFieldData") == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), ForceFieldData::staticClassName()) != 0) - { - continue; - } - ForceFieldData* ed = static_cast< ForceFieldData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, FORCEFIELD_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->ForceField; - } - else - { - ret = ed; - } - break; - } - } - } - } - else if (nvidia::strcmp(nameSpace, FLAME_EMITTER_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, "FlameEmitterData") == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), FlameEmitterData::staticClassName()) != 0) - { - continue; - } - FlameEmitterData* ed = static_cast< FlameEmitterData*>(ei); - if (nvidia::stricmp(ed->Name, resourceName) == 0) - { - if (nvidia::strcmp(nameSpace, FLAME_EMITTER_AUTHORING_TYPE_NAME) == 0 ) - { - ret = ed->FlameEmitter; - } - else - { - ret = ed; - } - break; - } - } - } - } - - return ret; -} - - - - -const char** ModuleParticlesImpl::getResourceNames(const char* nameSpace, uint32_t& nameCount, const char** &variants) -{ - READ_ZONE(); - const char** ret = NULL; - - variants = NULL; - mTempNames.clear(); - mTempVariantNames.clear(); - - if (nvidia::strcmp(nameSpace, IOFX_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageIOFXDatabaseParams* d = static_cast< EffectPackageIOFXDatabaseParams*>(mEffectPackageIOFXDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->GraphicsEffects.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->GraphicsEffects.buf[i]; - if (!ei) - { - continue; - } - GraphicsEffectData* ed = static_cast< GraphicsEffectData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(IOFX_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, APEX_MATERIALS_NAME_SPACE) == 0) - { - EffectPackageGraphicsMaterialsParams* d = static_cast< EffectPackageGraphicsMaterialsParams*>(mGraphicsMaterialsDatabase); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->GraphicsMaterials.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->GraphicsMaterials.buf[i]; - if (!ei) - { - continue; - } - if ( nvidia::strcmp(ei->className(),"GraphicsMaterialData") == 0 ) - { - GraphicsMaterialData* ed = static_cast< GraphicsMaterialData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(APEX_MATERIALS_NAME_SPACE); - } - } - } - } - else if (nvidia::strcmp(nameSpace, APEX_VOLUME_RENDER_MATERIALS_NAME_SPACE) == 0) - { - EffectPackageGraphicsMaterialsParams* d = static_cast< EffectPackageGraphicsMaterialsParams*>(mGraphicsMaterialsDatabase); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->GraphicsMaterials.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->GraphicsMaterials.buf[i]; - if (!ei) - { - continue; - } - if ( nvidia::strcmp(ei->className(),"VolumeRenderMaterialData") == 0 ) - { - VolumeRenderMaterialData* ed = static_cast< VolumeRenderMaterialData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(APEX_VOLUME_RENDER_MATERIALS_NAME_SPACE); - } - } - } - } - else if (nvidia::strcmp(nameSpace, BASIC_IOS_AUTHORING_TYPE_NAME) == 0 || nvidia::strcmp(nameSpace, PARTICLE_IOS_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageIOSDatabaseParams* d = static_cast< EffectPackageIOSDatabaseParams*>(mEffectPackageIOSDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->ParticleSimulations.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->ParticleSimulations.buf[i]; - if (!ei) - { - continue; - } - ParticleSimulationData* ed = static_cast< ParticleSimulationData*>(ei); - mTempNames.pushBack(ed->Name); - if (nvidia::strcmp(ed->IOS->className(), basicios::BasicIOSAssetParam::staticClassName()) == 0) - { - mTempVariantNames.pushBack(BASIC_IOS_AUTHORING_TYPE_NAME); - } - else - { - mTempVariantNames.pushBack(PARTICLE_IOS_AUTHORING_TYPE_NAME); - } - } - } - } - else if (nvidia::strcmp(nameSpace, EMITTER_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageEmitterDatabaseParams* d = static_cast< EffectPackageEmitterDatabaseParams*>(mEffectPackageEmitterDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->Emitters.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->Emitters.buf[i]; - if (!ei) - { - continue; - } - EmitterData* ed = static_cast< EmitterData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(EMITTER_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, HEAT_SOURCE_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), HeatSourceData::staticClassName()) != 0) - { - continue; - } - HeatSourceData* ed = static_cast< HeatSourceData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(HEAT_SOURCE_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, SUBSTANCE_SOURCE_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), SubstanceSourceData::staticClassName()) != 0) - { - continue; - } - SubstanceSourceData* ed = static_cast< SubstanceSourceData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(SUBSTANCE_SOURCE_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, VELOCITY_SOURCE_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), VelocitySourceData::staticClassName()) != 0) - { - continue; - } - VelocitySourceData* ed = static_cast< VelocitySourceData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(SUBSTANCE_SOURCE_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, JET_FS_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), JetFieldSamplerData::staticClassName()) != 0) - { - continue; - } - JetFieldSamplerData* ed = static_cast< JetFieldSamplerData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(JET_FS_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, WIND_FS_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), WindFieldSamplerData::staticClassName()) != 0) - { - continue; - } - WindFieldSamplerData* ed = static_cast< WindFieldSamplerData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(WIND_FS_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, NOISE_FS_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), NoiseFieldSamplerData::staticClassName()) != 0) - { - continue; - } - NoiseFieldSamplerData* ed = static_cast< NoiseFieldSamplerData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(NOISE_FS_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, VORTEX_FS_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), VortexFieldSamplerData::staticClassName()) != 0) - { - continue; - } - VortexFieldSamplerData* ed = static_cast< VortexFieldSamplerData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(VORTEX_FS_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, ATTRACTOR_FS_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), AttractorFieldSamplerData::staticClassName()) != 0) - { - continue; - } - AttractorFieldSamplerData* ed = static_cast< AttractorFieldSamplerData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(ATTRACTOR_FS_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, TURBULENCE_FS_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), TurbulenceFieldSamplerData::staticClassName()) != 0) - { - continue; - } - TurbulenceFieldSamplerData* ed = static_cast< TurbulenceFieldSamplerData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(TURBULENCE_FS_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, FORCEFIELD_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), ForceFieldData::staticClassName()) != 0) - { - continue; - } - ForceFieldData* ed = static_cast< ForceFieldData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(FORCEFIELD_AUTHORING_TYPE_NAME); - } - } - } - else if (nvidia::strcmp(nameSpace, FLAME_EMITTER_AUTHORING_TYPE_NAME) == 0) - { - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), FlameEmitterData::staticClassName()) != 0) - { - continue; - } - FlameEmitterData* ed = static_cast< FlameEmitterData*>(ei); - mTempNames.pushBack(ed->Name); - mTempVariantNames.pushBack(FLAME_EMITTER_AUTHORING_TYPE_NAME); - } - } - } - else - { - PX_ALWAYS_ASSERT(); - } - - nameCount = mTempNames.size(); - if (nameCount) - { - ret = &mTempNames[0]; - variants = &mTempVariantNames[0]; - } - - return ret; -} - - -bool ModuleParticlesImpl::setEffectPackageIOSDatabase(const NvParameterized::Interface* dataBase) -{ - WRITE_ZONE(); - bool ret = false; - - if (dataBase) - { - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - const char* className = dataBase->className(); - if (nvidia::strcmp(className, basicios::BasicIOSAssetParam::staticClassName()) == 0 || nvidia::strcmp(className, pxparticleios::ParticleIosAssetParam::staticClassName()) == 0) - { - bool revised = false; - const char* itemName = dataBase->name() ? dataBase->name() : "defaultBasicIOS"; - EffectPackageIOSDatabaseParams* d = static_cast< EffectPackageIOSDatabaseParams*>(mEffectPackageIOSDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->ParticleSimulations.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->ParticleSimulations.buf[i]; - if (!ei) - { - continue; - } - ParticleSimulationData* ed = static_cast< ParticleSimulationData*>(ei); - if (nvidia::stricmp(ed->Name.buf, itemName) == 0) - { - ed->IOS->copy(*dataBase); - initParticleSimulationData(ed); - revised = true; - ret = true; - break; - } - } - } - if (!revised && mEffectPackageIOSDatabaseParams) - { - int32_t arraySize = d->ParticleSimulations.arraySizes[0]; - NvParameterized::Handle handle(mEffectPackageIOSDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("ParticleSimulations"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(arraySize + 1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* ei = traits->createNvParameterized(ParticleSimulationData::staticClassName()); - if (ei) - { - ParticleSimulationData* ed = static_cast< ParticleSimulationData*>(ei); - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - d->ParticleSimulations.buf[arraySize] = ei; - ed->IOS = NULL; - NvParameterized::ErrorType err = dataBase->clone(ed->IOS); - if ( err != NvParameterized::ERROR_NONE || ed->IOS == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - else - { - initParticleSimulationData(ed); - } - } - ret = true; - } - } - } - else if (nvidia::strcmp(dataBase->className(), EffectPackageIOSDatabaseParams::staticClassName()) == 0) - { - if (mEffectPackageIOSDatabaseParams && mEffectPackageIOSDatabaseParams != dataBase) - { - mEffectPackageIOSDatabaseParams->destroy(); - mEffectPackageIOSDatabaseParams = NULL; - } - if (mEffectPackageIOSDatabaseParams == NULL) - { - dataBase->clone(mEffectPackageIOSDatabaseParams); - if ( mEffectPackageIOSDatabaseParams == NULL) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - mEffectPackageIOSDatabaseParams = traits->createNvParameterized(EffectPackageIOSDatabaseParams::staticClassName()); - } - } - - EffectPackageIOSDatabaseParams* d = static_cast< EffectPackageIOSDatabaseParams*>(mEffectPackageIOSDatabaseParams); - if ( d ) - { - if (d->ParticleSimulations.arraySizes[0] == 0) - { - NvParameterized::Handle handle(mEffectPackageIOSDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("ParticleSimulations"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(3); - - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - // create the default BasicIOS - { - NvParameterized::Interface* ei = traits->createNvParameterized(ParticleSimulationData::staticClassName()); - d->ParticleSimulations.buf[0] = ei; - ParticleSimulationData* psd = static_cast< ParticleSimulationData*>(ei); - if (psd) - { - NvParameterized::setParamString(*ei, "Name", "defaultBasicIOS"); - psd->IOS = traits->createNvParameterized(basicios::BasicIOSAssetParam::staticClassName()); - } - } - // create the default SimpleParticleIOS - { - NvParameterized::Interface* ei = traits->createNvParameterized(ParticleSimulationData::staticClassName()); - d->ParticleSimulations.buf[1] = ei; - ParticleSimulationData* psd = static_cast< ParticleSimulationData*>(ei); - if (psd) - { - NvParameterized::setParamString(*ei, "Name", "defaultSimpleParticleIOS"); - psd->IOS = traits->createNvParameterized(pxparticleios::ParticleIosAssetParam::staticClassName()); - pxparticleios::ParticleIosAssetParam* pia = static_cast< pxparticleios::ParticleIosAssetParam*>(psd->IOS); - if (pia) - { - pia->particleType = traits->createNvParameterized(pxparticleios::SimpleParticleSystemParams::staticClassName()); - } - } - } - // create the default FluidParticleIOS - { - NvParameterized::Interface* ei = traits->createNvParameterized(ParticleSimulationData::staticClassName()); - d->ParticleSimulations.buf[2] = ei; - ParticleSimulationData* psd = static_cast< ParticleSimulationData*>(ei); - - if (psd) - { - NvParameterized::setParamString(*ei, "Name", "defaultFluidParticleIOS"); - psd->IOS = traits->createNvParameterized(pxparticleios::ParticleIosAssetParam::staticClassName()); - pxparticleios::ParticleIosAssetParam* pia = static_cast< pxparticleios::ParticleIosAssetParam*>(psd->IOS); - - if (pia) - { - pia->particleType = traits->createNvParameterized(pxparticleios::FluidParticleSystemParams::staticClassName()); - pxparticleios::FluidParticleSystemParams* fp = static_cast< pxparticleios::FluidParticleSystemParams*>(pia->particleType); - if (fp) - { - fp->restParticleDistance = 0.1f; - fp->stiffness = 8; - fp->viscosity = 5; - } - pia->maxParticleCount = 200000; - pia->particleRadius = 1; - pia->maxInjectedParticleCount = 0.1f; - pia->maxMotionDistance = 0.2; - pia->contactOffset = 0.008f; - pia->restOffset = 0.004f; - pia->gridSize = 1.5f; - pia->damping = 0; - pia->externalAcceleration = PxVec3(0, 0, 0); - pia->projectionPlaneNormal = PxVec3(0, 1, 0); - pia->projectionPlaneDistance = 0; - pia->particleMass = 0.1f; - pia->restitution = 0.15f; - pia->dynamicFriction = 0.008f; - pia->staticFriction = 0.1f; - pia->CollisionTwoway = false; - pia->CollisionWithDynamicActors = true; - pia->Enable = true; - pia->ProjectToPlane = false; - pia->PerParticleRestOffset = false; - pia->PerParticleCollisionCacheHint = false; - } - } - } - ret = true; - } - } - - Array< const char* > nameList; - for (int32_t i = 0; i < d->ParticleSimulations.arraySizes[0]; i++) - { - ParticleSimulationData* e = static_cast< ParticleSimulationData*>(d->ParticleSimulations.buf[i]); - if (e) - { - for (uint32_t j = 0; j < nameList.size(); j++) - { - if (nvidia::stricmp(nameList[j], e->Name) == 0) - { - NvParameterized::Handle handle(e); - NvParameterized::ErrorType err = handle.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - handle.setParamString(getUniqueName(nameList, e->Name)); - ret = true; - break; - } - } - } - nameList.pushBack(e->Name); - } - } - - - for (uint32_t i = 0; i < (uint32_t)d->ParticleSimulations.arraySizes[0]; i++) - { - ParticleSimulationData* ed = static_cast< ParticleSimulationData* >(d->ParticleSimulations.buf[i]); - PX_ASSERT(ed); - if (ed && initParticleSimulationData(ed)) - { - ret = true; - } - } - } - } - else - { - PX_ALWAYS_ASSERT(); // not a valid NvParameterized interface - } - if (fixupNamedReferences()) - { - ret = true; - } - } - return ret; -} - -static void initColor(iofx::ColorVsLifeCompositeModifierParamsNS::colorLifeStruct_Type& c, float lifeRemaining, float red, float green, float blue, float alpha) -{ - c.lifeRemaining = lifeRemaining; - c.color.x = red; - c.color.y = green; - c.color.z = blue; - c.color.w = alpha; -} - -static void initScale(iofx::ScaleVsLife2DModifierParamsNS::scaleLifeStruct_Type& s, float lifetime, float scalex, float scaley) -{ - s.lifeRemaining = lifetime; - s.scale.x = scalex; - s.scale.y = scaley; -} - - -bool ModuleParticlesImpl::setEffectPackageIOFXDatabase(const NvParameterized::Interface* dataBase) -{ - WRITE_ZONE(); - bool ret = false; - - if (dataBase) - { - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - const char* className = dataBase->className(); - if (nvidia::strcmp(className, iofx::IofxAssetParameters::staticClassName()) == 0) - { - bool revised = false; - const char* itemName = dataBase->name(); - EffectPackageIOFXDatabaseParams* d = static_cast< EffectPackageIOFXDatabaseParams*>(mEffectPackageIOFXDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->GraphicsEffects.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->GraphicsEffects.buf[i]; - if (!ei) - { - continue; - } - GraphicsEffectData* ed = static_cast< GraphicsEffectData*>(ei); - if (nvidia::stricmp(ed->Name.buf, itemName) == 0) - { - ed->IOFX->copy(*dataBase); - revised = true; - ret = true; - break; - } - } - } - if (!revised && mEffectPackageIOFXDatabaseParams) - { - int32_t arraySize = d->GraphicsEffects.arraySizes[0]; - NvParameterized::Handle handle(mEffectPackageIOFXDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("GraphicsEffects"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(arraySize + 1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* ei = traits->createNvParameterized(GraphicsEffectData::staticClassName()); - if (ei) - { - GraphicsEffectData* ed = static_cast< GraphicsEffectData*>(ei); - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - d->GraphicsEffects.buf[arraySize] = ei; - ed->IOFX = NULL; - dataBase->clone(ed->IOFX); - if ( ed->IOFX == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - ret = true; - } - } - } - else if (nvidia::strcmp(dataBase->className(), EffectPackageIOFXDatabaseParams::staticClassName()) == 0) - { - if (mEffectPackageIOFXDatabaseParams && mEffectPackageIOFXDatabaseParams != dataBase) - { - mEffectPackageIOFXDatabaseParams->destroy(); - mEffectPackageIOFXDatabaseParams = NULL; - } - if (mEffectPackageIOFXDatabaseParams == NULL) - { - dataBase->clone(mEffectPackageIOFXDatabaseParams); - if ( mEffectPackageIOFXDatabaseParams == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - mEffectPackageIOFXDatabaseParams = traits->createNvParameterized(EffectPackageIOFXDatabaseParams::staticClassName()); - } - } - EffectPackageIOFXDatabaseParams* d = static_cast< EffectPackageIOFXDatabaseParams*>(mEffectPackageIOFXDatabaseParams); - if ( d ) - { - if (d->GraphicsEffects.arraySizes[0] == 0) - { - NvParameterized::Handle handle(mEffectPackageIOFXDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("GraphicsEffects"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(2); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - { - NvParameterized::Interface* ei = traits->createNvParameterized(GraphicsEffectData::staticClassName()); - d->GraphicsEffects.buf[0] = ei; - if (ei) - { - GraphicsEffectData* ged = static_cast< GraphicsEffectData*>(ei); - if (ged) - { - NvParameterized::setParamString(*ei, "Name", "defaultSpriteIOFX"); - ged->IOFX = traits->createNvParameterized(iofx::IofxAssetParameters::staticClassName()); - iofx::IofxAssetParameters* iofx = static_cast< iofx::IofxAssetParameters*>(ged->IOFX); - if (iofx) - { - iofx->iofxType = traits->createNvParameterized(iofx::SpriteIofxParameters::staticClassName()); - iofx->renderOutput.useFloat4Color = true; - } - } - } - } - { - NvParameterized::Interface* ei = traits->createNvParameterized(GraphicsEffectData::staticClassName()); - d->GraphicsEffects.buf[1] = ei; - if (ei) - { - GraphicsEffectData* ged = static_cast< GraphicsEffectData*>(ei); - if (ged) - { - NvParameterized::setParamString(*ei, "Name", "defaultMeshIOFX"); - ged->IOFX = traits->createNvParameterized(iofx::IofxAssetParameters::staticClassName()); - iofx::IofxAssetParameters* iofx = static_cast< iofx::IofxAssetParameters*>(ged->IOFX); - if (iofx) - { - iofx->iofxType = traits->createNvParameterized(iofx::MeshIofxParameters::staticClassName()); - iofx->renderOutput.useFloat4Color = true; - } - } - } - } - - ret = true; - } - } - - - Array< const char* > nameList; - for (int32_t i = 0; i < d->GraphicsEffects.arraySizes[0]; i++) - { - GraphicsEffectData* e = static_cast< GraphicsEffectData*>(d->GraphicsEffects.buf[i]); - if (e) - { - for (uint32_t j = 0; j < nameList.size(); j++) - { - if (nvidia::stricmp(nameList[j], e->Name) == 0) - { - NvParameterized::Handle handle(e); - NvParameterized::ErrorType err = handle.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - handle.setParamString(getUniqueName(nameList, e->Name)); - ret = true; - break; - } - } - } - nameList.pushBack(e->Name); - } - } - - - for (uint32_t i = 0; i < (uint32_t)d->GraphicsEffects.arraySizes[0]; i++) - { - GraphicsEffectData* ed = static_cast< GraphicsEffectData*>(d->GraphicsEffects.buf[i]); - // first, see if it's assigned to a sprite IOFX without valid default values... - { - iofx::IofxAssetParameters* ae = static_cast< iofx::IofxAssetParameters*>(ed->IOFX); - if (ae) - { - if (nvidia::strcmp(ae->iofxType->className(), iofx::SpriteIofxParameters::staticClassName()) == 0) - { - iofx::SpriteIofxParameters* iofxP = static_cast< iofx::SpriteIofxParameters*>(ae->iofxType); - if (iofxP->spawnModifierList.arraySizes[0] == 0 && iofxP->continuousModifierList.arraySizes[0] == 0) - { - ed->IOFX->destroy(); - ed->IOFX = NULL; - ret = true; - } - } - } - } - - if (ed->IOFX == NULL) - { - ed->IOFX = traits->createNvParameterized(iofx::IofxAssetParameters::staticClassName()); - iofx::IofxAssetParameters* ae = static_cast< iofx::IofxAssetParameters*>(ed->IOFX); - if (ae) - { - ae->renderOutput.useFloat4Color = true; - NvParameterized::Interface* iofx = traits->createNvParameterized(iofx::SpriteIofxParameters::staticClassName()); - ae->iofxType = iofx; - iofx::SpriteIofxParameters* iofxP = static_cast< iofx::SpriteIofxParameters*>(iofx); - if (iofxP) - { - { - NvParameterized::Handle handle(iofx); - NvParameterized::ErrorType err = handle.getParameter("spriteMaterialName"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - err = handle.initParamRef(APEX_MATERIALS_NAME_SPACE, true); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - iofxP->spriteMaterialName->setName("defaultGraphicsMaterial"); - } - } - } - - { - NvParameterized::Handle handle(iofx); - NvParameterized::ErrorType err = handle.getParameter("spawnModifierList"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(4); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - iofxP->spawnModifierList.buf[0] = traits->createNvParameterized(iofx::InitialColorModifierParams::staticClassName()); - iofxP->spawnModifierList.buf[1] = traits->createNvParameterized(iofx::RandomRotationModifierParams::staticClassName()); - iofxP->spawnModifierList.buf[2] = traits->createNvParameterized(iofx::RandomSubtextureModifierParams::staticClassName()); - iofxP->spawnModifierList.buf[3] = traits->createNvParameterized(iofx::RandomScaleModifierParams::staticClassName()); - } - } - - { - NvParameterized::Handle handle(iofx); - NvParameterized::ErrorType err = handle.getParameter("continuousModifierList"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - iofxP->continuousModifierList.buf[0] = traits->createNvParameterized(iofx::ViewDirectionSortingModifierParams::staticClassName()); - } - } - } - } - ret = true; - } - if (ed->IOFX) - { - iofx::IofxAssetParameters* ae = static_cast< iofx::IofxAssetParameters*>(ed->IOFX); - if (ae->iofxType) - { - ae->renderOutput.useFloat4Color = true; - const char* c = ae->iofxType->className(); - if (c && nvidia::strcmp(c, "MeshIofxParameters") == 0) - { - iofx::MeshIofxParameters* m = static_cast< iofx::MeshIofxParameters*>(ae->iofxType); - if (m->renderMeshList.arraySizes[0] == 0) - { - ret = true; - NvParameterized::Handle handle(m); - NvParameterized::ErrorType err = handle.getParameter("renderMeshList"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - iofx::MeshIofxParametersNS::meshProperties_Type& t = m->renderMeshList.buf[0]; - t.weight = 1; - NvParameterized::Handle elementHandle(m); - err = handle.getChildHandle(0, elementHandle); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - NvParameterized::Handle item(*elementHandle.getInterface()); - NvParameterized::ErrorType err = elementHandle.getChildHandle(elementHandle.getInterface(), "meshAssetName", item); - PX_ASSERT(err == NvParameterized:: ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - err = item.initParamRef(APEX_OPAQUE_MESH_NAME_SPACE,true); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - t.meshAssetName->setName("SampleMesh.apx"); - } - } - } - // initialize the spawn modifier list - { - NvParameterized::Handle handle(m); - NvParameterized::ErrorType err = handle.getParameter("spawnModifierList"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(2); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - m->spawnModifierList.buf[0] = traits->createNvParameterized(iofx::SimpleScaleModifierParams::staticClassName()); - iofx::SimpleScaleModifierParams* ss = static_cast< iofx::SimpleScaleModifierParams*>(m->spawnModifierList.buf[0]); - if (ss) - { - ss->scaleFactor = PxVec3(1, 1, 1); - m->spawnModifierList.buf[1] = traits->createNvParameterized(iofx::RotationModifierParams::staticClassName()); - NvParameterized::setParamEnum(*m->spawnModifierList.buf[1], "rollType", "SPHERICAL"); - } - } - } - // initialize the continuous modifier list - { - NvParameterized::Handle handle(m); - NvParameterized::ErrorType err = handle.getParameter("continuousModifierList"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(2); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - // init RotationModifierParams - { - m->continuousModifierList.buf[0] = traits->createNvParameterized(iofx::RotationModifierParams::staticClassName()); - if (m->continuousModifierList.buf[0]) - { - NvParameterized::setParamEnum(*m->continuousModifierList.buf[0], "rollType", "SPHERICAL"); - iofx::RotationModifierParams* rmp = static_cast< iofx::RotationModifierParams*>(m->continuousModifierList.buf[0]); - rmp->maxRotationRatePerSec = 0; - rmp->maxSettleRatePerSec = 1; - rmp->collisionRotationMultiplier = 1; - rmp->inAirRotationMultiplier = 1; - } - } - { - m->continuousModifierList.buf[1] = traits->createNvParameterized(iofx::ScaleVsLife3DModifierParams::staticClassName()); - if (m->continuousModifierList.buf[1]) - { - NvParameterized::Handle h(m->continuousModifierList.buf[1]); - err = h.getParameter("controlPoints"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = h.resizeArray(3); - iofx::ScaleVsLife3DModifierParams& svl = *(static_cast< iofx::ScaleVsLife3DModifierParams*>(m->continuousModifierList.buf[1])); - svl.controlPoints.buf[0].lifeRemaining = 0; - svl.controlPoints.buf[0].scale = PxVec3(0, 0, 0); - - svl.controlPoints.buf[1].lifeRemaining = 0.5f; - svl.controlPoints.buf[1].scale = PxVec3(1, 1, 1); - - svl.controlPoints.buf[2].lifeRemaining = 1; - svl.controlPoints.buf[2].scale = PxVec3(0, 0, 0); - - } - } - } - - } - } - } - } - } - } - } - } - else - { - PX_ALWAYS_ASSERT(); - } - } - - - return ret; - -} - -bool ModuleParticlesImpl::setEffectPackageEmitterDatabase(const NvParameterized::Interface* dataBase) -{ - WRITE_ZONE(); - bool ret = false; - - if (dataBase) - { - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - const char* className = dataBase->className(); - if (nvidia::strcmp(className, emitter::ApexEmitterAssetParameters::staticClassName()) == 0) - { - bool revised = false; - const char* itemName = dataBase->name(); - EffectPackageEmitterDatabaseParams* d = static_cast< EffectPackageEmitterDatabaseParams*>(mEffectPackageEmitterDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->Emitters.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->Emitters.buf[i]; - if (!ei) - { - continue; - } - EmitterData* ed = static_cast< EmitterData*>(ei); - if (nvidia::stricmp(ed->Name.buf, itemName) == 0) - { - ed->Emitter->copy(*dataBase); - revised = true; - ret = true; - break; - } - } - } - if (!revised && mEffectPackageEmitterDatabaseParams) - { - int32_t arraySize = d->Emitters.arraySizes[0]; - NvParameterized::Handle handle(mEffectPackageEmitterDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("Emitters"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(arraySize + 1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* ei = traits->createNvParameterized(EmitterData::staticClassName()); - if (ei) - { - EmitterData* ed = static_cast< EmitterData*>(ei); - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - d->Emitters.buf[arraySize] = ei; - ed->Emitter = NULL; - dataBase->clone(ed->Emitter); - if ( ed->Emitter == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - ret = true; - } - } - } - else if (nvidia::strcmp(dataBase->className(), EffectPackageEmitterDatabaseParams::staticClassName()) == 0) - { - if (mEffectPackageEmitterDatabaseParams && mEffectPackageEmitterDatabaseParams != dataBase) - { - mEffectPackageEmitterDatabaseParams->destroy(); - mEffectPackageEmitterDatabaseParams = NULL; - } - if (mEffectPackageEmitterDatabaseParams == NULL) - { - dataBase->clone(mEffectPackageEmitterDatabaseParams); - if ( mEffectPackageEmitterDatabaseParams == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - mEffectPackageEmitterDatabaseParams = traits->createNvParameterized(EffectPackageEmitterDatabaseParams::staticClassName()); - } - } - - EffectPackageEmitterDatabaseParams* d = static_cast< EffectPackageEmitterDatabaseParams*>(mEffectPackageEmitterDatabaseParams); - if ( d ) - { - if (d->Emitters.arraySizes[0] == 0) - { - NvParameterized::Handle handle(mEffectPackageEmitterDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("Emitters"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* ei = traits->createNvParameterized(EmitterData::staticClassName()); - d->Emitters.buf[0] = ei; - ret = true; - } - } - - - Array< const char* > nameList; - for (int32_t i = 0; i < d->Emitters.arraySizes[0]; i++) - { - EmitterData* e = static_cast< EmitterData*>(d->Emitters.buf[i]); - if (e) - { - for (uint32_t j = 0; j < nameList.size(); j++) - { - if (nvidia::stricmp(nameList[j], e->Name) == 0) - { - NvParameterized::Handle handle(e); - NvParameterized::ErrorType err = handle.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - handle.setParamString(getUniqueName(nameList, e->Name)); - ret = true; - break; - } - } - } - nameList.pushBack(e->Name); - } - } - - for (uint32_t i = 0; i < (uint32_t)d->Emitters.arraySizes[0]; i++) - { - EmitterData* ed = static_cast< EmitterData*>(d->Emitters.buf[i]); - if (ed->Emitter == NULL) - { - ed->Emitter = traits->createNvParameterized(emitter::ApexEmitterAssetParameters::staticClassName()); - // Modify "static_cast<emitter::ApexEmitterAssetParameters*>(ed->Emitter)" if default ApexEmitterAssetParameters initialisation is insufficiently - ret = true; - } - if (ed->Emitter) - { - emitter::ApexEmitterAssetParameters* ae = static_cast< emitter::ApexEmitterAssetParameters*>(ed->Emitter); - NvParameterized::Handle handle(ed->Emitter); - NvParameterized::ErrorType err = ed->Emitter->getParameterHandle("iofxAssetName", handle); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* val = NULL; - err = handle.getParamRef(val); - if (val == NULL) - { - err = handle.initParamRef(IOFX_AUTHORING_TYPE_NAME,true); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - char scratch[512]; - sprintf_s(scratch, 512, "defaultSpriteIOFX"); - ae->iofxAssetName->setName(scratch); - } - } - } - } - if (ed->Emitter) - { - emitter::ApexEmitterAssetParameters* ae = static_cast< emitter::ApexEmitterAssetParameters*>(ed->Emitter); - NvParameterized::Handle handle(ed->Emitter); - NvParameterized::ErrorType err = ed->Emitter->getParameterHandle("iosAssetName", handle); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* val = NULL; - err = handle.getParamRef(val); - if (val == NULL) - { - err = handle.initParamRef(BASIC_IOS_AUTHORING_TYPE_NAME,true); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - char scratch[512]; - sprintf_s(scratch, 512, "defaultBasicIOS"); - ae->iosAssetName->setName(scratch); - } - } - } - } - } - } - } - else - { - PX_ALWAYS_ASSERT(); // invalid NvParameterized::Interface passed in - } - } - - - return ret; -} - -enum FieldSamplerType -{ - FST_NONE, - FST_FORCE_FIELD, - FST_HEAT_SOURCE, - FST_SUBSTANCE_SOURCE, - FST_JET, - FST_ATTRACTOR, - FST_TURBULENCE, - FST_NOISE, - FST_VORTEX, - FST_WIND, - FST_VELOCITY_SOURCE, - FST_FLAME_EMITTER, - FST_LAST -}; - -static FieldSamplerType getFieldSamplerType(const NvParameterized::Interface* iface) -{ - FieldSamplerType ret = FST_NONE; - - if (iface) - { - const char* className = iface->className(); - if (nvidia::strcmp(className, forcefield::ForceFieldAssetParams::staticClassName()) == 0) - { - ret = FST_FORCE_FIELD; - } - else if (nvidia::strcmp(className, turbulencefs::HeatSourceAssetParams::staticClassName()) == 0) - { - ret = FST_HEAT_SOURCE; - } - else if (nvidia::strcmp(className, turbulencefs::SubstanceSourceAssetParams::staticClassName()) == 0) - { - ret = FST_SUBSTANCE_SOURCE; - } - else if (nvidia::strcmp(className, turbulencefs::VelocitySourceAssetParams::staticClassName()) == 0) - { - ret = FST_VELOCITY_SOURCE; - } - else if (nvidia::strcmp(className, basicfs::JetFSAssetParams::staticClassName()) == 0) - { - ret = FST_JET; - } - else if (nvidia::strcmp(className, basicfs::WindFSAssetParams::staticClassName()) == 0) - { - ret = FST_WIND; - } - else if (nvidia::strcmp(className, basicfs::NoiseFSAssetParams::staticClassName()) == 0) - { - ret = FST_NOISE; - } - else if (nvidia::strcmp(className, basicfs::VortexFSAssetParams::staticClassName()) == 0) - { - ret = FST_VORTEX; - } - else if (nvidia::strcmp(className, basicfs::AttractorFSAssetParams::staticClassName()) == 0) - { - ret = FST_ATTRACTOR; - } - else if (nvidia::strcmp(className, turbulencefs::TurbulenceFSAssetParams::staticClassName()) == 0) - { - ret = FST_TURBULENCE; - } - else if (nvidia::strcmp(className, turbulencefs::FlameEmitterAssetParams::staticClassName()) == 0) - { - ret = FST_FLAME_EMITTER; - } - else if (nvidia::strcmp(className, particles::ForceFieldData::staticClassName()) == 0) - { - ret = FST_FORCE_FIELD; - } - else if (nvidia::strcmp(className, particles::HeatSourceData::staticClassName()) == 0) - { - ret = FST_HEAT_SOURCE; - } - else if (nvidia::strcmp(className, particles::SubstanceSourceData::staticClassName()) == 0) - { - ret = FST_SUBSTANCE_SOURCE; - } - else if (nvidia::strcmp(className, particles::VelocitySourceData::staticClassName()) == 0) - { - ret = FST_VELOCITY_SOURCE; - } - else if (nvidia::strcmp(className, particles::AttractorFieldSamplerData::staticClassName()) == 0) - { - ret = FST_ATTRACTOR; - } - else if (nvidia::strcmp(className, particles::JetFieldSamplerData::staticClassName()) == 0) - { - ret = FST_JET; - } - else if (nvidia::strcmp(className, particles::WindFieldSamplerData::staticClassName()) == 0) - { - ret = FST_WIND; - } - else if (nvidia::strcmp(className, particles::NoiseFieldSamplerData::staticClassName()) == 0) - { - ret = FST_NOISE; - } - else if (nvidia::strcmp(className, particles::TurbulenceFieldSamplerData::staticClassName()) == 0) - { - ret = FST_TURBULENCE; - } - else if (nvidia::strcmp(className, particles::VortexFieldSamplerData::staticClassName()) == 0) - { - ret = FST_VORTEX; - } - else if (nvidia::strcmp(className, particles::FlameEmitterData::staticClassName()) == 0) - { - ret = FST_FLAME_EMITTER; - } - } - - return ret; -} - -static NvParameterized::Interface* getFieldSamplerData(FieldSamplerType fst, NvParameterized::Traits* traits, const NvParameterized::Interface* dataBase) -{ - NvParameterized::Interface* ret = NULL; - - const char* itemName = dataBase->name(); - NvParameterized::ErrorType err; - - switch (fst) - { - case FST_FORCE_FIELD: - { - NvParameterized::Interface* ei = traits->createNvParameterized(ForceFieldData::staticClassName()); - ForceFieldData* ed = static_cast< ForceFieldData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->ForceField = NULL; - dataBase->clone(ed->ForceField); - if ( ed->ForceField == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_HEAT_SOURCE: - { - NvParameterized::Interface* ei = traits->createNvParameterized(HeatSourceData::staticClassName()); - HeatSourceData* ed = static_cast< HeatSourceData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->HeatSource = NULL; - dataBase->clone(ed->HeatSource); - if ( ed->HeatSource == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_SUBSTANCE_SOURCE: - { - NvParameterized::Interface* ei = traits->createNvParameterized(SubstanceSourceData::staticClassName()); - SubstanceSourceData* ed = static_cast< SubstanceSourceData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->SubstanceSource = NULL; - dataBase->clone(ed->SubstanceSource); - if ( ed->SubstanceSource == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_VELOCITY_SOURCE: - { - NvParameterized::Interface* ei = traits->createNvParameterized(VelocitySourceData::staticClassName()); - VelocitySourceData* ed = static_cast< VelocitySourceData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->VelocitySource = NULL; - dataBase->clone(ed->VelocitySource); - if ( ed->VelocitySource == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_ATTRACTOR: - { - NvParameterized::Interface* ei = traits->createNvParameterized(AttractorFieldSamplerData::staticClassName()); - AttractorFieldSamplerData* ed = static_cast< AttractorFieldSamplerData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->AttractorFieldSampler = NULL; - dataBase->clone(ed->AttractorFieldSampler); - if ( ed->AttractorFieldSampler == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_VORTEX: - { - NvParameterized::Interface* ei = traits->createNvParameterized(VortexFieldSamplerData::staticClassName()); - VortexFieldSamplerData* ed = static_cast< VortexFieldSamplerData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->VortexFieldSampler = NULL; - dataBase->clone(ed->VortexFieldSampler); - if ( ed->VortexFieldSampler == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_NOISE: - { - NvParameterized::Interface* ei = traits->createNvParameterized(NoiseFieldSamplerData::staticClassName()); - NoiseFieldSamplerData* ed = static_cast< NoiseFieldSamplerData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->NoiseFieldSampler = NULL; - dataBase->clone(ed->NoiseFieldSampler); - if ( ed->NoiseFieldSampler == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_JET: - { - NvParameterized::Interface* ei = traits->createNvParameterized(JetFieldSamplerData::staticClassName()); - JetFieldSamplerData* ed = static_cast< JetFieldSamplerData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->JetFieldSampler = NULL; - dataBase->clone(ed->JetFieldSampler); - if ( ed->JetFieldSampler == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_WIND: - { - NvParameterized::Interface* ei = traits->createNvParameterized(WindFieldSamplerData::staticClassName()); - WindFieldSamplerData* ed = static_cast< WindFieldSamplerData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->WindFieldSampler = NULL; - dataBase->clone(ed->WindFieldSampler); - if ( ed->WindFieldSampler == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_TURBULENCE: - { - NvParameterized::Interface* ei = traits->createNvParameterized(TurbulenceFieldSamplerData::staticClassName()); - TurbulenceFieldSamplerData* ed = static_cast< TurbulenceFieldSamplerData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->TurbulenceFieldSampler = NULL; - dataBase->clone(ed->TurbulenceFieldSampler); - if ( ed->TurbulenceFieldSampler == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - case FST_FLAME_EMITTER: - { - NvParameterized::Interface* ei = traits->createNvParameterized(FlameEmitterData::staticClassName()); - FlameEmitterData* ed = static_cast< FlameEmitterData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - ret = ei; - ed->FlameEmitter = NULL; - dataBase->clone(ed->FlameEmitter); - if ( ed->FlameEmitter == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - } - break; - - default: - PX_ALWAYS_ASSERT(); // not yet implemented! - break; - } - - return ret; -} - -bool ModuleParticlesImpl::fixFieldSamplerCollisionFilterNames(NvParameterized::Interface *iface) -{ - bool ret = false; - - FieldSamplerType fst = getFieldSamplerType(iface); - NvParameterized::Interface *asset = NULL; - - const char *filterName=NULL; - - switch (fst) - { - case FST_FORCE_FIELD: - { - ForceFieldData* ed = static_cast< ForceFieldData*>(iface); - asset = ed->ForceField; - filterName = "ForceFieldFS=all"; - } - break; - case FST_HEAT_SOURCE: - { - HeatSourceData *ed = static_cast< HeatSourceData *>(iface); - asset = ed->HeatSource; - filterName = "HeatSource=all"; - } - break; - case FST_SUBSTANCE_SOURCE: - { - SubstanceSourceData *ed = static_cast< SubstanceSourceData *>(iface); - asset = ed->SubstanceSource; - filterName = "SubstanceSource=all"; - } - break; - case FST_VELOCITY_SOURCE: - { - VelocitySourceData *ed = static_cast< VelocitySourceData *>(iface); - asset = ed->VelocitySource; - filterName = "VelocitySource=all"; - } - break; - case FST_ATTRACTOR: - { - AttractorFieldSamplerData* ed = static_cast< AttractorFieldSamplerData*>(iface); - asset = ed->AttractorFieldSampler; - filterName = "AttractorFS=all"; - } - break; - case FST_VORTEX: - { - VortexFieldSamplerData* ed = static_cast< VortexFieldSamplerData*>(iface); - asset = ed->VortexFieldSampler; - filterName = "VortexFS=all"; - } - break; - case FST_NOISE: - { - NoiseFieldSamplerData* ed = static_cast< NoiseFieldSamplerData*>(iface); - asset = ed->NoiseFieldSampler; - filterName = "NoiseFS=all"; - } - break; - case FST_JET: - { - JetFieldSamplerData* ed = static_cast< JetFieldSamplerData*>(iface); - asset = ed->JetFieldSampler; - filterName = "JetFS=all"; - } - break; - case FST_WIND: - { - WindFieldSamplerData* ed = static_cast< WindFieldSamplerData*>(iface); - asset = ed->WindFieldSampler; - filterName = "WindFS=all"; - } - break; - case FST_TURBULENCE: - { - TurbulenceFieldSamplerData* ed = static_cast< TurbulenceFieldSamplerData*>(iface); - asset = ed->TurbulenceFieldSampler; - filterName = "TurbulenceFS=all"; - } - break; - case FST_FLAME_EMITTER: - { - FlameEmitterData *ed = static_cast< FlameEmitterData *>(iface); - asset = ed->FlameEmitter; - filterName = "FlameEmitter=all"; - } - break; - default: - //PX_ASSERT(0); - break; - } - if ( asset && filterName ) - { - const char *fieldBoundaryFilterDataName=NULL; - const char *fieldSamplerFilterDataName=NULL; - bool ok = NvParameterized::getParamString(*asset,"fieldSamplerFilterDataName",fieldSamplerFilterDataName); - PX_ASSERT( ok ); - ok = NvParameterized::getParamString(*asset,"fieldBoundaryFilterDataName",fieldBoundaryFilterDataName); - if ( ok ) - { - if ( fieldBoundaryFilterDataName == NULL || fieldBoundaryFilterDataName[0] == 0 || nvidia::strcmp(fieldBoundaryFilterDataName,"defaultFieldBoundaryFilterDataName") == 0 ) - { - NvParameterized::setParamString(*asset,"fieldBoundaryFilterDataName",filterName); - ret = true; - } - } - if ( fieldSamplerFilterDataName == NULL || fieldSamplerFilterDataName[0] == 0 || nvidia::strcmp(fieldSamplerFilterDataName,"defaultFieldSamplerFilterDataName") == 0 ) - { - NvParameterized::setParamString(*asset,"fieldSamplerFilterDataName",filterName); - ret = true; - } - if ( fst == FST_TURBULENCE ) - { - const char *collisionFilterDataName=NULL; - bool ok = NvParameterized::getParamString(*asset,"collisionFilterDataName",collisionFilterDataName); - PX_UNUSED( ok ); - PX_ASSERT( ok ); - if ( collisionFilterDataName == NULL || collisionFilterDataName[0] == 0 || nvidia::strcmp(collisionFilterDataName,"defaultTurbulenceCollisionFilterDataName") == 0 ) - { - NvParameterized::setParamString(*asset,"collisionFilterDataName",filterName); - ret = true; - } - } - } - return ret; -} - -static void setNamedReference(NvParameterized::Interface* parentInterface, const char* parentName, const char* authoringTypeName) -{ - NvParameterized::Handle handle(parentInterface); - NvParameterized::ErrorType err = parentInterface->getParameterHandle(parentName, handle); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - err = handle.initParamRef(authoringTypeName,true); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - } -} - - - -bool ModuleParticlesImpl::setEffectPackageFieldSamplerDatabase(const NvParameterized::Interface* dataBase) -{ - WRITE_ZONE(); - bool ret = false; - - if (dataBase) - { - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - FieldSamplerType fst = getFieldSamplerType(dataBase); - if (fst != FST_NONE) - { - bool revised = false; - const char* itemName = dataBase->name(); - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->FieldSamplers.buf[i]; - if (!ei) - { - continue; - } - const char* dataName; - NvParameterized::getParamString(*ei, "Name", dataName); - if (nvidia::stricmp(dataName, itemName) == 0) - { - ei->destroy(); - d->FieldSamplers.buf[i] = getFieldSamplerData(fst, traits, dataBase); - fixFieldSamplerCollisionFilterNames( d->FieldSamplers.buf[i] ); - revised = true; - ret = true; - break; - } - } - } - if (!revised && mEffectPackageFieldSamplerDatabaseParams) - { - int32_t arraySize = d->FieldSamplers.arraySizes[0]; - NvParameterized::Handle handle(mEffectPackageFieldSamplerDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("FieldSamplers"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(arraySize + 1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - d->FieldSamplers.buf[arraySize] = getFieldSamplerData(fst, traits, dataBase); - fixFieldSamplerCollisionFilterNames( d->FieldSamplers.buf[arraySize] ); - } - } - } - else if (nvidia::strcmp(dataBase->className(), EffectPackageFieldSamplerDatabaseParams::staticClassName()) == 0) - { - if (mEffectPackageFieldSamplerDatabaseParams && mEffectPackageFieldSamplerDatabaseParams != dataBase) - { - mEffectPackageFieldSamplerDatabaseParams->destroy(); - mEffectPackageFieldSamplerDatabaseParams = NULL; - } - - if (mEffectPackageFieldSamplerDatabaseParams == NULL) - { - dataBase->clone(mEffectPackageFieldSamplerDatabaseParams); - if ( mEffectPackageFieldSamplerDatabaseParams == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - mEffectPackageFieldSamplerDatabaseParams = traits->createNvParameterized(EffectPackageFieldSamplerDatabaseParams::staticClassName()); - } - } - - EffectPackageFieldSamplerDatabaseParams* d = static_cast< EffectPackageFieldSamplerDatabaseParams*>(mEffectPackageFieldSamplerDatabaseParams); - if ( d ) - { - if (d->FieldSamplers.arraySizes[0] == 0) - { - NvParameterized::Handle handle(mEffectPackageFieldSamplerDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("FieldSamplers"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(11); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - NvParameterized::Interface* ei; - if (err == NvParameterized::ERROR_NONE) - { - ei = traits->createNvParameterized(AttractorFieldSamplerData::staticClassName()); - d->FieldSamplers.buf[0] = ei; - - ei = traits->createNvParameterized(ForceFieldData::staticClassName()); - d->FieldSamplers.buf[1] = ei; - - ei = traits->createNvParameterized(HeatSourceData::staticClassName()); - d->FieldSamplers.buf[2] = ei; - - ei = traits->createNvParameterized(JetFieldSamplerData::staticClassName()); - d->FieldSamplers.buf[3] = ei; - - ei = traits->createNvParameterized(TurbulenceFieldSamplerData::staticClassName()); - d->FieldSamplers.buf[4] = ei; - - ei = traits->createNvParameterized(VortexFieldSamplerData::staticClassName()); - d->FieldSamplers.buf[5] = ei; - - ei = traits->createNvParameterized(NoiseFieldSamplerData::staticClassName()); - d->FieldSamplers.buf[6] = ei; - - ei = traits->createNvParameterized(SubstanceSourceData::staticClassName()); - d->FieldSamplers.buf[7] = ei; - - ei = traits->createNvParameterized(WindFieldSamplerData::staticClassName()); - d->FieldSamplers.buf[8] = ei; - - ei = traits->createNvParameterized(VelocitySourceData::staticClassName()); - d->FieldSamplers.buf[9] = ei; - - ei = traits->createNvParameterized(FlameEmitterData::staticClassName()); - d->FieldSamplers.buf[10] = ei; - - ret = true; - } - } - - - Array< const char* > nameList; - for (int32_t i = 0; i < d->FieldSamplers.arraySizes[0]; i++) - { - ForceFieldData* e = static_cast< ForceFieldData*>(d->FieldSamplers.buf[i]); - if (e) - { - for (uint32_t j = 0; j < nameList.size(); j++) - { - if (nvidia::stricmp(nameList[j], e->Name) == 0) - { - NvParameterized::Handle handle(e); - NvParameterized::ErrorType err = handle.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - handle.setParamString(getUniqueName(nameList, e->Name)); - ret = true; - break; - } - } - } - nameList.pushBack(e->Name); - } - } - - - for (uint32_t i = 0; i < (uint32_t)d->FieldSamplers.arraySizes[0]; i++) - { - NvParameterized::Interface* iface = d->FieldSamplers.buf[i]; - FieldSamplerType fst = getFieldSamplerType(iface); - switch (fst) - { - case FST_FORCE_FIELD: - { - ForceFieldData* ed = static_cast< ForceFieldData*>(d->FieldSamplers.buf[i]); - if (ed->ForceField == NULL) - { - ed->ForceField = traits->createNvParameterized(forcefield::ForceFieldAssetParams::staticClassName()); - ret = true; - } - forcefield::ForceFieldAssetParams* fap = static_cast< forcefield::ForceFieldAssetParams*>(ed->ForceField); - if (fap && fap->strength == 0 && fap->lifetime == 0) // initialize the forcefield to reasonable values; if lifetime is zero, then the force field is not considered initalized. - { - ret = true; - fap->defScale = 1; - fap->strength = 20.0f; - fap->lifetime = 1000; - - fap->includeShapeParameters.dimensions = PxVec3(5, 5, 5); - - //TODO: Verify correctness of changes, add case for GenericForceFieldKernelType - if (fap->forceFieldKernelType == NULL) - { - fap->forceFieldKernelType = traits->createNvParameterized(forcefield::RadialForceFieldKernelParams::staticClassName()); - forcefield::RadialForceFieldKernelParams* rfap = static_cast< forcefield::RadialForceFieldKernelParams*>(fap->forceFieldKernelType); - if (rfap) - { - rfap->falloffParameters = traits->createNvParameterized(forcefield::ForceFieldFalloffParams::staticClassName()); - forcefield::ForceFieldFalloffParams* ffp = static_cast< forcefield::ForceFieldFalloffParams*>(rfap->falloffParameters); - rfap->noiseParameters = traits->createNvParameterized(forcefield::ForceFieldNoiseParams::staticClassName()); - forcefield::ForceFieldNoiseParams* fnp = static_cast< forcefield::ForceFieldNoiseParams*>(rfap->noiseParameters); - - ffp->multiplier = 0.5f; - ffp->start = 100; - ffp->end = 0; - - fnp->strength = 0.01f; - fnp->spaceScale = 8; - fnp->timeScale = 1; - fnp->octaves = 3; - } - } - } - } - break; - case FST_HEAT_SOURCE: - { - HeatSourceData* ed = static_cast< HeatSourceData*>(d->FieldSamplers.buf[i]); - if (ed->HeatSource == NULL) - { - ed->HeatSource = traits->createNvParameterized(turbulencefs::HeatSourceAssetParams::staticClassName()); - ret = true; - } - turbulencefs::HeatSourceAssetParams* ap = static_cast< turbulencefs::HeatSourceAssetParams*>(ed->HeatSource); - if (ap && ap->geometryType == NULL) - { - ap->averageTemperature = 4; - ap->stdTemperature = 2; - ap->geometryType = traits->createNvParameterized(turbulencefs::HeatSourceGeomSphereParams::staticClassName()); - ret = true; - } - } - break; - case FST_SUBSTANCE_SOURCE: - { - SubstanceSourceData* ed = static_cast< SubstanceSourceData*>(d->FieldSamplers.buf[i]); - if (ed->SubstanceSource == NULL) - { - ed->SubstanceSource = traits->createNvParameterized(turbulencefs::SubstanceSourceAssetParams::staticClassName()); - ret = true; - } - turbulencefs::SubstanceSourceAssetParams* ap = static_cast< turbulencefs::SubstanceSourceAssetParams*>(ed->SubstanceSource); - if (ap && ap->geometryType == NULL) - { - ap->averageDensity = 32; - ap->stdDensity = 16; - ap->geometryType = traits->createNvParameterized(turbulencefs::HeatSourceGeomSphereParams::staticClassName()); - ret = true; - } - } - break; - case FST_VELOCITY_SOURCE: - { - VelocitySourceData* ed = static_cast< VelocitySourceData*>(d->FieldSamplers.buf[i]); - if (ed->VelocitySource == NULL) - { - ed->VelocitySource = traits->createNvParameterized(turbulencefs::VelocitySourceAssetParams::staticClassName()); - ret = true; - } - turbulencefs::VelocitySourceAssetParams* ap = static_cast< turbulencefs::VelocitySourceAssetParams*>(ed->VelocitySource); - if (ap && ap->geometryType == NULL) - { - ap->geometryType = traits->createNvParameterized(turbulencefs::HeatSourceGeomSphereParams::staticClassName()); - ret = true; - } - } - break; - case FST_ATTRACTOR: - { - AttractorFieldSamplerData* ed = static_cast< AttractorFieldSamplerData*>(d->FieldSamplers.buf[i]); - if (ed->AttractorFieldSampler == NULL) - { - ed->AttractorFieldSampler = traits->createNvParameterized(basicfs::AttractorFSAssetParams::staticClassName()); - basicfs::AttractorFSAssetParams* a = static_cast< basicfs::AttractorFSAssetParams*>(ed->AttractorFieldSampler); - if (a) - { - a->boundaryFadePercentage = 0.3f; - a->radius = 2; - a->constFieldStrength = 20; - a->variableFieldStrength = 1; - } - ret = true; - } - } - break; - case FST_VORTEX: - { - VortexFieldSamplerData* ed = static_cast< VortexFieldSamplerData*>(d->FieldSamplers.buf[i]); - if (ed->VortexFieldSampler == NULL) - { - ed->VortexFieldSampler = traits->createNvParameterized(basicfs::VortexFSAssetParams::staticClassName()); - basicfs::VortexFSAssetParams* j = static_cast< basicfs::VortexFSAssetParams*>(ed->VortexFieldSampler); - if (j) - { - j->boundaryFadePercentage = 0.1f; - j->height = 1; - j->bottomRadius = 1; - j->topRadius = 1; - j->rotationalStrength = 4; - j->radialStrength = 4; - j->liftStrength = 1; - } - ret = true; - } - } - break; - case FST_NOISE: - { - NoiseFieldSamplerData* ed = static_cast< NoiseFieldSamplerData*>(d->FieldSamplers.buf[i]); - if (ed->NoiseFieldSampler == NULL) - { - ed->NoiseFieldSampler = traits->createNvParameterized(basicfs::NoiseFSAssetParams::staticClassName()); - ret = true; - } - } - break; - case FST_JET: - { - JetFieldSamplerData* ed = static_cast< JetFieldSamplerData*>(d->FieldSamplers.buf[i]); - if (ed->JetFieldSampler == NULL) - { - ed->JetFieldSampler = traits->createNvParameterized(basicfs::JetFSAssetParams::staticClassName()); - basicfs::JetFSAssetParams* j = static_cast< basicfs::JetFSAssetParams*>(ed->JetFieldSampler); - if (j) - { - j->defaultScale = 1; - j->boundaryFadePercentage = 0.3f; - j->fieldDirection = PxVec3(1, 0, 0); - j->fieldDirectionDeviationAngle = 0; - j->fieldDirectionOscillationPeriod = 0; - j->fieldStrength = 10; - j->fieldStrengthDeviationPercentage = 0; - j->fieldStrengthOscillationPeriod = 0; - j->gridShapeRadius = 2; - j->gridShapeHeight = 2; - j->gridBoundaryFadePercentage = 0.01f; - j->nearRadius = 0.1f; - j->pivotRadius = 0.2f; - j->farRadius = 4; - j->directionalStretch = 1; - j->averageStartDistance = 1; - j->averageEndDistance = 5; - j->noisePercentage = 0.1f; - j->noiseTimeScale = 1; - j->noiseOctaves = 1; - } - ret = true; - } - } - break; - case FST_WIND: - { - WindFieldSamplerData* ed = static_cast< WindFieldSamplerData*>(d->FieldSamplers.buf[i]); - if (ed->WindFieldSampler == NULL) - { - ed->WindFieldSampler = traits->createNvParameterized(basicfs::WindFSAssetParams::staticClassName()); - basicfs::WindFSAssetParams* j = static_cast< basicfs::WindFSAssetParams*>(ed->WindFieldSampler); - if (j) - { - // TODO initialize to reasonable default values - } - ret = true; - } - } - break; - case FST_TURBULENCE: - { - TurbulenceFieldSamplerData* ed = static_cast< TurbulenceFieldSamplerData*>(d->FieldSamplers.buf[i]); - if (ed->TurbulenceFieldSampler == NULL) - { - ed->TurbulenceFieldSampler = traits->createNvParameterized(turbulencefs::TurbulenceFSAssetParams::staticClassName()); - turbulencefs::TurbulenceFSAssetParams* fs = static_cast< turbulencefs::TurbulenceFSAssetParams*>(ed->TurbulenceFieldSampler); - if (fs) - { - fs->gridSizeWorld = PxVec3(15, 15, 15); - fs->updatesPerFrame = 1; - fs->angularVelocityMultiplier = 1; - fs->angularVelocityClamp = 100000; - fs->linearVelocityMultiplier = 1; - fs->linearVelocityClamp = 100000; - fs->boundaryFadePercentage = 0.3f; - fs->boundarySizePercentage = 1; - fs->maxCollidingObjects = 32; - fs->maxHeatSources = 8; - fs->dragCoeff = 0; - fs->externalVelocity = PxVec3(0, 0, 0); - fs->fieldVelocityMultiplier = 1; - fs->fieldVelocityWeight = 0.75; - fs->useHeat = true; - fs->heatParams.temperatureBasedForceMultiplier = 0.02f; - fs->heatParams.ambientTemperature = 0; - fs->heatParams.heatForceDirection = PxVec3(0, 1, 0); - fs->isEnabledOptimizedLOD = false; - fs->updatesPerFrame = 1.f; - fs->noiseParams.noiseStrength = 0; - fs->noiseParams.noiseSpacePeriod = PxVec3(0.9f, 0.9f, 0.9f); - fs->noiseParams.noiseTimePeriod = 10; - fs->noiseParams.noiseOctaves = 1; - fs->dragCoeffForRigidBody = 0; - fs->fluidViscosity = 0; - } - - ret = true; - } - } - break; - case FST_FLAME_EMITTER: - { - FlameEmitterData* ed = static_cast< FlameEmitterData*>(d->FieldSamplers.buf[i]); - if (ed->FlameEmitter == NULL) - { - ed->FlameEmitter = traits->createNvParameterized(turbulencefs::FlameEmitterAssetParams::staticClassName()); - ret = true; - } - } - break; - default: - PX_ALWAYS_ASSERT(); // not yet implemented - break; - } - if ( fixFieldSamplerCollisionFilterNames( iface ) ) - { - ret = true; - } - } - } - } - else - { - PX_ALWAYS_ASSERT(); // invalid NvParameterized::Interface passed in - } - } - - - return ret; -} - - -static void initPathData(NvParameterized::Interface *ei,RigidBodyEffectNS::EffectProperties_Type &ep,bool &ret) -{ - if ( ep.Path.Scale.arraySizes[0] == 0 ) - { - NvParameterized::Handle handle(ei); - NvParameterized::ErrorType err = handle.getParameter("EffectProperties.Path.Scale"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(2); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - RigidBodyEffectNS::ControlPoint_Type &c1 = ep.Path.Scale.buf[0]; - RigidBodyEffectNS::ControlPoint_Type &c2 = ep.Path.Scale.buf[1]; - - c1.x = 0; - c1.y = 1; - - c2.x = 1; - c2.y = 1; - ret = true; - } - } - if ( ep.Path.Speed.arraySizes[0] == 0 ) - { - NvParameterized::Handle handle(ei); - NvParameterized::ErrorType err = handle.getParameter("EffectProperties.Path.Speed"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(2); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - RigidBodyEffectNS::ControlPoint_Type &c1 = ep.Path.Speed.buf[0]; - RigidBodyEffectNS::ControlPoint_Type &c2 = ep.Path.Speed.buf[1]; - - c1.x = 0; - c1.y = 1; - - c2.x = 1; - c2.y = 1; - ret = true; - } - } -} - -static void initPathData(NvParameterized::Interface *ei,RigidBodyEffectNS::EffectPath_Type &Path,bool &ret) -{ - if ( Path.Scale.arraySizes[0] == 0 ) - { - NvParameterized::Handle handle(ei); - NvParameterized::ErrorType err = handle.getParameter("Path.Scale"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(2); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - RigidBodyEffectNS::ControlPoint_Type &c1 = Path.Scale.buf[0]; - RigidBodyEffectNS::ControlPoint_Type &c2 = Path.Scale.buf[1]; - - c1.x = 0; - c1.y = 1; - - c2.x = 1; - c2.y = 1; - ret = true; - } - } - if ( Path.Speed.arraySizes[0] == 0 ) - { - NvParameterized::Handle handle(ei); - NvParameterized::ErrorType err = handle.getParameter("Path.Speed"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(2); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - RigidBodyEffectNS::ControlPoint_Type &c1 = Path.Speed.buf[0]; - RigidBodyEffectNS::ControlPoint_Type &c2 = Path.Speed.buf[1]; - - c1.x = 0; - c1.y = 1; - - c2.x = 1; - c2.y = 1; - ret = true; - } - } -} - - -bool ModuleParticlesImpl::setEffectPackageDatabase(const NvParameterized::Interface* dataBase) -{ - WRITE_ZONE(); - bool ret = false; - - if (dataBase) - { - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - const char* className = dataBase->className(); - if (nvidia::strcmp(className, EffectPackageAssetParams::staticClassName()) == 0) - { - bool revised = false; - const char* itemName = dataBase->name(); - EffectPackageDatabaseParams* d = static_cast< EffectPackageDatabaseParams*>(mEffectPackageDatabaseParams); - for (uint32_t i = 0; i < (uint32_t)d->EffectPackages.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->EffectPackages.buf[i]; - EffectPackageData* ed = static_cast< EffectPackageData*>(ei); - if (nvidia::stricmp(ed->Name.buf, itemName) == 0) - { - ed->EffectPackage->copy(*dataBase); - revised = true; - ret = true; - break; - } - } - if (!revised && mEffectPackageDatabaseParams) - { - int32_t arraySize = d->EffectPackages.arraySizes[0]; - NvParameterized::Handle handle(mEffectPackageDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("EffectPackages"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(arraySize + 1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* ei = traits->createNvParameterized(EffectPackageData::staticClassName()); - EffectPackageData* ed = static_cast< EffectPackageData*>(ei); - if (ed) - { - NvParameterized::Handle item(ei); - err = item.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - item.setParamString(itemName); - ei->setName(itemName); - d->EffectPackages.buf[arraySize] = ei; - dataBase->clone(ed->EffectPackage); - if ( ed->EffectPackage == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - } - } - ret = true; - } - } - } - else if (nvidia::strcmp(className, EffectPackageDatabaseParams::staticClassName()) == 0) - { - if (mEffectPackageDatabaseParams && mEffectPackageDatabaseParams != dataBase) - { - mEffectPackageDatabaseParams->destroy(); - mEffectPackageDatabaseParams = NULL; - } - if (mEffectPackageDatabaseParams == NULL) - { - dataBase->clone(mEffectPackageDatabaseParams); - if ( mEffectPackageDatabaseParams == NULL ) - { - APEX_DEBUG_WARNING("Failed to clone asset."); - mEffectPackageDatabaseParams = traits->createNvParameterized(EffectPackageDatabaseParams::staticClassName()); - } - } - } - // initialize anything which needs default values assigned... - if ( mEffectPackageDatabaseParams ) - { - EffectPackageDatabaseParams* d = static_cast< EffectPackageDatabaseParams*>(mEffectPackageDatabaseParams); - - { - if (d->EffectPackages.arraySizes[0] == 0) - { - NvParameterized::Handle handle(mEffectPackageDatabaseParams); - NvParameterized::ErrorType err = handle.getParameter("EffectPackages"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* ei = traits->createNvParameterized(EffectPackageData::staticClassName()); - EffectPackageData* ed = static_cast< EffectPackageData*>(ei); - d->EffectPackages.buf[0] = ei; - if (ed) - { - ed->EffectPackage = traits->createNvParameterized(EffectPackageAssetParams::staticClassName()); - EffectPackageAssetParams* p = static_cast< EffectPackageAssetParams*>(ed->EffectPackage); - if (p->Effects.arraySizes[0] == 0 && p) - { - NvParameterized::Handle handle(p); - NvParameterized::ErrorType err = handle.getParameter("Effects"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - err = handle.resizeArray(1); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* ei = traits->createNvParameterized(EmitterEffect::staticClassName()); - p->Effects.buf[0] = ei; - ret = true; - } - } - } - ret = true; - } - } - Array< const char* > nameList; - for (int32_t i = 0; i < d->EffectPackages.arraySizes[0]; i++) - { - EffectPackageData* e = static_cast< EffectPackageData*>(d->EffectPackages.buf[i]); - if (e) - { - for (uint32_t j = 0; j < nameList.size(); j++) - { - if (nvidia::stricmp(nameList[j], e->Name) == 0) - { - NvParameterized::Handle handle(e); - NvParameterized::ErrorType err = handle.getParameter("Name"); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - handle.setParamString(getUniqueName(nameList, e->Name)); - ret = true; - break; - } - } - } - nameList.pushBack(e->Name); - } - } - - - - for (uint32_t i = 0; i < (uint32_t)d->EffectPackages.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->EffectPackages.buf[i]; - EffectPackageData* d = static_cast< EffectPackageData*>(ei); - - - EffectPackageAssetParams* p = static_cast< EffectPackageAssetParams*>(d->EffectPackage); - if (p == NULL) - { - NvParameterized::Interface* ep = traits->createNvParameterized(EffectPackageAssetParams::staticClassName()); - p = static_cast< EffectPackageAssetParams*>(ep); - d->EffectPackage = ep; - } - - { - RigidBodyEffectNS::EffectPath_Type &path = *(RigidBodyEffectNS::EffectPath_Type *)&p->Path; - initPathData(d->EffectPackage,path,ret); - } - - - - for (uint32_t i = 0; i < (uint32_t)p->Effects.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = p->Effects.buf[i]; - if (!ei) - { - continue; - } - if (nvidia::strcmp(ei->className(), EmitterEffect::staticClassName()) == 0) - { - EmitterEffect* e = static_cast< EmitterEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->Emitter == NULL) - { - setNamedReference(ei, "Emitter", EMITTER_AUTHORING_TYPE_NAME); - PX_ASSERT(e->Emitter); - e->Emitter->setName("defaultEmitter"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), RigidBodyEffect::staticClassName()) == 0) - { - RigidBodyEffect* e = static_cast< RigidBodyEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = e->EffectProperties; - initPathData(ei,ep,ret); - } - else if (nvidia::strcmp(ei->className(), HeatSourceEffect::staticClassName()) == 0) - { - HeatSourceEffect* e = static_cast< HeatSourceEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->HeatSource == NULL) - { - setNamedReference(ei, "HeatSource", HEAT_SOURCE_AUTHORING_TYPE_NAME); - PX_ASSERT(e->HeatSource); - e->HeatSource->setName("defaultHeatSource"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), SubstanceSourceEffect::staticClassName()) == 0) - { - SubstanceSourceEffect* e = static_cast< SubstanceSourceEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->SubstanceSource == NULL) - { - setNamedReference(ei, "SubstanceSource", SUBSTANCE_SOURCE_AUTHORING_TYPE_NAME); - PX_ASSERT(e->SubstanceSource); - e->SubstanceSource->setName("defaultSubstanceSource"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), VelocitySourceEffect::staticClassName()) == 0) - { - VelocitySourceEffect* e = static_cast< VelocitySourceEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->VelocitySource == NULL) - { - setNamedReference(ei, "VelocitySource", VELOCITY_SOURCE_AUTHORING_TYPE_NAME); - PX_ASSERT(e->VelocitySource); - e->VelocitySource->setName("defaultVelocitySource"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), JetFieldSamplerEffect::staticClassName()) == 0) - { - JetFieldSamplerEffect* e = static_cast< JetFieldSamplerEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->JetFieldSampler == NULL) - { - setNamedReference(ei, "JetFieldSampler", JET_FS_AUTHORING_TYPE_NAME); - PX_ASSERT(e->JetFieldSampler); - e->JetFieldSampler->setName("defaultJetFieldSampler"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), WindFieldSamplerEffect::staticClassName()) == 0) - { - WindFieldSamplerEffect* e = static_cast< WindFieldSamplerEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->WindFieldSampler == NULL) - { - setNamedReference(ei, "WindFieldSampler", WIND_FS_AUTHORING_TYPE_NAME); - PX_ASSERT(e->WindFieldSampler); - e->WindFieldSampler->setName("defaultWindFieldSampler"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), NoiseFieldSamplerEffect::staticClassName()) == 0) - { - NoiseFieldSamplerEffect* e = static_cast< NoiseFieldSamplerEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->NoiseFieldSampler == NULL) - { - setNamedReference(ei, "NoiseFieldSampler", NOISE_FS_AUTHORING_TYPE_NAME); - PX_ASSERT(e->NoiseFieldSampler); - e->NoiseFieldSampler->setName("defaultNoiseFieldSampler"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), VortexFieldSamplerEffect::staticClassName()) == 0) - { - VortexFieldSamplerEffect* e = static_cast< VortexFieldSamplerEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->VortexFieldSampler == NULL) - { - setNamedReference(ei, "VortexFieldSampler", VORTEX_FS_AUTHORING_TYPE_NAME); - PX_ASSERT(e->VortexFieldSampler); - e->VortexFieldSampler->setName("defaultVortexFieldSampler"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), AttractorFieldSamplerEffect::staticClassName()) == 0) - { - AttractorFieldSamplerEffect* e = static_cast< AttractorFieldSamplerEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->AttractorFieldSampler == NULL) - { - setNamedReference(ei, "AttractorFieldSampler", ATTRACTOR_FS_AUTHORING_TYPE_NAME); - PX_ASSERT(e->AttractorFieldSampler); - e->AttractorFieldSampler->setName("defaultAttractorFieldSampler"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), TurbulenceFieldSamplerEffect::staticClassName()) == 0) - { - TurbulenceFieldSamplerEffect* e = static_cast< TurbulenceFieldSamplerEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->TurbulenceFieldSampler == NULL) - { - setNamedReference(ei, "TurbulenceFieldSampler", TURBULENCE_FS_AUTHORING_TYPE_NAME); - PX_ASSERT(e->TurbulenceFieldSampler); - e->TurbulenceFieldSampler->setName("defaultTurbulenceFieldSampler"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), ForceFieldEffect::staticClassName()) == 0) - { - ForceFieldEffect* e = static_cast< ForceFieldEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->ForceField == NULL) - { - setNamedReference(ei, "ForceField", FORCEFIELD_AUTHORING_TYPE_NAME); - PX_ASSERT(e->ForceField); - e->ForceField->setName("defaultForceField"); - ret = true; - } - } - else if (nvidia::strcmp(ei->className(), FlameEmitterEffect::staticClassName()) == 0) - { - FlameEmitterEffect* e = static_cast< FlameEmitterEffect*>(ei); - RigidBodyEffectNS::EffectProperties_Type &ep = *(RigidBodyEffectNS::EffectProperties_Type *)&e->EffectProperties; - initPathData(ei,ep,ret); - if (e->FlameEmitter == NULL) - { - setNamedReference(ei, "FlameEmitter", FLAME_EMITTER_AUTHORING_TYPE_NAME); - PX_ASSERT(e->FlameEmitter); - e->FlameEmitter->setName("defaultFlameEmitter"); - ret = true; - } - } - - } - } - } - } - } - - - return ret; -} - - -bool ModuleParticlesImpl::fixupNamedReferences(void) -{ - bool ret = false; - - if (mEffectPackageEmitterDatabaseParams) - { - EffectPackageEmitterDatabaseParams* d = static_cast< EffectPackageEmitterDatabaseParams*>(mEffectPackageEmitterDatabaseParams); - - for (int32_t i = 0; i < d->Emitters.arraySizes[0]; i++) - { - EmitterData* ed = static_cast< EmitterData*>(d->Emitters.buf[i]); - - if (ed->Emitter) - { - NvParameterized::Handle handle(ed->Emitter); - NvParameterized::ErrorType err = ed->Emitter->getParameterHandle("iosAssetName", handle); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - NvParameterized::Interface* val = NULL; - err = handle.getParamRef(val); - // ok..need to see if it has changed! - if (val) - { - const char* refName = val->name(); - EffectPackageIOSDatabaseParams* d = static_cast< EffectPackageIOSDatabaseParams*>(mEffectPackageIOSDatabaseParams); - for (uint32_t i = 0; i < (uint32_t)d->ParticleSimulations.arraySizes[0]; i++) - { - NvParameterized::Interface* ei = d->ParticleSimulations.buf[i]; - emitter::ApexEmitterAssetParameters* ae = static_cast< emitter::ApexEmitterAssetParameters*>(ed->Emitter); - ParticleSimulationData* ed = static_cast< ParticleSimulationData*>(ei); - if (nvidia::stricmp(ed->Name.buf, refName) == 0) - { - NvParameterized::Interface* ios = ed->IOS; - if ( ios ) - { - const char* paramRef = getAuthoringTypeName(ios->className()); - err = handle.initParamRef(paramRef,true); - PX_ASSERT(err == NvParameterized::ERROR_NONE); - if (err == NvParameterized::ERROR_NONE) - { - ae->iosAssetName->setName(ed->Name.buf); - } - } - break; - } - } - } - } - } - } - } - return ret; -} - -bool ModuleParticlesImpl::initParticleSimulationData(ParticleSimulationData* ed) -{ - bool ret = false; - - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - - if (ed->IOS == NULL) - { - ed->IOS = traits->createNvParameterized(basicios::BasicIOSAssetParam::staticClassName()); - basicios::BasicIOSAssetParam* ios = static_cast< basicios::BasicIOSAssetParam*>(ed->IOS); - if (ios) - { - ios->restDensity = 1; - ios->particleRadius = 0.1f; - ios->maxParticleCount = 16384; - ios->maxInjectedParticleCount = 0.05; - ios->sceneGravityScale = 1; - ios->externalAcceleration.x = 0; - ios->externalAcceleration.y = 0; - ios->externalAcceleration.z = 0; - ios->particleMass.center = 1; - ios->particleMass.spread = 0; - ios->staticCollision = true; - ios->restitutionForStaticShapes = 0.2f; - ios->dynamicCollision = true; - ios->restitutionForDynamicShapes = 0.2f; - ios->collisionDistanceMultiplier = 1; - ios->collisionThreshold = 0.001f; - ios->collisionWithConvex = true; - ios->collisionWithTriangleMesh = false; - } - ret = true; - } - - if (ed->IOS && nvidia::strcmp(ed->IOS->className(), "ParticleIosAssetParam") == 0) - { - pxparticleios::ParticleIosAssetParam* p = static_cast< pxparticleios::ParticleIosAssetParam*>(ed->IOS); - if (p->particleType == NULL) - { - p->particleType = traits->createNvParameterized(pxparticleios::FluidParticleSystemParams::staticClassName()); - ret = true; - } - } - - if ( ed->IOS ) - { - if ( nvidia::strcmp(ed->IOS->className(), "ParticleIosAssetParam") == 0 ) - { - const char *filterName = "ParticlesSimple=all"; - pxparticleios::ParticleIosAssetParam* p = static_cast< pxparticleios::ParticleIosAssetParam*>(ed->IOS); - if (p->particleType && nvidia::strcmp(p->particleType->className(), pxparticleios::FluidParticleSystemParams::staticClassName()) == 0 ) - { - filterName = "ParticlesFluid=all"; - } - - { - const char *value=NULL; - NvParameterized::getParamString(*ed->IOS,"simulationFilterData",value); - if ( value == NULL || value[0] == 0 ) - { - NvParameterized::setParamString(*ed->IOS,"simulationFilterData",filterName); - ret = true; - } - } - { - const char *value=NULL; - NvParameterized::getParamString(*ed->IOS,"fieldSamplerFilterData",value); - if ( value == NULL || value[0] == 0 ) - { - NvParameterized::setParamString(*ed->IOS,"fieldSamplerFilterData",filterName); - ret = true; - } - } - } - else - { - const char *filterName = "ParticlesBasicIOS=all"; - { - const char *value=NULL; - NvParameterized::getParamString(*ed->IOS,"collisionFilterDataName",value); - if ( value == NULL || value[0] == 0 ) - { - NvParameterized::setParamString(*ed->IOS,"collisionFilterDataName",filterName); - ret = true; - } - } - { - const char *value=NULL; - NvParameterized::getParamString(*ed->IOS,"fieldSamplerFilterDataName",value); - if ( value == NULL || value[0] == 0 ) - { - NvParameterized::setParamString(*ed->IOS,"fieldSamplerFilterDataName",filterName); - ret = true; - } - } - - } - } - return ret; -} - -void ModuleParticlesImpl::resetEmitterPool(void) -{ - WRITE_ZONE(); - for (uint32_t i = 0; i < mScenes.size(); i++) - { - ParticlesScene* ds = static_cast< ParticlesScene*>(mScenes[i]); - ds->resetEmitterPool(); - } -} - -#define MODULE_CHECK(x) if ( x == module ) { x = NULL; } - -/** -Notification from ApexSDK when a module has been released -*/ -void ModuleParticlesImpl::notifyChildGone(ModuleIntl* imodule) -{ - Module* module = mSdk->getModule(imodule); - PX_ASSERT(module); - MODULE_CHECK(mModuleBasicIos); - MODULE_CHECK(mModuleEmitter); - MODULE_CHECK(mModuleIofx); - MODULE_CHECK(mModuleFieldSampler); - MODULE_CHECK(mModuleBasicFS); - MODULE_CHECK(mModuleParticleIos); // PhysX 3.x only : Instantiate the ParticleIOS module - MODULE_CHECK(mModuleForceField); // PhysX 3.x only : Instantiate the ForceField module -}; - -// This is a notification that the ApexSDK is being released. During the shutdown process -// the APEX SDK will automatically release all currently registered modules; therefore we are no longer -// responsible for releasing these modules ourselves. - -#define SAFE_MODULE_NULL(x) if ( x ) { ModuleIntl *m = mSdk->getInternalModule(x); PX_ASSERT(m); m->setParent(NULL); x = NULL; } - -void ModuleParticlesImpl::notifyReleaseSDK(void) -{ - SAFE_MODULE_NULL(mModuleBasicIos); - SAFE_MODULE_NULL(mModuleEmitter); - SAFE_MODULE_NULL(mModuleIofx); - SAFE_MODULE_NULL(mModuleFieldSampler); - SAFE_MODULE_NULL(mModuleBasicFS); - SAFE_MODULE_NULL(mModuleParticleIos); // PhysX 3.x only : Instantiate the ParticleIOS module - SAFE_MODULE_NULL(mModuleForceField); // PhysX 3.x only : Instantiate the ForceField module -} - -void ModuleParticlesImpl::initializeDefaultDatabases(void) -{ - WRITE_ZONE(); - /* Register the NvParameterized factories */ - NvParameterized::Traits* traits = mSdk->getParameterizedTraits(); - - if (mTurbulenceModule == NULL) - { - uint32_t count = mSdk->getNbModules(); - Module** modules = mSdk->getModules(); - for (uint32_t i = 0; i < count; i++) - { - Module* m = modules[i]; - const char* name = m->getName(); - if (nvidia::strcmp(name, "TurbulenceFS") == 0) - { - mTurbulenceModule = static_cast< ModuleTurbulenceFS*>(m); - break; - } - } - } - - // Initialize the effect package databases - if (mEffectPackageIOSDatabaseParams == NULL) - { - NvParameterized::Interface* iface = traits->createNvParameterized(EffectPackageIOSDatabaseParams::staticClassName()); - if (iface) - { - setEffectPackageIOSDatabase(iface); - iface->destroy(); - } - } - if (mEffectPackageIOFXDatabaseParams == NULL) - { - NvParameterized::Interface* iface = traits->createNvParameterized(EffectPackageIOFXDatabaseParams::staticClassName()); - if (iface) - { - setEffectPackageIOFXDatabase(iface); - iface->destroy(); - } - } - if (mEffectPackageEmitterDatabaseParams == NULL) - { - NvParameterized::Interface* iface = traits->createNvParameterized(EffectPackageEmitterDatabaseParams::staticClassName()); - if (iface) - { - setEffectPackageEmitterDatabase(iface); - iface->destroy(); - } - } - if (mEffectPackageFieldSamplerDatabaseParams == NULL) - { - NvParameterized::Interface* iface = traits->createNvParameterized(EffectPackageFieldSamplerDatabaseParams::staticClassName()); - setEffectPackageFieldSamplerDatabase(iface); - iface->destroy(); - } - if (mEffectPackageDatabaseParams == NULL) - { - NvParameterized::Interface* iface = traits->createNvParameterized(EffectPackageDatabaseParams::staticClassName()); - if (iface) - { - setEffectPackageDatabase(iface); - iface->destroy(); - } - } - if (mGraphicsMaterialsDatabase == NULL) - { - NvParameterized::Interface* iface = traits->createNvParameterized(EffectPackageGraphicsMaterialsParams::staticClassName()); - if (iface) - { - setEffectPackageGraphicsMaterialsDatabase(iface); - iface->destroy(); - } - } - -} - -#define MODULE_NAME_CHECK(x) if ( x ) { if ( nvidia::strcmp(x->getName(),moduleName) == 0) ret = x; } - -nvidia::apex::Module* ModuleParticlesImpl::getModule(const char* moduleName) -{ - READ_ZONE(); - nvidia::apex::Module* ret = NULL; - MODULE_NAME_CHECK(mModuleBasicIos); - MODULE_NAME_CHECK(mModuleEmitter); - MODULE_NAME_CHECK(mModuleIofx); - MODULE_NAME_CHECK(mModuleFieldSampler); - MODULE_NAME_CHECK(mModuleBasicFS); - MODULE_NAME_CHECK(mModuleParticleIos); - MODULE_NAME_CHECK(mModuleForceField); - return ret; -} - -} -} // end namespace nvidia - diff --git a/APEX_1.4/module/particles/src/ParticlesScene.cpp b/APEX_1.4/module/particles/src/ParticlesScene.cpp deleted file mode 100644 index 4ca17275..00000000 --- a/APEX_1.4/module/particles/src/ParticlesScene.cpp +++ /dev/null @@ -1,338 +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 "ApexDefs.h" -#include "ApexUsingNamespace.h" - -#include "Apex.h" -#include "ParticlesScene.h" -#include "SceneIntl.h" -#include "ModulePerfScope.h" -#include "ModuleParticlesImpl.h" -#include "PxScene.h" -#include "EffectPackageActorImpl.h" -#include "ApexEmitterAssetParameters.h" -#include "EmitterAsset.h" -#include "EmitterActor.h" -#include "PxProfiler.h" - -#include "ScopedPhysXLock.h" -#include "Lock.h" - -#pragma warning(disable: 4355) // 'this' : used in base member initializer list - -namespace nvidia -{ - -namespace particles -{ - -ParticlesScene::ParticlesScene(ModuleParticlesImpl& module, SceneIntl& scene, RenderDebugInterface* renderDebug, ResourceList& list) - : mRenderDebug(renderDebug) - , mUpdateTask(*this) - , mSimTime(0) - , mCheckTime(0) -{ - mModule = &module; - mApexScene = &scene; - mPhysXScene = NULL; - - list.add(*this); // Add self to module's list of ParticlesScenes - - /* Initialize reference to ParticlesDebugRenderParams */ - { - READ_LOCK(*mApexScene); - mDebugRenderParams = DYNAMIC_CAST(DebugRenderParams*)(mApexScene->getDebugRenderParams()); - } - PX_ASSERT(mDebugRenderParams); - NvParameterized::Handle handle(*mDebugRenderParams), memberHandle(*mDebugRenderParams); - int size; - - if (mDebugRenderParams->getParameterHandle("moduleName", handle) == NvParameterized::ERROR_NONE) - { - handle.getArraySize(size, 0); - handle.resizeArray(size + 1); - if (handle.getChildHandle(size, memberHandle) == NvParameterized::ERROR_NONE) - { - memberHandle.initParamRef(ParticlesDebugRenderParams::staticClassName(), true); - } - } - - /* Load reference to ParticlesDebugRenderParams */ - NvParameterized::Interface* refPtr = NULL; - memberHandle.getParamRef(refPtr); - mParticlesDebugRenderParams = DYNAMIC_CAST(ParticlesDebugRenderParams*)(refPtr); - PX_ASSERT(mParticlesDebugRenderParams); -} - -ParticlesScene::~ParticlesScene() -{ -} - -// Called by scene task graph between LOD and PhysX::simulate() -void ParticlesScene::TaskUpdate::run() -{ -#if 1 - setProfileStat((uint16_t) mOwner.mActorArray.size()); - float dt = mOwner.mApexScene->getElapsedTime(); - mOwner.updateActors(dt); - -#endif -} - -void ParticlesScene::updateFromSimulate(float dt) -{ - PX_UNUSED(dt); -} - -// Called by updateTask between LOD and PhysX simulate. Any writes -// to render data must be protected by acquiring the actor's render data lock -void ParticlesScene::updateActors(float dt) -{ - PX_PROFILE_ZONE("ParticlesScene::updateActors", GetInternalApexSDK()->getContextId()); - - //_ASSERTE (dt <= 1.0f /60.0f); - SCOPED_PHYSX_LOCK_WRITE(mApexScene); - for (uint32_t i = 0 ; i < mActorArray.size() ; i++) - { - ParticlesBase* db = static_cast< ParticlesBase*>(mActorArray[i]); - switch (db->getParticlesType()) - { - case ParticlesBase::DST_EFFECT_PACKAGE_ACTOR: - { - EffectPackageActorImpl* actor = static_cast<EffectPackageActorImpl*>(db); - actor->updateParticles(dt); - } - break; - default: - PX_ASSERT(0); - } - } - -} - -// submit the task that updates the dynamicsystem actors -// called from ApexScene::simulate() -void ParticlesScene::submitTasks(float elapsedTime, float /*substepSize*/, uint32_t /*numSubSteps*/) -{ - PX_UNUSED(elapsedTime); -#if 1 - mSimTime += elapsedTime; - mCheckTime += elapsedTime; - PxTaskManager* tm; - { - READ_LOCK(*mApexScene); - tm = mApexScene->getTaskManager(); - } - tm->submitUnnamedTask(mUpdateTask); - mUpdateTask.finishBefore(tm->getNamedTask(AST_PHYSX_SIMULATE)); -#else - updateActors(elapsedTime); -#endif -} - -void ParticlesScene::fetchResults() -{ - -} - -// Called by ApexScene::fetchResults() with all actors render data locked. -void ParticlesScene::fetchResultsPostRenderUnlock() -{ - PX_PROFILE_ZONE("ParticlesSceneFetchResults", GetInternalApexSDK()->getContextId()); - - bool screenCulling = mModule->getEnableScreenCulling(); - bool znegative = mModule->getZnegative(); - - for (uint32_t i = 0 ; i < mActorArray.size() ; i++) - { - ParticlesBase* db = static_cast< ParticlesBase*>(mActorArray[i]); - - switch (db->getParticlesType()) - { - case ParticlesBase::DST_EFFECT_PACKAGE_ACTOR: - { - EffectPackageActorImpl* actor = static_cast< EffectPackageActorImpl*>(db); - actor->updatePoseAndBounds(screenCulling, znegative); - } - break; - default: - PX_ASSERT(0); - } - } - - // - - if (!mEmitterPool.empty()) - { - if (mCheckTime > 1) // only check once every second - { - mCheckTime = 0; - EmitterPool* source = &mEmitterPool[0]; - EmitterPool* dest = source; - uint32_t incount = mEmitterPool.size(); - uint32_t outcount = 0; - for (uint32_t i = 0; i < incount; i++) - { - bool alive = source->process(mSimTime); - if (!alive) // there must be at least one emitter sharing the same asset! - { - alive = true; // by default we cannot delete it unless there is at least once emitter in the pool sharing the same IOS - EmitterPool* scan = &mEmitterPool[0]; - for (uint32_t i = 0; i < outcount; i++) - { - if (scan != source) - { - if (source->mEmitter->getEmitterAsset() == scan->mEmitter->getEmitterAsset()) - { - alive = false; - break; - } - } - scan++; - } - } - if (alive) - { - *dest = *source; - dest++; - outcount++; - } - else - { - source->releaseEmitter(); - } - source++; - } - if (outcount != incount) - { - mEmitterPool.resize(outcount); - } - } - } - // -} - -void ParticlesScene::visualize() -{ -#ifndef WITHOUT_DEBUG_VISUALIZE - if (!mParticlesDebugRenderParams->VISUALIZE_HEAT_SOURCE_ACTOR && !mParticlesDebugRenderParams->VISUALIZE_EFFECT_PACKAGE_ACTOR) - { - return; - } - const physx::PxMat44& savedPose = *RENDER_DEBUG_IFACE(mRenderDebug)->getPoseTyped(); - RENDER_DEBUG_IFACE(mRenderDebug)->setIdentityPose(); - RENDER_DEBUG_IFACE(mRenderDebug)->pushRenderState(); - for (uint32_t i = 0 ; i < mActorArray.size() ; i++) - { - ParticlesBase* db = static_cast< ParticlesBase*>(mActorArray[i]); - switch (db->getParticlesType()) - { - case ParticlesBase::DST_EFFECT_PACKAGE_ACTOR: - if (mParticlesDebugRenderParams->VISUALIZE_EFFECT_PACKAGE_ACTOR) - { - EffectPackageActorImpl* hsa = static_cast< EffectPackageActorImpl*>(db); - hsa->visualize(mRenderDebug, false); - } - break; - default: - PX_ASSERT(0); - } - } - RENDER_DEBUG_IFACE(mRenderDebug)->setPose(savedPose); - RENDER_DEBUG_IFACE(mRenderDebug)->popRenderState(); -#endif -} - -void ParticlesScene::destroy() -{ - removeAllActors(); - resetEmitterPool(); - mApexScene->moduleReleased(*this); - delete this; -} - -void ParticlesScene::setModulePhysXScene(PxScene* nxScene) -{ - mPhysXScene = nxScene; -} - -void ParticlesScene::resetEmitterPool() -{ - for (uint32_t i = 0; i < mEmitterPool.size(); i++) - { - mEmitterPool[i].releaseEmitter(); - } - mEmitterPool.clear(); -} - -void ParticlesScene::addToEmitterPool(EmitterActor* emitterActor) -{ - EmitterPool ep(emitterActor, mSimTime); - emitterActor->stopEmit(); - mEmitterPool.pushBack(ep); -} - -EmitterActor* ParticlesScene::getEmitterFromPool(EmitterAsset* asset) -{ - EmitterActor* ret = NULL; - - uint32_t ecount = mEmitterPool.size(); - if (ecount) - { - for (uint32_t i = 0; i < ecount; i++) - { - if (mEmitterPool[i].mEmitter->getEmitterAsset() == asset) - { - ret = mEmitterPool[i].mEmitter; - for (uint32_t j = i + 1; j < ecount; j++) - { - mEmitterPool[j - 1] = mEmitterPool[j]; - } - mEmitterPool.resize(ecount - 1); - break; - } - } - } - return ret; -} - -bool EmitterPool::process(float simTime) -{ - bool ret = true; - if (simTime > mEmitterTime) - { - mEmitterTime = simTime + EMITTER_FORGET_TIME; - ret = false; - } - return ret; -} - -void EmitterPool::releaseEmitter() -{ - PX_ASSERT(mEmitter); - if (mEmitter) - { - mEmitter->release(); - mEmitter = NULL; - } -} - -EmitterPool::EmitterPool(EmitterActor* emitterActor, float simTime) -{ - mEmitter = emitterActor; - mEmitterTime = simTime + EMITTER_FORGET_TIME; -} - -} -} // end namespace nvidia - - diff --git a/APEX_1.4/module/particles/src/autogen/AttractorFieldSamplerData.cpp b/APEX_1.4/module/particles/src/autogen/AttractorFieldSamplerData.cpp deleted file mode 100644 index 818522a6..00000000 --- a/APEX_1.4/module/particles/src/autogen/AttractorFieldSamplerData.cpp +++ /dev/null @@ -1,363 +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 "AttractorFieldSamplerData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace AttractorFieldSamplerDataNS; - -const char* const AttractorFieldSamplerDataFactory::vptr = - NvParameterized::getVptr<AttractorFieldSamplerData, AttractorFieldSamplerData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->AttractorFieldSampler), NULL, 0 }, // AttractorFieldSampler -}; - - -bool AttractorFieldSamplerData::mBuiltFlag = false; -NvParameterized::MutexType AttractorFieldSamplerData::mBuiltFlagMutex; - -AttractorFieldSamplerData::AttractorFieldSamplerData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &AttractorFieldSamplerDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -AttractorFieldSamplerData::~AttractorFieldSamplerData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void AttractorFieldSamplerData::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->~AttractorFieldSamplerData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* AttractorFieldSamplerData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* AttractorFieldSamplerData::getParameterDefinitionTree(void) const -{ - AttractorFieldSamplerData* tmpParam = const_cast<AttractorFieldSamplerData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType AttractorFieldSamplerData::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 AttractorFieldSamplerData::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 AttractorFieldSamplerData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<AttractorFieldSamplerData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void AttractorFieldSamplerData::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 AttractorFieldSamplerData::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", "Containst he asset properties for this attractor field sampler", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Attractor FS Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="AttractorFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("AttractorFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Attractor FS Name", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "AttractorFSAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 AttractorFieldSamplerData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultAttractorFieldSampler"; -} - -void AttractorFieldSamplerData::initDynamicArrays(void) -{ -} - -void AttractorFieldSamplerData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void AttractorFieldSamplerData::initReferences(void) -{ - AttractorFieldSampler = NULL; - -} - -void AttractorFieldSamplerData::freeDynamicArrays(void) -{ -} - -void AttractorFieldSamplerData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void AttractorFieldSamplerData::freeReferences(void) -{ - if (AttractorFieldSampler) - { - AttractorFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/AttractorFieldSamplerEffect.cpp b/APEX_1.4/module/particles/src/autogen/AttractorFieldSamplerEffect.cpp deleted file mode 100644 index 640c6e85..00000000 --- a/APEX_1.4/module/particles/src/autogen/AttractorFieldSamplerEffect.cpp +++ /dev/null @@ -1,1362 +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 "AttractorFieldSamplerEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace AttractorFieldSamplerEffectNS; - -const char* const AttractorFieldSamplerEffectFactory::vptr = - NvParameterized::getVptr<AttractorFieldSamplerEffect, AttractorFieldSamplerEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->AttractorFieldSampler), NULL, 0 }, // AttractorFieldSampler -}; - - -bool AttractorFieldSamplerEffect::mBuiltFlag = false; -NvParameterized::MutexType AttractorFieldSamplerEffect::mBuiltFlagMutex; - -AttractorFieldSamplerEffect::AttractorFieldSamplerEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &AttractorFieldSamplerEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -AttractorFieldSamplerEffect::~AttractorFieldSamplerEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void AttractorFieldSamplerEffect::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->~AttractorFieldSamplerEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* AttractorFieldSamplerEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* AttractorFieldSamplerEffect::getParameterDefinitionTree(void) const -{ - AttractorFieldSamplerEffect* tmpParam = const_cast<AttractorFieldSamplerEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType AttractorFieldSamplerEffect::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 AttractorFieldSamplerEffect::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 AttractorFieldSamplerEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<AttractorFieldSamplerEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void AttractorFieldSamplerEffect::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 AttractorFieldSamplerEffect::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", "An attractor effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "Attractor FS Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="AttractorFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("AttractorFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Attractor FS Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "AttractorFSAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void AttractorFieldSamplerEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void AttractorFieldSamplerEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void AttractorFieldSamplerEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void AttractorFieldSamplerEffect::initReferences(void) -{ - AttractorFieldSampler = NULL; - -} - -void AttractorFieldSamplerEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void AttractorFieldSamplerEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void AttractorFieldSamplerEffect::freeReferences(void) -{ - if (AttractorFieldSampler) - { - AttractorFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EffectPackageActorParams.cpp b/APEX_1.4/module/particles/src/autogen/EffectPackageActorParams.cpp deleted file mode 100644 index ca305693..00000000 --- a/APEX_1.4/module/particles/src/autogen/EffectPackageActorParams.cpp +++ /dev/null @@ -1,368 +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 "EffectPackageActorParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EffectPackageActorParamsNS; - -const char* const EffectPackageActorParamsFactory::vptr = - NvParameterized::getVptr<EffectPackageActorParams, EffectPackageActorParams::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_TRANSFORM, false, (size_t)(&((ParametersStruct*)0)->InitialPose), NULL, 0 }, // InitialPose - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->objectScale), NULL, 0 }, // objectScale - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->Enabled), NULL, 0 }, // Enabled -}; - - -bool EffectPackageActorParams::mBuiltFlag = false; -NvParameterized::MutexType EffectPackageActorParams::mBuiltFlagMutex; - -EffectPackageActorParams::EffectPackageActorParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EffectPackageActorParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EffectPackageActorParams::~EffectPackageActorParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EffectPackageActorParams::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->~EffectPackageActorParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EffectPackageActorParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EffectPackageActorParams::getParameterDefinitionTree(void) const -{ - EffectPackageActorParams* tmpParam = const_cast<EffectPackageActorParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EffectPackageActorParams::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 EffectPackageActorParams::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 EffectPackageActorParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EffectPackageActorParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void EffectPackageActorParams::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 EffectPackageActorParams::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", "The individual effect package actor properties", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="InitialPose" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("InitialPose", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Helpful tooltip information goes here", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="objectScale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("objectScale", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "A uniform overall scale factor for this effect actor", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="Enabled" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enabled", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Helpful tooltip information goes here", 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 EffectPackageActorParams::initStrings(void) -{ -} - -void EffectPackageActorParams::initDynamicArrays(void) -{ -} - -void EffectPackageActorParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - InitialPose = physx::PxTransform(init(0,0,0,0,0,0,1)); - objectScale = float(1.000000000); - Enabled = bool(1); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EffectPackageActorParams::initReferences(void) -{ -} - -void EffectPackageActorParams::freeDynamicArrays(void) -{ -} - -void EffectPackageActorParams::freeStrings(void) -{ -} - -void EffectPackageActorParams::freeReferences(void) -{ -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EffectPackageAssetParams.cpp b/APEX_1.4/module/particles/src/autogen/EffectPackageAssetParams.cpp deleted file mode 100644 index 1c36c949..00000000 --- a/APEX_1.4/module/particles/src/autogen/EffectPackageAssetParams.cpp +++ /dev/null @@ -1,1613 +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 "EffectPackageAssetParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EffectPackageAssetParamsNS; - -const char* const EffectPackageAssetParamsFactory::vptr = - NvParameterized::getVptr<EffectPackageAssetParams, EffectPackageAssetParams::ClassAlignment>(); - -const uint32_t NumParamDefs = 40; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 23, 37, 39, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 24, 25, 26, 27, 29, 33, 28, 30, 31, 32, 34, 35, 36, 38, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 4 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->LODSettings), CHILDREN(4), 21 }, // LODSettings - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->UniqueRenderVolume), NULL, 0 }, // LODSettings.UniqueRenderVolume - { TYPE_F32, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeDistanceBegin), NULL, 0 }, // LODSettings.FadeDistanceBegin - { TYPE_F32, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeDistanceEnd), NULL, 0 }, // LODSettings.FadeDistanceEnd - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->RandomizeEmitterRate), NULL, 0 }, // LODSettings.RandomizeEmitterRate - { TYPE_F32, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeOutRate), NULL, 0 }, // LODSettings.FadeOutRate - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->CullByDistance), NULL, 0 }, // LODSettings.CullByDistance - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->CullOffScreen), NULL, 0 }, // LODSettings.CullOffScreen - { TYPE_F32, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->OffScreenCullTime), NULL, 0 }, // LODSettings.OffScreenCullTime - { TYPE_F32, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->NonVisibleDeleteTime), NULL, 0 }, // LODSettings.NonVisibleDeleteTime - { TYPE_F32, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->ScreenCullSize), NULL, 0 }, // LODSettings.ScreenCullSize - { TYPE_F32, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->ScreenCullDistance), NULL, 0 }, // LODSettings.ScreenCullDistance - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeEmitterRate), NULL, 0 }, // LODSettings.FadeEmitterRate - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeAttractorFieldStrength), NULL, 0 }, // LODSettings.FadeAttractorFieldStrength - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeJetFieldStrength), NULL, 0 }, // LODSettings.FadeJetFieldStrength - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeTurbulenceVelocity), NULL, 0 }, // LODSettings.FadeTurbulenceVelocity - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeTurbulenceNoise), NULL, 0 }, // LODSettings.FadeTurbulenceNoise - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeTurbulenceExternalVelocity), NULL, 0 }, // LODSettings.FadeTurbulenceExternalVelocity - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeTurbulenceVelocityWeight), NULL, 0 }, // LODSettings.FadeTurbulenceVelocityWeight - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeHeatSourceTemperature), NULL, 0 }, // LODSettings.FadeHeatSourceTemperature - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeForceFieldStrength), NULL, 0 }, // LODSettings.FadeForceFieldStrength - { TYPE_BOOL, false, (size_t)(&((LevelOfDetailSettings_Type*)0)->FadeForceFieldScale), NULL, 0 }, // LODSettings.FadeForceFieldScale - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->Path), CHILDREN(25), 6 }, // Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(31), 1 }, // Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(32), 1 }, // Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(33), 2 }, // Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(35), 1 }, // Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(36), 2 }, // Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // Path.Speed[].y - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->Effects), CHILDREN(38), 1 }, // Effects - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // Effects[] - { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->toolString), NULL, 0 }, // toolString -}; - - -bool EffectPackageAssetParams::mBuiltFlag = false; -NvParameterized::MutexType EffectPackageAssetParams::mBuiltFlagMutex; - -EffectPackageAssetParams::EffectPackageAssetParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EffectPackageAssetParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EffectPackageAssetParams::~EffectPackageAssetParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EffectPackageAssetParams::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->~EffectPackageAssetParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EffectPackageAssetParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EffectPackageAssetParams::getParameterDefinitionTree(void) const -{ - EffectPackageAssetParams* tmpParam = const_cast<EffectPackageAssetParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EffectPackageAssetParams::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 EffectPackageAssetParams::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 EffectPackageAssetParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EffectPackageAssetParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - Effects (not an array of structs) */ - -void EffectPackageAssetParams::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 EffectPackageAssetParams::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", "The effect package asset", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="LODSettings" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("LODSettings", TYPE_STRUCT, "LevelOfDetailSettings", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "LOD Settings for this effect package", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="LODSettings.UniqueRenderVolume" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UniqueRenderVolume", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Set to true if this effect should have a unique render volume; to get a separate draw call from all other instances of this effect", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="LODSettings.FadeDistanceBegin" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("FadeDistanceBegin", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(5000.000000000), true); - HintTable[1].init("min", double(0.100000001), 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", double(5000.000000000), true); - HintTable[1].init("min", double(0.100000001), true); - HintTable[2].init("shortDescription", "Distance to begin fading out the effect", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="LODSettings.FadeDistanceEnd" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("FadeDistanceEnd", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(5000.000000000), true); - HintTable[1].init("min", double(0.100000001), true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(5000.000000000), true); - HintTable[1].init("min", double(0.100000001), true); - HintTable[2].init("shortDescription", "Distance to finish fading out the effect", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="LODSettings.RandomizeEmitterRate" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("RandomizeEmitterRate", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "If true the emitter rate is randomized from the min to max values", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="LODSettings.FadeOutRate" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("FadeOutRate", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(10.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(10.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Time over which to fade out effect completely", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="LODSettings.CullByDistance" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("CullByDistance", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not to cull effects based on their distance from the camera; requires a valid view matrix", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="LODSettings.CullOffScreen" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("CullOffScreen", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not to cull this effect if it is off screen", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="LODSettings.OffScreenCullTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("OffScreenCullTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(99.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(99.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Time the effect should be offscreen before it is disabled", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="LODSettings.NonVisibleDeleteTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("NonVisibleDeleteTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(99.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(99.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The time an effect is non-visible before we delete it, rathern than just disabling it's state", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="LODSettings.ScreenCullSize" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("ScreenCullSize", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("DISPLAY_NAME", "ScreenCullingSize", true); - HintTable[1].init("max", double(1.000000000), true); - HintTable[2].init("min", double(0.010000000), true); - ParamDefTable[11].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("DISPLAY_NAME", "ScreenCullingSize", true); - HintTable[1].init("max", double(1.000000000), true); - HintTable[2].init("min", double(0.010000000), true); - HintTable[3].init("shortDescription", "Bounding volme to cull the effect when near the edge of the screen", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="LODSettings.ScreenCullDistance" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("ScreenCullDistance", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Radius to camera that we bypass screen culling entirely because the effect is too close to the screen; default is 3 meters", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="LODSettings.FadeEmitterRate" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("FadeEmitterRate", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Control the emitter rate with Fade Distance LOD setting", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="LODSettings.FadeAttractorFieldStrength" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("FadeAttractorFieldStrength", 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[14].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", "Helpful tooltip information goes here", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="LODSettings.FadeJetFieldStrength" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("FadeJetFieldStrength", 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[15].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", "Helpful tooltip information goes here", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="LODSettings.FadeTurbulenceVelocity" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("FadeTurbulenceVelocity", 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[16].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", "Helpful tooltip information goes here", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="LODSettings.FadeTurbulenceNoise" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("FadeTurbulenceNoise", 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[17].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", "Helpful tooltip information goes here", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="LODSettings.FadeTurbulenceExternalVelocity" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("FadeTurbulenceExternalVelocity", 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[18].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", "Helpful tooltip information goes here", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="LODSettings.FadeTurbulenceVelocityWeight" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("FadeTurbulenceVelocityWeight", 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[19].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", "Helpful tooltip information goes here", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="LODSettings.FadeHeatSourceTemperature" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("FadeHeatSourceTemperature", 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[20].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", "Helpful tooltip information goes here", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="LODSettings.FadeForceFieldStrength" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - ParamDef->init("FadeForceFieldStrength", 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[21].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", "Helpful tooltip information goes here", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="LODSettings.FadeForceFieldScale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("FadeForceFieldScale", 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[22].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", "Helpful tooltip information goes here", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional path for this effect to travel on", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[24].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", uint64_t(0), true); - HintTable[1].init("shortDescription", "The array index to loop back to", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[29].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[30].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=32, longName="Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; - 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", "The y-axis value for this vector", true); - ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=33, longName="Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[33].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=34, longName="Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[34].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=35, longName="Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=36, longName="Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; - 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", "The y-axis value for this vector", true); - ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=37, longName="Effects" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; - ParamDef->init("Effects", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("RIGHT_CLICK", "ENABLE_EFFECT DISABLE_EFFECT COPY_EFFECT_PROPERTIES PASTE_EFFECT_PROPERTIES", true); - ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("RIGHT_CLICK", "ENABLE_EFFECT DISABLE_EFFECT COPY_EFFECT_PROPERTIES PASTE_EFFECT_PROPERTIES", true); - HintTable[4].init("shortDescription", "Effect Setting", true); - ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "EmitterEffect", "HeatSourceEffect", "JetFieldSamplerEffect", "AttractorFieldSamplerEffect", "TurbulenceFieldSamplerEffect", "ForceFieldEffect", "NoiseFieldSamplerEffect", "VortexFieldSamplerEffect", "SubstanceSourceEffect", "WindFieldSamplerEffect", "RigidBodyEffect", "VelocitySourceEffect", "FlameEmitterEffect" }; - ParamDefTable[37].setRefVariantVals((const char**)RefVariantVals, 13); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=38, longName="Effects[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; - ParamDef->init("Effects", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("RIGHT_CLICK", "ENABLE_EFFECT DISABLE_EFFECT COPY_EFFECT_PROPERTIES PASTE_EFFECT_PROPERTIES", true); - ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#else - - static HintImpl HintTable[5]; - static Hint* HintPtrTable[5] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], &HintTable[4], }; - HintTable[0].init("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("RIGHT_CLICK", "ENABLE_EFFECT DISABLE_EFFECT COPY_EFFECT_PROPERTIES PASTE_EFFECT_PROPERTIES", true); - HintTable[4].init("shortDescription", "Effect Setting", true); - ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 5); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "EmitterEffect", "HeatSourceEffect", "JetFieldSamplerEffect", "AttractorFieldSamplerEffect", "TurbulenceFieldSamplerEffect", "ForceFieldEffect", "NoiseFieldSamplerEffect", "VortexFieldSamplerEffect", "SubstanceSourceEffect", "WindFieldSamplerEffect", "RigidBodyEffect", "VelocitySourceEffect", "FlameEmitterEffect" }; - ParamDefTable[38].setRefVariantVals((const char**)RefVariantVals, 13); - - - - } - - // Initialize DefinitionImpl node: nodeIndex=39, longName="toolString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; - ParamDef->init("toolString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", uint64_t(1), true); - ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("READONLY", uint64_t(1), true); - HintTable[1].init("shortDescription", "Describes the authoring tool. Info about used tool and runtime during effect creation", true); - ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[4]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(23); - Children[2] = PDEF_PTR(37); - Children[3] = PDEF_PTR(39); - - ParamDefTable[0].setChildren(Children, 4); - } - - // SetChildren for: nodeIndex=1, longName="LODSettings" - { - static Definition* Children[21]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(5); - Children[4] = PDEF_PTR(6); - Children[5] = PDEF_PTR(7); - Children[6] = PDEF_PTR(8); - Children[7] = PDEF_PTR(9); - Children[8] = PDEF_PTR(10); - Children[9] = PDEF_PTR(11); - Children[10] = PDEF_PTR(12); - Children[11] = PDEF_PTR(13); - Children[12] = PDEF_PTR(14); - Children[13] = PDEF_PTR(15); - Children[14] = PDEF_PTR(16); - Children[15] = PDEF_PTR(17); - Children[16] = PDEF_PTR(18); - Children[17] = PDEF_PTR(19); - Children[18] = PDEF_PTR(20); - Children[19] = PDEF_PTR(21); - Children[20] = PDEF_PTR(22); - - ParamDefTable[1].setChildren(Children, 21); - } - - // SetChildren for: nodeIndex=23, longName="Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(24); - Children[1] = PDEF_PTR(25); - Children[2] = PDEF_PTR(26); - Children[3] = PDEF_PTR(27); - Children[4] = PDEF_PTR(29); - Children[5] = PDEF_PTR(33); - - ParamDefTable[23].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=27, longName="Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=29, longName="Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(30); - - ParamDefTable[29].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=30, longName="Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(31); - Children[1] = PDEF_PTR(32); - - ParamDefTable[30].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=33, longName="Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(34); - - ParamDefTable[33].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=34, longName="Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(35); - Children[1] = PDEF_PTR(36); - - ParamDefTable[34].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=37, longName="Effects" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(38); - - ParamDefTable[37].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void EffectPackageAssetParams::initStrings(void) -{ - toolString.isAllocated = true; - toolString.buf = NULL; -} - -void EffectPackageAssetParams::initDynamicArrays(void) -{ - Path.ControlPoints.buf = NULL; - Path.ControlPoints.isAllocated = true; - Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - Path.ControlPoints.arraySizes[0] = 0; - Path.Scale.buf = NULL; - Path.Scale.isAllocated = true; - Path.Scale.elementSize = sizeof(ControlPoint_Type); - Path.Scale.arraySizes[0] = 0; - Path.Speed.buf = NULL; - Path.Speed.isAllocated = true; - Path.Speed.elementSize = sizeof(ControlPoint_Type); - Path.Speed.arraySizes[0] = 0; - Effects.buf = NULL; - Effects.isAllocated = true; - Effects.elementSize = sizeof(NvParameterized::Interface*); - Effects.arraySizes[0] = 0; -} - -void EffectPackageAssetParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - LODSettings.UniqueRenderVolume = bool(0); - LODSettings.FadeDistanceBegin = float(50000.000000000); - LODSettings.FadeDistanceEnd = float(5000.000000000); - LODSettings.RandomizeEmitterRate = bool(0); - LODSettings.FadeOutRate = float(0.200000003); - LODSettings.CullByDistance = bool(0); - LODSettings.CullOffScreen = bool(0); - LODSettings.OffScreenCullTime = float(1.000000000); - LODSettings.NonVisibleDeleteTime = float(4.000000000); - LODSettings.ScreenCullSize = float(0.100000001); - LODSettings.ScreenCullDistance = float(3.000000000); - LODSettings.FadeEmitterRate = bool(1); - LODSettings.FadeAttractorFieldStrength = bool(1); - LODSettings.FadeJetFieldStrength = bool(1); - LODSettings.FadeTurbulenceVelocity = bool(0); - LODSettings.FadeTurbulenceNoise = bool(0); - LODSettings.FadeTurbulenceExternalVelocity = bool(0); - LODSettings.FadeTurbulenceVelocityWeight = bool(0); - LODSettings.FadeHeatSourceTemperature = bool(0); - LODSettings.FadeForceFieldStrength = bool(0); - LODSettings.FadeForceFieldScale = bool(0); - Path.PlaybackMode = (const char*)"LOOP"; - Path.PathDuration = float(4.000000000); - Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EffectPackageAssetParams::initReferences(void) -{ -} - -void EffectPackageAssetParams::freeDynamicArrays(void) -{ - if (Path.ControlPoints.isAllocated && Path.ControlPoints.buf) - { - mParameterizedTraits->free(Path.ControlPoints.buf); - } - if (Path.Scale.isAllocated && Path.Scale.buf) - { - mParameterizedTraits->free(Path.Scale.buf); - } - if (Path.Speed.isAllocated && Path.Speed.buf) - { - mParameterizedTraits->free(Path.Speed.buf); - } - if (Effects.isAllocated && Effects.buf) - { - mParameterizedTraits->free(Effects.buf); - } -} - -void EffectPackageAssetParams::freeStrings(void) -{ - - if (toolString.isAllocated && toolString.buf) - { - mParameterizedTraits->strfree((char*)toolString.buf); - } -} - -void EffectPackageAssetParams::freeReferences(void) -{ - - for (int i = 0; i < Effects.arraySizes[0]; ++i) - { - if (Effects.buf[i]) - { - Effects.buf[i]->destroy(); - } - } -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EffectPackageData.cpp b/APEX_1.4/module/particles/src/autogen/EffectPackageData.cpp deleted file mode 100644 index c92b2177..00000000 --- a/APEX_1.4/module/particles/src/autogen/EffectPackageData.cpp +++ /dev/null @@ -1,363 +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 "EffectPackageData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EffectPackageDataNS; - -const char* const EffectPackageDataFactory::vptr = - NvParameterized::getVptr<EffectPackageData, EffectPackageData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->EffectPackage), NULL, 0 }, // EffectPackage -}; - - -bool EffectPackageData::mBuiltFlag = false; -NvParameterized::MutexType EffectPackageData::mBuiltFlagMutex; - -EffectPackageData::EffectPackageData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EffectPackageDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EffectPackageData::~EffectPackageData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EffectPackageData::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->~EffectPackageData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EffectPackageData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EffectPackageData::getParameterDefinitionTree(void) const -{ - EffectPackageData* tmpParam = const_cast<EffectPackageData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EffectPackageData::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 EffectPackageData::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 EffectPackageData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EffectPackageData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void EffectPackageData::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 EffectPackageData::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 Effect Package Properties", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Effect package name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectPackage" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("EffectPackage", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Effect package parameters", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "EffectPackageAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 EffectPackageData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultEffectPackage"; -} - -void EffectPackageData::initDynamicArrays(void) -{ -} - -void EffectPackageData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EffectPackageData::initReferences(void) -{ - EffectPackage = NULL; - -} - -void EffectPackageData::freeDynamicArrays(void) -{ -} - -void EffectPackageData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void EffectPackageData::freeReferences(void) -{ - if (EffectPackage) - { - EffectPackage->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EffectPackageDatabaseParams.cpp b/APEX_1.4/module/particles/src/autogen/EffectPackageDatabaseParams.cpp deleted file mode 100644 index 059ddc3e..00000000 --- a/APEX_1.4/module/particles/src/autogen/EffectPackageDatabaseParams.cpp +++ /dev/null @@ -1,400 +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 "EffectPackageDatabaseParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EffectPackageDatabaseParamsNS; - -const char* const EffectPackageDatabaseParamsFactory::vptr = - NvParameterized::getVptr<EffectPackageDatabaseParams, EffectPackageDatabaseParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->EffectPackages), CHILDREN(1), 1 }, // EffectPackages - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // EffectPackages[] -}; - - -bool EffectPackageDatabaseParams::mBuiltFlag = false; -NvParameterized::MutexType EffectPackageDatabaseParams::mBuiltFlagMutex; - -EffectPackageDatabaseParams::EffectPackageDatabaseParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EffectPackageDatabaseParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EffectPackageDatabaseParams::~EffectPackageDatabaseParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EffectPackageDatabaseParams::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->~EffectPackageDatabaseParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EffectPackageDatabaseParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EffectPackageDatabaseParams::getParameterDefinitionTree(void) const -{ - EffectPackageDatabaseParams* tmpParam = const_cast<EffectPackageDatabaseParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EffectPackageDatabaseParams::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 EffectPackageDatabaseParams::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 EffectPackageDatabaseParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EffectPackageDatabaseParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - EffectPackages (not an array of structs) */ - -void EffectPackageDatabaseParams::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 EffectPackageDatabaseParams::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", "The collection of all effect packages", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectPackages" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectPackages", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "ENABLE_EFFECT_PACKAGE DISABLE_EFFECT_PACKAGE COPY_EFFECT_PACKAGE_PROPERTIES PASTE_EFFECT_PACKAGE_PROPERTIES DISABLE_ALL_EFFECT_PACKAGES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "ENABLE_EFFECT_PACKAGE DISABLE_EFFECT_PACKAGE COPY_EFFECT_PACKAGE_PROPERTIES PASTE_EFFECT_PACKAGE_PROPERTIES DISABLE_ALL_EFFECT_PACKAGES", true); - HintTable[5].init("shortDescription", "The arary of EffectPackages", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "EffectPackageData" }; - ParamDefTable[1].setRefVariantVals((const char**)RefVariantVals, 1); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectPackages[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("EffectPackages", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "ENABLE_EFFECT_PACKAGE DISABLE_EFFECT_PACKAGE COPY_EFFECT_PACKAGE_PROPERTIES PASTE_EFFECT_PACKAGE_PROPERTIES DISABLE_ALL_EFFECT_PACKAGES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "ENABLE_EFFECT_PACKAGE DISABLE_EFFECT_PACKAGE COPY_EFFECT_PACKAGE_PROPERTIES PASTE_EFFECT_PACKAGE_PROPERTIES DISABLE_ALL_EFFECT_PACKAGES", true); - HintTable[5].init("shortDescription", "The arary of EffectPackages", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "EffectPackageData" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="EffectPackages" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void EffectPackageDatabaseParams::initStrings(void) -{ -} - -void EffectPackageDatabaseParams::initDynamicArrays(void) -{ - EffectPackages.buf = NULL; - EffectPackages.isAllocated = true; - EffectPackages.elementSize = sizeof(NvParameterized::Interface*); - EffectPackages.arraySizes[0] = 0; -} - -void EffectPackageDatabaseParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EffectPackageDatabaseParams::initReferences(void) -{ -} - -void EffectPackageDatabaseParams::freeDynamicArrays(void) -{ - if (EffectPackages.isAllocated && EffectPackages.buf) - { - mParameterizedTraits->free(EffectPackages.buf); - } -} - -void EffectPackageDatabaseParams::freeStrings(void) -{ -} - -void EffectPackageDatabaseParams::freeReferences(void) -{ - - for (int i = 0; i < EffectPackages.arraySizes[0]; ++i) - { - if (EffectPackages.buf[i]) - { - EffectPackages.buf[i]->destroy(); - } - } -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EffectPackageEmitterDatabaseParams.cpp b/APEX_1.4/module/particles/src/autogen/EffectPackageEmitterDatabaseParams.cpp deleted file mode 100644 index c10a0b56..00000000 --- a/APEX_1.4/module/particles/src/autogen/EffectPackageEmitterDatabaseParams.cpp +++ /dev/null @@ -1,400 +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 "EffectPackageEmitterDatabaseParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EffectPackageEmitterDatabaseParamsNS; - -const char* const EffectPackageEmitterDatabaseParamsFactory::vptr = - NvParameterized::getVptr<EffectPackageEmitterDatabaseParams, EffectPackageEmitterDatabaseParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->Emitters), CHILDREN(1), 1 }, // Emitters - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // Emitters[] -}; - - -bool EffectPackageEmitterDatabaseParams::mBuiltFlag = false; -NvParameterized::MutexType EffectPackageEmitterDatabaseParams::mBuiltFlagMutex; - -EffectPackageEmitterDatabaseParams::EffectPackageEmitterDatabaseParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EffectPackageEmitterDatabaseParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EffectPackageEmitterDatabaseParams::~EffectPackageEmitterDatabaseParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EffectPackageEmitterDatabaseParams::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->~EffectPackageEmitterDatabaseParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EffectPackageEmitterDatabaseParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EffectPackageEmitterDatabaseParams::getParameterDefinitionTree(void) const -{ - EffectPackageEmitterDatabaseParams* tmpParam = const_cast<EffectPackageEmitterDatabaseParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EffectPackageEmitterDatabaseParams::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 EffectPackageEmitterDatabaseParams::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 EffectPackageEmitterDatabaseParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EffectPackageEmitterDatabaseParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - Emitters (not an array of structs) */ - -void EffectPackageEmitterDatabaseParams::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 EffectPackageEmitterDatabaseParams::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", "The collection of all emitter assets", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Emitters" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Emitters", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_EMITTER_PROPERTIES PASTE_EMITTER_PROPERTIES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_EMITTER_PROPERTIES PASTE_EMITTER_PROPERTIES", true); - HintTable[5].init("shortDescription", "The array of emitters", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "EmitterData" }; - ParamDefTable[1].setRefVariantVals((const char**)RefVariantVals, 1); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="Emitters[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("Emitters", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_EMITTER_PROPERTIES PASTE_EMITTER_PROPERTIES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_EMITTER_PROPERTIES PASTE_EMITTER_PROPERTIES", true); - HintTable[5].init("shortDescription", "The array of emitters", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "EmitterData" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="Emitters" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void EffectPackageEmitterDatabaseParams::initStrings(void) -{ -} - -void EffectPackageEmitterDatabaseParams::initDynamicArrays(void) -{ - Emitters.buf = NULL; - Emitters.isAllocated = true; - Emitters.elementSize = sizeof(NvParameterized::Interface*); - Emitters.arraySizes[0] = 0; -} - -void EffectPackageEmitterDatabaseParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EffectPackageEmitterDatabaseParams::initReferences(void) -{ -} - -void EffectPackageEmitterDatabaseParams::freeDynamicArrays(void) -{ - if (Emitters.isAllocated && Emitters.buf) - { - mParameterizedTraits->free(Emitters.buf); - } -} - -void EffectPackageEmitterDatabaseParams::freeStrings(void) -{ -} - -void EffectPackageEmitterDatabaseParams::freeReferences(void) -{ - - for (int i = 0; i < Emitters.arraySizes[0]; ++i) - { - if (Emitters.buf[i]) - { - Emitters.buf[i]->destroy(); - } - } -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EffectPackageFieldSamplerDatabaseParams.cpp b/APEX_1.4/module/particles/src/autogen/EffectPackageFieldSamplerDatabaseParams.cpp deleted file mode 100644 index 6295edc3..00000000 --- a/APEX_1.4/module/particles/src/autogen/EffectPackageFieldSamplerDatabaseParams.cpp +++ /dev/null @@ -1,400 +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 "EffectPackageFieldSamplerDatabaseParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EffectPackageFieldSamplerDatabaseParamsNS; - -const char* const EffectPackageFieldSamplerDatabaseParamsFactory::vptr = - NvParameterized::getVptr<EffectPackageFieldSamplerDatabaseParams, EffectPackageFieldSamplerDatabaseParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->FieldSamplers), CHILDREN(1), 1 }, // FieldSamplers - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // FieldSamplers[] -}; - - -bool EffectPackageFieldSamplerDatabaseParams::mBuiltFlag = false; -NvParameterized::MutexType EffectPackageFieldSamplerDatabaseParams::mBuiltFlagMutex; - -EffectPackageFieldSamplerDatabaseParams::EffectPackageFieldSamplerDatabaseParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EffectPackageFieldSamplerDatabaseParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EffectPackageFieldSamplerDatabaseParams::~EffectPackageFieldSamplerDatabaseParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EffectPackageFieldSamplerDatabaseParams::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->~EffectPackageFieldSamplerDatabaseParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EffectPackageFieldSamplerDatabaseParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EffectPackageFieldSamplerDatabaseParams::getParameterDefinitionTree(void) const -{ - EffectPackageFieldSamplerDatabaseParams* tmpParam = const_cast<EffectPackageFieldSamplerDatabaseParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EffectPackageFieldSamplerDatabaseParams::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 EffectPackageFieldSamplerDatabaseParams::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 EffectPackageFieldSamplerDatabaseParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EffectPackageFieldSamplerDatabaseParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - FieldSamplers (not an array of structs) */ - -void EffectPackageFieldSamplerDatabaseParams::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 EffectPackageFieldSamplerDatabaseParams::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", "The collection of all field sampler assets", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="FieldSamplers" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("FieldSamplers", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_FIELD_SAMPLER_PROPERTIES PASTE_FIELD_SAMPLER_PROPERTIES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_FIELD_SAMPLER_PROPERTIES PASTE_FIELD_SAMPLER_PROPERTIES", true); - HintTable[5].init("shortDescription", "The arary of FieldSamplers", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "AttractorFieldSamplerData", "ForceFieldData", "HeatSourceData", "JetFieldSamplerData", "TurbulenceFieldSamplerData", "VortexFieldSamplerData", "NoiseFieldSamplerData", "SubstanceSourceData", "WindFieldSamplerData", "VelocitySourceData", "FlameEmitterData" }; - ParamDefTable[1].setRefVariantVals((const char**)RefVariantVals, 11); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="FieldSamplers[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("FieldSamplers", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_FIELD_SAMPLER_PROPERTIES PASTE_FIELD_SAMPLER_PROPERTIES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_FIELD_SAMPLER_PROPERTIES PASTE_FIELD_SAMPLER_PROPERTIES", true); - HintTable[5].init("shortDescription", "The arary of FieldSamplers", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "AttractorFieldSamplerData", "ForceFieldData", "HeatSourceData", "JetFieldSamplerData", "TurbulenceFieldSamplerData", "VortexFieldSamplerData", "NoiseFieldSamplerData", "SubstanceSourceData", "WindFieldSamplerData", "VelocitySourceData", "FlameEmitterData" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 11); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="FieldSamplers" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void EffectPackageFieldSamplerDatabaseParams::initStrings(void) -{ -} - -void EffectPackageFieldSamplerDatabaseParams::initDynamicArrays(void) -{ - FieldSamplers.buf = NULL; - FieldSamplers.isAllocated = true; - FieldSamplers.elementSize = sizeof(NvParameterized::Interface*); - FieldSamplers.arraySizes[0] = 0; -} - -void EffectPackageFieldSamplerDatabaseParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EffectPackageFieldSamplerDatabaseParams::initReferences(void) -{ -} - -void EffectPackageFieldSamplerDatabaseParams::freeDynamicArrays(void) -{ - if (FieldSamplers.isAllocated && FieldSamplers.buf) - { - mParameterizedTraits->free(FieldSamplers.buf); - } -} - -void EffectPackageFieldSamplerDatabaseParams::freeStrings(void) -{ -} - -void EffectPackageFieldSamplerDatabaseParams::freeReferences(void) -{ - - for (int i = 0; i < FieldSamplers.arraySizes[0]; ++i) - { - if (FieldSamplers.buf[i]) - { - FieldSamplers.buf[i]->destroy(); - } - } -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EffectPackageGraphicsMaterialsParams.cpp b/APEX_1.4/module/particles/src/autogen/EffectPackageGraphicsMaterialsParams.cpp deleted file mode 100644 index 651c80a0..00000000 --- a/APEX_1.4/module/particles/src/autogen/EffectPackageGraphicsMaterialsParams.cpp +++ /dev/null @@ -1,392 +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 "EffectPackageGraphicsMaterialsParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EffectPackageGraphicsMaterialsParamsNS; - -const char* const EffectPackageGraphicsMaterialsParamsFactory::vptr = - NvParameterized::getVptr<EffectPackageGraphicsMaterialsParams, EffectPackageGraphicsMaterialsParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->GraphicsMaterials), CHILDREN(1), 1 }, // GraphicsMaterials - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // GraphicsMaterials[] -}; - - -bool EffectPackageGraphicsMaterialsParams::mBuiltFlag = false; -NvParameterized::MutexType EffectPackageGraphicsMaterialsParams::mBuiltFlagMutex; - -EffectPackageGraphicsMaterialsParams::EffectPackageGraphicsMaterialsParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EffectPackageGraphicsMaterialsParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EffectPackageGraphicsMaterialsParams::~EffectPackageGraphicsMaterialsParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EffectPackageGraphicsMaterialsParams::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->~EffectPackageGraphicsMaterialsParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EffectPackageGraphicsMaterialsParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EffectPackageGraphicsMaterialsParams::getParameterDefinitionTree(void) const -{ - EffectPackageGraphicsMaterialsParams* tmpParam = const_cast<EffectPackageGraphicsMaterialsParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EffectPackageGraphicsMaterialsParams::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 EffectPackageGraphicsMaterialsParams::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 EffectPackageGraphicsMaterialsParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EffectPackageGraphicsMaterialsParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - GraphicsMaterials (not an array of structs) */ - -void EffectPackageGraphicsMaterialsParams::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 EffectPackageGraphicsMaterialsParams::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", "The collection of graphics and volumetric material assets", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="GraphicsMaterials" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("GraphicsMaterials", 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("INCLUDED", uint64_t(1), true); - HintTable[1].init("READONLY", uint64_t(0), true); - HintTable[2].init("RIGHT_CLICK", "COPY_GRAPHICS_MATERIAL_PROPERTIES PASTE_GRAPHICS_MATERIAL_PROPERTIES", 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("INCLUDED", uint64_t(1), true); - HintTable[1].init("READONLY", uint64_t(0), true); - HintTable[2].init("RIGHT_CLICK", "COPY_GRAPHICS_MATERIAL_PROPERTIES PASTE_GRAPHICS_MATERIAL_PROPERTIES", true); - HintTable[3].init("shortDescription", "The array of graphics materials", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "GraphicsMaterialData", "VolumeRenderMaterialData" }; - ParamDefTable[1].setRefVariantVals((const char**)RefVariantVals, 2); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="GraphicsMaterials[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("GraphicsMaterials", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - 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("READONLY", uint64_t(0), true); - HintTable[2].init("RIGHT_CLICK", "COPY_GRAPHICS_MATERIAL_PROPERTIES PASTE_GRAPHICS_MATERIAL_PROPERTIES", true); - ParamDefTable[2].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("INCLUDED", uint64_t(1), true); - HintTable[1].init("READONLY", uint64_t(0), true); - HintTable[2].init("RIGHT_CLICK", "COPY_GRAPHICS_MATERIAL_PROPERTIES PASTE_GRAPHICS_MATERIAL_PROPERTIES", true); - HintTable[3].init("shortDescription", "The array of graphics materials", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "GraphicsMaterialData", "VolumeRenderMaterialData" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 2); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="GraphicsMaterials" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void EffectPackageGraphicsMaterialsParams::initStrings(void) -{ -} - -void EffectPackageGraphicsMaterialsParams::initDynamicArrays(void) -{ - GraphicsMaterials.buf = NULL; - GraphicsMaterials.isAllocated = true; - GraphicsMaterials.elementSize = sizeof(NvParameterized::Interface*); - GraphicsMaterials.arraySizes[0] = 0; -} - -void EffectPackageGraphicsMaterialsParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EffectPackageGraphicsMaterialsParams::initReferences(void) -{ -} - -void EffectPackageGraphicsMaterialsParams::freeDynamicArrays(void) -{ - if (GraphicsMaterials.isAllocated && GraphicsMaterials.buf) - { - mParameterizedTraits->free(GraphicsMaterials.buf); - } -} - -void EffectPackageGraphicsMaterialsParams::freeStrings(void) -{ -} - -void EffectPackageGraphicsMaterialsParams::freeReferences(void) -{ - - for (int i = 0; i < GraphicsMaterials.arraySizes[0]; ++i) - { - if (GraphicsMaterials.buf[i]) - { - GraphicsMaterials.buf[i]->destroy(); - } - } -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EffectPackageIOFXDatabaseParams.cpp b/APEX_1.4/module/particles/src/autogen/EffectPackageIOFXDatabaseParams.cpp deleted file mode 100644 index 49b45674..00000000 --- a/APEX_1.4/module/particles/src/autogen/EffectPackageIOFXDatabaseParams.cpp +++ /dev/null @@ -1,400 +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 "EffectPackageIOFXDatabaseParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EffectPackageIOFXDatabaseParamsNS; - -const char* const EffectPackageIOFXDatabaseParamsFactory::vptr = - NvParameterized::getVptr<EffectPackageIOFXDatabaseParams, EffectPackageIOFXDatabaseParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->GraphicsEffects), CHILDREN(1), 1 }, // GraphicsEffects - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // GraphicsEffects[] -}; - - -bool EffectPackageIOFXDatabaseParams::mBuiltFlag = false; -NvParameterized::MutexType EffectPackageIOFXDatabaseParams::mBuiltFlagMutex; - -EffectPackageIOFXDatabaseParams::EffectPackageIOFXDatabaseParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EffectPackageIOFXDatabaseParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EffectPackageIOFXDatabaseParams::~EffectPackageIOFXDatabaseParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EffectPackageIOFXDatabaseParams::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->~EffectPackageIOFXDatabaseParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EffectPackageIOFXDatabaseParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EffectPackageIOFXDatabaseParams::getParameterDefinitionTree(void) const -{ - EffectPackageIOFXDatabaseParams* tmpParam = const_cast<EffectPackageIOFXDatabaseParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EffectPackageIOFXDatabaseParams::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 EffectPackageIOFXDatabaseParams::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 EffectPackageIOFXDatabaseParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EffectPackageIOFXDatabaseParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - GraphicsEffects (not an array of structs) */ - -void EffectPackageIOFXDatabaseParams::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 EffectPackageIOFXDatabaseParams::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", "The collection of graphics effect assets (IOFX)", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="GraphicsEffects" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("GraphicsEffects", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_IOFX_PROPERTIES PASTE_IOFX_PROPERTIES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_IOFX_PROPERTIES PASTE_IOFX_PROPERTIES", true); - HintTable[5].init("shortDescription", "The array of graphics effect definition data", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "GraphicsEffectData" }; - ParamDefTable[1].setRefVariantVals((const char**)RefVariantVals, 1); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="GraphicsEffects[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("GraphicsEffects", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_IOFX_PROPERTIES PASTE_IOFX_PROPERTIES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_IOFX_PROPERTIES PASTE_IOFX_PROPERTIES", true); - HintTable[5].init("shortDescription", "The array of graphics effect definition data", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "GraphicsEffectData" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="GraphicsEffects" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void EffectPackageIOFXDatabaseParams::initStrings(void) -{ -} - -void EffectPackageIOFXDatabaseParams::initDynamicArrays(void) -{ - GraphicsEffects.buf = NULL; - GraphicsEffects.isAllocated = true; - GraphicsEffects.elementSize = sizeof(NvParameterized::Interface*); - GraphicsEffects.arraySizes[0] = 0; -} - -void EffectPackageIOFXDatabaseParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EffectPackageIOFXDatabaseParams::initReferences(void) -{ -} - -void EffectPackageIOFXDatabaseParams::freeDynamicArrays(void) -{ - if (GraphicsEffects.isAllocated && GraphicsEffects.buf) - { - mParameterizedTraits->free(GraphicsEffects.buf); - } -} - -void EffectPackageIOFXDatabaseParams::freeStrings(void) -{ -} - -void EffectPackageIOFXDatabaseParams::freeReferences(void) -{ - - for (int i = 0; i < GraphicsEffects.arraySizes[0]; ++i) - { - if (GraphicsEffects.buf[i]) - { - GraphicsEffects.buf[i]->destroy(); - } - } -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EffectPackageIOSDatabaseParams.cpp b/APEX_1.4/module/particles/src/autogen/EffectPackageIOSDatabaseParams.cpp deleted file mode 100644 index f71aa4fb..00000000 --- a/APEX_1.4/module/particles/src/autogen/EffectPackageIOSDatabaseParams.cpp +++ /dev/null @@ -1,400 +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 "EffectPackageIOSDatabaseParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EffectPackageIOSDatabaseParamsNS; - -const char* const EffectPackageIOSDatabaseParamsFactory::vptr = - NvParameterized::getVptr<EffectPackageIOSDatabaseParams, EffectPackageIOSDatabaseParams::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), 1 }, - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->ParticleSimulations), CHILDREN(1), 1 }, // ParticleSimulations - { TYPE_REF, false, 1 * sizeof(NvParameterized::Interface*), NULL, 0 }, // ParticleSimulations[] -}; - - -bool EffectPackageIOSDatabaseParams::mBuiltFlag = false; -NvParameterized::MutexType EffectPackageIOSDatabaseParams::mBuiltFlagMutex; - -EffectPackageIOSDatabaseParams::EffectPackageIOSDatabaseParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EffectPackageIOSDatabaseParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EffectPackageIOSDatabaseParams::~EffectPackageIOSDatabaseParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EffectPackageIOSDatabaseParams::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->~EffectPackageIOSDatabaseParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EffectPackageIOSDatabaseParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EffectPackageIOSDatabaseParams::getParameterDefinitionTree(void) const -{ - EffectPackageIOSDatabaseParams* tmpParam = const_cast<EffectPackageIOSDatabaseParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EffectPackageIOSDatabaseParams::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 EffectPackageIOSDatabaseParams::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 EffectPackageIOSDatabaseParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EffectPackageIOSDatabaseParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ -/* [0] - ParticleSimulations (not an array of structs) */ - -void EffectPackageIOSDatabaseParams::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 EffectPackageIOSDatabaseParams::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", "The collection of particle simulation assets (IOS)", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="ParticleSimulations" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("ParticleSimulations", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_IOS_PROPERTIES PASTE_IOS_PROPERTIES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_IOS_PROPERTIES PASTE_IOS_PROPERTIES", true); - HintTable[5].init("shortDescription", "The arary of particle simulation data", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ParticleSimulationData" }; - ParamDefTable[1].setRefVariantVals((const char**)RefVariantVals, 1); - - - ParamDef->setArraySize(-1); - static const uint8_t dynHandleIndices[1] = { 0, }; - ParamDef->setDynamicHandleIndicesMap(dynHandleIndices, 1); - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="ParticleSimulations[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("ParticleSimulations", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_IOS_PROPERTIES PASTE_IOS_PROPERTIES", 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("DISABLE_SINGLE_CLICK_COLLAPSE", uint64_t(1), true); - HintTable[1].init("DISABLE_SINGLE_CLICK_EXPAND", uint64_t(1), true); - HintTable[2].init("INCLUDED", uint64_t(1), true); - HintTable[3].init("READONLY", uint64_t(0), true); - HintTable[4].init("RIGHT_CLICK", "COPY_IOS_PROPERTIES PASTE_IOS_PROPERTIES", true); - HintTable[5].init("shortDescription", "The arary of particle simulation data", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ParticleSimulationData" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(1); - - ParamDefTable[0].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=1, longName="ParticleSimulations" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(2); - - ParamDefTable[1].setChildren(Children, 1); - } - - mBuiltFlag = true; - -} -void EffectPackageIOSDatabaseParams::initStrings(void) -{ -} - -void EffectPackageIOSDatabaseParams::initDynamicArrays(void) -{ - ParticleSimulations.buf = NULL; - ParticleSimulations.isAllocated = true; - ParticleSimulations.elementSize = sizeof(NvParameterized::Interface*); - ParticleSimulations.arraySizes[0] = 0; -} - -void EffectPackageIOSDatabaseParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EffectPackageIOSDatabaseParams::initReferences(void) -{ -} - -void EffectPackageIOSDatabaseParams::freeDynamicArrays(void) -{ - if (ParticleSimulations.isAllocated && ParticleSimulations.buf) - { - mParameterizedTraits->free(ParticleSimulations.buf); - } -} - -void EffectPackageIOSDatabaseParams::freeStrings(void) -{ -} - -void EffectPackageIOSDatabaseParams::freeReferences(void) -{ - - for (int i = 0; i < ParticleSimulations.arraySizes[0]; ++i) - { - if (ParticleSimulations.buf[i]) - { - ParticleSimulations.buf[i]->destroy(); - } - } -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EmitterData.cpp b/APEX_1.4/module/particles/src/autogen/EmitterData.cpp deleted file mode 100644 index 428c2900..00000000 --- a/APEX_1.4/module/particles/src/autogen/EmitterData.cpp +++ /dev/null @@ -1,363 +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 "EmitterData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EmitterDataNS; - -const char* const EmitterDataFactory::vptr = - NvParameterized::getVptr<EmitterData, EmitterData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->Emitter), NULL, 0 }, // Emitter -}; - - -bool EmitterData::mBuiltFlag = false; -NvParameterized::MutexType EmitterData::mBuiltFlagMutex; - -EmitterData::EmitterData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EmitterDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EmitterData::~EmitterData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EmitterData::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->~EmitterData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EmitterData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EmitterData::getParameterDefinitionTree(void) const -{ - EmitterData* tmpParam = const_cast<EmitterData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EmitterData::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 EmitterData::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 EmitterData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EmitterData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void EmitterData::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 EmitterData::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 this emitter", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Emitter name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="Emitter" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("Emitter", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Emitter properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ApexEmitterAssetParameters" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 EmitterData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultEmitter"; -} - -void EmitterData::initDynamicArrays(void) -{ -} - -void EmitterData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EmitterData::initReferences(void) -{ - Emitter = NULL; - -} - -void EmitterData::freeDynamicArrays(void) -{ -} - -void EmitterData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void EmitterData::freeReferences(void) -{ - if (Emitter) - { - Emitter->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/EmitterEffect.cpp b/APEX_1.4/module/particles/src/autogen/EmitterEffect.cpp deleted file mode 100644 index 41bd6d6f..00000000 --- a/APEX_1.4/module/particles/src/autogen/EmitterEffect.cpp +++ /dev/null @@ -1,1769 +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 "EmitterEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace EmitterEffectNS; - -const char* const EmitterEffectFactory::vptr = - NvParameterized::getVptr<EmitterEffect, EmitterEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 45; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 44, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, - 23, 27, 22, 24, 25, 26, 28, 29, 30, 32, 38, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 3 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(3), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(13), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(16), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(19), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(25), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(26), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(27), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(29), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(30), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EmitterVelocityChanges), CHILDREN(32), 2 }, // EmitterVelocityChanges - { TYPE_STRUCT, false, (size_t)(&((EmitterVelocityProperties_Type*)0)->AdjustLifetime), CHILDREN(34), 5 }, // EmitterVelocityChanges.AdjustLifetime - { TYPE_BOOL, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->AdjustEnabled), NULL, 0 }, // EmitterVelocityChanges.AdjustLifetime.AdjustEnabled - { TYPE_F32, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->VelocityLow), NULL, 0 }, // EmitterVelocityChanges.AdjustLifetime.VelocityLow - { TYPE_F32, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->VelocityHigh), NULL, 0 }, // EmitterVelocityChanges.AdjustLifetime.VelocityHigh - { TYPE_F32, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->LowValue), NULL, 0 }, // EmitterVelocityChanges.AdjustLifetime.LowValue - { TYPE_F32, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->HighValue), NULL, 0 }, // EmitterVelocityChanges.AdjustLifetime.HighValue - { TYPE_STRUCT, false, (size_t)(&((EmitterVelocityProperties_Type*)0)->AdjustEmitterRate), CHILDREN(39), 5 }, // EmitterVelocityChanges.AdjustEmitterRate - { TYPE_BOOL, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->AdjustEnabled), NULL, 0 }, // EmitterVelocityChanges.AdjustEmitterRate.AdjustEnabled - { TYPE_F32, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->VelocityLow), NULL, 0 }, // EmitterVelocityChanges.AdjustEmitterRate.VelocityLow - { TYPE_F32, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->VelocityHigh), NULL, 0 }, // EmitterVelocityChanges.AdjustEmitterRate.VelocityHigh - { TYPE_F32, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->LowValue), NULL, 0 }, // EmitterVelocityChanges.AdjustEmitterRate.LowValue - { TYPE_F32, false, (size_t)(&((EmitterVelocityAdjust_Type*)0)->HighValue), NULL, 0 }, // EmitterVelocityChanges.AdjustEmitterRate.HighValue - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->Emitter), NULL, 0 }, // Emitter -}; - - -bool EmitterEffect::mBuiltFlag = false; -NvParameterized::MutexType EmitterEffect::mBuiltFlagMutex; - -EmitterEffect::EmitterEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &EmitterEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -EmitterEffect::~EmitterEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void EmitterEffect::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->~EmitterEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* EmitterEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* EmitterEffect::getParameterDefinitionTree(void) const -{ - EmitterEffect* tmpParam = const_cast<EmitterEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType EmitterEffect::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 EmitterEffect::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 EmitterEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<EmitterEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void EmitterEffect::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 EmitterEffect::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", "An emitter effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "Emitter Effect Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="EmitterVelocityChanges" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("EmitterVelocityChanges", TYPE_STRUCT, "EmitterVelocityProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Adjust the Velocity of the Emitter", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=32, longName="EmitterVelocityChanges.AdjustLifetime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; - ParamDef->init("AdjustLifetime", TYPE_STRUCT, "EmitterVelocityAdjust", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Optionally adjust the lifetime of emitted particles based on the velocity of the emitter", true); - ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=33, longName="EmitterVelocityChanges.AdjustLifetime.AdjustEnabled" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; - ParamDef->init("AdjustEnabled", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "True if adjusting emitter properties based on velocity", true); - ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=34, longName="EmitterVelocityChanges.AdjustLifetime.VelocityLow" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; - ParamDef->init("VelocityLow", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Low velocity range to match the low", true); - ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=35, longName="EmitterVelocityChanges.AdjustLifetime.VelocityHigh" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; - ParamDef->init("VelocityHigh", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "High velocity range to match the high value", true); - ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=36, longName="EmitterVelocityChanges.AdjustLifetime.LowValue" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; - ParamDef->init("LowValue", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The multiplier when the velocity equals VelocityLow", true); - ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=37, longName="EmitterVelocityChanges.AdjustLifetime.HighValue" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; - ParamDef->init("HighValue", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The multiplier when the velocity equals VelocityHigh", true); - ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=38, longName="EmitterVelocityChanges.AdjustEmitterRate" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; - ParamDef->init("AdjustEmitterRate", TYPE_STRUCT, "EmitterVelocityAdjust", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Optionally adjust the rate of the emitted particles based on the velocity of the emitter", true); - ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=39, longName="EmitterVelocityChanges.AdjustEmitterRate.AdjustEnabled" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; - ParamDef->init("AdjustEnabled", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "True if adjusting emitter properties based on velocity", true); - ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=40, longName="EmitterVelocityChanges.AdjustEmitterRate.VelocityLow" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[40]; - ParamDef->init("VelocityLow", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Low velocity range to match the low", true); - ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=41, longName="EmitterVelocityChanges.AdjustEmitterRate.VelocityHigh" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[41]; - ParamDef->init("VelocityHigh", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[41].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "High velocity range to match the high value", true); - ParamDefTable[41].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=42, longName="EmitterVelocityChanges.AdjustEmitterRate.LowValue" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[42]; - ParamDef->init("LowValue", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[42].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The multiplier when the velocity equals VelocityLow", true); - ParamDefTable[42].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=43, longName="EmitterVelocityChanges.AdjustEmitterRate.HighValue" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[43]; - ParamDef->init("HighValue", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[43].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The multiplier when the velocity equals VelocityHigh", true); - ParamDefTable[43].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=44, longName="Emitter" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[44]; - ParamDef->init("Emitter", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Emitter Asset", true); - ParamDefTable[44].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ApexEmitterAsset" }; - ParamDefTable[44].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - Children[2] = PDEF_PTR(44); - - ParamDefTable[0].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=31, longName="EmitterVelocityChanges" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(32); - Children[1] = PDEF_PTR(38); - - ParamDefTable[31].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=32, longName="EmitterVelocityChanges.AdjustLifetime" - { - static Definition* Children[5]; - Children[0] = PDEF_PTR(33); - Children[1] = PDEF_PTR(34); - Children[2] = PDEF_PTR(35); - Children[3] = PDEF_PTR(36); - Children[4] = PDEF_PTR(37); - - ParamDefTable[32].setChildren(Children, 5); - } - - // SetChildren for: nodeIndex=38, longName="EmitterVelocityChanges.AdjustEmitterRate" - { - static Definition* Children[5]; - Children[0] = PDEF_PTR(39); - Children[1] = PDEF_PTR(40); - Children[2] = PDEF_PTR(41); - Children[3] = PDEF_PTR(42); - Children[4] = PDEF_PTR(43); - - ParamDefTable[38].setChildren(Children, 5); - } - - mBuiltFlag = true; - -} -void EmitterEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void EmitterEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void EmitterEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - EmitterVelocityChanges.AdjustLifetime.AdjustEnabled = bool(0); - EmitterVelocityChanges.AdjustLifetime.VelocityLow = float(2.000000000); - EmitterVelocityChanges.AdjustLifetime.VelocityHigh = float(10.000000000); - EmitterVelocityChanges.AdjustLifetime.LowValue = float(1.000000000); - EmitterVelocityChanges.AdjustLifetime.HighValue = float(0.000000000); - EmitterVelocityChanges.AdjustEmitterRate.AdjustEnabled = bool(0); - EmitterVelocityChanges.AdjustEmitterRate.VelocityLow = float(2.000000000); - EmitterVelocityChanges.AdjustEmitterRate.VelocityHigh = float(10.000000000); - EmitterVelocityChanges.AdjustEmitterRate.LowValue = float(1.000000000); - EmitterVelocityChanges.AdjustEmitterRate.HighValue = float(0.000000000); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void EmitterEffect::initReferences(void) -{ - Emitter = NULL; - -} - -void EmitterEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void EmitterEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void EmitterEffect::freeReferences(void) -{ - if (Emitter) - { - Emitter->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/FlameEmitterData.cpp b/APEX_1.4/module/particles/src/autogen/FlameEmitterData.cpp deleted file mode 100644 index 26107f7b..00000000 --- a/APEX_1.4/module/particles/src/autogen/FlameEmitterData.cpp +++ /dev/null @@ -1,363 +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 "FlameEmitterData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace FlameEmitterDataNS; - -const char* const FlameEmitterDataFactory::vptr = - NvParameterized::getVptr<FlameEmitterData, FlameEmitterData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->FlameEmitter), NULL, 0 }, // FlameEmitter -}; - - -bool FlameEmitterData::mBuiltFlag = false; -NvParameterized::MutexType FlameEmitterData::mBuiltFlagMutex; - -FlameEmitterData::FlameEmitterData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &FlameEmitterDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -FlameEmitterData::~FlameEmitterData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void FlameEmitterData::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->~FlameEmitterData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* FlameEmitterData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* FlameEmitterData::getParameterDefinitionTree(void) const -{ - FlameEmitterData* tmpParam = const_cast<FlameEmitterData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType FlameEmitterData::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 FlameEmitterData::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 FlameEmitterData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<FlameEmitterData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void FlameEmitterData::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 FlameEmitterData::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 this flame emitter", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Flame Emitter Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="FlameEmitter" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("FlameEmitter", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Flame Emitter properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "FlameEmitterAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 FlameEmitterData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultFlameEmitter"; -} - -void FlameEmitterData::initDynamicArrays(void) -{ -} - -void FlameEmitterData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void FlameEmitterData::initReferences(void) -{ - FlameEmitter = NULL; - -} - -void FlameEmitterData::freeDynamicArrays(void) -{ -} - -void FlameEmitterData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void FlameEmitterData::freeReferences(void) -{ - if (FlameEmitter) - { - FlameEmitter->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/FlameEmitterEffect.cpp b/APEX_1.4/module/particles/src/autogen/FlameEmitterEffect.cpp deleted file mode 100644 index 7b5e81aa..00000000 --- a/APEX_1.4/module/particles/src/autogen/FlameEmitterEffect.cpp +++ /dev/null @@ -1,1356 +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 "FlameEmitterEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace FlameEmitterEffectNS; - -const char* const FlameEmitterEffectFactory::vptr = - NvParameterized::getVptr<FlameEmitterEffect, FlameEmitterEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->FlameEmitter), NULL, 0 }, // FlameEmitter -}; - - -bool FlameEmitterEffect::mBuiltFlag = false; -NvParameterized::MutexType FlameEmitterEffect::mBuiltFlagMutex; - -FlameEmitterEffect::FlameEmitterEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &FlameEmitterEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -FlameEmitterEffect::~FlameEmitterEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void FlameEmitterEffect::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->~FlameEmitterEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* FlameEmitterEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* FlameEmitterEffect::getParameterDefinitionTree(void) const -{ - FlameEmitterEffect* tmpParam = const_cast<FlameEmitterEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType FlameEmitterEffect::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 FlameEmitterEffect::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 FlameEmitterEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<FlameEmitterEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void FlameEmitterEffect::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 FlameEmitterEffect::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", "A flame emitter effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Flame Emitter Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="FlameEmitter" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("FlameEmitter", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Flame Emitter Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "FlameEmitterAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void FlameEmitterEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void FlameEmitterEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void FlameEmitterEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void FlameEmitterEffect::initReferences(void) -{ - FlameEmitter = NULL; - -} - -void FlameEmitterEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void FlameEmitterEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void FlameEmitterEffect::freeReferences(void) -{ - if (FlameEmitter) - { - FlameEmitter->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/ForceFieldData.cpp b/APEX_1.4/module/particles/src/autogen/ForceFieldData.cpp deleted file mode 100644 index 51a4f604..00000000 --- a/APEX_1.4/module/particles/src/autogen/ForceFieldData.cpp +++ /dev/null @@ -1,363 +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 "ForceFieldData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace ForceFieldDataNS; - -const char* const ForceFieldDataFactory::vptr = - NvParameterized::getVptr<ForceFieldData, ForceFieldData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->ForceField), NULL, 0 }, // ForceField -}; - - -bool ForceFieldData::mBuiltFlag = false; -NvParameterized::MutexType ForceFieldData::mBuiltFlagMutex; - -ForceFieldData::ForceFieldData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ForceFieldDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ForceFieldData::~ForceFieldData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ForceFieldData::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->~ForceFieldData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ForceFieldData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ForceFieldData::getParameterDefinitionTree(void) const -{ - ForceFieldData* tmpParam = const_cast<ForceFieldData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ForceFieldData::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 ForceFieldData::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 ForceFieldData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ForceFieldData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ForceFieldData::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 ForceFieldData::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 this force field sampler", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Forcefield Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="ForceField" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("ForceField", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Forcefield properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ForceFieldAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 ForceFieldData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultForceField"; -} - -void ForceFieldData::initDynamicArrays(void) -{ -} - -void ForceFieldData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ForceFieldData::initReferences(void) -{ - ForceField = NULL; - -} - -void ForceFieldData::freeDynamicArrays(void) -{ -} - -void ForceFieldData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void ForceFieldData::freeReferences(void) -{ - if (ForceField) - { - ForceField->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/ForceFieldEffect.cpp b/APEX_1.4/module/particles/src/autogen/ForceFieldEffect.cpp deleted file mode 100644 index dc3bed74..00000000 --- a/APEX_1.4/module/particles/src/autogen/ForceFieldEffect.cpp +++ /dev/null @@ -1,1362 +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 "ForceFieldEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace ForceFieldEffectNS; - -const char* const ForceFieldEffectFactory::vptr = - NvParameterized::getVptr<ForceFieldEffect, ForceFieldEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->ForceField), NULL, 0 }, // ForceField -}; - - -bool ForceFieldEffect::mBuiltFlag = false; -NvParameterized::MutexType ForceFieldEffect::mBuiltFlagMutex; - -ForceFieldEffect::ForceFieldEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ForceFieldEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ForceFieldEffect::~ForceFieldEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ForceFieldEffect::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->~ForceFieldEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ForceFieldEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ForceFieldEffect::getParameterDefinitionTree(void) const -{ - ForceFieldEffect* tmpParam = const_cast<ForceFieldEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ForceFieldEffect::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 ForceFieldEffect::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 ForceFieldEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ForceFieldEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ForceFieldEffect::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 ForceFieldEffect::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", "A forcefield effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "Forcefield Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="ForceField" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("ForceField", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Forcefield Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "ForceFieldAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void ForceFieldEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void ForceFieldEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void ForceFieldEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ForceFieldEffect::initReferences(void) -{ - ForceField = NULL; - -} - -void ForceFieldEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void ForceFieldEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void ForceFieldEffect::freeReferences(void) -{ - if (ForceField) - { - ForceField->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/GraphicsEffectData.cpp b/APEX_1.4/module/particles/src/autogen/GraphicsEffectData.cpp deleted file mode 100644 index dece3c93..00000000 --- a/APEX_1.4/module/particles/src/autogen/GraphicsEffectData.cpp +++ /dev/null @@ -1,363 +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 "GraphicsEffectData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace GraphicsEffectDataNS; - -const char* const GraphicsEffectDataFactory::vptr = - NvParameterized::getVptr<GraphicsEffectData, GraphicsEffectData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->IOFX), NULL, 0 }, // IOFX -}; - - -bool GraphicsEffectData::mBuiltFlag = false; -NvParameterized::MutexType GraphicsEffectData::mBuiltFlagMutex; - -GraphicsEffectData::GraphicsEffectData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &GraphicsEffectDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -GraphicsEffectData::~GraphicsEffectData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void GraphicsEffectData::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->~GraphicsEffectData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* GraphicsEffectData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* GraphicsEffectData::getParameterDefinitionTree(void) const -{ - GraphicsEffectData* tmpParam = const_cast<GraphicsEffectData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType GraphicsEffectData::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 GraphicsEffectData::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 GraphicsEffectData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<GraphicsEffectData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void GraphicsEffectData::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 GraphicsEffectData::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 this graphics effect (IOFX)", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Sprite IOFX Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="IOFX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("IOFX", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Sprite IOFX properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "IofxAssetParameters" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 GraphicsEffectData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultSpriteIOFX"; -} - -void GraphicsEffectData::initDynamicArrays(void) -{ -} - -void GraphicsEffectData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void GraphicsEffectData::initReferences(void) -{ - IOFX = NULL; - -} - -void GraphicsEffectData::freeDynamicArrays(void) -{ -} - -void GraphicsEffectData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void GraphicsEffectData::freeReferences(void) -{ - if (IOFX) - { - IOFX->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/GraphicsMaterialData.cpp b/APEX_1.4/module/particles/src/autogen/GraphicsMaterialData.cpp deleted file mode 100644 index dc30bb65..00000000 --- a/APEX_1.4/module/particles/src/autogen/GraphicsMaterialData.cpp +++ /dev/null @@ -1,886 +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 "GraphicsMaterialData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace GraphicsMaterialDataNS; - -const char* const GraphicsMaterialDataFactory::vptr = - NvParameterized::getVptr<GraphicsMaterialData, GraphicsMaterialData::ClassAlignment>(); - -const uint32_t NumParamDefs = 20; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 16 }, - { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->ApplicationMaterialName), NULL, 0 }, // ApplicationMaterialName - { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->UserProperties), NULL, 0 }, // UserProperties - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->RenderTechnique), NULL, 0 }, // RenderTechnique - { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->DiffuseTexture), NULL, 0 }, // DiffuseTexture - { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->CellColumn), NULL, 0 }, // CellColumn - { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->CellRow), NULL, 0 }, // CellRow - { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->CellCount), NULL, 0 }, // CellCount - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->CrossBlend), NULL, 0 }, // CrossBlend - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->ColorMultiplier), NULL, 0 }, // ColorMultiplier - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->UsePSM), NULL, 0 }, // UsePSM - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->Resolution), NULL, 0 }, // Resolution - { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->FullResPercent), NULL, 0 }, // FullResPercent - { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->HalfResPercent), NULL, 0 }, // HalfResPercent - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->PSM_ShadowBias), NULL, 0 }, // PSM_ShadowBias - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->PSM_Frustum), CHILDREN(16), 3 }, // PSM_Frustum - { TYPE_BOOL, false, (size_t)(&((FrustumPSM_Type*)0)->ShowFrustum), NULL, 0 }, // PSM_Frustum.ShowFrustum - { TYPE_F32, false, (size_t)(&((FrustumPSM_Type*)0)->FrustumDepth), NULL, 0 }, // PSM_Frustum.FrustumDepth - { TYPE_F32, false, (size_t)(&((FrustumPSM_Type*)0)->FrustumSize), NULL, 0 }, // PSM_Frustum.FrustumSize -}; - - -bool GraphicsMaterialData::mBuiltFlag = false; -NvParameterized::MutexType GraphicsMaterialData::mBuiltFlagMutex; - -GraphicsMaterialData::GraphicsMaterialData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &GraphicsMaterialDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -GraphicsMaterialData::~GraphicsMaterialData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void GraphicsMaterialData::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->~GraphicsMaterialData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* GraphicsMaterialData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* GraphicsMaterialData::getParameterDefinitionTree(void) const -{ - GraphicsMaterialData* tmpParam = const_cast<GraphicsMaterialData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType GraphicsMaterialData::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 GraphicsMaterialData::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 GraphicsMaterialData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<GraphicsMaterialData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void GraphicsMaterialData::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 GraphicsMaterialData::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 this graphics material", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "The name of this graphics material", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="ApplicationMaterialName" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("ApplicationMaterialName", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The name of the material to match up with the application's material system", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="UserProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("UserProperties", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Optional user properties string", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="RenderTechnique" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("RenderTechnique", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Which sprite rendering technique to apply", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "SPRITE_ONE", "SPRITE_ONE", "SPRITE_ALPHA", "SPRITE_SOLID", "SPRITE_TEXTURE", "SPRITE_WIREFRAME" }; - ParamDefTable[4].setEnumVals((const char**)EnumVals, 6); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="DiffuseTexture" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("DiffuseTexture", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("NAME_CALLBACK", 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("NAME_CALLBACK", uint64_t(1), true); - HintTable[1].init("shortDescription", "The diffuse source texture to render the sprite with.", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="CellColumn" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("CellColumn", TYPE_U32, 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(32), true); - HintTable[1].init("min", uint64_t(1), 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(32), true); - HintTable[1].init("min", uint64_t(1), true); - HintTable[2].init("shortDescription", "The number of columns in the celled texture", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="CellRow" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("CellRow", TYPE_U32, 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(32), true); - HintTable[1].init("min", uint64_t(1), true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(32), true); - HintTable[1].init("min", uint64_t(1), true); - HintTable[2].init("shortDescription", "The number of rows in the celled texture", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="CellCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("CellCount", TYPE_U32, 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(1024), true); - HintTable[1].init("min", uint64_t(1), true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(1024), true); - HintTable[1].init("min", uint64_t(1), true); - HintTable[2].init("shortDescription", "The total number of frames in the celled animation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="CrossBlend" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("CrossBlend", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "True if cross blending celled animated sprites", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="ColorMultiplier" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("ColorMultiplier", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(10.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(10.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Multiply this constant times the output color", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="UsePSM" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("UsePSM", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not to use the PSM pipeline or not", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="Resolution" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("Resolution", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not to use full-res, half-res, quarter res, or multi-resoluation particle rendering", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "FULL", "HALF", "QUARTER", "MULTI" }; - ParamDefTable[12].setEnumVals((const char**)EnumVals, 4); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="FullResPercent" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("FullResPercent", TYPE_U32, 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(100), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[13].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(100), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Percentage of particles to render at full resolution, is using the multi-res feature", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="HalfResPercent" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("HalfResPercent", TYPE_U32, 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(100), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(100), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Percentage of particles to reunder at half-resolution; remaining percentage maps to quarter resolution if rendering using the multi-res feature", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="PSM_ShadowBias" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("PSM_ShadowBias", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(2.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(2.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Helpful ToolTip goes here", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="PSM_Frustum" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("PSM_Frustum", TYPE_STRUCT, "FrustumPSM", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The frustum properties for PSM", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="PSM_Frustum.ShowFrustum" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("ShowFrustum", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Debug visualize the frustum", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="PSM_Frustum.FrustumDepth" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("FrustumDepth", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The depth to use to build the non-orthographic projection", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="PSM_Frustum.FrustumSize" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("FrustumSize", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(100.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The overall bounding volume width/height to use to compute the PSM view frustum", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[16]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - Children[2] = PDEF_PTR(3); - Children[3] = PDEF_PTR(4); - Children[4] = PDEF_PTR(5); - Children[5] = PDEF_PTR(6); - Children[6] = PDEF_PTR(7); - Children[7] = PDEF_PTR(8); - Children[8] = PDEF_PTR(9); - Children[9] = PDEF_PTR(10); - Children[10] = PDEF_PTR(11); - Children[11] = PDEF_PTR(12); - Children[12] = PDEF_PTR(13); - Children[13] = PDEF_PTR(14); - Children[14] = PDEF_PTR(15); - Children[15] = PDEF_PTR(16); - - ParamDefTable[0].setChildren(Children, 16); - } - - // SetChildren for: nodeIndex=16, longName="PSM_Frustum" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(17); - Children[1] = PDEF_PTR(18); - Children[2] = PDEF_PTR(19); - - ParamDefTable[16].setChildren(Children, 3); - } - - mBuiltFlag = true; - -} -void GraphicsMaterialData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultGraphicsMaterial"; - ApplicationMaterialName.isAllocated = true; - ApplicationMaterialName.buf = NULL; - UserProperties.isAllocated = true; - UserProperties.buf = NULL; - DiffuseTexture.isAllocated = false; - DiffuseTexture.buf = (const char*)"DefaultSprite.dds"; -} - -void GraphicsMaterialData::initDynamicArrays(void) -{ -} - -void GraphicsMaterialData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - RenderTechnique = (const char*)"SPRITE_ONE"; - CellColumn = uint32_t(1); - CellRow = uint32_t(1); - CellCount = uint32_t(1); - CrossBlend = bool(0); - ColorMultiplier = float(1.000000000); - UsePSM = bool(0); - Resolution = (const char*)"FULL"; - FullResPercent = uint32_t(0); - HalfResPercent = uint32_t(80); - PSM_ShadowBias = float(1.000000000); - PSM_Frustum.ShowFrustum = bool(0); - PSM_Frustum.FrustumDepth = float(10.000000000); - PSM_Frustum.FrustumSize = float(10.000000000); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void GraphicsMaterialData::initReferences(void) -{ -} - -void GraphicsMaterialData::freeDynamicArrays(void) -{ -} - -void GraphicsMaterialData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } - - if (ApplicationMaterialName.isAllocated && ApplicationMaterialName.buf) - { - mParameterizedTraits->strfree((char*)ApplicationMaterialName.buf); - } - - if (UserProperties.isAllocated && UserProperties.buf) - { - mParameterizedTraits->strfree((char*)UserProperties.buf); - } - - if (DiffuseTexture.isAllocated && DiffuseTexture.buf) - { - mParameterizedTraits->strfree((char*)DiffuseTexture.buf); - } -} - -void GraphicsMaterialData::freeReferences(void) -{ -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/HeatSourceData.cpp b/APEX_1.4/module/particles/src/autogen/HeatSourceData.cpp deleted file mode 100644 index 648c54e7..00000000 --- a/APEX_1.4/module/particles/src/autogen/HeatSourceData.cpp +++ /dev/null @@ -1,363 +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 "HeatSourceData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace HeatSourceDataNS; - -const char* const HeatSourceDataFactory::vptr = - NvParameterized::getVptr<HeatSourceData, HeatSourceData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->HeatSource), NULL, 0 }, // HeatSource -}; - - -bool HeatSourceData::mBuiltFlag = false; -NvParameterized::MutexType HeatSourceData::mBuiltFlagMutex; - -HeatSourceData::HeatSourceData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &HeatSourceDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -HeatSourceData::~HeatSourceData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void HeatSourceData::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->~HeatSourceData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* HeatSourceData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* HeatSourceData::getParameterDefinitionTree(void) const -{ - HeatSourceData* tmpParam = const_cast<HeatSourceData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType HeatSourceData::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 HeatSourceData::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 HeatSourceData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<HeatSourceData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void HeatSourceData::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 HeatSourceData::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 this heat source asset", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Heat Source name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="HeatSource" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("HeatSource", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Heat Source properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "HeatSourceAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 HeatSourceData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultHeatSource"; -} - -void HeatSourceData::initDynamicArrays(void) -{ -} - -void HeatSourceData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void HeatSourceData::initReferences(void) -{ - HeatSource = NULL; - -} - -void HeatSourceData::freeDynamicArrays(void) -{ -} - -void HeatSourceData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void HeatSourceData::freeReferences(void) -{ - if (HeatSource) - { - HeatSource->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/HeatSourceEffect.cpp b/APEX_1.4/module/particles/src/autogen/HeatSourceEffect.cpp deleted file mode 100644 index f7ed8122..00000000 --- a/APEX_1.4/module/particles/src/autogen/HeatSourceEffect.cpp +++ /dev/null @@ -1,1356 +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 "HeatSourceEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace HeatSourceEffectNS; - -const char* const HeatSourceEffectFactory::vptr = - NvParameterized::getVptr<HeatSourceEffect, HeatSourceEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->HeatSource), NULL, 0 }, // HeatSource -}; - - -bool HeatSourceEffect::mBuiltFlag = false; -NvParameterized::MutexType HeatSourceEffect::mBuiltFlagMutex; - -HeatSourceEffect::HeatSourceEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &HeatSourceEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -HeatSourceEffect::~HeatSourceEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void HeatSourceEffect::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->~HeatSourceEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* HeatSourceEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* HeatSourceEffect::getParameterDefinitionTree(void) const -{ - HeatSourceEffect* tmpParam = const_cast<HeatSourceEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType HeatSourceEffect::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 HeatSourceEffect::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 HeatSourceEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<HeatSourceEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void HeatSourceEffect::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 HeatSourceEffect::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", "A heat source effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Properties of Heat Source Asset", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="HeatSource" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("HeatSource", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Heat Source Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "HeatSourceAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void HeatSourceEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void HeatSourceEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void HeatSourceEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void HeatSourceEffect::initReferences(void) -{ - HeatSource = NULL; - -} - -void HeatSourceEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void HeatSourceEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void HeatSourceEffect::freeReferences(void) -{ - if (HeatSource) - { - HeatSource->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/JetFieldSamplerData.cpp b/APEX_1.4/module/particles/src/autogen/JetFieldSamplerData.cpp deleted file mode 100644 index 5981bac8..00000000 --- a/APEX_1.4/module/particles/src/autogen/JetFieldSamplerData.cpp +++ /dev/null @@ -1,363 +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 "JetFieldSamplerData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace JetFieldSamplerDataNS; - -const char* const JetFieldSamplerDataFactory::vptr = - NvParameterized::getVptr<JetFieldSamplerData, JetFieldSamplerData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->JetFieldSampler), NULL, 0 }, // JetFieldSampler -}; - - -bool JetFieldSamplerData::mBuiltFlag = false; -NvParameterized::MutexType JetFieldSamplerData::mBuiltFlagMutex; - -JetFieldSamplerData::JetFieldSamplerData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &JetFieldSamplerDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -JetFieldSamplerData::~JetFieldSamplerData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void JetFieldSamplerData::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->~JetFieldSamplerData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* JetFieldSamplerData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* JetFieldSamplerData::getParameterDefinitionTree(void) const -{ - JetFieldSamplerData* tmpParam = const_cast<JetFieldSamplerData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType JetFieldSamplerData::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 JetFieldSamplerData::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 JetFieldSamplerData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<JetFieldSamplerData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void JetFieldSamplerData::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 JetFieldSamplerData::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 this jet field sampler", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Jet FS Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="JetFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("JetFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Jet FS properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "JetFSAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 JetFieldSamplerData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultJetFieldSampler"; -} - -void JetFieldSamplerData::initDynamicArrays(void) -{ -} - -void JetFieldSamplerData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void JetFieldSamplerData::initReferences(void) -{ - JetFieldSampler = NULL; - -} - -void JetFieldSamplerData::freeDynamicArrays(void) -{ -} - -void JetFieldSamplerData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void JetFieldSamplerData::freeReferences(void) -{ - if (JetFieldSampler) - { - JetFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/JetFieldSamplerEffect.cpp b/APEX_1.4/module/particles/src/autogen/JetFieldSamplerEffect.cpp deleted file mode 100644 index 4353b16b..00000000 --- a/APEX_1.4/module/particles/src/autogen/JetFieldSamplerEffect.cpp +++ /dev/null @@ -1,1362 +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 "JetFieldSamplerEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace JetFieldSamplerEffectNS; - -const char* const JetFieldSamplerEffectFactory::vptr = - NvParameterized::getVptr<JetFieldSamplerEffect, JetFieldSamplerEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->JetFieldSampler), NULL, 0 }, // JetFieldSampler -}; - - -bool JetFieldSamplerEffect::mBuiltFlag = false; -NvParameterized::MutexType JetFieldSamplerEffect::mBuiltFlagMutex; - -JetFieldSamplerEffect::JetFieldSamplerEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &JetFieldSamplerEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -JetFieldSamplerEffect::~JetFieldSamplerEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void JetFieldSamplerEffect::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->~JetFieldSamplerEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* JetFieldSamplerEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* JetFieldSamplerEffect::getParameterDefinitionTree(void) const -{ - JetFieldSamplerEffect* tmpParam = const_cast<JetFieldSamplerEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType JetFieldSamplerEffect::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 JetFieldSamplerEffect::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 JetFieldSamplerEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<JetFieldSamplerEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void JetFieldSamplerEffect::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 JetFieldSamplerEffect::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", "A jet field sampler effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "Jet FS Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="JetFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("JetFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Jet FS Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "JetFSAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void JetFieldSamplerEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void JetFieldSamplerEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void JetFieldSamplerEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void JetFieldSamplerEffect::initReferences(void) -{ - JetFieldSampler = NULL; - -} - -void JetFieldSamplerEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void JetFieldSamplerEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void JetFieldSamplerEffect::freeReferences(void) -{ - if (JetFieldSampler) - { - JetFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/NoiseFieldSamplerData.cpp b/APEX_1.4/module/particles/src/autogen/NoiseFieldSamplerData.cpp deleted file mode 100644 index ca78ce4a..00000000 --- a/APEX_1.4/module/particles/src/autogen/NoiseFieldSamplerData.cpp +++ /dev/null @@ -1,363 +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 "NoiseFieldSamplerData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace NoiseFieldSamplerDataNS; - -const char* const NoiseFieldSamplerDataFactory::vptr = - NvParameterized::getVptr<NoiseFieldSamplerData, NoiseFieldSamplerData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->NoiseFieldSampler), NULL, 0 }, // NoiseFieldSampler -}; - - -bool NoiseFieldSamplerData::mBuiltFlag = false; -NvParameterized::MutexType NoiseFieldSamplerData::mBuiltFlagMutex; - -NoiseFieldSamplerData::NoiseFieldSamplerData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &NoiseFieldSamplerDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -NoiseFieldSamplerData::~NoiseFieldSamplerData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void NoiseFieldSamplerData::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->~NoiseFieldSamplerData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* NoiseFieldSamplerData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* NoiseFieldSamplerData::getParameterDefinitionTree(void) const -{ - NoiseFieldSamplerData* tmpParam = const_cast<NoiseFieldSamplerData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType NoiseFieldSamplerData::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 NoiseFieldSamplerData::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 NoiseFieldSamplerData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<NoiseFieldSamplerData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void NoiseFieldSamplerData::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 NoiseFieldSamplerData::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 this noise field sampler", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Noise FS Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="NoiseFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("NoiseFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Noise FS properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "NoiseFSAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 NoiseFieldSamplerData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultNoiseFieldSampler"; -} - -void NoiseFieldSamplerData::initDynamicArrays(void) -{ -} - -void NoiseFieldSamplerData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void NoiseFieldSamplerData::initReferences(void) -{ - NoiseFieldSampler = NULL; - -} - -void NoiseFieldSamplerData::freeDynamicArrays(void) -{ -} - -void NoiseFieldSamplerData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void NoiseFieldSamplerData::freeReferences(void) -{ - if (NoiseFieldSampler) - { - NoiseFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/NoiseFieldSamplerEffect.cpp b/APEX_1.4/module/particles/src/autogen/NoiseFieldSamplerEffect.cpp deleted file mode 100644 index 99a0cf62..00000000 --- a/APEX_1.4/module/particles/src/autogen/NoiseFieldSamplerEffect.cpp +++ /dev/null @@ -1,1362 +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 "NoiseFieldSamplerEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace NoiseFieldSamplerEffectNS; - -const char* const NoiseFieldSamplerEffectFactory::vptr = - NvParameterized::getVptr<NoiseFieldSamplerEffect, NoiseFieldSamplerEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->NoiseFieldSampler), NULL, 0 }, // NoiseFieldSampler -}; - - -bool NoiseFieldSamplerEffect::mBuiltFlag = false; -NvParameterized::MutexType NoiseFieldSamplerEffect::mBuiltFlagMutex; - -NoiseFieldSamplerEffect::NoiseFieldSamplerEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &NoiseFieldSamplerEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -NoiseFieldSamplerEffect::~NoiseFieldSamplerEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void NoiseFieldSamplerEffect::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->~NoiseFieldSamplerEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* NoiseFieldSamplerEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* NoiseFieldSamplerEffect::getParameterDefinitionTree(void) const -{ - NoiseFieldSamplerEffect* tmpParam = const_cast<NoiseFieldSamplerEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType NoiseFieldSamplerEffect::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 NoiseFieldSamplerEffect::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 NoiseFieldSamplerEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<NoiseFieldSamplerEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void NoiseFieldSamplerEffect::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 NoiseFieldSamplerEffect::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", "A noise field sampler effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "Noise FS Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="NoiseFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("NoiseFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Noise FS Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "NoiseFSAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void NoiseFieldSamplerEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void NoiseFieldSamplerEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void NoiseFieldSamplerEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void NoiseFieldSamplerEffect::initReferences(void) -{ - NoiseFieldSampler = NULL; - -} - -void NoiseFieldSamplerEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void NoiseFieldSamplerEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void NoiseFieldSamplerEffect::freeReferences(void) -{ - if (NoiseFieldSampler) - { - NoiseFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/ParticleSimulationData.cpp b/APEX_1.4/module/particles/src/autogen/ParticleSimulationData.cpp deleted file mode 100644 index 456f9503..00000000 --- a/APEX_1.4/module/particles/src/autogen/ParticleSimulationData.cpp +++ /dev/null @@ -1,363 +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 "ParticleSimulationData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace ParticleSimulationDataNS; - -const char* const ParticleSimulationDataFactory::vptr = - NvParameterized::getVptr<ParticleSimulationData, ParticleSimulationData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->IOS), NULL, 0 }, // IOS -}; - - -bool ParticleSimulationData::mBuiltFlag = false; -NvParameterized::MutexType ParticleSimulationData::mBuiltFlagMutex; - -ParticleSimulationData::ParticleSimulationData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ParticleSimulationDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ParticleSimulationData::~ParticleSimulationData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ParticleSimulationData::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->~ParticleSimulationData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ParticleSimulationData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ParticleSimulationData::getParameterDefinitionTree(void) const -{ - ParticleSimulationData* tmpParam = const_cast<ParticleSimulationData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ParticleSimulationData::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 ParticleSimulationData::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 ParticleSimulationData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ParticleSimulationData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ParticleSimulationData::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 ParticleSimulationData::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 this particle simulation (IOS)", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Basic IOS Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="IOS" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("IOS", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Basic IOS properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "BasicIOSAssetParam", "ParticleIosAssetParam" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 2); - - - - } - - // 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 ParticleSimulationData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultBasicIOS"; -} - -void ParticleSimulationData::initDynamicArrays(void) -{ -} - -void ParticleSimulationData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ParticleSimulationData::initReferences(void) -{ - IOS = NULL; - -} - -void ParticleSimulationData::freeDynamicArrays(void) -{ -} - -void ParticleSimulationData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void ParticleSimulationData::freeReferences(void) -{ - if (IOS) - { - IOS->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/ParticlesDebugRenderParams.cpp b/APEX_1.4/module/particles/src/autogen/ParticlesDebugRenderParams.cpp deleted file mode 100644 index f052ee11..00000000 --- a/APEX_1.4/module/particles/src/autogen/ParticlesDebugRenderParams.cpp +++ /dev/null @@ -1,333 +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 "ParticlesDebugRenderParams.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace ParticlesDebugRenderParamsNS; - -const char* const ParticlesDebugRenderParamsFactory::vptr = - NvParameterized::getVptr<ParticlesDebugRenderParams, ParticlesDebugRenderParams::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_BOOL, false, (size_t)(&((ParametersStruct*)0)->VISUALIZE_HEAT_SOURCE_ACTOR), NULL, 0 }, // VISUALIZE_HEAT_SOURCE_ACTOR - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->VISUALIZE_EFFECT_PACKAGE_ACTOR), NULL, 0 }, // VISUALIZE_EFFECT_PACKAGE_ACTOR -}; - - -bool ParticlesDebugRenderParams::mBuiltFlag = false; -NvParameterized::MutexType ParticlesDebugRenderParams::mBuiltFlagMutex; - -ParticlesDebugRenderParams::ParticlesDebugRenderParams(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ParticlesDebugRenderParamsFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ParticlesDebugRenderParams::~ParticlesDebugRenderParams() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ParticlesDebugRenderParams::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->~ParticlesDebugRenderParams(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ParticlesDebugRenderParams::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ParticlesDebugRenderParams::getParameterDefinitionTree(void) const -{ - ParticlesDebugRenderParams* tmpParam = const_cast<ParticlesDebugRenderParams*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ParticlesDebugRenderParams::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 ParticlesDebugRenderParams::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 ParticlesDebugRenderParams::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ParticlesDebugRenderParams::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ParticlesDebugRenderParams::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 ParticlesDebugRenderParams::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_HEAT_SOURCE_ACTOR" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("VISUALIZE_HEAT_SOURCE_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", "This option allows user to enable or disable debug visualization of a heat source actor", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="VISUALIZE_EFFECT_PACKAGE_ACTOR" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("VISUALIZE_EFFECT_PACKAGE_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", "This option allows user to enable or disable debug visualization of an effect package actor", true); - ParamDefTable[2].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); - } - - mBuiltFlag = true; - -} -void ParticlesDebugRenderParams::initStrings(void) -{ -} - -void ParticlesDebugRenderParams::initDynamicArrays(void) -{ -} - -void ParticlesDebugRenderParams::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - VISUALIZE_HEAT_SOURCE_ACTOR = bool(false); - VISUALIZE_EFFECT_PACKAGE_ACTOR = bool(false); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ParticlesDebugRenderParams::initReferences(void) -{ -} - -void ParticlesDebugRenderParams::freeDynamicArrays(void) -{ -} - -void ParticlesDebugRenderParams::freeStrings(void) -{ -} - -void ParticlesDebugRenderParams::freeReferences(void) -{ -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/ParticlesModuleParameters.cpp b/APEX_1.4/module/particles/src/autogen/ParticlesModuleParameters.cpp deleted file mode 100644 index 382ede54..00000000 --- a/APEX_1.4/module/particles/src/autogen/ParticlesModuleParameters.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 "ParticlesModuleParameters.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace ParticlesModuleParametersNS; - -const char* const ParticlesModuleParametersFactory::vptr = - NvParameterized::getVptr<ParticlesModuleParameters, ParticlesModuleParameters::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 ParticlesModuleParameters::mBuiltFlag = false; -NvParameterized::MutexType ParticlesModuleParameters::mBuiltFlagMutex; - -ParticlesModuleParameters::ParticlesModuleParameters(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &ParticlesModuleParametersFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -ParticlesModuleParameters::~ParticlesModuleParameters() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void ParticlesModuleParameters::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->~ParticlesModuleParameters(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* ParticlesModuleParameters::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* ParticlesModuleParameters::getParameterDefinitionTree(void) const -{ - ParticlesModuleParameters* tmpParam = const_cast<ParticlesModuleParameters*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType ParticlesModuleParameters::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 ParticlesModuleParameters::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 ParticlesModuleParameters::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<ParticlesModuleParameters::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void ParticlesModuleParameters::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 ParticlesModuleParameters::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 ModuleParticles.", 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 ParticlesModuleParameters::initStrings(void) -{ -} - -void ParticlesModuleParameters::initDynamicArrays(void) -{ -} - -void ParticlesModuleParameters::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - unused = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void ParticlesModuleParameters::initReferences(void) -{ -} - -void ParticlesModuleParameters::freeDynamicArrays(void) -{ -} - -void ParticlesModuleParameters::freeStrings(void) -{ -} - -void ParticlesModuleParameters::freeReferences(void) -{ -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/RigidBodyEffect.cpp b/APEX_1.4/module/particles/src/autogen/RigidBodyEffect.cpp deleted file mode 100644 index 0f6a1a42..00000000 --- a/APEX_1.4/module/particles/src/autogen/RigidBodyEffect.cpp +++ /dev/null @@ -1,1587 +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 "RigidBodyEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace RigidBodyEffectNS; - -const char* const RigidBodyEffectFactory::vptr = - NvParameterized::getVptr<RigidBodyEffect, RigidBodyEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 41; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, - 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 11 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(11), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(21), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(24), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(27), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(33), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(34), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(35), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(37), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(38), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->Type), NULL, 0 }, // Type - { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->CollisionFilterDataName), NULL, 0 }, // CollisionFilterDataName - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->Dynamic), NULL, 0 }, // Dynamic - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->Gravity), NULL, 0 }, // Gravity - { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->Extents), NULL, 0 }, // Extents - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->Mass), NULL, 0 }, // Mass - { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->InitialLinearVelocity), NULL, 0 }, // InitialLinearVelocity - { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->InitialAngularVelocity), NULL, 0 }, // InitialAngularVelocity - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->LinearDamping), NULL, 0 }, // LinearDamping - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->AngularDamping), NULL, 0 }, // AngularDamping -}; - - -bool RigidBodyEffect::mBuiltFlag = false; -NvParameterized::MutexType RigidBodyEffect::mBuiltFlagMutex; - -RigidBodyEffect::RigidBodyEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &RigidBodyEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -RigidBodyEffect::~RigidBodyEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void RigidBodyEffect::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->~RigidBodyEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* RigidBodyEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* RigidBodyEffect::getParameterDefinitionTree(void) const -{ - RigidBodyEffect* tmpParam = const_cast<RigidBodyEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType RigidBodyEffect::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 RigidBodyEffect::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 RigidBodyEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<RigidBodyEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void RigidBodyEffect::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 RigidBodyEffect::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", "An effect comprised of a primitive rigid body shape", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "Rigid Body Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="Type" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("Type", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "What type of rigid body primitive this is", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "SPHERE", "CAPSULE", "BOX" }; - ParamDefTable[31].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=32, longName="CollisionFilterDataName" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; - ParamDef->init("CollisionFilterDataName", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The collision filter data name", true); - ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=33, longName="Dynamic" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; - ParamDef->init("Dynamic", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether the rigid body is dynamic or kinematic", true); - ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=34, longName="Gravity" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; - ParamDef->init("Gravity", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "A flag to determine if the object responds to gravity or not", true); - ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=35, longName="Extents" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; - ParamDef->init("Extents", TYPE_VEC3, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The extents of the primitve, radius, height, or box dimensions XYZ", true); - ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=36, longName="Mass" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[36]; - ParamDef->init("Mass", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mass of the object", true); - ParamDefTable[36].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=37, longName="InitialLinearVelocity" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[37]; - ParamDef->init("InitialLinearVelocity", TYPE_VEC3, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The initial linear velocity (if dynamic)", true); - ParamDefTable[37].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=38, longName="InitialAngularVelocity" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[38]; - ParamDef->init("InitialAngularVelocity", TYPE_VEC3, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The initial angular velocity (if dynamic)", true); - ParamDefTable[38].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=39, longName="LinearDamping" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[39]; - ParamDef->init("LinearDamping", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The linear damping on the rigid body", true); - ParamDefTable[39].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=40, longName="AngularDamping" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[40]; - ParamDef->init("AngularDamping", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The angular damping on the rigid body", true); - ParamDefTable[40].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[11]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - Children[2] = PDEF_PTR(32); - Children[3] = PDEF_PTR(33); - Children[4] = PDEF_PTR(34); - Children[5] = PDEF_PTR(35); - Children[6] = PDEF_PTR(36); - Children[7] = PDEF_PTR(37); - Children[8] = PDEF_PTR(38); - Children[9] = PDEF_PTR(39); - Children[10] = PDEF_PTR(40); - - ParamDefTable[0].setChildren(Children, 11); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void RigidBodyEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; - CollisionFilterDataName.isAllocated = false; - CollisionFilterDataName.buf = (const char*)"rigidbody=all"; -} - -void RigidBodyEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void RigidBodyEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - Type = (const char*)"SPHERE"; - Dynamic = bool(0); - Gravity = bool(1); - Extents = physx::PxVec3(init(1.000000000,1.000000000,1.000000000)); - Mass = float(1.000000000); - InitialLinearVelocity = physx::PxVec3(init(0.000000000,0.000000000,0.000000000)); - InitialAngularVelocity = physx::PxVec3(init(0.000000000,0.000000000,0.000000000)); - LinearDamping = float(0.000000000); - AngularDamping = float(0.000000000); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void RigidBodyEffect::initReferences(void) -{ -} - -void RigidBodyEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void RigidBodyEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } - - if (CollisionFilterDataName.isAllocated && CollisionFilterDataName.buf) - { - mParameterizedTraits->strfree((char*)CollisionFilterDataName.buf); - } -} - -void RigidBodyEffect::freeReferences(void) -{ -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/SubstanceSourceData.cpp b/APEX_1.4/module/particles/src/autogen/SubstanceSourceData.cpp deleted file mode 100644 index 2bdbef5f..00000000 --- a/APEX_1.4/module/particles/src/autogen/SubstanceSourceData.cpp +++ /dev/null @@ -1,363 +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 "SubstanceSourceData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace SubstanceSourceDataNS; - -const char* const SubstanceSourceDataFactory::vptr = - NvParameterized::getVptr<SubstanceSourceData, SubstanceSourceData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->SubstanceSource), NULL, 0 }, // SubstanceSource -}; - - -bool SubstanceSourceData::mBuiltFlag = false; -NvParameterized::MutexType SubstanceSourceData::mBuiltFlagMutex; - -SubstanceSourceData::SubstanceSourceData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SubstanceSourceDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SubstanceSourceData::~SubstanceSourceData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SubstanceSourceData::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->~SubstanceSourceData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SubstanceSourceData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SubstanceSourceData::getParameterDefinitionTree(void) const -{ - SubstanceSourceData* tmpParam = const_cast<SubstanceSourceData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SubstanceSourceData::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 SubstanceSourceData::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 SubstanceSourceData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SubstanceSourceData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void SubstanceSourceData::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 SubstanceSourceData::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 this substance source", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Substance Source Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="SubstanceSource" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("SubstanceSource", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Substance Source properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "SubstanceSourceAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 SubstanceSourceData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultSubstanceSource"; -} - -void SubstanceSourceData::initDynamicArrays(void) -{ -} - -void SubstanceSourceData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SubstanceSourceData::initReferences(void) -{ - SubstanceSource = NULL; - -} - -void SubstanceSourceData::freeDynamicArrays(void) -{ -} - -void SubstanceSourceData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void SubstanceSourceData::freeReferences(void) -{ - if (SubstanceSource) - { - SubstanceSource->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/SubstanceSourceEffect.cpp b/APEX_1.4/module/particles/src/autogen/SubstanceSourceEffect.cpp deleted file mode 100644 index 58007910..00000000 --- a/APEX_1.4/module/particles/src/autogen/SubstanceSourceEffect.cpp +++ /dev/null @@ -1,1356 +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 "SubstanceSourceEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace SubstanceSourceEffectNS; - -const char* const SubstanceSourceEffectFactory::vptr = - NvParameterized::getVptr<SubstanceSourceEffect, SubstanceSourceEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->SubstanceSource), NULL, 0 }, // SubstanceSource -}; - - -bool SubstanceSourceEffect::mBuiltFlag = false; -NvParameterized::MutexType SubstanceSourceEffect::mBuiltFlagMutex; - -SubstanceSourceEffect::SubstanceSourceEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &SubstanceSourceEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -SubstanceSourceEffect::~SubstanceSourceEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void SubstanceSourceEffect::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->~SubstanceSourceEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* SubstanceSourceEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* SubstanceSourceEffect::getParameterDefinitionTree(void) const -{ - SubstanceSourceEffect* tmpParam = const_cast<SubstanceSourceEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType SubstanceSourceEffect::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 SubstanceSourceEffect::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 SubstanceSourceEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<SubstanceSourceEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void SubstanceSourceEffect::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 SubstanceSourceEffect::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", "A substance source effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Substance Source Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="SubstanceSource" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("SubstanceSource", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Substance Source Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "SubstanceSourceAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void SubstanceSourceEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void SubstanceSourceEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void SubstanceSourceEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void SubstanceSourceEffect::initReferences(void) -{ - SubstanceSource = NULL; - -} - -void SubstanceSourceEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void SubstanceSourceEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void SubstanceSourceEffect::freeReferences(void) -{ - if (SubstanceSource) - { - SubstanceSource->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/TurbulenceFieldSamplerData.cpp b/APEX_1.4/module/particles/src/autogen/TurbulenceFieldSamplerData.cpp deleted file mode 100644 index 4816cf54..00000000 --- a/APEX_1.4/module/particles/src/autogen/TurbulenceFieldSamplerData.cpp +++ /dev/null @@ -1,363 +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 "TurbulenceFieldSamplerData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace TurbulenceFieldSamplerDataNS; - -const char* const TurbulenceFieldSamplerDataFactory::vptr = - NvParameterized::getVptr<TurbulenceFieldSamplerData, TurbulenceFieldSamplerData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->TurbulenceFieldSampler), NULL, 0 }, // TurbulenceFieldSampler -}; - - -bool TurbulenceFieldSamplerData::mBuiltFlag = false; -NvParameterized::MutexType TurbulenceFieldSamplerData::mBuiltFlagMutex; - -TurbulenceFieldSamplerData::TurbulenceFieldSamplerData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &TurbulenceFieldSamplerDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -TurbulenceFieldSamplerData::~TurbulenceFieldSamplerData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void TurbulenceFieldSamplerData::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->~TurbulenceFieldSamplerData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* TurbulenceFieldSamplerData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* TurbulenceFieldSamplerData::getParameterDefinitionTree(void) const -{ - TurbulenceFieldSamplerData* tmpParam = const_cast<TurbulenceFieldSamplerData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType TurbulenceFieldSamplerData::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 TurbulenceFieldSamplerData::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 TurbulenceFieldSamplerData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<TurbulenceFieldSamplerData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void TurbulenceFieldSamplerData::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 TurbulenceFieldSamplerData::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 this turbulence field sampler", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Turbulence FS Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="TurbulenceFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("TurbulenceFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Turbulence FS properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "TurbulenceFSAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 TurbulenceFieldSamplerData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultTurbulenceFieldSampler"; -} - -void TurbulenceFieldSamplerData::initDynamicArrays(void) -{ -} - -void TurbulenceFieldSamplerData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void TurbulenceFieldSamplerData::initReferences(void) -{ - TurbulenceFieldSampler = NULL; - -} - -void TurbulenceFieldSamplerData::freeDynamicArrays(void) -{ -} - -void TurbulenceFieldSamplerData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void TurbulenceFieldSamplerData::freeReferences(void) -{ - if (TurbulenceFieldSampler) - { - TurbulenceFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/TurbulenceFieldSamplerEffect.cpp b/APEX_1.4/module/particles/src/autogen/TurbulenceFieldSamplerEffect.cpp deleted file mode 100644 index e7744755..00000000 --- a/APEX_1.4/module/particles/src/autogen/TurbulenceFieldSamplerEffect.cpp +++ /dev/null @@ -1,1362 +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 "TurbulenceFieldSamplerEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace TurbulenceFieldSamplerEffectNS; - -const char* const TurbulenceFieldSamplerEffectFactory::vptr = - NvParameterized::getVptr<TurbulenceFieldSamplerEffect, TurbulenceFieldSamplerEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->TurbulenceFieldSampler), NULL, 0 }, // TurbulenceFieldSampler -}; - - -bool TurbulenceFieldSamplerEffect::mBuiltFlag = false; -NvParameterized::MutexType TurbulenceFieldSamplerEffect::mBuiltFlagMutex; - -TurbulenceFieldSamplerEffect::TurbulenceFieldSamplerEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &TurbulenceFieldSamplerEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -TurbulenceFieldSamplerEffect::~TurbulenceFieldSamplerEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void TurbulenceFieldSamplerEffect::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->~TurbulenceFieldSamplerEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* TurbulenceFieldSamplerEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* TurbulenceFieldSamplerEffect::getParameterDefinitionTree(void) const -{ - TurbulenceFieldSamplerEffect* tmpParam = const_cast<TurbulenceFieldSamplerEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType TurbulenceFieldSamplerEffect::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 TurbulenceFieldSamplerEffect::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 TurbulenceFieldSamplerEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<TurbulenceFieldSamplerEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void TurbulenceFieldSamplerEffect::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 TurbulenceFieldSamplerEffect::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", "A turbulence effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "Turbulence FS Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="TurbulenceFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("TurbulenceFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Turbulence FS Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "TurbulenceFSAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void TurbulenceFieldSamplerEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void TurbulenceFieldSamplerEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void TurbulenceFieldSamplerEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void TurbulenceFieldSamplerEffect::initReferences(void) -{ - TurbulenceFieldSampler = NULL; - -} - -void TurbulenceFieldSamplerEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void TurbulenceFieldSamplerEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void TurbulenceFieldSamplerEffect::freeReferences(void) -{ - if (TurbulenceFieldSampler) - { - TurbulenceFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/VelocitySourceData.cpp b/APEX_1.4/module/particles/src/autogen/VelocitySourceData.cpp deleted file mode 100644 index 32ceac93..00000000 --- a/APEX_1.4/module/particles/src/autogen/VelocitySourceData.cpp +++ /dev/null @@ -1,363 +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 "VelocitySourceData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace VelocitySourceDataNS; - -const char* const VelocitySourceDataFactory::vptr = - NvParameterized::getVptr<VelocitySourceData, VelocitySourceData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->VelocitySource), NULL, 0 }, // VelocitySource -}; - - -bool VelocitySourceData::mBuiltFlag = false; -NvParameterized::MutexType VelocitySourceData::mBuiltFlagMutex; - -VelocitySourceData::VelocitySourceData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &VelocitySourceDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -VelocitySourceData::~VelocitySourceData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void VelocitySourceData::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->~VelocitySourceData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* VelocitySourceData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* VelocitySourceData::getParameterDefinitionTree(void) const -{ - VelocitySourceData* tmpParam = const_cast<VelocitySourceData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType VelocitySourceData::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 VelocitySourceData::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 VelocitySourceData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<VelocitySourceData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void VelocitySourceData::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 VelocitySourceData::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 this velocity source", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Velocity Source Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="VelocitySource" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("VelocitySource", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Velocity Source properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "VelocitySourceAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 VelocitySourceData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultVelocitySource"; -} - -void VelocitySourceData::initDynamicArrays(void) -{ -} - -void VelocitySourceData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void VelocitySourceData::initReferences(void) -{ - VelocitySource = NULL; - -} - -void VelocitySourceData::freeDynamicArrays(void) -{ -} - -void VelocitySourceData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void VelocitySourceData::freeReferences(void) -{ - if (VelocitySource) - { - VelocitySource->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/VelocitySourceEffect.cpp b/APEX_1.4/module/particles/src/autogen/VelocitySourceEffect.cpp deleted file mode 100644 index 71af2d18..00000000 --- a/APEX_1.4/module/particles/src/autogen/VelocitySourceEffect.cpp +++ /dev/null @@ -1,1356 +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 "VelocitySourceEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace VelocitySourceEffectNS; - -const char* const VelocitySourceEffectFactory::vptr = - NvParameterized::getVptr<VelocitySourceEffect, VelocitySourceEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->VelocitySource), NULL, 0 }, // VelocitySource -}; - - -bool VelocitySourceEffect::mBuiltFlag = false; -NvParameterized::MutexType VelocitySourceEffect::mBuiltFlagMutex; - -VelocitySourceEffect::VelocitySourceEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &VelocitySourceEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -VelocitySourceEffect::~VelocitySourceEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void VelocitySourceEffect::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->~VelocitySourceEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* VelocitySourceEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* VelocitySourceEffect::getParameterDefinitionTree(void) const -{ - VelocitySourceEffect* tmpParam = const_cast<VelocitySourceEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType VelocitySourceEffect::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 VelocitySourceEffect::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 VelocitySourceEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<VelocitySourceEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void VelocitySourceEffect::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 VelocitySourceEffect::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", "A velocity source effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Velocity Source Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="VelocitySource" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("VelocitySource", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Velocity Source Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "VelocitySourceAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void VelocitySourceEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void VelocitySourceEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void VelocitySourceEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void VelocitySourceEffect::initReferences(void) -{ - VelocitySource = NULL; - -} - -void VelocitySourceEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void VelocitySourceEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void VelocitySourceEffect::freeReferences(void) -{ - if (VelocitySource) - { - VelocitySource->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/VolumeRenderMaterialData.cpp b/APEX_1.4/module/particles/src/autogen/VolumeRenderMaterialData.cpp deleted file mode 100644 index a62c9463..00000000 --- a/APEX_1.4/module/particles/src/autogen/VolumeRenderMaterialData.cpp +++ /dev/null @@ -1,1349 +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 "VolumeRenderMaterialData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace VolumeRenderMaterialDataNS; - -const char* const VolumeRenderMaterialDataFactory::vptr = - NvParameterized::getVptr<VolumeRenderMaterialData, VolumeRenderMaterialData::ClassAlignment>(); - -const uint32_t NumParamDefs = 36; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 34, 35, 31, 32, 33, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 32 }, - { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->ApplicationMaterialName), NULL, 0 }, // ApplicationMaterialName - { TYPE_STRING, false, (size_t)(&((ParametersStruct*)0)->UserProperties), NULL, 0 }, // UserProperties - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->RenderMode), NULL, 0 }, // RenderMode - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->RenderMethod), NULL, 0 }, // RenderMethod - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->ResolutionScale), NULL, 0 }, // ResolutionScale - { TYPE_ENUM, false, (size_t)(&((ParametersStruct*)0)->FillMode), NULL, 0 }, // FillMode - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->GenerateShadows), NULL, 0 }, // GenerateShadows - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->BlurShadows), NULL, 0 }, // BlurShadows - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->GenerateMipmaps), NULL, 0 }, // GenerateMipmaps - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->EnableStencilOpt), NULL, 0 }, // EnableStencilOpt - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->StepScale), NULL, 0 }, // StepScale - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->Density), NULL, 0 }, // Density - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->EdgeFade), NULL, 0 }, // EdgeFade - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->OpacityThreshold), NULL, 0 }, // OpacityThreshold - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->RayJitter), NULL, 0 }, // RayJitter - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->IsoValue), NULL, 0 }, // IsoValue - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->IsoValueSign), NULL, 0 }, // IsoValueSign - { TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->ShadowSamples), NULL, 0 }, // ShadowSamples - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->ShadowDistance), NULL, 0 }, // ShadowDistance - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->ShadowDensity), NULL, 0 }, // ShadowDensity - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->ShadowJitter), NULL, 0 }, // ShadowJitter - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->ShadowAmount), NULL, 0 }, // ShadowAmount - { TYPE_VEC3, false, (size_t)(&((ParametersStruct*)0)->LightDir), NULL, 0 }, // LightDir - { TYPE_VEC4, false, (size_t)(&((ParametersStruct*)0)->LightColor), NULL, 0 }, // LightColor - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->BlockEmptyThreshold), NULL, 0 }, // BlockEmptyThreshold - { TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->ReadDepth), NULL, 0 }, // ReadDepth - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->ColorMapScale), NULL, 0 }, // ColorMapScale - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->ColorMapOffset), NULL, 0 }, // ColorMapOffset - { TYPE_ARRAY, true, (size_t)(&((ParametersStruct*)0)->ColorMap), CHILDREN(32), 1 }, // ColorMap - { TYPE_STRUCT, false, 1 * sizeof(colorLifeStruct_Type), CHILDREN(33), 2 }, // ColorMap[] - { TYPE_F32, false, (size_t)(&((colorLifeStruct_Type*)0)->density), NULL, 0 }, // ColorMap[].density - { TYPE_VEC4, false, (size_t)(&((colorLifeStruct_Type*)0)->color), NULL, 0 }, // ColorMap[].color - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->TextureRangeMin), NULL, 0 }, // TextureRangeMin - { TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->TextureRangeMax), NULL, 0 }, // TextureRangeMax -}; - - -bool VolumeRenderMaterialData::mBuiltFlag = false; -NvParameterized::MutexType VolumeRenderMaterialData::mBuiltFlagMutex; - -VolumeRenderMaterialData::VolumeRenderMaterialData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &VolumeRenderMaterialDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -VolumeRenderMaterialData::~VolumeRenderMaterialData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void VolumeRenderMaterialData::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->~VolumeRenderMaterialData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* VolumeRenderMaterialData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* VolumeRenderMaterialData::getParameterDefinitionTree(void) const -{ - VolumeRenderMaterialData* tmpParam = const_cast<VolumeRenderMaterialData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType VolumeRenderMaterialData::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 VolumeRenderMaterialData::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 VolumeRenderMaterialData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<VolumeRenderMaterialData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void VolumeRenderMaterialData::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 VolumeRenderMaterialData::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 volume render material properties for this asset", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "The name of this volume render material", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="ApplicationMaterialName" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("ApplicationMaterialName", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The name of the material to match up with the application's material system", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="UserProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("UserProperties", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Optional user properties string", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="RenderMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("RenderMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Volume rendering mode", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "VOLUME", "VOLUME_COLORMAP", "VOLUME_SHADOWED", "VOXELS", "ISOSURFACE" }; - ParamDefTable[4].setEnumVals((const char**)EnumVals, 5); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="RenderMethod" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("RenderMethod", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Determines whether to do raycasting or slice based rendering, default is raycasting", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "RAYCASTING", "SLICE_BASED" }; - ParamDefTable[5].setEnumVals((const char**)EnumVals, 2); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="ResolutionScale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("ResolutionScale", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Resolution scale to use", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "NO_SCALE", "HALF_SCALE", "QUARTER_SCALE" }; - ParamDefTable[6].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="FillMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("FillMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Debugging option to render the volume in wireframe mode; default is solid of course", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "SOLID", "WIREFRAME" }; - ParamDefTable[7].setEnumVals((const char**)EnumVals, 2); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="GenerateShadows" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("GenerateShadows", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Generate shadow volume", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="BlurShadows" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("BlurShadows", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Blur shadow volume", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="GenerateMipmaps" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("GenerateMipmaps", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The maximum clamp range to use when copying velocity/desnity to the 3d volume texture; this range will be scaled 0-255; it's important to tune the proper range value", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EnableStencilOpt" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("EnableStencilOpt", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Enable stencil optimization", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="StepScale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("StepScale", 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 ray march step - e.g. 1.0 == voxel size, 0.5 == half voxel size", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="Density" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Density", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Volume density [0, 1000.0]", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EdgeFade" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("EdgeFade", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Edge fade distance [0, 1]", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="OpacityThreshold" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("OpacityThreshold", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Stop ray marching once opacity has reached this threshold [0, 1]", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="RayJitter" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RayJitter", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount to jitter view rays [0, 1]", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="IsoValue" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("IsoValue", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Surface Isovalue for Isovalue render mode", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="IsoValueSign" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("IsoValueSign", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Isovalue sign, density is multiplied by this value before comparison (usually 1.0 or -1.0)", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="ShadowSamples" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("ShadowSamples", TYPE_U32, 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(256), true); - HintTable[1].init("min", uint64_t(0), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", uint64_t(256), true); - HintTable[1].init("min", uint64_t(0), true); - HintTable[2].init("shortDescription", "Number of samples for shadows [0, 256]", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="ShadowDistance" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("ShadowDistance", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Distance to ray march shadows [0, 1]", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="ShadowDensity" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - ParamDef->init("ShadowDensity", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Shadow density [0, 1000]", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="ShadowJitter" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ShadowJitter", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount to jitter shadow rays [0, 1]", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="ShadowAmount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("ShadowAmount", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of shadowing [0, 1]", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="LightDir" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("LightDir", TYPE_VEC3, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Normalized light direction", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="LightColor" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - ParamDef->init("LightColor", TYPE_VEC4, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("COLOR", uint64_t(1), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("COLOR", uint64_t(1), true); - HintTable[1].init("shortDescription", "The color to use for the 'light' on this volume render", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="BlockEmptyThreshold" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - ParamDef->init("BlockEmptyThreshold", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Threshold above which block is considered non-empty for empty space skipping (typically close to 0.0)", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="ReadDepth" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("ReadDepth", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Read background depth during compositing", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="ColorMapScale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("ColorMapScale", 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 map scale", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="ColorMapOffset" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - ParamDef->init("ColorMapOffset", 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 map offset", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="ColorMap" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - ParamDef->init("ColorMap", 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", "''Fluid Density''", true); - HintTable[4].init("yAxisLabel", "''Alpha + Color''", true); - ParamDefTable[30].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 color map", true); - HintTable[4].init("xAxisLabel", "''Fluid Density''", true); - HintTable[5].init("yAxisLabel", "''Alpha + Color''", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="ColorMap[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("ColorMap", TYPE_STRUCT, "colorLifeStruct", 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", "''Fluid Density''", true); - HintTable[4].init("yAxisLabel", "''Alpha + Color''", true); - ParamDefTable[31].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 color map", true); - HintTable[4].init("xAxisLabel", "''Fluid Density''", true); - HintTable[5].init("yAxisLabel", "''Alpha + Color''", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=32, longName="ColorMap[].density" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[32]; - ParamDef->init("density", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Density", true); - ParamDefTable[32].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=33, longName="ColorMap[].color" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[33]; - ParamDef->init("color", TYPE_VEC4, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Color is formated x=R, y=G, z=B, w=A", true); - ParamDefTable[33].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=34, longName="TextureRangeMin" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[34]; - ParamDef->init("TextureRangeMin", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(5000.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(5000.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "For APEX turbulence, controls the minimum density range to copy to the density texture", true); - ParamDefTable[34].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=35, longName="TextureRangeMax" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[35]; - ParamDef->init("TextureRangeMax", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(5000.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(5000.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "For APEX turbulence, controls the maximum density range to copy to the density texture", true); - ParamDefTable[35].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[32]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(2); - Children[2] = PDEF_PTR(3); - Children[3] = PDEF_PTR(4); - Children[4] = PDEF_PTR(5); - Children[5] = PDEF_PTR(6); - Children[6] = PDEF_PTR(7); - Children[7] = PDEF_PTR(8); - Children[8] = PDEF_PTR(9); - Children[9] = PDEF_PTR(10); - Children[10] = PDEF_PTR(11); - Children[11] = PDEF_PTR(12); - Children[12] = PDEF_PTR(13); - Children[13] = PDEF_PTR(14); - Children[14] = PDEF_PTR(15); - Children[15] = PDEF_PTR(16); - Children[16] = PDEF_PTR(17); - Children[17] = PDEF_PTR(18); - Children[18] = PDEF_PTR(19); - Children[19] = PDEF_PTR(20); - Children[20] = PDEF_PTR(21); - Children[21] = PDEF_PTR(22); - Children[22] = PDEF_PTR(23); - Children[23] = PDEF_PTR(24); - Children[24] = PDEF_PTR(25); - Children[25] = PDEF_PTR(26); - Children[26] = PDEF_PTR(27); - Children[27] = PDEF_PTR(28); - Children[28] = PDEF_PTR(29); - Children[29] = PDEF_PTR(30); - Children[30] = PDEF_PTR(34); - Children[31] = PDEF_PTR(35); - - ParamDefTable[0].setChildren(Children, 32); - } - - // SetChildren for: nodeIndex=30, longName="ColorMap" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(31); - - ParamDefTable[30].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=31, longName="ColorMap[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(32); - Children[1] = PDEF_PTR(33); - - ParamDefTable[31].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void VolumeRenderMaterialData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultVolumeRenderMaterial"; - ApplicationMaterialName.isAllocated = true; - ApplicationMaterialName.buf = NULL; - UserProperties.isAllocated = true; - UserProperties.buf = NULL; -} - -void VolumeRenderMaterialData::initDynamicArrays(void) -{ - ColorMap.buf = NULL; - ColorMap.isAllocated = true; - ColorMap.elementSize = sizeof(colorLifeStruct_Type); - ColorMap.arraySizes[0] = 0; -} - -void VolumeRenderMaterialData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - RenderMode = (const char*)"VOLUME"; - RenderMethod = (const char*)"RAYCASTING"; - ResolutionScale = (const char*)"NO_SCALE"; - FillMode = (const char*)"SOLID"; - GenerateShadows = bool(0); - BlurShadows = bool(1); - GenerateMipmaps = bool(0); - EnableStencilOpt = bool(0); - StepScale = float(0.500000000); - Density = float(50.000000000); - EdgeFade = float(0.100000001); - OpacityThreshold = float(0.990000010); - RayJitter = float(0.000000000); - IsoValue = float(0.500000000); - IsoValueSign = float(1.000000000); - ShadowSamples = uint32_t(4); - ShadowDistance = float(0.200000003); - ShadowDensity = float(20.000000000); - ShadowJitter = float(1.000000000); - ShadowAmount = float(1.000000000); - LightDir = physx::PxVec3(init(1.000000000,1.000000000,1.000000000)); - LightColor = physx::PxVec4(initVec4(1.000000000,1.000000000,1.000000000,1.000000000)); - BlockEmptyThreshold = float(0.000000000); - ReadDepth = bool(1); - ColorMapScale = float(1.000000000); - ColorMapOffset = float(0.000000000); - TextureRangeMin = float(0.000000000); - TextureRangeMax = float(500.000000000); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void VolumeRenderMaterialData::initReferences(void) -{ -} - -void VolumeRenderMaterialData::freeDynamicArrays(void) -{ - if (ColorMap.isAllocated && ColorMap.buf) - { - mParameterizedTraits->free(ColorMap.buf); - } -} - -void VolumeRenderMaterialData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } - - if (ApplicationMaterialName.isAllocated && ApplicationMaterialName.buf) - { - mParameterizedTraits->strfree((char*)ApplicationMaterialName.buf); - } - - if (UserProperties.isAllocated && UserProperties.buf) - { - mParameterizedTraits->strfree((char*)UserProperties.buf); - } -} - -void VolumeRenderMaterialData::freeReferences(void) -{ -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/VortexFieldSamplerData.cpp b/APEX_1.4/module/particles/src/autogen/VortexFieldSamplerData.cpp deleted file mode 100644 index 357e302d..00000000 --- a/APEX_1.4/module/particles/src/autogen/VortexFieldSamplerData.cpp +++ /dev/null @@ -1,363 +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 "VortexFieldSamplerData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace VortexFieldSamplerDataNS; - -const char* const VortexFieldSamplerDataFactory::vptr = - NvParameterized::getVptr<VortexFieldSamplerData, VortexFieldSamplerData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->VortexFieldSampler), NULL, 0 }, // VortexFieldSampler -}; - - -bool VortexFieldSamplerData::mBuiltFlag = false; -NvParameterized::MutexType VortexFieldSamplerData::mBuiltFlagMutex; - -VortexFieldSamplerData::VortexFieldSamplerData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &VortexFieldSamplerDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -VortexFieldSamplerData::~VortexFieldSamplerData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void VortexFieldSamplerData::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->~VortexFieldSamplerData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* VortexFieldSamplerData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* VortexFieldSamplerData::getParameterDefinitionTree(void) const -{ - VortexFieldSamplerData* tmpParam = const_cast<VortexFieldSamplerData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType VortexFieldSamplerData::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 VortexFieldSamplerData::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 VortexFieldSamplerData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<VortexFieldSamplerData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void VortexFieldSamplerData::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 VortexFieldSamplerData::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 this vortex field sampler", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Vortex FS Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="VortexFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("VortexFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Vortex FS properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "VortexFSAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 VortexFieldSamplerData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultVortexFieldSampler"; -} - -void VortexFieldSamplerData::initDynamicArrays(void) -{ -} - -void VortexFieldSamplerData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void VortexFieldSamplerData::initReferences(void) -{ - VortexFieldSampler = NULL; - -} - -void VortexFieldSamplerData::freeDynamicArrays(void) -{ -} - -void VortexFieldSamplerData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void VortexFieldSamplerData::freeReferences(void) -{ - if (VortexFieldSampler) - { - VortexFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/VortexFieldSamplerEffect.cpp b/APEX_1.4/module/particles/src/autogen/VortexFieldSamplerEffect.cpp deleted file mode 100644 index 06a3bf04..00000000 --- a/APEX_1.4/module/particles/src/autogen/VortexFieldSamplerEffect.cpp +++ /dev/null @@ -1,1362 +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 "VortexFieldSamplerEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace VortexFieldSamplerEffectNS; - -const char* const VortexFieldSamplerEffectFactory::vptr = - NvParameterized::getVptr<VortexFieldSamplerEffect, VortexFieldSamplerEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->VortexFieldSampler), NULL, 0 }, // VortexFieldSampler -}; - - -bool VortexFieldSamplerEffect::mBuiltFlag = false; -NvParameterized::MutexType VortexFieldSamplerEffect::mBuiltFlagMutex; - -VortexFieldSamplerEffect::VortexFieldSamplerEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &VortexFieldSamplerEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -VortexFieldSamplerEffect::~VortexFieldSamplerEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void VortexFieldSamplerEffect::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->~VortexFieldSamplerEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* VortexFieldSamplerEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* VortexFieldSamplerEffect::getParameterDefinitionTree(void) const -{ - VortexFieldSamplerEffect* tmpParam = const_cast<VortexFieldSamplerEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType VortexFieldSamplerEffect::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 VortexFieldSamplerEffect::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 VortexFieldSamplerEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<VortexFieldSamplerEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void VortexFieldSamplerEffect::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 VortexFieldSamplerEffect::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", "A vortex field sampler effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "Vortex FS Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="VortexFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("VortexFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Vortex FS Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "VortexFSAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void VortexFieldSamplerEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void VortexFieldSamplerEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void VortexFieldSamplerEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void VortexFieldSamplerEffect::initReferences(void) -{ - VortexFieldSampler = NULL; - -} - -void VortexFieldSamplerEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void VortexFieldSamplerEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void VortexFieldSamplerEffect::freeReferences(void) -{ - if (VortexFieldSampler) - { - VortexFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/WindFieldSamplerData.cpp b/APEX_1.4/module/particles/src/autogen/WindFieldSamplerData.cpp deleted file mode 100644 index 9d5308f7..00000000 --- a/APEX_1.4/module/particles/src/autogen/WindFieldSamplerData.cpp +++ /dev/null @@ -1,363 +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 "WindFieldSamplerData.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace WindFieldSamplerDataNS; - -const char* const WindFieldSamplerDataFactory::vptr = - NvParameterized::getVptr<WindFieldSamplerData, WindFieldSamplerData::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_STRING, false, (size_t)(&((ParametersStruct*)0)->Name), NULL, 0 }, // Name - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->WindFieldSampler), NULL, 0 }, // WindFieldSampler -}; - - -bool WindFieldSamplerData::mBuiltFlag = false; -NvParameterized::MutexType WindFieldSamplerData::mBuiltFlagMutex; - -WindFieldSamplerData::WindFieldSamplerData(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &WindFieldSamplerDataFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -WindFieldSamplerData::~WindFieldSamplerData() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void WindFieldSamplerData::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->~WindFieldSamplerData(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* WindFieldSamplerData::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* WindFieldSamplerData::getParameterDefinitionTree(void) const -{ - WindFieldSamplerData* tmpParam = const_cast<WindFieldSamplerData*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType WindFieldSamplerData::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 WindFieldSamplerData::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 WindFieldSamplerData::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<WindFieldSamplerData::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void WindFieldSamplerData::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 WindFieldSamplerData::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 this wind field sampler", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="Name" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("Name", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Wind FS Name", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="WindFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("WindFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("INCLUDED", uint64_t(1), true); - HintTable[1].init("shortDescription", "Wind FS properties", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "WindFSAssetParams" }; - ParamDefTable[2].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // 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 WindFieldSamplerData::initStrings(void) -{ - Name.isAllocated = false; - Name.buf = (const char*)"defaultWindFieldSampler"; -} - -void WindFieldSamplerData::initDynamicArrays(void) -{ -} - -void WindFieldSamplerData::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void WindFieldSamplerData::initReferences(void) -{ - WindFieldSampler = NULL; - -} - -void WindFieldSamplerData::freeDynamicArrays(void) -{ -} - -void WindFieldSamplerData::freeStrings(void) -{ - - if (Name.isAllocated && Name.buf) - { - mParameterizedTraits->strfree((char*)Name.buf); - } -} - -void WindFieldSamplerData::freeReferences(void) -{ - if (WindFieldSampler) - { - WindFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia diff --git a/APEX_1.4/module/particles/src/autogen/WindFieldSamplerEffect.cpp b/APEX_1.4/module/particles/src/autogen/WindFieldSamplerEffect.cpp deleted file mode 100644 index f431ff3b..00000000 --- a/APEX_1.4/module/particles/src/autogen/WindFieldSamplerEffect.cpp +++ /dev/null @@ -1,1362 +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 "WindFieldSamplerEffect.h" -#include <string.h> -#include <stdlib.h> - -using namespace NvParameterized; - -namespace nvidia -{ -namespace particles -{ - -using namespace WindFieldSamplerEffectNS; - -const char* const WindFieldSamplerEffectFactory::vptr = - NvParameterized::getVptr<WindFieldSamplerEffect, WindFieldSamplerEffect::ClassAlignment>(); - -const uint32_t NumParamDefs = 32; -static NvParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs]; - - -static const size_t ParamLookupChildrenTable[] = -{ - 1, 31, 2, 3, 4, 8, 12, 13, 14, 15, 16, 17, 5, 6, 7, 9, 10, 11, 18, 19, 20, 21, 23, - 27, 22, 24, 25, 26, 28, 29, 30, -}; - -#define TENUM(type) nvidia::##type -#define CHILDREN(index) &ParamLookupChildrenTable[index] -static const NvParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] = -{ - { TYPE_STRUCT, false, 0, CHILDREN(0), 2 }, - { TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->EffectProperties), CHILDREN(2), 10 }, // EffectProperties - { TYPE_STRING, false, (size_t)(&((EffectProperties_Type*)0)->UserString), NULL, 0 }, // EffectProperties.UserString - { TYPE_BOOL, false, (size_t)(&((EffectProperties_Type*)0)->Enable), NULL, 0 }, // EffectProperties.Enable - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Position), CHILDREN(12), 3 }, // EffectProperties.Position - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateX), NULL, 0 }, // EffectProperties.Position.TranslateX - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateY), NULL, 0 }, // EffectProperties.Position.TranslateY - { TYPE_F32, false, (size_t)(&((TranslateObject_Type*)0)->TranslateZ), NULL, 0 }, // EffectProperties.Position.TranslateZ - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Orientation), CHILDREN(15), 3 }, // EffectProperties.Orientation - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateX), NULL, 0 }, // EffectProperties.Orientation.RotateX - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateY), NULL, 0 }, // EffectProperties.Orientation.RotateY - { TYPE_F32, false, (size_t)(&((OrientObject_Type*)0)->RotateZ), NULL, 0 }, // EffectProperties.Orientation.RotateZ - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->InitialDelayTime), NULL, 0 }, // EffectProperties.InitialDelayTime - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->Duration), NULL, 0 }, // EffectProperties.Duration - { TYPE_U32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatCount), NULL, 0 }, // EffectProperties.RepeatCount - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RepeatDelay), NULL, 0 }, // EffectProperties.RepeatDelay - { TYPE_F32, false, (size_t)(&((EffectProperties_Type*)0)->RandomizeRepeatTime), NULL, 0 }, // EffectProperties.RandomizeRepeatTime - { TYPE_STRUCT, false, (size_t)(&((EffectProperties_Type*)0)->Path), CHILDREN(18), 6 }, // EffectProperties.Path - { TYPE_ENUM, false, (size_t)(&((EffectPath_Type*)0)->PlaybackMode), NULL, 0 }, // EffectProperties.Path.PlaybackMode - { TYPE_F32, false, (size_t)(&((EffectPath_Type*)0)->PathDuration), NULL, 0 }, // EffectProperties.Path.PathDuration - { TYPE_U32, false, (size_t)(&((EffectPath_Type*)0)->LoopIndex), NULL, 0 }, // EffectProperties.Path.LoopIndex - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->ControlPoints), CHILDREN(24), 1 }, // EffectProperties.Path.ControlPoints - { TYPE_TRANSFORM, false, 1 * sizeof(physx::PxTransform), NULL, 0 }, // EffectProperties.Path.ControlPoints[] - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Scale), CHILDREN(25), 1 }, // EffectProperties.Path.Scale - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(26), 2 }, // EffectProperties.Path.Scale[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Scale[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Scale[].y - { TYPE_ARRAY, true, (size_t)(&((EffectPath_Type*)0)->Speed), CHILDREN(28), 1 }, // EffectProperties.Path.Speed - { TYPE_STRUCT, false, 1 * sizeof(ControlPoint_Type), CHILDREN(29), 2 }, // EffectProperties.Path.Speed[] - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->x), NULL, 0 }, // EffectProperties.Path.Speed[].x - { TYPE_F32, false, (size_t)(&((ControlPoint_Type*)0)->y), NULL, 0 }, // EffectProperties.Path.Speed[].y - { TYPE_REF, false, (size_t)(&((ParametersStruct*)0)->WindFieldSampler), NULL, 0 }, // WindFieldSampler -}; - - -bool WindFieldSamplerEffect::mBuiltFlag = false; -NvParameterized::MutexType WindFieldSamplerEffect::mBuiltFlagMutex; - -WindFieldSamplerEffect::WindFieldSamplerEffect(NvParameterized::Traits* traits, void* buf, int32_t* refCount) : - NvParameters(traits, buf, refCount) -{ - //mParameterizedTraits->registerFactory(className(), &WindFieldSamplerEffectFactoryInst); - - if (!buf) //Do not init data if it is inplace-deserialized - { - initDynamicArrays(); - initStrings(); - initReferences(); - initDefaults(); - } -} - -WindFieldSamplerEffect::~WindFieldSamplerEffect() -{ - freeStrings(); - freeReferences(); - freeDynamicArrays(); -} - -void WindFieldSamplerEffect::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->~WindFieldSamplerEffect(); - - NvParameters::destroy(this, traits, doDeallocateSelf, refCount, buf); -} - -const NvParameterized::DefinitionImpl* WindFieldSamplerEffect::getParameterDefinitionTree(void) -{ - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -const NvParameterized::DefinitionImpl* WindFieldSamplerEffect::getParameterDefinitionTree(void) const -{ - WindFieldSamplerEffect* tmpParam = const_cast<WindFieldSamplerEffect*>(this); - - if (!mBuiltFlag) // Double-checked lock - { - NvParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex); - if (!mBuiltFlag) - { - tmpParam->buildTree(); - } - } - - return(&ParamDefTable[0]); -} - -NvParameterized::ErrorType WindFieldSamplerEffect::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 WindFieldSamplerEffect::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 WindFieldSamplerEffect::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const -{ - ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<WindFieldSamplerEffect::ParametersStruct*>(¶meters()), handle, offset); -} - - -/* Dynamic Handle Indices */ - -void WindFieldSamplerEffect::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 WindFieldSamplerEffect::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", "A wind field sampler effect", true); - ParamDefTable[0].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=1, longName="EffectProperties" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1]; - ParamDef->init("EffectProperties", TYPE_STRUCT, "EffectProperties", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("READONLY", 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("READONLY", uint64_t(0), true); - HintTable[1].init("shortDescription", "Wind FS Properties", true); - ParamDefTable[1].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=2, longName="EffectProperties.UserString" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2]; - ParamDef->init("UserString", TYPE_STRING, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An aribtrary user string that can be set by an artist/designer/programmer", true); - ParamDefTable[2].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=3, longName="EffectProperties.Enable" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3]; - ParamDef->init("Enable", TYPE_BOOL, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Whether or not this effect is to be initially enabled on startup", true); - ParamDefTable[3].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=4, longName="EffectProperties.Position" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4]; - ParamDef->init("Position", TYPE_STRUCT, "TranslateObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The position of this effect relative to the parent", true); - ParamDefTable[4].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=5, longName="EffectProperties.Position.TranslateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5]; - ParamDef->init("TranslateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[5].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[5].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=6, longName="EffectProperties.Position.TranslateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6]; - ParamDef->init("TranslateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[6].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[6].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=7, longName="EffectProperties.Position.TranslateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7]; - ParamDef->init("TranslateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - ParamDefTable[7].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(500.000000000), true); - HintTable[2].init("min", double(-500.000000000), true); - HintTable[3].init("shortDescription", "Nudge up to +/- one meter in each direction", true); - ParamDefTable[7].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=8, longName="EffectProperties.Orientation" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8]; - ParamDef->init("Orientation", TYPE_STRUCT, "OrientObject", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The orientation of this effect, relative to the parent orientation", true); - ParamDefTable[8].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=9, longName="EffectProperties.Orientation.RotateX" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9]; - ParamDef->init("RotateX", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[9].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the X axis (0-360 degrees)", true); - ParamDefTable[9].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=10, longName="EffectProperties.Orientation.RotateY" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10]; - ParamDef->init("RotateY", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[10].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Y axis (0-360 degrees)", true); - ParamDefTable[10].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=11, longName="EffectProperties.Orientation.RotateZ" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11]; - ParamDef->init("RotateZ", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - ParamDefTable[11].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("READONLY", uint64_t(0), true); - HintTable[1].init("max", double(360.000000000), true); - HintTable[2].init("min", double(0.000000000), true); - HintTable[3].init("shortDescription", "Rotate on the Z axis (0-360 degrees)", true); - ParamDefTable[11].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=12, longName="EffectProperties.InitialDelayTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12]; - ParamDef->init("InitialDelayTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "Initial time to delay before spawning this effect", true); - ParamDefTable[12].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=13, longName="EffectProperties.Duration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13]; - ParamDef->init("Duration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The duration of the effect in secontds", true); - ParamDefTable[13].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=14, longName="EffectProperties.RepeatCount" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14]; - ParamDef->init("RepeatCount", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(1), true); - ParamDefTable[14].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(1), true); - HintTable[1].init("shortDescription", "The number of times to repeat the effect; 9999 means repeate forever", true); - ParamDefTable[14].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=15, longName="EffectProperties.RepeatDelay" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15]; - ParamDef->init("RepeatDelay", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", double(0.000000000), true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#else - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("min", double(0.000000000), true); - HintTable[1].init("shortDescription", "The time to delay activation each time the effect repeats in seconds; this can be different than the initial delay time", true); - ParamDefTable[15].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=16, longName="EffectProperties.RandomizeRepeatTime" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16]; - ParamDef->init("RandomizeRepeatTime", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "Amount of randomization to the repeat cycle; a value of zero (default) means no random and a value of one means completely random.", true); - ParamDefTable[16].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=17, longName="EffectProperties.Path" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[17]; - ParamDef->init("Path", TYPE_STRUCT, "EffectPath", true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "An optional pre-defined path for this effect to travel on", true); - ParamDefTable[17].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=18, longName="EffectProperties.Path.PlaybackMode" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[18]; - ParamDef->init("PlaybackMode", TYPE_ENUM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "The mode to play back the path", true); - ParamDefTable[18].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - static const char* const EnumVals[] = { "LOOP", "PLAY_ONCE", "PING_PONG" }; - ParamDefTable[18].setEnumVals((const char**)EnumVals, 3); - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=19, longName="EffectProperties.Path.PathDuration" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[19]; - ParamDef->init("PathDuration", TYPE_F32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[2]; - static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1000.000000000), true); - HintTable[1].init("min", double(0.000010000), true); - HintTable[2].init("shortDescription", "The duration of the path if one is not otherwise provided", true); - ParamDefTable[19].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=20, longName="EffectProperties.Path.LoopIndex" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[20]; - ParamDef->init("LoopIndex", TYPE_U32, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("min", uint64_t(0), true); - ParamDefTable[20].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", "The array index to loop back to", true); - ParamDefTable[20].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[21]; - 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[21].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[21].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=22, longName="EffectProperties.Path.ControlPoints[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[22]; - ParamDef->init("ControlPoints", TYPE_TRANSFORM, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - ParamDefTable[22].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("editorCurve", uint64_t(1), true); - HintTable[2].init("pathEditor", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of control points to fit the curve to", true); - ParamDefTable[22].setHints((const NvParameterized::Hint**)HintPtrTable, 4); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[23]; - ParamDef->init("Scale", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[23].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[23].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[24]; - ParamDef->init("Scale", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Scale", true); - ParamDefTable[24].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of scale values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Scale", true); - ParamDefTable[24].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=25, longName="EffectProperties.Path.Scale[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[25]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[25].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=26, longName="EffectProperties.Path.Scale[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[26]; - 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", "The y-axis value for this vector", true); - ParamDefTable[26].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[27]; - ParamDef->init("Speed", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[27].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[27].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - ParamDef->setArraySize(-1); - } - - // Initialize DefinitionImpl node: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[28]; - ParamDef->init("Speed", TYPE_STRUCT, "ControlPoint", 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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("xAxisLabel", "Over Time", true); - HintTable[4].init("yAxisLabel", "Speed", true); - ParamDefTable[28].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("RIGHT_CLICK", "COPY_PATH PASTE_PATH CLEAR_PATH", true); - HintTable[1].init("UseSpline", uint64_t(1), true); - HintTable[2].init("editorCurve", uint64_t(1), true); - HintTable[3].init("shortDescription", "The array of speed values over time", true); - HintTable[4].init("xAxisLabel", "Over Time", true); - HintTable[5].init("yAxisLabel", "Speed", true); - ParamDefTable[28].setHints((const NvParameterized::Hint**)HintPtrTable, 6); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=29, longName="EffectProperties.Path.Speed[].x" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[29]; - 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", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 2); - -#else - - static HintImpl HintTable[3]; - static Hint* HintPtrTable[3] = { &HintTable[0], &HintTable[1], &HintTable[2], }; - HintTable[0].init("max", double(1.000000000), true); - HintTable[1].init("min", double(0.000000000), true); - HintTable[2].init("shortDescription", "The x-axis value for this vector", true); - ParamDefTable[29].setHints((const NvParameterized::Hint**)HintPtrTable, 3); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=30, longName="EffectProperties.Path.Speed[].y" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[30]; - 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", "The y-axis value for this vector", true); - ParamDefTable[30].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - - - - } - - // Initialize DefinitionImpl node: nodeIndex=31, longName="WindFieldSampler" - { - NvParameterized::DefinitionImpl* ParamDef = &ParamDefTable[31]; - ParamDef->init("WindFieldSampler", TYPE_REF, NULL, true); - -#ifdef NV_PARAMETERIZED_HIDE_DESCRIPTIONS - -#else - - static HintImpl HintTable[1]; - static Hint* HintPtrTable[1] = { &HintTable[0], }; - HintTable[0].init("shortDescription", "Wind FS Asset", true); - ParamDefTable[31].setHints((const NvParameterized::Hint**)HintPtrTable, 1); - -#endif /* NV_PARAMETERIZED_HIDE_DESCRIPTIONS */ - - - static const char* const RefVariantVals[] = { "WindFSAsset" }; - ParamDefTable[31].setRefVariantVals((const char**)RefVariantVals, 1); - - - - } - - // SetChildren for: nodeIndex=0, longName="" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(1); - Children[1] = PDEF_PTR(31); - - ParamDefTable[0].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=1, longName="EffectProperties" - { - static Definition* Children[10]; - Children[0] = PDEF_PTR(2); - Children[1] = PDEF_PTR(3); - Children[2] = PDEF_PTR(4); - Children[3] = PDEF_PTR(8); - Children[4] = PDEF_PTR(12); - Children[5] = PDEF_PTR(13); - Children[6] = PDEF_PTR(14); - Children[7] = PDEF_PTR(15); - Children[8] = PDEF_PTR(16); - Children[9] = PDEF_PTR(17); - - ParamDefTable[1].setChildren(Children, 10); - } - - // SetChildren for: nodeIndex=4, longName="EffectProperties.Position" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(5); - Children[1] = PDEF_PTR(6); - Children[2] = PDEF_PTR(7); - - ParamDefTable[4].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=8, longName="EffectProperties.Orientation" - { - static Definition* Children[3]; - Children[0] = PDEF_PTR(9); - Children[1] = PDEF_PTR(10); - Children[2] = PDEF_PTR(11); - - ParamDefTable[8].setChildren(Children, 3); - } - - // SetChildren for: nodeIndex=17, longName="EffectProperties.Path" - { - static Definition* Children[6]; - Children[0] = PDEF_PTR(18); - Children[1] = PDEF_PTR(19); - Children[2] = PDEF_PTR(20); - Children[3] = PDEF_PTR(21); - Children[4] = PDEF_PTR(23); - Children[5] = PDEF_PTR(27); - - ParamDefTable[17].setChildren(Children, 6); - } - - // SetChildren for: nodeIndex=21, longName="EffectProperties.Path.ControlPoints" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(22); - - ParamDefTable[21].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=23, longName="EffectProperties.Path.Scale" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(24); - - ParamDefTable[23].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=24, longName="EffectProperties.Path.Scale[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(25); - Children[1] = PDEF_PTR(26); - - ParamDefTable[24].setChildren(Children, 2); - } - - // SetChildren for: nodeIndex=27, longName="EffectProperties.Path.Speed" - { - static Definition* Children[1]; - Children[0] = PDEF_PTR(28); - - ParamDefTable[27].setChildren(Children, 1); - } - - // SetChildren for: nodeIndex=28, longName="EffectProperties.Path.Speed[]" - { - static Definition* Children[2]; - Children[0] = PDEF_PTR(29); - Children[1] = PDEF_PTR(30); - - ParamDefTable[28].setChildren(Children, 2); - } - - mBuiltFlag = true; - -} -void WindFieldSamplerEffect::initStrings(void) -{ - EffectProperties.UserString.isAllocated = true; - EffectProperties.UserString.buf = NULL; -} - -void WindFieldSamplerEffect::initDynamicArrays(void) -{ - EffectProperties.Path.ControlPoints.buf = NULL; - EffectProperties.Path.ControlPoints.isAllocated = true; - EffectProperties.Path.ControlPoints.elementSize = sizeof(physx::PxTransform); - EffectProperties.Path.ControlPoints.arraySizes[0] = 0; - EffectProperties.Path.Scale.buf = NULL; - EffectProperties.Path.Scale.isAllocated = true; - EffectProperties.Path.Scale.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Scale.arraySizes[0] = 0; - EffectProperties.Path.Speed.buf = NULL; - EffectProperties.Path.Speed.isAllocated = true; - EffectProperties.Path.Speed.elementSize = sizeof(ControlPoint_Type); - EffectProperties.Path.Speed.arraySizes[0] = 0; -} - -void WindFieldSamplerEffect::initDefaults(void) -{ - - freeStrings(); - freeReferences(); - freeDynamicArrays(); - EffectProperties.Enable = bool(1); - EffectProperties.Position.TranslateX = float(0.000000000); - EffectProperties.Position.TranslateY = float(0.000000000); - EffectProperties.Position.TranslateZ = float(0.000000000); - EffectProperties.Orientation.RotateX = float(0.000000000); - EffectProperties.Orientation.RotateY = float(0.000000000); - EffectProperties.Orientation.RotateZ = float(0.000000000); - EffectProperties.InitialDelayTime = float(0.000000000); - EffectProperties.Duration = float(0.000000000); - EffectProperties.RepeatCount = uint32_t(1); - EffectProperties.RepeatDelay = float(0.000000000); - EffectProperties.RandomizeRepeatTime = float(0.000000000); - EffectProperties.Path.PlaybackMode = (const char*)"LOOP"; - EffectProperties.Path.PathDuration = float(4.000000000); - EffectProperties.Path.LoopIndex = uint32_t(0); - - initDynamicArrays(); - initStrings(); - initReferences(); -} - -void WindFieldSamplerEffect::initReferences(void) -{ - WindFieldSampler = NULL; - -} - -void WindFieldSamplerEffect::freeDynamicArrays(void) -{ - if (EffectProperties.Path.ControlPoints.isAllocated && EffectProperties.Path.ControlPoints.buf) - { - mParameterizedTraits->free(EffectProperties.Path.ControlPoints.buf); - } - if (EffectProperties.Path.Scale.isAllocated && EffectProperties.Path.Scale.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Scale.buf); - } - if (EffectProperties.Path.Speed.isAllocated && EffectProperties.Path.Speed.buf) - { - mParameterizedTraits->free(EffectProperties.Path.Speed.buf); - } -} - -void WindFieldSamplerEffect::freeStrings(void) -{ - - if (EffectProperties.UserString.isAllocated && EffectProperties.UserString.buf) - { - mParameterizedTraits->strfree((char*)EffectProperties.UserString.buf); - } -} - -void WindFieldSamplerEffect::freeReferences(void) -{ - if (WindFieldSampler) - { - WindFieldSampler->destroy(); - } - -} - -} // namespace particles -} // namespace nvidia |