diff options
| author | git perforce import user <a@b> | 2016-10-25 12:29:14 -0600 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees> | 2016-10-25 18:56:37 -0500 |
| commit | 3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch) | |
| tree | fa6485c169e50d7415a651bf838f5bcd0fd3bfbd /APEX_1.4/module/clothing/include/autogen | |
| download | physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip | |
Initial commit:
PhysX 3.4.0 Update @ 21294896
APEX 1.4.0 Update @ 21275617
[CL 21300167]
Diffstat (limited to 'APEX_1.4/module/clothing/include/autogen')
11 files changed, 3211 insertions, 0 deletions
diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingActorParam.h b/APEX_1.4/module/clothing/include/autogen/ClothingActorParam.h new file mode 100644 index 00000000..db7ba860 --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingActorParam.h @@ -0,0 +1,351 @@ +// 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_ClothingActorParam_h +#define HEADER_ClothingActorParam_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingActorParamNS +{ + +struct GroupsMask_Type; +struct ClothDescTemplate_Type; +struct ShapeDescFlags_Type; +struct ShapeDescTemplate_Type; +struct ActorDescTemplate_Type; +struct WindParameters_Type; +struct MaxDistanceScale_Type; +struct ClothingActorFlags_Type; + +struct MAT44_DynamicArray1D_Type +{ + physx::PxMat44* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct VEC3_DynamicArray1D_Type +{ + physx::PxVec3* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct STRING_DynamicArray1D_Type +{ + NvParameterized::DummyStringStruct* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct ActorDescTemplate_Type +{ + uint64_t userData; + uint64_t name; +}; +struct GroupsMask_Type +{ + uint32_t bits0; + uint32_t bits1; + uint32_t bits2; + uint32_t bits3; +}; +struct ClothDescTemplate_Type +{ + float collisionResponseCoefficient; + uint16_t collisionGroup; + GroupsMask_Type groupsMask; + physx::PxBounds3 validBounds; + uint64_t compartment; + uint64_t userData; +}; +struct MaxDistanceScale_Type +{ + float Scale; + bool Multipliable; +}; +struct ClothingActorFlags_Type +{ + bool ParallelCpuSkinning; + bool RecomputeNormals; + bool RecomputeTangents; + bool Visualize; + bool CorrectSimulationNormals; + bool ComputeRenderData; + bool ComputePhysicsMeshNormals; +}; +struct ShapeDescFlags_Type +{ + bool NX_SF_VISUALIZATION; + bool NX_SF_DISABLE_COLLISION; + bool NX_SF_DISABLE_RAYCASTING; + bool NX_SF_DYNAMIC_DYNAMIC_CCD; + bool NX_SF_DISABLE_SCENE_QUERIES; +}; +struct ShapeDescTemplate_Type +{ + ShapeDescFlags_Type flags; + uint16_t collisionGroup; + GroupsMask_Type groupsMask; + uint16_t materialIndex; + uint64_t userData; + uint64_t name; +}; +struct WindParameters_Type +{ + physx::PxVec3 Velocity; + float Adaption; +}; + +struct ParametersStruct +{ + + physx::PxMat44 globalPose; + bool useHardwareCloth; + ClothingActorFlags_Type flags; + bool fallbackSkinning; + bool slowStart; + bool useInternalBoneOrder; + bool updateStateWithGlobalMatrices; + uint32_t uvChannelForTangentUpdate; + float maxDistanceBlendTime; + uint32_t clothingMaterialIndex; + WindParameters_Type windParams; + MaxDistanceScale_Type maxDistanceScale; + uint64_t userData; + MAT44_DynamicArray1D_Type boneMatrices; + ClothDescTemplate_Type clothDescTemplate; + ShapeDescTemplate_Type shapeDescTemplate; + ActorDescTemplate_Type actorDescTemplate; + float actorScale; + NvParameterized::Interface* runtimeCooked; + VEC3_DynamicArray1D_Type morphDisplacements; + VEC3_DynamicArray1D_Type morphPhysicalMeshNewPositions; + VEC3_DynamicArray1D_Type morphGraphicalMeshNewPositions; + bool allowAdaptiveTargetFrequency; + bool useVelocityClamping; + physx::PxBounds3 vertexVelocityClamp; + float pressure; + bool multiplyGlobalPoseIntoBones; + STRING_DynamicArray1D_Type overrideMaterialNames; + const char* simulationBackend; + bool freezeByLOD; + bool localSpaceSim; + int32_t teleportMode; + +}; + +static const uint32_t checksum[] = { 0xf1063127, 0xe3a4d0e2, 0x61f25577, 0x4e838af4, }; + +} // namespace ClothingActorParamNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingActorParam : public NvParameterized::NvParameters, public ClothingActorParamNS::ParametersStruct +{ +public: + ClothingActorParam(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingActorParam(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingActorParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)18; + + 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(ClothingActorParamNS::checksum); + return ClothingActorParamNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingActorParamNS::ParametersStruct& parameters(void) const + { + ClothingActorParam* tmpThis = const_cast<ClothingActorParam*>(this); + return *(static_cast<ClothingActorParamNS::ParametersStruct*>(tmpThis)); + } + + ClothingActorParamNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingActorParamNS::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 ClothingActorParamFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingActorParam::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingActorParam), ClothingActorParam::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingActorParam::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingActorParam"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingActorParam)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingActorParam)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingActorParam::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingActorParam::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingActorParam"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingActorParam 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 (ClothingActorParam*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingActorParam::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingActorParam::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingActorParam::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingActorParam::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingAssetParameters.h b/APEX_1.4/module/clothing/include/autogen/ClothingAssetParameters.h new file mode 100644 index 00000000..5a56d6ec --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingAssetParameters.h @@ -0,0 +1,374 @@ +// 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_ClothingAssetParameters_h +#define HEADER_ClothingAssetParameters_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingAssetParametersNS +{ + +struct BoneEntry_Type; +struct ActorEntry_Type; +struct BoneSphere_Type; +struct BonePlane_Type; +struct CookedEntry_Type; +struct SimulationParams_Type; + +struct REF_DynamicArray1D_Type +{ + NvParameterized::Interface** buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct BoneEntry_DynamicArray1D_Type +{ + BoneEntry_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct ActorEntry_DynamicArray1D_Type +{ + ActorEntry_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct VEC3_DynamicArray1D_Type +{ + physx::PxVec3* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct BoneSphere_DynamicArray1D_Type +{ + BoneSphere_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct U16_DynamicArray1D_Type +{ + uint16_t* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct BonePlane_DynamicArray1D_Type +{ + BonePlane_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct U32_DynamicArray1D_Type +{ + uint32_t* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct CookedEntry_DynamicArray1D_Type +{ + CookedEntry_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct BonePlane_Type +{ + int32_t boneIndex; + physx::PxVec3 n; + float d; +}; +struct BoneSphere_Type +{ + int32_t boneIndex; + float radius; + physx::PxVec3 localPos; +}; +struct SimulationParams_Type +{ + uint32_t hierarchicalLevels; + float thickness; + float virtualParticleDensity; + physx::PxVec3 gravityDirection; + float sleepLinearVelocity; + bool disableCCD; + bool untangling; + bool twowayInteraction; + float restLengthScale; +}; +struct CookedEntry_Type +{ + float scale; + NvParameterized::Interface* cookedData; +}; +struct BoneEntry_Type +{ + int32_t internalIndex; + int32_t externalIndex; + uint32_t numMeshReferenced; + uint32_t numRigidBodiesReferenced; + int32_t parentIndex; + physx::PxMat44 bindPose; + NvParameterized::DummyStringStruct name; +}; +struct ActorEntry_Type +{ + int32_t boneIndex; + uint32_t convexVerticesStart; + uint32_t convexVerticesCount; + float capsuleRadius; + float capsuleHeight; + physx::PxMat44 localPose; +}; + +struct ParametersStruct +{ + + REF_DynamicArray1D_Type physicalMeshes; + REF_DynamicArray1D_Type graphicalLods; + SimulationParams_Type simulation; + BoneEntry_DynamicArray1D_Type bones; + uint32_t bonesReferenced; + uint32_t bonesReferencedByMesh; + uint32_t rootBoneIndex; + ActorEntry_DynamicArray1D_Type boneActors; + VEC3_DynamicArray1D_Type boneVertices; + BoneSphere_DynamicArray1D_Type boneSpheres; + U16_DynamicArray1D_Type boneSphereConnections; + BonePlane_DynamicArray1D_Type bonePlanes; + U32_DynamicArray1D_Type collisionConvexes; + CookedEntry_DynamicArray1D_Type cookedData; + physx::PxBounds3 boundingBox; + NvParameterized::Interface* materialLibrary; + uint32_t materialIndex; + uint32_t interCollisionChannels; + NvParameterized::DummyStringStruct toolString; + +}; + +static const uint32_t checksum[] = { 0x1095fcd4, 0x7327d8f7, 0xefaa63f8, 0x5bda9add, }; + +} // namespace ClothingAssetParametersNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingAssetParameters : public NvParameterized::NvParameters, public ClothingAssetParametersNS::ParametersStruct +{ +public: + ClothingAssetParameters(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingAssetParameters(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingAssetParameters"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)14; + + 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(ClothingAssetParametersNS::checksum); + return ClothingAssetParametersNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingAssetParametersNS::ParametersStruct& parameters(void) const + { + ClothingAssetParameters* tmpThis = const_cast<ClothingAssetParameters*>(this); + return *(static_cast<ClothingAssetParametersNS::ParametersStruct*>(tmpThis)); + } + + ClothingAssetParametersNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingAssetParametersNS::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 ClothingAssetParametersFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingAssetParameters::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingAssetParameters), ClothingAssetParameters::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingAssetParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingAssetParameters"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingAssetParameters)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingAssetParameters)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingAssetParameters::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingAssetParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingAssetParameters"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingAssetParameters 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 (ClothingAssetParameters*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingAssetParameters::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingAssetParameters::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingAssetParameters::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingAssetParameters::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingCookedParam.h b/APEX_1.4/module/clothing/include/autogen/ClothingCookedParam.h new file mode 100644 index 00000000..c4306292 --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingCookedParam.h @@ -0,0 +1,297 @@ +// 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_ClothingCookedParam_h +#define HEADER_ClothingCookedParam_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingCookedParamNS +{ + +struct CookedPhysicalMesh_Type; + +struct U8_DynamicArray1D_Type +{ + uint8_t* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct POINTER_DynamicArray1D_Type +{ + void** buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct CookedPhysicalMesh_DynamicArray1D_Type +{ + CookedPhysicalMesh_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct F32_DynamicArray1D_Type +{ + float* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct U32_DynamicArray1D_Type +{ + uint32_t* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct VEC3_DynamicArray1D_Type +{ + physx::PxVec3* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct CookedPhysicalMesh_Type +{ + uint32_t physicalMeshId; + uint32_t cookedDataOffset; + uint32_t cookedDataLength; + void* deformableMeshPointer; + uint32_t deformableInvParticleWeightsOffset; + uint32_t virtualParticleIndicesOffset; + uint32_t virtualParticleIndicesLength; +}; + +struct ParametersStruct +{ + + float actorScale; + U8_DynamicArray1D_Type convexCookedData; + POINTER_DynamicArray1D_Type convexMeshPointers; + CookedPhysicalMesh_DynamicArray1D_Type cookedPhysicalMeshes; + U8_DynamicArray1D_Type deformableCookedData; + uint32_t cookedDataVersion; + F32_DynamicArray1D_Type deformableInvParticleWeights; + U32_DynamicArray1D_Type virtualParticleIndices; + VEC3_DynamicArray1D_Type virtualParticleWeights; + +}; + +static const uint32_t checksum[] = { 0x140bacb3, 0x5ea948eb, 0x14dd612e, 0x6ad11b93, }; + +} // namespace ClothingCookedParamNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingCookedParam : public NvParameterized::NvParameters, public ClothingCookedParamNS::ParametersStruct +{ +public: + ClothingCookedParam(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingCookedParam(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingCookedParam"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)3; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(ClothingCookedParamNS::checksum); + return ClothingCookedParamNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingCookedParamNS::ParametersStruct& parameters(void) const + { + ClothingCookedParam* tmpThis = const_cast<ClothingCookedParam*>(this); + return *(static_cast<ClothingCookedParamNS::ParametersStruct*>(tmpThis)); + } + + ClothingCookedParamNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingCookedParamNS::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 ClothingCookedParamFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingCookedParam::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingCookedParam), ClothingCookedParam::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingCookedParam::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingCookedParam"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingCookedParam)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingCookedParam)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingCookedParam::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingCookedParam::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingCookedParam"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingCookedParam 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 (ClothingCookedParam*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingCookedParam::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingCookedParam::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingCookedParam::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingCookedParam::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingCookedPhysX3Param.h b/APEX_1.4/module/clothing/include/autogen/ClothingCookedPhysX3Param.h new file mode 100644 index 00000000..51dd9241 --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingCookedPhysX3Param.h @@ -0,0 +1,310 @@ +// 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_ClothingCookedPhysX3Param_h +#define HEADER_ClothingCookedPhysX3Param_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingCookedPhysX3ParamNS +{ + +struct PhaseDesc_Type; +struct SetDesc_Type; +struct FabricGPU_Type; + +struct F32_DynamicArray1D_Type +{ + float* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct U32_DynamicArray1D_Type +{ + uint32_t* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct SetDesc_DynamicArray1D_Type +{ + SetDesc_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct PhaseDesc_DynamicArray1D_Type +{ + PhaseDesc_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct FabricGPU_DynamicArray1D_Type +{ + FabricGPU_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct SetDesc_Type +{ + uint32_t fiberEnd; + uint32_t longestFiber; + uint32_t shortestFiber; + uint32_t numEdges; + float avgEdgeLength; + uint32_t avgFiberLength; +}; +struct PhaseDesc_Type +{ + uint32_t phaseType; + uint32_t setIndex; + uint32_t restValueOffset; +}; +struct FabricGPU_Type +{ + void* fabricGPU; + void* factory; +}; + +struct ParametersStruct +{ + + uint32_t physicalMeshId; + uint32_t numVertices; + F32_DynamicArray1D_Type deformableRestLengths; + U32_DynamicArray1D_Type deformableIndices; + U32_DynamicArray1D_Type selfCollisionIndices; + U32_DynamicArray1D_Type selfCollisionNormalIndices; + U32_DynamicArray1D_Type selfCollisionNormalSetSizes; + SetDesc_DynamicArray1D_Type deformableSets; + PhaseDesc_DynamicArray1D_Type deformablePhaseDescs; + U32_DynamicArray1D_Type tetherAnchors; + F32_DynamicArray1D_Type tetherLengths; + F32_DynamicArray1D_Type deformableInvVertexWeights; + U32_DynamicArray1D_Type virtualParticleIndices; + F32_DynamicArray1D_Type virtualParticleWeights; + uint32_t cookedDataVersion; + void* fabricCPU; + FabricGPU_DynamicArray1D_Type fabricGPU; + NvParameterized::Interface* nextCookedData; + +}; + +static const uint32_t checksum[] = { 0x05292657, 0xc602622e, 0xa6989638, 0xf1f9e34f, }; + +} // namespace ClothingCookedPhysX3ParamNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingCookedPhysX3Param : public NvParameterized::NvParameters, public ClothingCookedPhysX3ParamNS::ParametersStruct +{ +public: + ClothingCookedPhysX3Param(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingCookedPhysX3Param(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingCookedPhysX3Param"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)5; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(ClothingCookedPhysX3ParamNS::checksum); + return ClothingCookedPhysX3ParamNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingCookedPhysX3ParamNS::ParametersStruct& parameters(void) const + { + ClothingCookedPhysX3Param* tmpThis = const_cast<ClothingCookedPhysX3Param*>(this); + return *(static_cast<ClothingCookedPhysX3ParamNS::ParametersStruct*>(tmpThis)); + } + + ClothingCookedPhysX3ParamNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingCookedPhysX3ParamNS::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 ClothingCookedPhysX3ParamFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingCookedPhysX3Param::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingCookedPhysX3Param), ClothingCookedPhysX3Param::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingCookedPhysX3Param::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingCookedPhysX3Param"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingCookedPhysX3Param)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingCookedPhysX3Param)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingCookedPhysX3Param::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingCookedPhysX3Param::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingCookedPhysX3Param"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingCookedPhysX3Param 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 (ClothingCookedPhysX3Param*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingCookedPhysX3Param::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingCookedPhysX3Param::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingCookedPhysX3Param::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingCookedPhysX3Param::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingDebugRenderParams.h b/APEX_1.4/module/clothing/include/autogen/ClothingDebugRenderParams.h new file mode 100644 index 00000000..92a84a0e --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingDebugRenderParams.h @@ -0,0 +1,270 @@ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2015 NVIDIA Corporation. All rights reserved. + +// This file was generated by NvParameterized/scripts/GenParameterized.pl + + +#ifndef HEADER_ClothingDebugRenderParams_h +#define HEADER_ClothingDebugRenderParams_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingDebugRenderParamsNS +{ + + + +struct ParametersStruct +{ + + bool Actors; + float SkinnedPositions; + bool Backstop; + float BackstopPrecise; + bool MaxDistance; + bool MaxDistanceInwards; + bool SkinMapAll; + bool SkinMapBad; + bool SkinMapActual; + bool SkinMapInvalidBary; + float PhysicsMeshWire; + float PhysicsMeshSolid; + float PhysicsMeshNormals; + bool Skeleton; + float BoneFrames; + float BoneNames; + float Velocities; + float Wind; + bool GraphicalVertexBones; + bool PhysicalVertexBones; + bool CollisionShapes; + bool CollisionShapesWire; + bool LengthFibers; + bool CrossSectionFibers; + bool BendingFibers; + bool ShearingFibers; + bool ZerostretchFibers; + bool TethersActive; + bool TethersInactive; + bool VirtualCollision; + bool FiberRange; + bool ShowInLocalSpace; + bool GlobalPose; + bool RecomputeSubmeshes; + bool RecomputeVertices; + bool PhysicsMeshIndices; + bool MassScale; + bool SelfCollision; + bool SelfCollisionWire; + float SelfCollisionAttenuation; + bool SolverMode; + +}; + +static const uint32_t checksum[] = { 0x0814367c, 0x9b811470, 0x122fd821, 0xd5717b8e, }; + +} // namespace ClothingDebugRenderParamsNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingDebugRenderParams : public NvParameterized::NvParameters, public ClothingDebugRenderParamsNS::ParametersStruct +{ +public: + ClothingDebugRenderParams(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingDebugRenderParams(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingDebugRenderParams"); + } + + 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(ClothingDebugRenderParamsNS::checksum); + return ClothingDebugRenderParamsNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingDebugRenderParamsNS::ParametersStruct& parameters(void) const + { + ClothingDebugRenderParams* tmpThis = const_cast<ClothingDebugRenderParams*>(this); + return *(static_cast<ClothingDebugRenderParamsNS::ParametersStruct*>(tmpThis)); + } + + ClothingDebugRenderParamsNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingDebugRenderParamsNS::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 ClothingDebugRenderParamsFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingDebugRenderParams::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingDebugRenderParams), ClothingDebugRenderParams::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingDebugRenderParams::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingDebugRenderParams"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingDebugRenderParams)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingDebugRenderParams)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingDebugRenderParams::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingDebugRenderParams::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingDebugRenderParams"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingDebugRenderParams 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 (ClothingDebugRenderParams*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingDebugRenderParams::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingDebugRenderParams::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingDebugRenderParams::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingDebugRenderParams::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingGraphicalLodParameters.h b/APEX_1.4/module/clothing/include/autogen/ClothingGraphicalLodParameters.h new file mode 100644 index 00000000..596b8871 --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingGraphicalLodParameters.h @@ -0,0 +1,335 @@ +// 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_ClothingGraphicalLodParameters_h +#define HEADER_ClothingGraphicalLodParameters_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingGraphicalLodParametersNS +{ + +struct SkinClothMapB_Type; +struct SkinClothMapC_Type; +struct SkinClothMapD_Type; +struct TetraLink_Type; +struct PhysicsMeshPartitioning_Type; + +struct STRING_DynamicArray1D_Type +{ + NvParameterized::DummyStringStruct* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct U32_DynamicArray1D_Type +{ + uint32_t* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct SkinClothMapB_DynamicArray1D_Type +{ + SkinClothMapB_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct SkinClothMapD_DynamicArray1D_Type +{ + SkinClothMapD_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct TetraLink_DynamicArray1D_Type +{ + TetraLink_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct PhysicsMeshPartitioning_DynamicArray1D_Type +{ + PhysicsMeshPartitioning_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct SkinClothMapC_Type +{ + physx::PxVec3 vertexBary; + uint32_t faceIndex0; + physx::PxVec3 normalBary; + uint32_t vertexIndexPlusOffset; +}; +struct PhysicsMeshPartitioning_Type +{ + uint32_t graphicalSubmesh; + uint32_t numSimulatedVertices; + uint32_t numSimulatedVerticesAdditional; + uint32_t numSimulatedIndices; +}; +struct SkinClothMapD_Type +{ + physx::PxVec3 vertexBary; + uint32_t vertexIndex0; + physx::PxVec3 normalBary; + uint32_t vertexIndex1; + physx::PxVec3 tangentBary; + uint32_t vertexIndex2; + uint32_t vertexIndexPlusOffset; +}; +struct SkinClothMapB_Type +{ + physx::PxVec3 vtxTetraBary; + uint32_t vertexIndexPlusOffset; + physx::PxVec3 nrmTetraBary; + uint32_t faceIndex0; + uint32_t tetraIndex; + uint32_t submeshIndex; +}; +struct TetraLink_Type +{ + physx::PxVec3 vertexBary; + uint32_t tetraIndex0; + physx::PxVec3 normalBary; + uint32_t _dummyForAlignment; +}; + +struct ParametersStruct +{ + + STRING_DynamicArray1D_Type platforms; + uint32_t lod; + uint32_t physicalMeshId; + NvParameterized::Interface* renderMeshAsset; + void* renderMeshAssetPointer; + U32_DynamicArray1D_Type immediateClothMap; + SkinClothMapB_DynamicArray1D_Type skinClothMapB; + SkinClothMapD_DynamicArray1D_Type skinClothMap; + float skinClothMapThickness; + float skinClothMapOffset; + TetraLink_DynamicArray1D_Type tetraMap; + uint32_t renderMeshAssetSorting; + PhysicsMeshPartitioning_DynamicArray1D_Type physicsMeshPartitioning; + +}; + +static const uint32_t checksum[] = { 0xb82a1fab, 0xfd43a015, 0x35b1be8a, 0x80ebc50f, }; + +} // namespace ClothingGraphicalLodParametersNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingGraphicalLodParameters : public NvParameterized::NvParameters, public ClothingGraphicalLodParametersNS::ParametersStruct +{ +public: + ClothingGraphicalLodParameters(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingGraphicalLodParameters(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingGraphicalLodParameters"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)5; + + static uint32_t staticVersion(void) + { + return ClassVersion; + } + + uint32_t version(void) const + { + return(staticVersion()); + } + + static const uint32_t ClassAlignment = 8; + + static const uint32_t* staticChecksum(uint32_t& bits) + { + bits = 8 * sizeof(ClothingGraphicalLodParametersNS::checksum); + return ClothingGraphicalLodParametersNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingGraphicalLodParametersNS::ParametersStruct& parameters(void) const + { + ClothingGraphicalLodParameters* tmpThis = const_cast<ClothingGraphicalLodParameters*>(this); + return *(static_cast<ClothingGraphicalLodParametersNS::ParametersStruct*>(tmpThis)); + } + + ClothingGraphicalLodParametersNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingGraphicalLodParametersNS::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 ClothingGraphicalLodParametersFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingGraphicalLodParameters::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingGraphicalLodParameters), ClothingGraphicalLodParameters::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingGraphicalLodParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingGraphicalLodParameters"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingGraphicalLodParameters)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingGraphicalLodParameters)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingGraphicalLodParameters::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingGraphicalLodParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingGraphicalLodParameters"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingGraphicalLodParameters 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 (ClothingGraphicalLodParameters*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingGraphicalLodParameters::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingGraphicalLodParameters::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingGraphicalLodParameters::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingGraphicalLodParameters::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingMaterialLibraryParameters.h b/APEX_1.4/module/clothing/include/autogen/ClothingMaterialLibraryParameters.h new file mode 100644 index 00000000..0edd6155 --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingMaterialLibraryParameters.h @@ -0,0 +1,277 @@ +// 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_ClothingMaterialLibraryParameters_h +#define HEADER_ClothingMaterialLibraryParameters_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingMaterialLibraryParametersNS +{ + +struct StiffnessScaling_Type; +struct ClothingMaterial_Type; + +struct ClothingMaterial_DynamicArray1D_Type +{ + ClothingMaterial_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct StiffnessScaling_Type +{ + float compressionRange; + float stretchRange; + float scale; +}; +struct ClothingMaterial_Type +{ + NvParameterized::DummyStringStruct materialName; + float verticalStretchingStiffness; + float horizontalStretchingStiffness; + float bendingStiffness; + float shearingStiffness; + float tetherStiffness; + float tetherLimit; + bool orthoBending; + StiffnessScaling_Type verticalStiffnessScaling; + StiffnessScaling_Type horizontalStiffnessScaling; + StiffnessScaling_Type bendingStiffnessScaling; + StiffnessScaling_Type shearingStiffnessScaling; + float damping; + float stiffnessFrequency; + float drag; + bool comDamping; + float friction; + float massScale; + uint32_t solverIterations; + float solverFrequency; + float gravityScale; + float inertiaScale; + float hardStretchLimitation; + float maxDistanceBias; + uint32_t hierarchicalSolverIterations; + float selfcollisionThickness; + float selfcollisionSquashScale; + float selfcollisionStiffness; +}; + +struct ParametersStruct +{ + + ClothingMaterial_DynamicArray1D_Type materials; + +}; + +static const uint32_t checksum[] = { 0xf827ceb7, 0xd03d140a, 0x0c8ae038, 0x16333673, }; + +} // namespace ClothingMaterialLibraryParametersNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingMaterialLibraryParameters : public NvParameterized::NvParameters, public ClothingMaterialLibraryParametersNS::ParametersStruct +{ +public: + ClothingMaterialLibraryParameters(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingMaterialLibraryParameters(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingMaterialLibraryParameters"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)14; + + 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(ClothingMaterialLibraryParametersNS::checksum); + return ClothingMaterialLibraryParametersNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingMaterialLibraryParametersNS::ParametersStruct& parameters(void) const + { + ClothingMaterialLibraryParameters* tmpThis = const_cast<ClothingMaterialLibraryParameters*>(this); + return *(static_cast<ClothingMaterialLibraryParametersNS::ParametersStruct*>(tmpThis)); + } + + ClothingMaterialLibraryParametersNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingMaterialLibraryParametersNS::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 ClothingMaterialLibraryParametersFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingMaterialLibraryParameters::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingMaterialLibraryParameters), ClothingMaterialLibraryParameters::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingMaterialLibraryParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingMaterialLibraryParameters"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingMaterialLibraryParameters)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingMaterialLibraryParameters)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingMaterialLibraryParameters::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingMaterialLibraryParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingMaterialLibraryParameters"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingMaterialLibraryParameters 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 (ClothingMaterialLibraryParameters*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingMaterialLibraryParameters::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingMaterialLibraryParameters::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingMaterialLibraryParameters::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingMaterialLibraryParameters::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingModuleParameters.h b/APEX_1.4/module/clothing/include/autogen/ClothingModuleParameters.h new file mode 100644 index 00000000..9f8142ed --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingModuleParameters.h @@ -0,0 +1,240 @@ +// 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_ClothingModuleParameters_h +#define HEADER_ClothingModuleParameters_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingModuleParametersNS +{ + + + +struct ParametersStruct +{ + + uint32_t maxNumCompartments; + uint32_t maxUnusedPhysXResources; + bool allowAsyncCooking; + bool asyncFetchResults; + uint32_t avgSimFrequencyWindow; + bool allowApexWorkBetweenSubsteps; + float interCollisionDistance; + float interCollisionStiffness; + uint32_t interCollisionIterations; + bool sparseSelfCollision; + uint32_t maxTimeRenderProxyInPool; + +}; + +static const uint32_t checksum[] = { 0x15043a9d, 0x77224355, 0x4c92d234, 0x3bbce77c, }; + +} // namespace ClothingModuleParametersNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingModuleParameters : public NvParameterized::NvParameters, public ClothingModuleParametersNS::ParametersStruct +{ +public: + ClothingModuleParameters(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingModuleParameters(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingModuleParameters"); + } + + 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(ClothingModuleParametersNS::checksum); + return ClothingModuleParametersNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingModuleParametersNS::ParametersStruct& parameters(void) const + { + ClothingModuleParameters* tmpThis = const_cast<ClothingModuleParameters*>(this); + return *(static_cast<ClothingModuleParametersNS::ParametersStruct*>(tmpThis)); + } + + ClothingModuleParametersNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingModuleParametersNS::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 ClothingModuleParametersFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingModuleParameters::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingModuleParameters), ClothingModuleParameters::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingModuleParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingModuleParameters"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingModuleParameters)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingModuleParameters)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingModuleParameters::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingModuleParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingModuleParameters"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingModuleParameters 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 (ClothingModuleParameters*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingModuleParameters::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingModuleParameters::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingModuleParameters::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingModuleParameters::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingPhysicalMeshParameters.h b/APEX_1.4/module/clothing/include/autogen/ClothingPhysicalMeshParameters.h new file mode 100644 index 00000000..0b282933 --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingPhysicalMeshParameters.h @@ -0,0 +1,373 @@ +// 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_ClothingPhysicalMeshParameters_h +#define HEADER_ClothingPhysicalMeshParameters_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingPhysicalMeshParametersNS +{ + +struct SkinClothMapB_Type; +struct SkinClothMapC_Type; +struct SkinClothMapD_Type; +struct TetraLink_Type; +struct ConstrainCoefficient_Type; +struct PhysicalMesh_Type; + +struct VEC3_DynamicArray1D_Type +{ + physx::PxVec3* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct ConstrainCoefficient_DynamicArray1D_Type +{ + ConstrainCoefficient_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct U16_DynamicArray1D_Type +{ + uint16_t* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct F32_DynamicArray1D_Type +{ + float* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct U8_DynamicArray1D_Type +{ + uint8_t* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct U32_DynamicArray1D_Type +{ + uint32_t* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct SkinClothMapB_DynamicArray1D_Type +{ + SkinClothMapB_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct SkinClothMapD_DynamicArray1D_Type +{ + SkinClothMapD_Type* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + +struct SkinClothMapC_Type +{ + physx::PxVec3 vertexBary; + uint32_t faceIndex0; + physx::PxVec3 normalBary; + uint32_t vertexIndexPlusOffset; +}; +struct ConstrainCoefficient_Type +{ + float maxDistance; + float collisionSphereRadius; + float collisionSphereDistance; +}; +struct PhysicalMesh_Type +{ + uint32_t numVertices; + uint32_t numSimulatedVertices; + uint32_t numMaxDistance0Vertices; + uint32_t numIndices; + uint32_t numSimulatedIndices; + uint32_t numBonesPerVertex; + VEC3_DynamicArray1D_Type vertices; + VEC3_DynamicArray1D_Type normals; + VEC3_DynamicArray1D_Type skinningNormals; + ConstrainCoefficient_DynamicArray1D_Type constrainCoefficients; + U16_DynamicArray1D_Type boneIndices; + F32_DynamicArray1D_Type boneWeights; + U8_DynamicArray1D_Type optimizationData; + bool hasNegativeBackstop; + bool isClosed; + U32_DynamicArray1D_Type indices; + float maximumMaxDistance; + uint32_t physicalMeshSorting; + float shortestEdgeLength; + float averageEdgeLength; + bool isTetrahedralMesh; + bool flipNormals; +}; +struct SkinClothMapD_Type +{ + physx::PxVec3 vertexBary; + uint32_t vertexIndex0; + physx::PxVec3 normalBary; + uint32_t vertexIndex1; + physx::PxVec3 tangentBary; + uint32_t vertexIndex2; + uint32_t vertexIndexPlusOffset; +}; +struct SkinClothMapB_Type +{ + physx::PxVec3 vtxTetraBary; + uint32_t vertexIndexPlusOffset; + physx::PxVec3 nrmTetraBary; + uint32_t faceIndex0; + uint32_t tetraIndex; + uint32_t submeshIndex; +}; +struct TetraLink_Type +{ + physx::PxVec3 vertexBary; + uint32_t tetraIndex0; + physx::PxVec3 normalBary; + uint32_t _dummyForAlignment; +}; + +struct ParametersStruct +{ + + PhysicalMesh_Type physicalMesh; + SkinClothMapB_DynamicArray1D_Type transitionUpB; + SkinClothMapD_DynamicArray1D_Type transitionUp; + float transitionUpThickness; + float transitionUpOffset; + SkinClothMapB_DynamicArray1D_Type transitionDownB; + SkinClothMapD_DynamicArray1D_Type transitionDown; + float transitionDownThickness; + float transitionDownOffset; + uint32_t referenceCount; + +}; + +static const uint32_t checksum[] = { 0x436eae3d, 0xbb86cc6f, 0xab9fa108, 0x26281bae, }; + +} // namespace ClothingPhysicalMeshParametersNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingPhysicalMeshParameters : public NvParameterized::NvParameters, public ClothingPhysicalMeshParametersNS::ParametersStruct +{ +public: + ClothingPhysicalMeshParameters(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingPhysicalMeshParameters(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingPhysicalMeshParameters"); + } + + const char* className(void) const + { + return(staticClassName()); + } + + static const uint32_t ClassVersion = ((uint32_t)0 << 16) + (uint32_t)11; + + 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(ClothingPhysicalMeshParametersNS::checksum); + return ClothingPhysicalMeshParametersNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingPhysicalMeshParametersNS::ParametersStruct& parameters(void) const + { + ClothingPhysicalMeshParameters* tmpThis = const_cast<ClothingPhysicalMeshParameters*>(this); + return *(static_cast<ClothingPhysicalMeshParametersNS::ParametersStruct*>(tmpThis)); + } + + ClothingPhysicalMeshParametersNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingPhysicalMeshParametersNS::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 ClothingPhysicalMeshParametersFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingPhysicalMeshParameters::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingPhysicalMeshParameters), ClothingPhysicalMeshParameters::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingPhysicalMeshParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingPhysicalMeshParameters"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingPhysicalMeshParameters)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingPhysicalMeshParameters)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingPhysicalMeshParameters::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingPhysicalMeshParameters::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingPhysicalMeshParameters"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingPhysicalMeshParameters 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 (ClothingPhysicalMeshParameters*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingPhysicalMeshParameters::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingPhysicalMeshParameters::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingPhysicalMeshParameters::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingPhysicalMeshParameters::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ClothingPreviewParam.h b/APEX_1.4/module/clothing/include/autogen/ClothingPreviewParam.h new file mode 100644 index 00000000..a6b2093c --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ClothingPreviewParam.h @@ -0,0 +1,243 @@ +// 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_ClothingPreviewParam_h +#define HEADER_ClothingPreviewParam_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 clothing +{ + +#if PX_VC +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +#endif + +namespace ClothingPreviewParamNS +{ + + +struct MAT44_DynamicArray1D_Type +{ + physx::PxMat44* buf; + bool isAllocated; + int32_t elementSize; + int32_t arraySizes[1]; +}; + + +struct ParametersStruct +{ + + physx::PxMat44 globalPose; + bool fallbackSkinning; + bool useInternalBoneOrder; + bool updateStateWithGlobalMatrices; + uint64_t userData; + MAT44_DynamicArray1D_Type boneMatrices; + +}; + +static const uint32_t checksum[] = { 0x614ffe9f, 0x273131aa, 0xa5bdd27c, 0xfe7fba5b, }; + +} // namespace ClothingPreviewParamNS + +#ifndef NV_PARAMETERIZED_ONLY_LAYOUTS +class ClothingPreviewParam : public NvParameterized::NvParameters, public ClothingPreviewParamNS::ParametersStruct +{ +public: + ClothingPreviewParam(NvParameterized::Traits* traits, void* buf = 0, int32_t* refCount = 0); + + virtual ~ClothingPreviewParam(); + + virtual void destroy(); + + static const char* staticClassName(void) + { + return("ClothingPreviewParam"); + } + + 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(ClothingPreviewParamNS::checksum); + return ClothingPreviewParamNS::checksum; + } + + static void freeParameterDefinitionTable(NvParameterized::Traits* traits); + + const uint32_t* checksum(uint32_t& bits) const + { + return staticChecksum(bits); + } + + const ClothingPreviewParamNS::ParametersStruct& parameters(void) const + { + ClothingPreviewParam* tmpThis = const_cast<ClothingPreviewParam*>(this); + return *(static_cast<ClothingPreviewParamNS::ParametersStruct*>(tmpThis)); + } + + ClothingPreviewParamNS::ParametersStruct& parameters(void) + { + return *(static_cast<ClothingPreviewParamNS::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 ClothingPreviewParamFactory : public NvParameterized::Factory +{ + static const char* const vptr; + +public: + + virtual void freeParameterDefinitionTable(NvParameterized::Traits* traits) + { + ClothingPreviewParam::freeParameterDefinitionTable(traits); + } + + virtual NvParameterized::Interface* create(NvParameterized::Traits* paramTraits) + { + // placement new on this class using mParameterizedTraits + + void* newPtr = paramTraits->alloc(sizeof(ClothingPreviewParam), ClothingPreviewParam::ClassAlignment); + if (!NvParameterized::IsAligned(newPtr, ClothingPreviewParam::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingPreviewParam"); + paramTraits->free(newPtr); + return 0; + } + + memset(newPtr, 0, sizeof(ClothingPreviewParam)); // always initialize memory allocated to zero for default values + return NV_PARAM_PLACEMENT_NEW(newPtr, ClothingPreviewParam)(paramTraits); + } + + virtual NvParameterized::Interface* finish(NvParameterized::Traits* paramTraits, void* bufObj, void* bufStart, int32_t* refCount) + { + if (!NvParameterized::IsAligned(bufObj, ClothingPreviewParam::ClassAlignment) + || !NvParameterized::IsAligned(bufStart, ClothingPreviewParam::ClassAlignment)) + { + NV_PARAM_TRAITS_WARNING(paramTraits, "Unaligned memory allocation for class ClothingPreviewParam"); + return 0; + } + + // Init NvParameters-part + // We used to call empty constructor of ClothingPreviewParam 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 (ClothingPreviewParam*)bufObj; + } + + virtual const char* getClassName() + { + return (ClothingPreviewParam::staticClassName()); + } + + virtual uint32_t getVersion() + { + return (ClothingPreviewParam::staticVersion()); + } + + virtual uint32_t getAlignment() + { + return (ClothingPreviewParam::ClassAlignment); + } + + virtual const uint32_t* getChecksum(uint32_t& bits) + { + return (ClothingPreviewParam::staticChecksum(bits)); + } +}; +#endif // NV_PARAMETERIZED_ONLY_LAYOUTS + +} // namespace clothing +} // namespace nvidia + +#if PX_VC +#pragma warning(pop) +#endif + +#endif diff --git a/APEX_1.4/module/clothing/include/autogen/ModuleClothingRegistration.h b/APEX_1.4/module/clothing/include/autogen/ModuleClothingRegistration.h new file mode 100644 index 00000000..4e8a5605 --- /dev/null +++ b/APEX_1.4/module/clothing/include/autogen/ModuleClothingRegistration.h @@ -0,0 +1,141 @@ +/* + * 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_MODULECLOTHINGREGISTRATIONH_H +#define MODULE_MODULECLOTHINGREGISTRATIONH_H + +#include "PsAllocator.h" +#include "NvRegistrationsForTraitsBase.h" +#include "nvparameterized/NvParameterizedTraits.h" +#include "PxAssert.h" +#include <stdint.h> + +// INCLUDE GENERATED FACTORIES +#include "ClothingActorParam.h" +#include "ClothingAssetParameters.h" +#include "ClothingCookedParam.h" +#include "ClothingCookedPhysX3Param.h" +#include "ClothingDebugRenderParams.h" +#include "ClothingGraphicalLodParameters.h" +#include "ClothingMaterialLibraryParameters.h" +#include "ClothingModuleParameters.h" +#include "ClothingPhysicalMeshParameters.h" +#include "ClothingPreviewParam.h" + + +// INCLUDE GENERATED CONVERSION + + +namespace nvidia { +namespace clothing { + + +class ModuleClothingRegistration : public NvParameterized::RegistrationsForTraitsBase +{ +public: + static void invokeRegistration(NvParameterized::Traits* parameterizedTraits) + { + if (parameterizedTraits) + { + ModuleClothingRegistration().registerAll(*parameterizedTraits); + } + } + + static void invokeUnregistration(NvParameterized::Traits* parameterizedTraits) + { + if (parameterizedTraits) + { + ModuleClothingRegistration().unregisterAll(*parameterizedTraits); + } + } + + void registerAvailableFactories(NvParameterized::Traits& parameterizedTraits) + { + ::NvParameterized::Factory* factoriesToRegister[] = { +// REGISTER GENERATED FACTORIES + new nvidia::clothing::ClothingActorParamFactory(), + new nvidia::clothing::ClothingAssetParametersFactory(), + new nvidia::clothing::ClothingCookedParamFactory(), + new nvidia::clothing::ClothingCookedPhysX3ParamFactory(), + new nvidia::clothing::ClothingDebugRenderParamsFactory(), + new nvidia::clothing::ClothingGraphicalLodParametersFactory(), + new nvidia::clothing::ClothingMaterialLibraryParametersFactory(), + new nvidia::clothing::ClothingModuleParametersFactory(), + new nvidia::clothing::ClothingPhysicalMeshParametersFactory(), + new nvidia::clothing::ClothingPreviewParamFactory(), + + }; + + 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::clothing::ClothingActorParamFactory(), + new nvidia::clothing::ClothingAssetParametersFactory(), + new nvidia::clothing::ClothingCookedParamFactory(), + new nvidia::clothing::ClothingCookedPhysX3ParamFactory(), + new nvidia::clothing::ClothingDebugRenderParamsFactory(), + new nvidia::clothing::ClothingGraphicalLodParametersFactory(), + new nvidia::clothing::ClothingMaterialLibraryParametersFactory(), + new nvidia::clothing::ClothingModuleParametersFactory(), + new nvidia::clothing::ClothingPhysicalMeshParametersFactory(), + new nvidia::clothing::ClothingPreviewParamFactory(), + + }; + + 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::clothing + +#endif |