Init
This commit is contained in:
@ -0,0 +1,352 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
#ifndef PVD_META_DATA_DEFINE_PROPERTIES_H
|
||||
#define PVD_META_DATA_DEFINE_PROPERTIES_H
|
||||
|
||||
#if PX_SUPPORT_PVD
|
||||
|
||||
#include "common/PxCoreUtilityTypes.h"
|
||||
|
||||
#include "PvdMetaDataPropertyVisitor.h"
|
||||
#include "PxPvdDataStreamHelpers.h"
|
||||
#include "PxPvdDataStream.h"
|
||||
|
||||
namespace physx
|
||||
{
|
||||
namespace Vd
|
||||
{
|
||||
using namespace physx::shdfnd;
|
||||
using namespace physx::pvdsdk;
|
||||
|
||||
template<typename TPropType>
|
||||
struct PropertyDefinitionOp
|
||||
{
|
||||
void defineProperty( PvdPropertyDefinitionHelper& mHelper, NamespacedName mClassKey )
|
||||
{
|
||||
mHelper.createProperty( mClassKey, "", getPvdNamespacedNameForType<TPropType>(), PropertyType::Scalar );
|
||||
}
|
||||
};
|
||||
template<>
|
||||
struct PropertyDefinitionOp<const char*>
|
||||
{
|
||||
void defineProperty( PvdPropertyDefinitionHelper& mHelper, NamespacedName mClassKey )
|
||||
{
|
||||
mHelper.createProperty( mClassKey, "", getPvdNamespacedNameForType<StringHandle>(), PropertyType::Scalar );
|
||||
}
|
||||
};
|
||||
#define DEFINE_PROPERTY_DEFINITION_OP_NOP( type ) \
|
||||
template<> struct PropertyDefinitionOp<type> { void defineProperty( PvdPropertyDefinitionHelper&, NamespacedName ){} };
|
||||
|
||||
//NOP out these two types.
|
||||
DEFINE_PROPERTY_DEFINITION_OP_NOP( PxStridedData )
|
||||
DEFINE_PROPERTY_DEFINITION_OP_NOP( PxBoundedData )
|
||||
|
||||
#define DEFINE_PROPERTY_DEFINITION_OBJECT_REF( type ) \
|
||||
template<> struct PropertyDefinitionOp<type> { \
|
||||
void defineProperty( PvdPropertyDefinitionHelper& mHelper, NamespacedName mClassKey) \
|
||||
{ \
|
||||
mHelper.createProperty( mClassKey, "", getPvdNamespacedNameForType<ObjectRef>(), PropertyType::Scalar ); \
|
||||
} \
|
||||
};
|
||||
|
||||
DEFINE_PROPERTY_DEFINITION_OBJECT_REF( PxTriangleMesh* )
|
||||
DEFINE_PROPERTY_DEFINITION_OBJECT_REF( PxBVH33TriangleMesh* )
|
||||
DEFINE_PROPERTY_DEFINITION_OBJECT_REF( PxBVH34TriangleMesh* )
|
||||
DEFINE_PROPERTY_DEFINITION_OBJECT_REF( PxConvexMesh* )
|
||||
DEFINE_PROPERTY_DEFINITION_OBJECT_REF( PxHeightField* )
|
||||
|
||||
|
||||
struct PvdClassInfoDefine
|
||||
{
|
||||
PvdPropertyDefinitionHelper& mHelper;
|
||||
NamespacedName mClassKey;
|
||||
|
||||
PvdClassInfoDefine( PvdPropertyDefinitionHelper& info, NamespacedName inClassName )
|
||||
: mHelper( info )
|
||||
, mClassKey( inClassName ) { }
|
||||
|
||||
PvdClassInfoDefine( const PvdClassInfoDefine& other )
|
||||
: mHelper( other.mHelper )
|
||||
, mClassKey( other.mClassKey )
|
||||
{
|
||||
}
|
||||
|
||||
void defineProperty( NamespacedName inDtype, const char* semantic = "", PropertyType::Enum inPType = PropertyType::Scalar )
|
||||
{
|
||||
mHelper.createProperty( mClassKey, semantic, inDtype, inPType );
|
||||
}
|
||||
|
||||
void pushName( const char* inName )
|
||||
{
|
||||
mHelper.pushName( inName );
|
||||
}
|
||||
|
||||
void pushBracketedName( const char* inName)
|
||||
{
|
||||
mHelper.pushBracketedName( inName );
|
||||
}
|
||||
|
||||
void popName()
|
||||
{
|
||||
mHelper.popName();
|
||||
}
|
||||
|
||||
inline void defineNameValueDefs( const PxU32ToName* theConversions )
|
||||
{
|
||||
while( theConversions->mName != NULL )
|
||||
{
|
||||
mHelper.addNamedValue( theConversions->mName, theConversions->mValue );
|
||||
++theConversions;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename TAccessorType>
|
||||
void simpleProperty( PxU32, TAccessorType& /*inProp */)
|
||||
{
|
||||
typedef typename TAccessorType::prop_type TPropertyType;
|
||||
PropertyDefinitionOp<TPropertyType>().defineProperty( mHelper, mClassKey );
|
||||
}
|
||||
|
||||
template<typename TAccessorType, typename TInfoType>
|
||||
void extendedIndexedProperty( PxU32* key, const TAccessorType& inProp, TInfoType& )
|
||||
{
|
||||
simpleProperty(*key, inProp);
|
||||
}
|
||||
|
||||
template<typename TDataType>
|
||||
static NamespacedName getNameForEnumType()
|
||||
{
|
||||
size_t s = sizeof( TDataType );
|
||||
switch(s)
|
||||
{
|
||||
case 1: return getPvdNamespacedNameForType<PxU8>();
|
||||
case 2: return getPvdNamespacedNameForType<PxU16>();
|
||||
case 4: return getPvdNamespacedNameForType<PxU32>();
|
||||
default: return getPvdNamespacedNameForType<PxU64>();
|
||||
}
|
||||
}
|
||||
|
||||
template<typename TAccessorType>
|
||||
void enumProperty( PxU32 /*key*/, TAccessorType& /*inProp*/, const PxU32ToName* inConversions )
|
||||
{
|
||||
typedef typename TAccessorType::prop_type TPropType;
|
||||
defineNameValueDefs( inConversions );
|
||||
defineProperty( getNameForEnumType<TPropType>(), "Enumeration Value" );
|
||||
}
|
||||
|
||||
template<typename TAccessorType>
|
||||
void flagsProperty( PxU32 /*key*/, const TAccessorType& /*inAccessor*/, const PxU32ToName* inConversions )
|
||||
{
|
||||
typedef typename TAccessorType::prop_type TPropType;
|
||||
defineNameValueDefs( inConversions );
|
||||
defineProperty( getNameForEnumType<TPropType>(), "Bitflag" );
|
||||
}
|
||||
|
||||
template<typename TAccessorType, typename TInfoType>
|
||||
void complexProperty( PxU32* key, const TAccessorType& inAccessor, TInfoType& inInfo )
|
||||
{
|
||||
PxU32 theOffset = inAccessor.mOffset;
|
||||
inInfo.visitBaseProperties( makePvdPropertyFilter( *this, key, &theOffset ) );
|
||||
inInfo.visitInstanceProperties( makePvdPropertyFilter( *this, key, &theOffset ) );
|
||||
}
|
||||
|
||||
template<typename TAccessorType, typename TInfoType>
|
||||
void bufferCollectionProperty( PxU32* key, const TAccessorType& inAccessor, TInfoType& inInfo )
|
||||
{
|
||||
complexProperty(key, inAccessor, inInfo);
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TPropertyType, PxU32 TEnableFlag>
|
||||
void handleBuffer( const PxBufferPropertyInfo<TKey, TObjectType, const Array< TPropertyType >&, TEnableFlag>& inProp )
|
||||
{
|
||||
mHelper.pushName( inProp.mName );
|
||||
defineProperty( getPvdNamespacedNameForType<TPropertyType>(), "", PropertyType::Array );
|
||||
mHelper.popName();
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TCollectionType>
|
||||
void handleCollection( const PxReadOnlyCollectionPropertyInfo<TKey, TObjectType, TCollectionType>& inProp )
|
||||
{
|
||||
mHelper.pushName( inProp.mName );
|
||||
defineProperty( getPvdNamespacedNameForType<TCollectionType>(), "", PropertyType::Array );
|
||||
mHelper.popName();
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TEnumType>
|
||||
void handleCollection( const PxReadOnlyCollectionPropertyInfo<TKey, TObjectType, TEnumType>& inProp, const PxU32ToName* inConversions )
|
||||
{
|
||||
mHelper.pushName( inProp.mName );
|
||||
defineNameValueDefs( inConversions );
|
||||
defineProperty( getNameForEnumType<TEnumType>(), "Enumeration Value", PropertyType::Array );
|
||||
mHelper.popName();
|
||||
}
|
||||
|
||||
private:
|
||||
PvdClassInfoDefine& operator=(const PvdClassInfoDefine&);
|
||||
};
|
||||
|
||||
template<typename TPropType>
|
||||
struct SimplePropertyValueStructOp
|
||||
{
|
||||
void addPropertyMessageArg( PvdPropertyDefinitionHelper& mHelper, PxU32 inOffset )
|
||||
{
|
||||
mHelper.addPropertyMessageArg<TPropType>( inOffset );
|
||||
}
|
||||
};
|
||||
|
||||
#define DEFINE_SIMPLE_PROPERTY_VALUE_STRUCT_OP_NOP( type ) \
|
||||
template<> struct SimplePropertyValueStructOp<type> { void addPropertyMessageArg( PvdPropertyDefinitionHelper&, PxU32 ){}};
|
||||
|
||||
DEFINE_SIMPLE_PROPERTY_VALUE_STRUCT_OP_NOP( PxStridedData )
|
||||
DEFINE_SIMPLE_PROPERTY_VALUE_STRUCT_OP_NOP( PxBoundedData )
|
||||
|
||||
#define DEFINE_SIMPLE_PROPERTY_VALUE_STRUCT_VOIDPTR_OP( type ) \
|
||||
template<> struct SimplePropertyValueStructOp<type> { \
|
||||
void addPropertyMessageArg( PvdPropertyDefinitionHelper& mHelper, PxU32 inOffset ) \
|
||||
{ \
|
||||
mHelper.addPropertyMessageArg<VoidPtr>( inOffset ); \
|
||||
} \
|
||||
};
|
||||
|
||||
DEFINE_SIMPLE_PROPERTY_VALUE_STRUCT_VOIDPTR_OP( PxTriangleMesh* )
|
||||
DEFINE_SIMPLE_PROPERTY_VALUE_STRUCT_VOIDPTR_OP( PxBVH33TriangleMesh* )
|
||||
DEFINE_SIMPLE_PROPERTY_VALUE_STRUCT_VOIDPTR_OP( PxBVH34TriangleMesh* )
|
||||
DEFINE_SIMPLE_PROPERTY_VALUE_STRUCT_VOIDPTR_OP( PxConvexMesh* )
|
||||
DEFINE_SIMPLE_PROPERTY_VALUE_STRUCT_VOIDPTR_OP( PxHeightField* )
|
||||
|
||||
|
||||
struct PvdClassInfoValueStructDefine
|
||||
{
|
||||
private:
|
||||
PvdClassInfoValueStructDefine& operator=(const PvdClassInfoValueStructDefine&);
|
||||
public:
|
||||
|
||||
PvdPropertyDefinitionHelper& mHelper;
|
||||
|
||||
PvdClassInfoValueStructDefine( PvdPropertyDefinitionHelper& info )
|
||||
: mHelper( info )
|
||||
{ }
|
||||
|
||||
PvdClassInfoValueStructDefine( const PvdClassInfoValueStructDefine& other )
|
||||
: mHelper( other.mHelper )
|
||||
{
|
||||
}
|
||||
|
||||
void defineValueStructOffset( const ValueStructOffsetRecord& inProp, PxU32 inPropSize )
|
||||
{
|
||||
if( inProp.mHasValidOffset )
|
||||
{
|
||||
switch( inPropSize )
|
||||
{
|
||||
case 8: mHelper.addPropertyMessageArg<PxU64>( inProp.mOffset ); break;
|
||||
case 4: mHelper.addPropertyMessageArg<PxU32>( inProp.mOffset ); break;
|
||||
case 2: mHelper.addPropertyMessageArg<PxU16>( inProp.mOffset ); break;
|
||||
default:
|
||||
PX_ASSERT(1 == inPropSize);
|
||||
mHelper.addPropertyMessageArg<PxU8>( inProp.mOffset ); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void pushName( const char* inName )
|
||||
{
|
||||
mHelper.pushName( inName );
|
||||
}
|
||||
|
||||
void pushBracketedName( const char* inName)
|
||||
{
|
||||
mHelper.pushBracketedName( inName );
|
||||
}
|
||||
|
||||
void popName()
|
||||
{
|
||||
mHelper.popName();
|
||||
}
|
||||
|
||||
template<typename TAccessorType, typename TInfoType>
|
||||
void bufferCollectionProperty( PxU32* /*key*/, const TAccessorType& /*inAccessor*/, TInfoType& /*inInfo*/ )
|
||||
{
|
||||
//complexProperty(key, inAccessor, inInfo);
|
||||
}
|
||||
|
||||
template<typename TAccessorType>
|
||||
void simpleProperty( PxU32 /*key*/, TAccessorType& inProp )
|
||||
{
|
||||
typedef typename TAccessorType::prop_type TPropertyType;
|
||||
if ( inProp.mHasValidOffset )
|
||||
{
|
||||
SimplePropertyValueStructOp<TPropertyType>().addPropertyMessageArg( mHelper, inProp.mOffset );
|
||||
}
|
||||
}
|
||||
|
||||
template<typename TAccessorType>
|
||||
void enumProperty( PxU32 /*key*/, TAccessorType& inAccessor, const PxU32ToName* /*inConversions */)
|
||||
{
|
||||
typedef typename TAccessorType::prop_type TPropType;
|
||||
defineValueStructOffset( inAccessor, sizeof( TPropType ) );
|
||||
}
|
||||
|
||||
template<typename TAccessorType>
|
||||
void flagsProperty( PxU32 /*key*/, const TAccessorType& inAccessor, const PxU32ToName* /*inConversions */)
|
||||
{
|
||||
typedef typename TAccessorType::prop_type TPropType;
|
||||
defineValueStructOffset( inAccessor, sizeof( TPropType ) );
|
||||
}
|
||||
|
||||
template<typename TAccessorType, typename TInfoType>
|
||||
void complexProperty( PxU32* key, const TAccessorType& inAccessor, TInfoType& inInfo )
|
||||
{
|
||||
PxU32 theOffset = inAccessor.mOffset;
|
||||
inInfo.visitBaseProperties( makePvdPropertyFilter( *this, key, &theOffset ) );
|
||||
inInfo.visitInstanceProperties( makePvdPropertyFilter( *this, key, &theOffset ) );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TCollectionType>
|
||||
void handleCollection( const PxReadOnlyCollectionPropertyInfo<TKey, TObjectType, TCollectionType>& /*prop*/ )
|
||||
{
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TEnumType>
|
||||
void handleCollection( const PxReadOnlyCollectionPropertyInfo<TKey, TObjectType, TEnumType>& /*prop*/, const PxU32ToName* /*inConversions */)
|
||||
{
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TInfoType>
|
||||
void handleCollection( const PxBufferCollectionPropertyInfo<TKey, TObjectType, TInfoType>& /*prop*/, const TInfoType& /*inInfo */)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
318
physx/source/physxmetadata/core/include/PvdMetaDataExtensions.h
Normal file
318
physx/source/physxmetadata/core/include/PvdMetaDataExtensions.h
Normal file
@ -0,0 +1,318 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
#ifndef PX_META_DATA_EXTENSIONS_H
|
||||
#define PX_META_DATA_EXTENSIONS_H
|
||||
#include "PxMetaDataObjects.h"
|
||||
|
||||
#if PX_SUPPORT_PVD
|
||||
#include "PxPvdObjectModelBaseTypes.h"
|
||||
|
||||
namespace physx { namespace pvdsdk {
|
||||
|
||||
template<> PX_INLINE NamespacedName getPvdNamespacedNameForType<physx::PxMetaDataPlane>() { return getPvdNamespacedNameForType<PxVec4>(); }
|
||||
template<> PX_INLINE NamespacedName getPvdNamespacedNameForType<physx::PxRigidActor*>() { return getPvdNamespacedNameForType<VoidPtr>(); }
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
||||
namespace physx
|
||||
{
|
||||
namespace Vd
|
||||
{
|
||||
//Additional properties that exist only in pvd land.
|
||||
struct PxPvdOnlyProperties
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
FirstProp = PxPropertyInfoName::LastPxPropertyInfoName,
|
||||
PxScene_Frame,
|
||||
PxScene_Contacts,
|
||||
PxScene_SimulateElapsedTime,
|
||||
#define DEFINE_ENUM_RANGE( stem, count ) \
|
||||
stem##Begin, \
|
||||
stem##End = stem##Begin + count
|
||||
|
||||
//I can't easily add up the number of required property entries, but it is large due to the below
|
||||
//geometry count squared properties. Thus I punt and allocate way more than I need right now.
|
||||
DEFINE_ENUM_RANGE( PxScene_SimulationStatistics, 1000 ),
|
||||
DEFINE_ENUM_RANGE( PxSceneDesc_Limits, PxPropertyInfoName::PxSceneLimits_PropertiesStop - PxPropertyInfoName::PxSceneLimits_PropertiesStart ),
|
||||
DEFINE_ENUM_RANGE( PxSimulationStatistics_NumShapes, PxGeometryType::eGEOMETRY_COUNT ),
|
||||
DEFINE_ENUM_RANGE( PxSimulationStatistics_NumDiscreteContactPairs, PxGeometryType::eGEOMETRY_COUNT * PxGeometryType::eGEOMETRY_COUNT ),
|
||||
DEFINE_ENUM_RANGE( PxSimulationStatistics_NumModifiedContactPairs, PxGeometryType::eGEOMETRY_COUNT * PxGeometryType::eGEOMETRY_COUNT ),
|
||||
DEFINE_ENUM_RANGE( PxSimulationStatistics_NumSweptIntegrationPairs, PxGeometryType::eGEOMETRY_COUNT * PxGeometryType::eGEOMETRY_COUNT ),
|
||||
DEFINE_ENUM_RANGE( PxSimulationStatistics_NumTriggerPairs, PxGeometryType::eGEOMETRY_COUNT * PxGeometryType::eGEOMETRY_COUNT ),
|
||||
DEFINE_ENUM_RANGE( PxRigidDynamic_SolverIterationCounts, 2 ),
|
||||
DEFINE_ENUM_RANGE( PxArticulation_SolverIterationCounts, 2 ),
|
||||
DEFINE_ENUM_RANGE( PxArticulationJoint_SwingLimit, 2 ),
|
||||
DEFINE_ENUM_RANGE( PxArticulationJoint_TwistLimit, 2 ),
|
||||
DEFINE_ENUM_RANGE( PxConvexMeshGeometry_Scale, PxPropertyInfoName::PxMeshScale_PropertiesStop - PxPropertyInfoName::PxMeshScale_PropertiesStart ),
|
||||
DEFINE_ENUM_RANGE( PxTriangleMeshGeometry_Scale, PxPropertyInfoName::PxMeshScale_PropertiesStop - PxPropertyInfoName::PxMeshScale_PropertiesStart ),
|
||||
|
||||
LastPxPvdOnlyProperty
|
||||
};
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TPropertyType, PxU32 TEnableFlag>
|
||||
struct PxBufferPropertyInfo : PxReadOnlyPropertyInfo< TKey, TObjectType, TPropertyType >
|
||||
{
|
||||
typedef PxReadOnlyPropertyInfo< TKey, TObjectType, TPropertyType > TBaseType;
|
||||
typedef typename TBaseType::TGetterType TGetterType;
|
||||
PxBufferPropertyInfo( const char* inName, TGetterType inGetter )
|
||||
: TBaseType( inName, inGetter )
|
||||
{
|
||||
}
|
||||
bool isEnabled( PxU32 inFlags ) const { return (inFlags & TEnableFlag) > 0; }
|
||||
};
|
||||
|
||||
|
||||
#define DECLARE_BUFFER_PROPERTY( objectType, baseType, propType, propName, fieldName, flagName ) \
|
||||
typedef PxBufferPropertyInfo< PxPvdOnlyProperties::baseType##_##propName, objectType, propType, flagName > T##objectType##propName##Base; \
|
||||
inline propType get##propName( const objectType* inData ) { return inData->fieldName; } \
|
||||
struct baseType##propName##Property : T##objectType##propName##Base \
|
||||
{ \
|
||||
baseType##propName##Property() : T##objectType##propName##Base( #propName, get##propName ){} \
|
||||
};
|
||||
|
||||
template<PxU32 PropertyKey, typename TEnumType >
|
||||
struct IndexerToNameMap
|
||||
{
|
||||
PxEnumTraits<TEnumType> Converter;
|
||||
};
|
||||
|
||||
struct ValueStructOffsetRecord
|
||||
{
|
||||
mutable bool mHasValidOffset;
|
||||
mutable PxU32 mOffset;
|
||||
ValueStructOffsetRecord() : mHasValidOffset( false ), mOffset( 0 ) {}
|
||||
void setupValueStructOffset( PxU32 inValue ) const
|
||||
{
|
||||
mHasValidOffset = true;
|
||||
mOffset = inValue;
|
||||
}
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TPropertyType>
|
||||
struct PxPvdReadOnlyPropertyAccessor : public ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxReadOnlyPropertyInfo<TKey,TObjectType,TPropertyType> TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
|
||||
const TPropertyInfoType mProperty;
|
||||
PxPvdReadOnlyPropertyAccessor( const TPropertyInfoType& inProp )
|
||||
: mProperty( inProp )
|
||||
{
|
||||
}
|
||||
prop_type get( const TObjectType* inObj ) const { return mProperty.get( inObj ); }
|
||||
|
||||
private:
|
||||
PxPvdReadOnlyPropertyAccessor& operator=(const PxPvdReadOnlyPropertyAccessor&);
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TPropertyType>
|
||||
struct PxBufferCollectionPropertyAccessor : public ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxBufferCollectionPropertyInfo< TKey, TObjectType, TPropertyType > TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
const TPropertyInfoType& mProperty;
|
||||
const char* mName;
|
||||
|
||||
PxBufferCollectionPropertyAccessor( const TPropertyInfoType& inProp, const char* inName )
|
||||
: mProperty( inProp )
|
||||
, mName( inName )
|
||||
{
|
||||
}
|
||||
|
||||
const char* name() const { return mName; }
|
||||
PxU32 size( const TObjectType* inObj ) const { return mProperty.size( inObj ); }
|
||||
PxU32 get( const TObjectType* inObj, prop_type* buffer, PxU32 inNumItems) const { return mProperty.get( inObj, buffer, inNumItems); }
|
||||
void set( TObjectType* inObj, prop_type* inBuffer, PxU32 inNumItems ) const { mProperty.set( inObj, inBuffer, inNumItems ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TIndexType, typename TPropertyType>
|
||||
struct PxPvdIndexedPropertyAccessor : public ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxIndexedPropertyInfo< TKey, TObjectType, TIndexType, TPropertyType > TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
TIndexType mIndex;
|
||||
const TPropertyInfoType& mProperty;
|
||||
PxPvdIndexedPropertyAccessor( const TPropertyInfoType& inProp, PxU32 inIndex )
|
||||
: mIndex( static_cast<TIndexType>( inIndex ) )
|
||||
, mProperty( inProp )
|
||||
{
|
||||
}
|
||||
prop_type get( const TObjectType* inObj ) const { return mProperty.get( inObj, mIndex ); }
|
||||
void set( TObjectType* inObj, prop_type val ) const { mProperty.set( inObj, mIndex, val ); }
|
||||
|
||||
void operator = (PxPvdIndexedPropertyAccessor&) {}
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TIndexType, typename TPropertyType>
|
||||
struct PxPvdExtendedIndexedPropertyAccessor : public ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxExtendedIndexedPropertyInfo< TKey, TObjectType, TIndexType, TPropertyType > TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
TIndexType mIndex;
|
||||
const TPropertyInfoType& mProperty;
|
||||
PxPvdExtendedIndexedPropertyAccessor( const TPropertyInfoType& inProp, PxU32 inIndex )
|
||||
: mIndex( static_cast<TIndexType>( inIndex ) )
|
||||
, mProperty( inProp )
|
||||
{
|
||||
}
|
||||
|
||||
PxU32 size( const TObjectType* inObj ) const { return mProperty.size( inObj ); }
|
||||
prop_type get( const TObjectType* inObj, TIndexType index ) const { return mProperty.get( inObj, index ); }
|
||||
void set( TObjectType* inObj, TIndexType index, prop_type val ) const { mProperty.set( inObj, index, val ); }
|
||||
|
||||
void operator = (PxPvdExtendedIndexedPropertyAccessor&) {}
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TIndexType, typename TPropertyType>
|
||||
struct PxPvdFixedSizeLookupTablePropertyAccessor : public ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxFixedSizeLookupTablePropertyInfo< TKey, TObjectType, TIndexType, TPropertyType > TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
TIndexType mIndex;
|
||||
|
||||
const TPropertyInfoType& mProperty;
|
||||
PxPvdFixedSizeLookupTablePropertyAccessor( const TPropertyInfoType& inProp, const PxU32 inIndex3 )
|
||||
: mIndex( static_cast<TIndexType>( inIndex3 ) )
|
||||
, mProperty( inProp )
|
||||
{
|
||||
}
|
||||
|
||||
PxU32 size( const TObjectType* inObj ) const { return mProperty.size( inObj ); }
|
||||
prop_type getX( const TObjectType* inObj, const TIndexType index ) const { return mProperty.getX( inObj, index ); }
|
||||
prop_type getY( const TObjectType* inObj, const TIndexType index ) const { return mProperty.getY( inObj, index ); }
|
||||
void addPair( TObjectType* inObj, const PxReal x, const PxReal y ) { const_cast<TPropertyInfoType&>(mProperty).addPair( inObj, x, y ); }
|
||||
void clear( TObjectType* inObj ) { const_cast<TPropertyInfoType&>(mProperty).clear( inObj ); }
|
||||
void operator = (PxPvdFixedSizeLookupTablePropertyAccessor&) {}
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TIdx0Type, typename TIdx1Type, typename TPropertyType>
|
||||
struct PxPvdDualIndexedPropertyAccessor : public ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxDualIndexedPropertyInfo< TKey, TObjectType, TIdx0Type, TIdx1Type, TPropertyType > TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
TIdx0Type mIdx0;
|
||||
TIdx1Type mIdx1;
|
||||
const TPropertyInfoType& mProperty;
|
||||
|
||||
PxPvdDualIndexedPropertyAccessor( const TPropertyInfoType& inProp, PxU32 idx0, PxU32 idx1 )
|
||||
: mIdx0( static_cast<TIdx0Type>( idx0 ) )
|
||||
, mIdx1( static_cast<TIdx1Type>( idx1 ) )
|
||||
, mProperty( inProp )
|
||||
{
|
||||
}
|
||||
prop_type get( const TObjectType* inObj ) const { return mProperty.get( inObj, mIdx0, mIdx1 ); }
|
||||
void set( TObjectType* inObj, prop_type val ) const { mProperty.set( inObj, mIdx0, mIdx1, val ); }
|
||||
|
||||
private:
|
||||
PxPvdDualIndexedPropertyAccessor& operator = (const PxPvdDualIndexedPropertyAccessor&);
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TIdx0Type, typename TIdx1Type, typename TPropertyType>
|
||||
struct PxPvdExtendedDualIndexedPropertyAccessor : public ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxExtendedDualIndexedPropertyInfo< TKey, TObjectType, TIdx0Type, TIdx1Type, TPropertyType > TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
TIdx0Type mIdx0;
|
||||
TIdx1Type mIdx1;
|
||||
const TPropertyInfoType& mProperty;
|
||||
|
||||
PxPvdExtendedDualIndexedPropertyAccessor( const TPropertyInfoType& inProp, PxU32 idx0, PxU32 idx1 )
|
||||
: mIdx0( static_cast<TIdx0Type>( idx0 ) )
|
||||
, mIdx1( static_cast<TIdx1Type>( idx1 ) )
|
||||
, mProperty( inProp )
|
||||
{
|
||||
}
|
||||
prop_type get( const TObjectType* inObj ) const { return mProperty.get( inObj, mIdx0, mIdx1 ); }
|
||||
void set( TObjectType* inObj, prop_type val ) const { mProperty.set( inObj, mIdx0, mIdx1, val ); }
|
||||
|
||||
private:
|
||||
PxPvdExtendedDualIndexedPropertyAccessor& operator = (const PxPvdExtendedDualIndexedPropertyAccessor&);
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
struct PxPvdRangePropertyAccessor : public ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxRangePropertyInfo<TKey, TObjType, TPropertyType> TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
bool mFirstValue;
|
||||
const TPropertyInfoType& mProperty;
|
||||
|
||||
PxPvdRangePropertyAccessor( const TPropertyInfoType& inProp, bool inFirstValue )
|
||||
: mFirstValue( inFirstValue )
|
||||
, mProperty( inProp )
|
||||
{
|
||||
}
|
||||
|
||||
prop_type get( const TObjType* inObj ) const {
|
||||
prop_type first,second;
|
||||
mProperty.get( inObj, first, second );
|
||||
return mFirstValue ? first : second;
|
||||
}
|
||||
void set( TObjType* inObj, prop_type val ) const
|
||||
{
|
||||
prop_type first,second;
|
||||
mProperty.get( inObj, first, second );
|
||||
if ( mFirstValue ) mProperty.set( inObj, val, second );
|
||||
else mProperty.set( inObj, first, val );
|
||||
}
|
||||
|
||||
void operator = (PxPvdRangePropertyAccessor&) {}
|
||||
};
|
||||
|
||||
|
||||
template<typename TDataType>
|
||||
struct IsFlagsType
|
||||
{
|
||||
bool FlagData;
|
||||
};
|
||||
|
||||
template<typename TEnumType, typename TStorageType>
|
||||
struct IsFlagsType<PxFlags<TEnumType, TStorageType> >
|
||||
{
|
||||
const PxU32ToName* FlagData;
|
||||
IsFlagsType<PxFlags<TEnumType, TStorageType> > () : FlagData( PxEnumTraits<TEnumType>().NameConversion ) {}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template<typename TDataType>
|
||||
struct PvdClassForType
|
||||
{
|
||||
bool Unknown;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,539 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
#ifndef PX_META_DATA_PROPERTY_VISITOR_H
|
||||
#define PX_META_DATA_PROPERTY_VISITOR_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "PvdMetaDataExtensions.h"
|
||||
namespace physx
|
||||
{
|
||||
|
||||
namespace Vd
|
||||
{
|
||||
|
||||
//PVD only deals with read-only properties, indexed, and properties like this by in large.
|
||||
//so we have a filter that expands properties to a level where we can get to them and expands them into
|
||||
//named functions that make more sense and are easier to read than operator()
|
||||
template<typename TOperatorType>
|
||||
struct PvdPropertyFilter
|
||||
{
|
||||
|
||||
private:
|
||||
PvdPropertyFilter& operator=(const PvdPropertyFilter&);
|
||||
|
||||
public:
|
||||
|
||||
TOperatorType mOperator;
|
||||
PxU32* mKeyOverride;
|
||||
PxU32* mOffsetOverride;
|
||||
|
||||
PvdPropertyFilter( TOperatorType& inOperator )
|
||||
: mOperator( inOperator )
|
||||
, mKeyOverride( 0 )
|
||||
, mOffsetOverride( 0 ) {}
|
||||
|
||||
PvdPropertyFilter( TOperatorType& inOperator, PxU32* inKeyOverride, PxU32* inOffsetOverride )
|
||||
: mOperator( inOperator )
|
||||
, mKeyOverride( inKeyOverride )
|
||||
, mOffsetOverride( inOffsetOverride ) {}
|
||||
|
||||
PvdPropertyFilter( const PvdPropertyFilter& inOther ) : mOperator( inOther.mOperator ), mKeyOverride( inOther.mKeyOverride ), mOffsetOverride( inOther.mOffsetOverride ) {}
|
||||
|
||||
template<PxU32 TKey, typename TAccessorType>
|
||||
void dispatchAccessor( PxU32 inKey, const TAccessorType& inAccessor, bool, bool, bool)
|
||||
{
|
||||
mOperator.simpleProperty(inKey, inAccessor );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TAccessorType>
|
||||
void dispatchAccessor( PxU32 inKey, const TAccessorType& inAccessor, bool, bool, const PxU32ToName* inConversions )
|
||||
{
|
||||
mOperator.flagsProperty(inKey, inAccessor, inConversions );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TAccessorType>
|
||||
void dispatchAccessor( PxU32 inKey, const TAccessorType& inAccessor, const PxU32ToName* inConversions, bool, bool )
|
||||
{
|
||||
mOperator.enumProperty( inKey, inAccessor, inConversions );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TAccessorType, typename TInfoType>
|
||||
void dispatchAccessor(PxU32, const TAccessorType& inAccessor, bool, const TInfoType* inInfo, bool )
|
||||
{
|
||||
PxU32 rangeStart = TKey;
|
||||
PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
|
||||
mOperator.complexProperty( &propIdx, inAccessor, *inInfo );
|
||||
}
|
||||
|
||||
PxU32 getKeyValue( PxU32 inPropertyKey )
|
||||
{
|
||||
PxU32 retval = inPropertyKey;
|
||||
if ( mKeyOverride )
|
||||
{
|
||||
retval = *mKeyOverride;
|
||||
(*mKeyOverride)++;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
void setupValueStructOffset( const ValueStructOffsetRecord&, bool, PxU32* ) {}
|
||||
void setupValueStructOffset( const ValueStructOffsetRecord& inAccessor, PxU32 inOffset, PxU32* inAdditionalOffset )
|
||||
{
|
||||
//This allows us to nest properties correctly.
|
||||
if ( inAdditionalOffset ) inOffset += *inAdditionalOffset;
|
||||
inAccessor.setupValueStructOffset( inOffset );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TAccessorType>
|
||||
void handleAccessor( PxU32 inKey, const TAccessorType& inAccessor )
|
||||
{
|
||||
typedef typename TAccessorType::prop_type TPropertyType;
|
||||
dispatchAccessor<TKey>( inKey
|
||||
, inAccessor
|
||||
, PxEnumTraits<TPropertyType>().NameConversion
|
||||
, PxClassInfoTraits<TPropertyType>().getInfo()
|
||||
, IsFlagsType<TPropertyType>().FlagData );
|
||||
}
|
||||
|
||||
|
||||
template<PxU32 TKey, typename TAccessorType>
|
||||
void handleAccessor( const TAccessorType& inAccessor )
|
||||
{
|
||||
setupValueStructOffset( inAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, mOffsetOverride );
|
||||
handleAccessor<TKey>( getKeyValue( TKey ), inAccessor );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
void operator()( const PxReadOnlyPropertyInfo<TKey,TObjType,TPropertyType>& inProperty, PxU32 )
|
||||
{
|
||||
PxPvdReadOnlyPropertyAccessor< TKey, TObjType, TPropertyType > theAccessor( inProperty );
|
||||
mOperator.pushName( inProperty.mName );
|
||||
handleAccessor<TKey>( theAccessor );
|
||||
mOperator.popName();
|
||||
}
|
||||
|
||||
//We don't handle unbounded indexed properties
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType, typename TValueConversionType, typename TInfoType>
|
||||
void indexedProperty( PxU32, const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >&, bool, TValueConversionType, const TInfoType& ) {}
|
||||
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
void indexedProperty( PxU32, const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, const PxU32ToName* theConversions, const PxUnknownClassInfo& )
|
||||
{
|
||||
mOperator.pushName( inProp.mName );
|
||||
PxU32 rangeStart = TKey;
|
||||
PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
|
||||
PxU32 theOffset = 0;
|
||||
if ( mOffsetOverride ) theOffset = *mOffsetOverride;
|
||||
|
||||
while( theConversions->mName != NULL )
|
||||
{
|
||||
mOperator.pushBracketedName( theConversions->mName );
|
||||
PxPvdIndexedPropertyAccessor<TKey, TObjType, TIndexType, TPropertyType> theAccessor( inProp, theConversions->mValue );
|
||||
setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
|
||||
handleAccessor<TKey>( propIdx, theAccessor );
|
||||
mOperator.popName();
|
||||
++propIdx;
|
||||
++theConversions;
|
||||
theOffset += sizeof( TPropertyType );
|
||||
}
|
||||
mOperator.popName();
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType, typename TInfoType>
|
||||
void indexedProperty( PxU32, const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, const PxU32ToName* theConversions, const TInfoType& inInfo )
|
||||
{
|
||||
//ouch, not nice. Indexed complex property.
|
||||
mOperator.pushName( inProp.mName );
|
||||
PxU32 propIdx = TKey;
|
||||
PxU32 theOffset = 0;
|
||||
if ( mOffsetOverride ) theOffset = *mOffsetOverride;
|
||||
|
||||
while( theConversions->mName != NULL )
|
||||
{
|
||||
mOperator.pushBracketedName( theConversions->mName );
|
||||
PxPvdIndexedPropertyAccessor<TKey, TObjType, TIndexType, TPropertyType> theAccessor( inProp, theConversions->mValue );
|
||||
setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
|
||||
PX_ASSERT( theAccessor.mHasValidOffset );
|
||||
mOperator.complexProperty( &propIdx, theAccessor, inInfo );
|
||||
mOperator.popName();
|
||||
++theConversions;
|
||||
theOffset += sizeof( TPropertyType );
|
||||
}
|
||||
mOperator.popName();
|
||||
}
|
||||
|
||||
static char* myStrcat(const char* a,const char * b)
|
||||
{
|
||||
size_t len = strlen(a)+strlen(b);
|
||||
char* result = new char[len+1];
|
||||
|
||||
strcpy(result,a);
|
||||
strcat(result,b);
|
||||
result[len] = 0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType, typename TInfoType>
|
||||
void handleBufferCollectionProperty(PxU32 , const PxBufferCollectionPropertyInfo<TKey, TObjType, TPropertyType >& inProp, const TInfoType& inInfo)
|
||||
{
|
||||
//append 'Collection' to buffer properties
|
||||
char* name = myStrcat(inProp.mName, "Collection");
|
||||
|
||||
mOperator.pushName(name);
|
||||
PxU32 propIdx = TKey;
|
||||
PxU32 theOffset = 0;
|
||||
|
||||
PxBufferCollectionPropertyAccessor<TKey, TObjType, TPropertyType> theAccessor( inProp, inProp.mName );
|
||||
setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
|
||||
|
||||
mOperator.bufferCollectionProperty( &propIdx, theAccessor, inInfo );
|
||||
mOperator.popName();
|
||||
delete []name;
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
void operator()( const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, PxU32 inIndex )
|
||||
{
|
||||
indexedProperty( inIndex, inProp, IndexerToNameMap<TKey,TIndexType>().Converter.NameConversion
|
||||
, PxClassInfoTraits<TPropertyType>().Info );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType, typename TIndexType, typename TInfoType>
|
||||
void handleExtendedIndexProperty(PxU32 inIndex, const PxExtendedIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, const TInfoType& inInfo)
|
||||
{
|
||||
mOperator.pushName(inProp.mName);
|
||||
PxU32 propIdx = TKey;
|
||||
PxU32 theOffset = 0;
|
||||
|
||||
PxPvdExtendedIndexedPropertyAccessor<TKey, TObjType, TIndexType, TPropertyType> theAccessor( inProp, inIndex );
|
||||
setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
|
||||
|
||||
mOperator.extendedIndexedProperty( &propIdx, theAccessor, inInfo );
|
||||
mOperator.popName();
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType, typename TIndexType, typename TInfoType>
|
||||
void handlePxFixedSizeLookupTableProperty( const PxU32 inIndex, const PxFixedSizeLookupTablePropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, const TInfoType& inInfo)
|
||||
{
|
||||
mOperator.pushName(inProp.mName);
|
||||
|
||||
PxU32 propIdx = TKey;
|
||||
PxU32 theOffset = 0;
|
||||
|
||||
PxPvdFixedSizeLookupTablePropertyAccessor<TKey, TObjType, TIndexType, TPropertyType> theAccessor( inProp, inIndex );
|
||||
setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
|
||||
|
||||
mOperator.PxFixedSizeLookupTableProperty( &propIdx, theAccessor, inInfo );
|
||||
|
||||
mOperator.popName();
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
void operator()( const PxExtendedIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, PxU32 inIndex )
|
||||
{
|
||||
handleExtendedIndexProperty( inIndex, inProp, PxClassInfoTraits<TPropertyType>().Info );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
void operator()( const PxFixedSizeLookupTablePropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, PxU32 inIndex)
|
||||
{
|
||||
handlePxFixedSizeLookupTableProperty(inIndex, inProp, PxClassInfoTraits<TPropertyType>().Info);
|
||||
}
|
||||
|
||||
//We don't handle unbounded indexed properties
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType, typename TNameConv, typename TNameConv2 >
|
||||
void dualIndexedProperty( PxU32 idx, const PxDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >&, TNameConv, TNameConv2 ) { PX_UNUSED(idx); }
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
|
||||
void dualIndexedProperty( PxU32 /*idx*/, const PxDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >& inProp, const PxU32ToName* c1, const PxU32ToName* c2 )
|
||||
{
|
||||
mOperator.pushName( inProp.mName );
|
||||
PxU32 rangeStart = TKey;
|
||||
PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
|
||||
PxU32 theOffset = 0;
|
||||
if ( mOffsetOverride ) theOffset = *mOffsetOverride;
|
||||
while( c1->mName != NULL )
|
||||
{
|
||||
mOperator.pushBracketedName( c1->mName );
|
||||
const PxU32ToName* c2Idx = c2;
|
||||
while( c2Idx->mName != NULL )
|
||||
{
|
||||
mOperator.pushBracketedName( c2Idx->mName );
|
||||
PxPvdDualIndexedPropertyAccessor<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType> theAccessor( inProp, c1->mValue, c2Idx->mValue );
|
||||
setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
|
||||
handleAccessor<TKey>( propIdx, theAccessor );
|
||||
mOperator.popName();
|
||||
++propIdx;
|
||||
++c2Idx;
|
||||
theOffset += sizeof( TPropertyType );
|
||||
}
|
||||
mOperator.popName();
|
||||
++c1;
|
||||
}
|
||||
mOperator.popName();
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
|
||||
void extendedDualIndexedProperty( PxU32 /*idx*/, const PxExtendedDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >& inProp, PxU32 id0Count, PxU32 id1Count )
|
||||
{
|
||||
mOperator.pushName( inProp.mName );
|
||||
PxU32 rangeStart = TKey;
|
||||
PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
|
||||
PxU32 theOffset = 0;
|
||||
if ( mOffsetOverride ) theOffset = *mOffsetOverride;
|
||||
for(PxU32 i = 0; i < id0Count; ++i)
|
||||
{
|
||||
char buffer1[32] = { 0 };
|
||||
sprintf( buffer1, "eId1_%u", i );
|
||||
|
||||
mOperator.pushBracketedName( buffer1 );
|
||||
for(PxU32 j = 0; j < id1Count; ++j)
|
||||
{
|
||||
char buffer2[32] = { 0 };
|
||||
sprintf( buffer2, "eId2_%u", j );
|
||||
|
||||
mOperator.pushBracketedName( buffer2 );
|
||||
PxPvdExtendedDualIndexedPropertyAccessor<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType> theAccessor( inProp, i, j );
|
||||
setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
|
||||
handleAccessor<TKey>( propIdx, theAccessor );
|
||||
mOperator.popName();
|
||||
++propIdx;
|
||||
theOffset += sizeof( TPropertyType );
|
||||
}
|
||||
mOperator.popName();
|
||||
}
|
||||
mOperator.popName();
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
|
||||
void operator()( const PxDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >& inProp, PxU32 idx )
|
||||
{
|
||||
dualIndexedProperty( idx, inProp
|
||||
, IndexerToNameMap<TKey,TIndexType>().Converter.NameConversion
|
||||
, IndexerToNameMap<TKey,TIndex2Type>().Converter.NameConversion );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
|
||||
void operator()( const PxExtendedDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >& inProp, PxU32 idx )
|
||||
{
|
||||
extendedDualIndexedProperty( idx, inProp, inProp.mId0Count, inProp.mId1Count );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
void operator()( const PxRangePropertyInfo<TKey, TObjType, TPropertyType>& inProperty, PxU32 /*idx*/)
|
||||
{
|
||||
PxU32 rangeStart = TKey;
|
||||
PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
|
||||
PxU32 theOffset = 0;
|
||||
if ( mOffsetOverride ) theOffset = *mOffsetOverride;
|
||||
|
||||
mOperator.pushName( inProperty.mName );
|
||||
mOperator.pushName( inProperty.mArg0Name );
|
||||
PxPvdRangePropertyAccessor<TKey, TObjType, TPropertyType> theAccessor( inProperty, true );
|
||||
setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
|
||||
handleAccessor<TKey>( propIdx, theAccessor );
|
||||
++propIdx;
|
||||
theOffset += sizeof( TPropertyType );
|
||||
mOperator.popName();
|
||||
mOperator.pushName( inProperty.mArg1Name );
|
||||
theAccessor.mFirstValue = false;
|
||||
setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
|
||||
handleAccessor<TKey>( propIdx, theAccessor );
|
||||
mOperator.popName();
|
||||
mOperator.popName();
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
void operator()( const PxBufferCollectionPropertyInfo<TKey, TObjType, TPropertyType>& inProp, PxU32 count )
|
||||
{
|
||||
handleBufferCollectionProperty( count, inProp, PxClassInfoTraits<TPropertyType>().Info );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TPropertyType, PxU32 TEnableFlag>
|
||||
void handleBuffer( const PxBufferPropertyInfo<TKey, TObjectType, TPropertyType, TEnableFlag>& inProp )
|
||||
{
|
||||
mOperator.handleBuffer( inProp );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjectType, typename TPropertyType, PxU32 TEnableFlag>
|
||||
void operator()( const PxBufferPropertyInfo<TKey, TObjectType, TPropertyType, TEnableFlag>& inProp, PxU32 )
|
||||
{
|
||||
handleBuffer( inProp );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType>
|
||||
void operator()( const PxReadOnlyCollectionPropertyInfo<TKey, TObjType, PxU32>& prop, PxU32 )
|
||||
{
|
||||
mOperator.handleCollection( prop );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType>
|
||||
void operator()( const PxReadOnlyCollectionPropertyInfo<TKey, TObjType, PxReal>& prop, PxU32 )
|
||||
{
|
||||
mOperator.handleCollection( prop );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
void operator()( const PxWriteOnlyPropertyInfo<TKey,TObjType,TPropertyType>&, PxU32 ) {}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType>
|
||||
void operator()( const PxReadOnlyCollectionPropertyInfo<TKey, TObjType, TCollectionType>&, PxU32 ) {}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType, typename TFilterType>
|
||||
void operator()( const PxReadOnlyFilteredCollectionPropertyInfo<TKey, TObjType, TCollectionType, TFilterType >&, PxU32 ) {}
|
||||
|
||||
|
||||
//We don't deal with these property datatypes.
|
||||
#define DEFINE_PVD_PROPERTY_NOP(datatype) \
|
||||
template<PxU32 TKey, typename TObjType> \
|
||||
void operator()( const PxReadOnlyPropertyInfo<TKey,TObjType,datatype>& inProperty, PxU32 ){PX_UNUSED(inProperty); }
|
||||
|
||||
DEFINE_PVD_PROPERTY_NOP( const void* )
|
||||
DEFINE_PVD_PROPERTY_NOP( void* )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxSimulationFilterCallback * )
|
||||
DEFINE_PVD_PROPERTY_NOP( physx::PxTaskManager * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxSimulationFilterShader * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxSimulationFilterShader)
|
||||
DEFINE_PVD_PROPERTY_NOP( PxContactModifyCallback * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxCCDContactModifyCallback * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxSimulationEventCallback * )
|
||||
DEFINE_PVD_PROPERTY_NOP( physx::PxCudaContextManager* )
|
||||
DEFINE_PVD_PROPERTY_NOP( physx::PxCpuDispatcher * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxRigidActor )
|
||||
DEFINE_PVD_PROPERTY_NOP( const PxRigidActor )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxRigidActor& )
|
||||
DEFINE_PVD_PROPERTY_NOP( const PxRigidActor& )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxScene* )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxConstraint )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxConstraint* )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxConstraint& )
|
||||
DEFINE_PVD_PROPERTY_NOP( const PxConstraint& )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxAggregate * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxArticulationBase& )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxArticulation& )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxArticulationReducedCoordinate&)
|
||||
DEFINE_PVD_PROPERTY_NOP( const PxArticulationLink * )
|
||||
DEFINE_PVD_PROPERTY_NOP( const PxRigidDynamic * )
|
||||
DEFINE_PVD_PROPERTY_NOP( const PxRigidStatic * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxArticulationJointBase * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxArticulationJointReducedCoordinate * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxArticulationJoint * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxBroadPhaseCallback * )
|
||||
DEFINE_PVD_PROPERTY_NOP( const PxBroadPhaseRegion * )
|
||||
DEFINE_PVD_PROPERTY_NOP( PxU32 * )
|
||||
|
||||
};
|
||||
|
||||
template<typename TOperator>
|
||||
inline PvdPropertyFilter<TOperator> makePvdPropertyFilter( TOperator inOperator )
|
||||
{
|
||||
return PvdPropertyFilter<TOperator>( inOperator );
|
||||
}
|
||||
|
||||
template<typename TOperator>
|
||||
inline PvdPropertyFilter<TOperator> makePvdPropertyFilter( TOperator inOperator, PxU32* inKey, PxU32* inOffset )
|
||||
{
|
||||
return PvdPropertyFilter<TOperator>( inOperator, inKey, inOffset );
|
||||
}
|
||||
|
||||
template<typename TOperator, typename TFuncType>
|
||||
inline void visitWithPvdFilter( TOperator inOperator, TFuncType inFuncType )
|
||||
{
|
||||
PX_UNUSED(inFuncType);
|
||||
TFuncType( makePvdPropertyFilter( inOperator ) );
|
||||
}
|
||||
|
||||
template<typename TObjType, typename TOperator>
|
||||
inline void visitInstancePvdProperties( TOperator inOperator )
|
||||
{
|
||||
visitInstanceProperties<TObjType>( makePvdPropertyFilter( inOperator ) );
|
||||
}
|
||||
|
||||
template<typename TOperator>
|
||||
struct PvdAllPropertyVisitor
|
||||
{
|
||||
TOperator mOperator;
|
||||
PvdAllPropertyVisitor( TOperator op ) : mOperator( op ) {}
|
||||
template<typename TObjectType>
|
||||
bool operator()( const TObjectType* ) { visitInstancePvdProperties<TObjectType>( mOperator ); return false; }
|
||||
};
|
||||
|
||||
|
||||
template<typename TOperator>
|
||||
struct PvdAllInfoVisitor
|
||||
{
|
||||
TOperator mOperator;
|
||||
PvdAllInfoVisitor( TOperator op ) : mOperator( op ) {}
|
||||
template<typename TInfoType>
|
||||
void operator()( TInfoType inInfo )
|
||||
{
|
||||
inInfo.template visitType<bool>( PvdAllPropertyVisitor<TOperator>( mOperator ) );
|
||||
inInfo.visitBases( *this );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename TObjType, typename TOperator>
|
||||
inline void visitAllPvdProperties( TOperator inOperator )
|
||||
{
|
||||
visitAllProperties<TObjType>( makePvdPropertyFilter( inOperator ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename TOperator>
|
||||
inline void visitRigidDynamicPerFrameProperties( TOperator inOperator )
|
||||
{
|
||||
PvdPropertyFilter<TOperator> theFilter( inOperator );
|
||||
PxRigidDynamicGeneratedInfo theInfo;
|
||||
theFilter( theInfo.GlobalPose, 0 );
|
||||
theFilter( theInfo.LinearVelocity, 1 );
|
||||
theFilter( theInfo.AngularVelocity, 2 );
|
||||
theFilter( theInfo.IsSleeping, 3 );
|
||||
}
|
||||
|
||||
template<typename TOperator>
|
||||
inline void visitArticulationLinkPerFrameProperties( TOperator inOperator )
|
||||
{
|
||||
PvdPropertyFilter<TOperator> theFilter( inOperator );
|
||||
PxArticulationLinkGeneratedInfo theInfo;
|
||||
theFilter( theInfo.GlobalPose, 0 );
|
||||
theFilter( theInfo.LinearVelocity, 1 );
|
||||
theFilter( theInfo.AngularVelocity, 2 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,384 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
// This code is auto-generated by the PhysX Clang metadata generator. Do not edit or be
|
||||
// prepared for your edits to be quietly ignored next time the clang metadata generator is
|
||||
// run. You can find the most recent version of clang metadata generator by contacting
|
||||
// Chris Nuernberger <chrisn@nvidia.com> or Dilip or Adam.
|
||||
// The source code for the generate was at one time checked into:
|
||||
// physx/PhysXMetaDataGenerator/llvm/tools/clang/lib/Frontend/PhysXMetaDataAction.cpp
|
||||
#define THERE_IS_NO_INCLUDE_GUARD_HERE_FOR_A_REASON
|
||||
|
||||
PxPhysics_PropertiesStart,
|
||||
PxPhysics_TolerancesScale,
|
||||
PxPhysics_TriangleMeshes,
|
||||
PxPhysics_HeightFields,
|
||||
PxPhysics_ConvexMeshes,
|
||||
PxPhysics_BVHStructures,
|
||||
PxPhysics_Scenes,
|
||||
PxPhysics_Shapes,
|
||||
PxPhysics_Materials,
|
||||
PxPhysics_PropertiesStop,
|
||||
PxMaterial_PropertiesStart,
|
||||
PxMaterial_ReferenceCount,
|
||||
PxMaterial_DynamicFriction,
|
||||
PxMaterial_StaticFriction,
|
||||
PxMaterial_Restitution,
|
||||
PxMaterial_Flags,
|
||||
PxMaterial_FrictionCombineMode,
|
||||
PxMaterial_RestitutionCombineMode,
|
||||
PxMaterial_ConcreteTypeName,
|
||||
PxMaterial_UserData,
|
||||
PxMaterial_PropertiesStop,
|
||||
PxActor_PropertiesStart,
|
||||
PxActor_Scene,
|
||||
PxActor_Name,
|
||||
PxActor_ActorFlags,
|
||||
PxActor_DominanceGroup,
|
||||
PxActor_OwnerClient,
|
||||
PxActor_Aggregate,
|
||||
PxActor_UserData,
|
||||
PxActor_PropertiesStop,
|
||||
PxRigidActor_PropertiesStart,
|
||||
PxRigidActor_GlobalPose,
|
||||
PxRigidActor_Shapes,
|
||||
PxRigidActor_Constraints,
|
||||
PxRigidActor_PropertiesStop,
|
||||
PxRigidBody_PropertiesStart,
|
||||
PxRigidBody_CMassLocalPose,
|
||||
PxRigidBody_Mass,
|
||||
PxRigidBody_InvMass,
|
||||
PxRigidBody_MassSpaceInertiaTensor,
|
||||
PxRigidBody_MassSpaceInvInertiaTensor,
|
||||
PxRigidBody_LinearDamping,
|
||||
PxRigidBody_AngularDamping,
|
||||
PxRigidBody_LinearVelocity,
|
||||
PxRigidBody_AngularVelocity,
|
||||
PxRigidBody_MaxAngularVelocity,
|
||||
PxRigidBody_MaxLinearVelocity,
|
||||
PxRigidBody_RigidBodyFlags,
|
||||
PxRigidBody_MinCCDAdvanceCoefficient,
|
||||
PxRigidBody_MaxDepenetrationVelocity,
|
||||
PxRigidBody_MaxContactImpulse,
|
||||
PxRigidBody_PropertiesStop,
|
||||
PxRigidDynamic_PropertiesStart,
|
||||
PxRigidDynamic_IsSleeping,
|
||||
PxRigidDynamic_SleepThreshold,
|
||||
PxRigidDynamic_StabilizationThreshold,
|
||||
PxRigidDynamic_RigidDynamicLockFlags,
|
||||
PxRigidDynamic_WakeCounter,
|
||||
PxRigidDynamic_SolverIterationCounts,
|
||||
PxRigidDynamic_ContactReportThreshold,
|
||||
PxRigidDynamic_ConcreteTypeName,
|
||||
PxRigidDynamic_PropertiesStop,
|
||||
PxRigidStatic_PropertiesStart,
|
||||
PxRigidStatic_ConcreteTypeName,
|
||||
PxRigidStatic_PropertiesStop,
|
||||
PxArticulationLink_PropertiesStart,
|
||||
PxArticulationLink_InboundJoint,
|
||||
PxArticulationLink_InboundJointDof,
|
||||
PxArticulationLink_LinkIndex,
|
||||
PxArticulationLink_Children,
|
||||
PxArticulationLink_ConcreteTypeName,
|
||||
PxArticulationLink_PropertiesStop,
|
||||
PxArticulationJointBase_PropertiesStart,
|
||||
PxArticulationJointBase_ParentPose,
|
||||
PxArticulationJointBase_ChildPose,
|
||||
PxArticulationJointBase_PropertiesStop,
|
||||
PxArticulationJoint_PropertiesStart,
|
||||
PxArticulationJoint_TargetOrientation,
|
||||
PxArticulationJoint_TargetVelocity,
|
||||
PxArticulationJoint_DriveType,
|
||||
PxArticulationJoint_Stiffness,
|
||||
PxArticulationJoint_Damping,
|
||||
PxArticulationJoint_InternalCompliance,
|
||||
PxArticulationJoint_ExternalCompliance,
|
||||
PxArticulationJoint_SwingLimit,
|
||||
PxArticulationJoint_TangentialStiffness,
|
||||
PxArticulationJoint_TangentialDamping,
|
||||
PxArticulationJoint_SwingLimitContactDistance,
|
||||
PxArticulationJoint_SwingLimitEnabled,
|
||||
PxArticulationJoint_TwistLimit,
|
||||
PxArticulationJoint_TwistLimitEnabled,
|
||||
PxArticulationJoint_TwistLimitContactDistance,
|
||||
PxArticulationJoint_ConcreteTypeName,
|
||||
PxArticulationJoint_PropertiesStop,
|
||||
PxArticulationJointReducedCoordinate_PropertiesStart,
|
||||
PxArticulationJointReducedCoordinate_JointType,
|
||||
PxArticulationJointReducedCoordinate_Motion,
|
||||
PxArticulationJointReducedCoordinate_FrictionCoefficient,
|
||||
PxArticulationJointReducedCoordinate_ConcreteTypeName,
|
||||
PxArticulationJointReducedCoordinate_MaxJointVelocity,
|
||||
PxArticulationJointReducedCoordinate_PropertiesStop,
|
||||
PxArticulationBase_PropertiesStart,
|
||||
PxArticulationBase_Scene,
|
||||
PxArticulationBase_SolverIterationCounts,
|
||||
PxArticulationBase_IsSleeping,
|
||||
PxArticulationBase_SleepThreshold,
|
||||
PxArticulationBase_StabilizationThreshold,
|
||||
PxArticulationBase_WakeCounter,
|
||||
PxArticulationBase_Links,
|
||||
PxArticulationBase_Name,
|
||||
PxArticulationBase_Aggregate,
|
||||
PxArticulationBase_UserData,
|
||||
PxArticulationBase_PropertiesStop,
|
||||
PxArticulation_PropertiesStart,
|
||||
PxArticulation_MaxProjectionIterations,
|
||||
PxArticulation_SeparationTolerance,
|
||||
PxArticulation_InternalDriveIterations,
|
||||
PxArticulation_ExternalDriveIterations,
|
||||
PxArticulation_PropertiesStop,
|
||||
PxArticulationReducedCoordinate_PropertiesStart,
|
||||
PxArticulationReducedCoordinate_ArticulationFlags,
|
||||
PxArticulationReducedCoordinate_Dofs,
|
||||
PxArticulationReducedCoordinate_CacheDataSize,
|
||||
PxArticulationReducedCoordinate_CoefficientMatrixSize,
|
||||
PxArticulationReducedCoordinate_PropertiesStop,
|
||||
PxAggregate_PropertiesStart,
|
||||
PxAggregate_MaxNbActors,
|
||||
PxAggregate_Actors,
|
||||
PxAggregate_SelfCollision,
|
||||
PxAggregate_ConcreteTypeName,
|
||||
PxAggregate_PropertiesStop,
|
||||
PxConstraint_PropertiesStart,
|
||||
PxConstraint_Scene,
|
||||
PxConstraint_Actors,
|
||||
PxConstraint_Flags,
|
||||
PxConstraint_IsValid,
|
||||
PxConstraint_BreakForce,
|
||||
PxConstraint_MinResponseThreshold,
|
||||
PxConstraint_ConcreteTypeName,
|
||||
PxConstraint_PropertiesStop,
|
||||
PxShape_PropertiesStart,
|
||||
PxShape_ReferenceCount,
|
||||
PxShape_GeometryType,
|
||||
PxShape_Geometry,
|
||||
PxShape_LocalPose,
|
||||
PxShape_SimulationFilterData,
|
||||
PxShape_QueryFilterData,
|
||||
PxShape_Materials,
|
||||
PxShape_ContactOffset,
|
||||
PxShape_RestOffset,
|
||||
PxShape_TorsionalPatchRadius,
|
||||
PxShape_MinTorsionalPatchRadius,
|
||||
PxShape_Flags,
|
||||
PxShape_IsExclusive,
|
||||
PxShape_Name,
|
||||
PxShape_ConcreteTypeName,
|
||||
PxShape_UserData,
|
||||
PxShape_PropertiesStop,
|
||||
PxPruningStructure_PropertiesStart,
|
||||
PxPruningStructure_RigidActors,
|
||||
PxPruningStructure_ConcreteTypeName,
|
||||
PxPruningStructure_PropertiesStop,
|
||||
PxTolerancesScale_PropertiesStart,
|
||||
PxTolerancesScale_IsValid,
|
||||
PxTolerancesScale_Length,
|
||||
PxTolerancesScale_Speed,
|
||||
PxTolerancesScale_PropertiesStop,
|
||||
PxGeometry_PropertiesStart,
|
||||
PxGeometry_PropertiesStop,
|
||||
PxBoxGeometry_PropertiesStart,
|
||||
PxBoxGeometry_HalfExtents,
|
||||
PxBoxGeometry_PropertiesStop,
|
||||
PxCapsuleGeometry_PropertiesStart,
|
||||
PxCapsuleGeometry_Radius,
|
||||
PxCapsuleGeometry_HalfHeight,
|
||||
PxCapsuleGeometry_PropertiesStop,
|
||||
PxMeshScale_PropertiesStart,
|
||||
PxMeshScale_Scale,
|
||||
PxMeshScale_Rotation,
|
||||
PxMeshScale_PropertiesStop,
|
||||
PxConvexMeshGeometry_PropertiesStart,
|
||||
PxConvexMeshGeometry_Scale,
|
||||
PxConvexMeshGeometry_ConvexMesh,
|
||||
PxConvexMeshGeometry_MeshFlags,
|
||||
PxConvexMeshGeometry_PropertiesStop,
|
||||
PxSphereGeometry_PropertiesStart,
|
||||
PxSphereGeometry_Radius,
|
||||
PxSphereGeometry_PropertiesStop,
|
||||
PxPlaneGeometry_PropertiesStart,
|
||||
PxPlaneGeometry_PropertiesStop,
|
||||
PxTriangleMeshGeometry_PropertiesStart,
|
||||
PxTriangleMeshGeometry_Scale,
|
||||
PxTriangleMeshGeometry_MeshFlags,
|
||||
PxTriangleMeshGeometry_TriangleMesh,
|
||||
PxTriangleMeshGeometry_PropertiesStop,
|
||||
PxHeightFieldGeometry_PropertiesStart,
|
||||
PxHeightFieldGeometry_HeightField,
|
||||
PxHeightFieldGeometry_HeightScale,
|
||||
PxHeightFieldGeometry_RowScale,
|
||||
PxHeightFieldGeometry_ColumnScale,
|
||||
PxHeightFieldGeometry_HeightFieldFlags,
|
||||
PxHeightFieldGeometry_PropertiesStop,
|
||||
PxHeightFieldDesc_PropertiesStart,
|
||||
PxHeightFieldDesc_NbRows,
|
||||
PxHeightFieldDesc_NbColumns,
|
||||
PxHeightFieldDesc_Format,
|
||||
PxHeightFieldDesc_Samples,
|
||||
PxHeightFieldDesc_ConvexEdgeThreshold,
|
||||
PxHeightFieldDesc_Flags,
|
||||
PxHeightFieldDesc_PropertiesStop,
|
||||
PxScene_PropertiesStart,
|
||||
PxScene_Flags,
|
||||
PxScene_Limits,
|
||||
PxScene_Timestamp,
|
||||
PxScene_Actors,
|
||||
PxScene_Articulations,
|
||||
PxScene_Constraints,
|
||||
PxScene_Aggregates,
|
||||
PxScene_CpuDispatcher,
|
||||
PxScene_CudaContextManager,
|
||||
PxScene_SimulationEventCallback,
|
||||
PxScene_ContactModifyCallback,
|
||||
PxScene_CCDContactModifyCallback,
|
||||
PxScene_BroadPhaseCallback,
|
||||
PxScene_FilterShaderDataSize,
|
||||
PxScene_FilterShader,
|
||||
PxScene_FilterCallback,
|
||||
PxScene_KinematicKinematicFilteringMode,
|
||||
PxScene_StaticKinematicFilteringMode,
|
||||
PxScene_Gravity,
|
||||
PxScene_BounceThresholdVelocity,
|
||||
PxScene_CCDMaxPasses,
|
||||
PxScene_FrictionOffsetThreshold,
|
||||
PxScene_FrictionType,
|
||||
PxScene_VisualizationCullingBox,
|
||||
PxScene_StaticStructure,
|
||||
PxScene_DynamicStructure,
|
||||
PxScene_DynamicTreeRebuildRateHint,
|
||||
PxScene_SceneQueryUpdateMode,
|
||||
PxScene_SceneQueryStaticTimestamp,
|
||||
PxScene_BroadPhaseType,
|
||||
PxScene_BroadPhaseRegions,
|
||||
PxScene_TaskManager,
|
||||
PxScene_NbContactDataBlocks,
|
||||
PxScene_MaxNbContactDataBlocksUsed,
|
||||
PxScene_ContactReportStreamBufferSize,
|
||||
PxScene_SolverBatchSize,
|
||||
PxScene_SolverArticulationBatchSize,
|
||||
PxScene_WakeCounterResetValue,
|
||||
PxScene_UserData,
|
||||
PxScene_SimulationStatistics,
|
||||
PxScene_PropertiesStop,
|
||||
PxSceneLimits_PropertiesStart,
|
||||
PxSceneLimits_MaxNbActors,
|
||||
PxSceneLimits_MaxNbBodies,
|
||||
PxSceneLimits_MaxNbStaticShapes,
|
||||
PxSceneLimits_MaxNbDynamicShapes,
|
||||
PxSceneLimits_MaxNbAggregates,
|
||||
PxSceneLimits_MaxNbConstraints,
|
||||
PxSceneLimits_MaxNbRegions,
|
||||
PxSceneLimits_MaxNbBroadPhaseOverlaps,
|
||||
PxSceneLimits_PropertiesStop,
|
||||
PxgDynamicsMemoryConfig_PropertiesStart,
|
||||
PxgDynamicsMemoryConfig_ConstraintBufferCapacity,
|
||||
PxgDynamicsMemoryConfig_ContactBufferCapacity,
|
||||
PxgDynamicsMemoryConfig_TempBufferCapacity,
|
||||
PxgDynamicsMemoryConfig_ContactStreamSize,
|
||||
PxgDynamicsMemoryConfig_PatchStreamSize,
|
||||
PxgDynamicsMemoryConfig_ForceStreamCapacity,
|
||||
PxgDynamicsMemoryConfig_HeapCapacity,
|
||||
PxgDynamicsMemoryConfig_FoundLostPairsCapacity,
|
||||
PxgDynamicsMemoryConfig_PropertiesStop,
|
||||
PxSceneDesc_PropertiesStart,
|
||||
PxSceneDesc_ToDefault,
|
||||
PxSceneDesc_Gravity,
|
||||
PxSceneDesc_SimulationEventCallback,
|
||||
PxSceneDesc_ContactModifyCallback,
|
||||
PxSceneDesc_CcdContactModifyCallback,
|
||||
PxSceneDesc_FilterShaderData,
|
||||
PxSceneDesc_FilterShaderDataSize,
|
||||
PxSceneDesc_FilterShader,
|
||||
PxSceneDesc_FilterCallback,
|
||||
PxSceneDesc_KineKineFilteringMode,
|
||||
PxSceneDesc_StaticKineFilteringMode,
|
||||
PxSceneDesc_BroadPhaseType,
|
||||
PxSceneDesc_BroadPhaseCallback,
|
||||
PxSceneDesc_Limits,
|
||||
PxSceneDesc_FrictionType,
|
||||
PxSceneDesc_SolverType,
|
||||
PxSceneDesc_BounceThresholdVelocity,
|
||||
PxSceneDesc_FrictionOffsetThreshold,
|
||||
PxSceneDesc_CcdMaxSeparation,
|
||||
PxSceneDesc_SolverOffsetSlop,
|
||||
PxSceneDesc_Flags,
|
||||
PxSceneDesc_CpuDispatcher,
|
||||
PxSceneDesc_CudaContextManager,
|
||||
PxSceneDesc_StaticStructure,
|
||||
PxSceneDesc_DynamicStructure,
|
||||
PxSceneDesc_DynamicTreeRebuildRateHint,
|
||||
PxSceneDesc_SceneQueryUpdateMode,
|
||||
PxSceneDesc_UserData,
|
||||
PxSceneDesc_SolverBatchSize,
|
||||
PxSceneDesc_SolverArticulationBatchSize,
|
||||
PxSceneDesc_NbContactDataBlocks,
|
||||
PxSceneDesc_MaxNbContactDataBlocks,
|
||||
PxSceneDesc_MaxBiasCoefficient,
|
||||
PxSceneDesc_ContactReportStreamBufferSize,
|
||||
PxSceneDesc_CcdMaxPasses,
|
||||
PxSceneDesc_CcdThreshold,
|
||||
PxSceneDesc_WakeCounterResetValue,
|
||||
PxSceneDesc_SanityBounds,
|
||||
PxSceneDesc_GpuDynamicsConfig,
|
||||
PxSceneDesc_GpuMaxNumPartitions,
|
||||
PxSceneDesc_GpuComputeVersion,
|
||||
PxSceneDesc_PropertiesStop,
|
||||
PxSimulationStatistics_PropertiesStart,
|
||||
PxSimulationStatistics_NbActiveConstraints,
|
||||
PxSimulationStatistics_NbActiveDynamicBodies,
|
||||
PxSimulationStatistics_NbActiveKinematicBodies,
|
||||
PxSimulationStatistics_NbStaticBodies,
|
||||
PxSimulationStatistics_NbDynamicBodies,
|
||||
PxSimulationStatistics_NbKinematicBodies,
|
||||
PxSimulationStatistics_NbAggregates,
|
||||
PxSimulationStatistics_NbArticulations,
|
||||
PxSimulationStatistics_NbAxisSolverConstraints,
|
||||
PxSimulationStatistics_CompressedContactSize,
|
||||
PxSimulationStatistics_RequiredContactConstraintMemory,
|
||||
PxSimulationStatistics_PeakConstraintMemory,
|
||||
PxSimulationStatistics_NbDiscreteContactPairsTotal,
|
||||
PxSimulationStatistics_NbDiscreteContactPairsWithCacheHits,
|
||||
PxSimulationStatistics_NbDiscreteContactPairsWithContacts,
|
||||
PxSimulationStatistics_NbNewPairs,
|
||||
PxSimulationStatistics_NbLostPairs,
|
||||
PxSimulationStatistics_NbNewTouches,
|
||||
PxSimulationStatistics_NbLostTouches,
|
||||
PxSimulationStatistics_NbPartitions,
|
||||
PxSimulationStatistics_NbBroadPhaseAdds,
|
||||
PxSimulationStatistics_NbBroadPhaseRemoves,
|
||||
PxSimulationStatistics_NbDiscreteContactPairs,
|
||||
PxSimulationStatistics_NbModifiedContactPairs,
|
||||
PxSimulationStatistics_NbCCDPairs,
|
||||
PxSimulationStatistics_NbTriggerPairs,
|
||||
PxSimulationStatistics_NbShapes,
|
||||
PxSimulationStatistics_PropertiesStop,
|
||||
|
||||
|
||||
#undef THERE_IS_NO_INCLUDE_GUARD_HERE_FOR_A_REASON
|
||||
File diff suppressed because it is too large
Load Diff
388
physx/source/physxmetadata/core/include/PxMetaDataCompare.h
Normal file
388
physx/source/physxmetadata/core/include/PxMetaDataCompare.h
Normal file
@ -0,0 +1,388 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
#ifndef PX_METADATACOMPARE_H
|
||||
#define PX_METADATACOMPARE_H
|
||||
#include "PxMetaDataObjects.h"
|
||||
#include "PsInlineArray.h"
|
||||
|
||||
//Implement a basic equality comparison system based on the meta data system.
|
||||
//if you implement a particular areequal specialized to exactly your type
|
||||
//before including this file it will be called in preference to the completely
|
||||
//generic one shown here.
|
||||
|
||||
|
||||
//If you don't care about the failure prop name you are welcome to pass in 'null',
|
||||
template<typename TBaseObjType>
|
||||
bool areEqual( const TBaseObjType& lhs, const TBaseObjType& rhs, const char** outFailurePropName );
|
||||
//We don't have the ability right now to handle these types.
|
||||
inline bool areEqual( const PxAggregate&, const PxAggregate& ) { return true; }
|
||||
inline bool areEqual( const PxSimulationFilterShader&, const PxSimulationFilterShader& ) { return true; }
|
||||
inline bool areEqual( const PxSimulationFilterCallback&, const PxSimulationFilterCallback& ) { return true; }
|
||||
inline bool areEqual( const PxConvexMesh&, const PxConvexMesh& ) { return true; }
|
||||
inline bool areEqual( const PxTriangleMesh&, const PxTriangleMesh& ) { return true; }
|
||||
inline bool areEqual( const PxBVH33TriangleMesh&, const PxBVH33TriangleMesh& ) { return true; }
|
||||
inline bool areEqual( const PxBVH34TriangleMesh&, const PxBVH34TriangleMesh& ) { return true; }
|
||||
inline bool areEqual( const PxHeightField&, const PxHeightField& ) { return true; }
|
||||
inline bool areEqual( const void* inLhs, const void* inRhs ) { return inLhs == inRhs; }
|
||||
inline bool areEqual( void* inLhs, void* inRhs ) { return inLhs == inRhs; }
|
||||
|
||||
//Operators are copied, so this object needs to point
|
||||
//to the important data rather than reference or own it.
|
||||
template<typename TBaseObjType>
|
||||
struct EqualityOp
|
||||
{
|
||||
bool* mVal;
|
||||
const TBaseObjType* mLhs;
|
||||
const TBaseObjType* mRhs;
|
||||
const char** mFailurePropName;
|
||||
|
||||
EqualityOp( bool& inVal, const TBaseObjType& inLhs, const TBaseObjType& inRhs, const char*& inFailurePropName )
|
||||
: mVal( &inVal )
|
||||
, mLhs( &inLhs )
|
||||
, mRhs( &inRhs )
|
||||
, mFailurePropName( &inFailurePropName )
|
||||
{
|
||||
}
|
||||
|
||||
bool hasFailed() { return *mVal == false; }
|
||||
//Ensure failure propagates the result a ways.
|
||||
void update( bool inResult, const char* inName )
|
||||
{
|
||||
*mVal = *mVal && inResult;
|
||||
if ( hasFailed() )
|
||||
*mFailurePropName = inName;
|
||||
}
|
||||
|
||||
//ignore any properties pointering back to the scene.
|
||||
template<PxU32 TKey, typename TObjType>
|
||||
void operator()( const PxReadOnlyPropertyInfo<TKey, TObjType, PxScene*> & inProp, PxU32 ) {}
|
||||
|
||||
template<PxU32 TKey, typename TObjType>
|
||||
void operator()( const PxReadOnlyPropertyInfo<TKey, TObjType, const PxScene*> & inProp, PxU32 ) {}
|
||||
|
||||
//ignore any properties pointering back to the impl.
|
||||
template<PxU32 TKey, typename TObjType>
|
||||
void operator()(const PxReadOnlyPropertyInfo<TKey, TObjType, void*> & inProp, PxU32) {}
|
||||
|
||||
template<PxU32 TKey, typename TObjType>
|
||||
void operator()(const PxReadOnlyPropertyInfo<TKey, TObjType, const void*> & inProp, PxU32) {}
|
||||
|
||||
//ignore all of these properties because they just point back to the 'this' object and cause
|
||||
//a stack overflow.
|
||||
|
||||
//Children is unnecessary and articulation points back to the source.
|
||||
void operator()( const PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxArticulationLink_Children, PxArticulationLink, PxArticulationLink* >& inProp, PxU32 ) {}
|
||||
void operator()( const PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxRigidActor_Constraints, PxRigidActor, PxConstraint* >& inProp, PxU32 ){}
|
||||
void operator()( const PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxAggregate_Actors, PxAggregate, PxActor* >& inProp, PxU32 ) {}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TGetPropType>
|
||||
void operator()( const PxBufferCollectionPropertyInfo<TKey, TObjType, TGetPropType> & inProp, PxU32 )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TGetPropType>
|
||||
void operator()( const PxReadOnlyPropertyInfo<TKey, TObjType, TGetPropType> & inProp, PxU32 )
|
||||
{
|
||||
if ( hasFailed() ) return;
|
||||
TGetPropType lhs( inProp.get( mLhs ) );
|
||||
TGetPropType rhs( inProp.get( mRhs ) );
|
||||
update( areEqual( lhs, rhs, NULL ), inProp.mName );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropType>
|
||||
void operator()( const PxRangePropertyInfo<TKey, TObjType, TPropType> & inProp, PxU32 )
|
||||
{
|
||||
if ( hasFailed() ) return;
|
||||
TPropType lhsl, lhsr, rhsl, rhsr;
|
||||
inProp.get( mLhs, lhsl, lhsr );
|
||||
inProp.get( mRhs, rhsl, rhsr );
|
||||
update( areEqual( lhsl, rhsl, NULL ), inProp.mName );
|
||||
update( areEqual( lhsr, rhsr, NULL ), inProp.mName );
|
||||
}
|
||||
|
||||
//Indexed properties where we don't know the range of index types are ignored
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropType>
|
||||
void compareIndex( const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropType> &, bool ) {}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropType>
|
||||
void compareIndex( const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropType> &inProp, const PxU32ToName* inNames )
|
||||
{
|
||||
for ( const PxU32ToName* theName = inNames;
|
||||
theName->mName != NULL && !hasFailed();
|
||||
++theName )
|
||||
{
|
||||
TIndexType theIndex( static_cast<TIndexType>( theName->mValue ) );
|
||||
update( areEqual( inProp.get( mLhs, theIndex ), inProp.get( mRhs, theIndex ), NULL ), inProp.mName );
|
||||
}
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropType>
|
||||
void operator()( const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropType> & inProp, PxU32 )
|
||||
{
|
||||
if ( hasFailed() ) return;
|
||||
compareIndex( inProp, PxEnumTraits<TIndexType>().NameConversion );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType>
|
||||
void operator()( const PxReadOnlyCollectionPropertyInfo<TKey, TObjType, TCollectionType> & inProp, PxU32 )
|
||||
{
|
||||
if ( hasFailed() ) return;
|
||||
physx::shdfnd::InlineArray<TCollectionType, 20> lhsArray;
|
||||
physx::shdfnd::InlineArray<TCollectionType, 20> rhsArray;
|
||||
PxU32 size = inProp.size( mLhs );
|
||||
if ( size != inProp.size( mRhs ) )
|
||||
update( false, inProp.mName );
|
||||
else
|
||||
{
|
||||
lhsArray.resize( size );
|
||||
rhsArray.resize( size );
|
||||
inProp.get( mLhs, lhsArray.begin(), size );
|
||||
inProp.get( mRhs, rhsArray.begin(), size );
|
||||
for ( PxU32 idx =0; idx < size && !hasFailed(); ++idx )
|
||||
update( areEqual( lhsArray[idx], rhsArray[idx], NULL ), inProp.mName );
|
||||
}
|
||||
}
|
||||
|
||||
//Filtered collections where we can't know the range of filter values are ignored.
|
||||
template<PxU32 TKey, typename TObjType, typename TFilterType, typename TCollectionType>
|
||||
void compare( const PxReadOnlyFilteredCollectionPropertyInfo< TKey, TObjType, TFilterType, TCollectionType >&, bool ) {}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TFilterType, typename TCollectionType>
|
||||
void compare( const PxReadOnlyFilteredCollectionPropertyInfo< TKey, TObjType, TFilterType, TCollectionType >& inProp, const PxU32ToName* inNames )
|
||||
{
|
||||
//Exaustively compare all items.
|
||||
physx::shdfnd::InlineArray<TCollectionType*, 20> lhsArray;
|
||||
physx::shdfnd::InlineArray<TCollectionType*, 20> rhsArray;
|
||||
for ( const PxU32ToName* theName = inNames;
|
||||
theName->mName != NULL && !hasFailed();
|
||||
++theName )
|
||||
{
|
||||
TFilterType theFilter( static_cast<TFilterType>( theName->mValue ) );
|
||||
PxU32 size = inProp.size( mLhs, theFilter );
|
||||
if ( size != inProp.size( mRhs, theFilter ) )
|
||||
update( false, inProp.mName );
|
||||
else
|
||||
{
|
||||
lhsArray.resize( size );
|
||||
rhsArray.resize( size );
|
||||
inProp.get( mLhs, theFilter, lhsArray.begin(), size );
|
||||
inProp.get( mRhs, theFilter, rhsArray.begin(), size );
|
||||
for ( PxU32 idx =0; idx < size && !hasFailed(); ++idx )
|
||||
update( areEqual( lhsArray[idx], rhsArray[idx], NULL ), inProp.mName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TFilterType, typename TCollectionType>
|
||||
void operator()( const PxReadOnlyFilteredCollectionPropertyInfo< TKey, TObjType, TFilterType, TCollectionType >& inProp, PxU32 )
|
||||
{
|
||||
if ( hasFailed() ) return;
|
||||
compare( inProp, PxEnumTraits<TFilterType>().NameConversion );
|
||||
}
|
||||
|
||||
template<typename TGeometryType, typename TPropertyType>
|
||||
void compareGeometry( const TPropertyType& inProp )
|
||||
{
|
||||
TGeometryType lhs;
|
||||
TGeometryType rhs;
|
||||
bool lsuc = inProp.getGeometry( mLhs, lhs );
|
||||
bool rsuc = inProp.getGeometry( mRhs, rhs );
|
||||
if ( !( lsuc && rsuc ) )
|
||||
update( false, inProp.mName );
|
||||
else
|
||||
update( areEqual( lhs, rhs, NULL ), inProp.mName );
|
||||
}
|
||||
|
||||
void operator()( const PxShapeGeometryProperty& inProp, PxU32 )
|
||||
{
|
||||
if ( hasFailed() ) return;
|
||||
PxGeometryType::Enum lhsType( inProp.getGeometryType( mLhs ) );
|
||||
PxGeometryType::Enum rhsType( inProp.getGeometryType( mRhs ) );
|
||||
if ( lhsType != rhsType )
|
||||
update( false, inProp.mName );
|
||||
else
|
||||
{
|
||||
switch( lhsType )
|
||||
{
|
||||
case PxGeometryType::eSPHERE: compareGeometry<PxSphereGeometry>(inProp); break;
|
||||
case PxGeometryType::ePLANE: compareGeometry<PxPlaneGeometry>(inProp); break;
|
||||
case PxGeometryType::eCAPSULE: compareGeometry<PxCapsuleGeometry>(inProp); break;
|
||||
case PxGeometryType::eBOX: compareGeometry<PxBoxGeometry>(inProp); break;
|
||||
case PxGeometryType::eCONVEXMESH: compareGeometry<PxConvexMeshGeometry>(inProp); break;
|
||||
case PxGeometryType::eTRIANGLEMESH: compareGeometry<PxTriangleMeshGeometry>(inProp); break;
|
||||
case PxGeometryType::eHEIGHTFIELD: compareGeometry<PxHeightFieldGeometry>(inProp); break;
|
||||
default: PX_ASSERT( false ); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
inline bool areEqual( const char* lhs, const char* rhs, const char**, const PxUnknownClassInfo& )
|
||||
{
|
||||
if ( lhs && rhs ) return strcmp( lhs, rhs ) == 0;
|
||||
if ( lhs || rhs ) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool areEqual( PxReal inLhs, PxReal inRhs )
|
||||
{
|
||||
return PxAbs( inLhs - inRhs ) < 1e-5f;
|
||||
}
|
||||
|
||||
inline bool areEqual( PxVec3& lhs, PxVec3& rhs )
|
||||
{
|
||||
return areEqual( lhs.x, rhs.x )
|
||||
&& areEqual( lhs.y, rhs.y )
|
||||
&& areEqual( lhs.z, rhs.z );
|
||||
}
|
||||
|
||||
inline bool areEqual( const PxVec3& lhs, const PxVec3& rhs )
|
||||
{
|
||||
return areEqual( lhs.x, rhs.x )
|
||||
&& areEqual( lhs.y, rhs.y )
|
||||
&& areEqual( lhs.z, rhs.z );
|
||||
}
|
||||
|
||||
inline bool areEqual( const PxVec4& lhs, const PxVec4& rhs )
|
||||
{
|
||||
return areEqual( lhs.x, rhs.x )
|
||||
&& areEqual( lhs.y, rhs.y )
|
||||
&& areEqual( lhs.z, rhs.z )
|
||||
&& areEqual( lhs.w, rhs.w );
|
||||
}
|
||||
|
||||
inline bool areEqual( const PxQuat& lhs, const PxQuat& rhs )
|
||||
{
|
||||
return areEqual( lhs.x, rhs.x )
|
||||
&& areEqual( lhs.y, rhs.y )
|
||||
&& areEqual( lhs.z, rhs.z )
|
||||
&& areEqual( lhs.w, rhs.w );
|
||||
}
|
||||
|
||||
|
||||
inline bool areEqual( const PxTransform& lhs, const PxTransform& rhs )
|
||||
{
|
||||
return areEqual(lhs.p, rhs.p) && areEqual(lhs.q, rhs.q);
|
||||
}
|
||||
|
||||
|
||||
inline bool areEqual( const PxBounds3& inLhs, const PxBounds3& inRhs )
|
||||
{
|
||||
return areEqual(inLhs.minimum,inRhs.minimum)
|
||||
&& areEqual(inLhs.maximum,inRhs.maximum);
|
||||
}
|
||||
|
||||
inline bool areEqual( const PxMetaDataPlane& lhs, const PxMetaDataPlane& rhs )
|
||||
{
|
||||
return areEqual( lhs.normal.x, rhs.normal.x )
|
||||
&& areEqual( lhs.normal.y, rhs.normal.y )
|
||||
&& areEqual( lhs.normal.z, rhs.normal.z )
|
||||
&& areEqual( lhs.distance, rhs.distance );
|
||||
}
|
||||
|
||||
template<typename TBaseObjType>
|
||||
inline bool areEqual( const TBaseObjType& lhs, const TBaseObjType& rhs )
|
||||
{
|
||||
return lhs == rhs;
|
||||
}
|
||||
|
||||
//If we don't know the class type, we must result in == operator
|
||||
template<typename TBaseObjType>
|
||||
inline bool areEqual( const TBaseObjType& lhs, const TBaseObjType& rhs, const char**, const PxUnknownClassInfo& )
|
||||
{
|
||||
return areEqual( lhs, rhs );
|
||||
}
|
||||
|
||||
//If we don't know the class type, we must result in == operator
|
||||
template<typename TBaseObjType, typename TTraitsType>
|
||||
inline bool areEqual( const TBaseObjType& lhs, const TBaseObjType& rhs, const char** outFailurePropName, const TTraitsType& )
|
||||
{
|
||||
const char* theFailureName = NULL;
|
||||
bool result = true;
|
||||
static int i = 0;
|
||||
++i;
|
||||
visitAllProperties<TBaseObjType>( EqualityOp<TBaseObjType>( result, lhs, rhs, theFailureName ) );
|
||||
if ( outFailurePropName != NULL && theFailureName )
|
||||
*outFailurePropName = theFailureName;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
template<typename TBaseObjType>
|
||||
inline bool areEqualPointerCheck( const TBaseObjType& lhs, const TBaseObjType& rhs, const char** outFailurePropName, int )
|
||||
{
|
||||
return areEqual( lhs, rhs, outFailurePropName, PxClassInfoTraits<TBaseObjType>().Info );
|
||||
}
|
||||
|
||||
inline bool areEqualPointerCheck( const void* lhs, const void* rhs, const char**, bool )
|
||||
{
|
||||
return lhs == rhs;
|
||||
}
|
||||
|
||||
inline bool areEqualPointerCheck( const char* lhs, const char* rhs, const char** outFailurePropName, bool )
|
||||
{
|
||||
bool bRet = true;
|
||||
if ( lhs && rhs ) bRet = strcmp( lhs, rhs ) == 0;
|
||||
else if ( lhs || rhs ) bRet = false;
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
inline bool areEqualPointerCheck( void* lhs, void* rhs, const char**, bool )
|
||||
{
|
||||
return lhs == rhs;
|
||||
}
|
||||
|
||||
template<typename TBaseObjType>
|
||||
inline bool areEqualPointerCheck( const TBaseObjType& lhs, const TBaseObjType& rhs, const char** outFailurePropName, bool )
|
||||
{
|
||||
if ( lhs && rhs )
|
||||
return areEqual( *lhs, *rhs, outFailurePropName );
|
||||
if ( lhs || rhs )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
template < typename Tp >
|
||||
struct is_pointer { static const int val = 0; };
|
||||
|
||||
template < typename Tp >
|
||||
struct is_pointer<Tp*> { static const bool val = true; };
|
||||
|
||||
|
||||
template<typename TBaseObjType>
|
||||
inline bool areEqual( const TBaseObjType& lhs, const TBaseObjType& rhs, const char** outFailurePropName )
|
||||
{
|
||||
return areEqualPointerCheck( lhs, rhs, outFailurePropName, is_pointer<TBaseObjType>::val );
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,37 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
#ifndef PX_META_DATA_CPP_PREFIX_H
|
||||
#define PX_META_DATA_CPP_PREFIX_H
|
||||
|
||||
//Header that is only included by the clang-generated cpp files.
|
||||
//Used to change compilation settings where necessary for only those files.
|
||||
|
||||
|
||||
#endif
|
||||
669
physx/source/physxmetadata/core/include/PxMetaDataObjects.h
Normal file
669
physx/source/physxmetadata/core/include/PxMetaDataObjects.h
Normal file
@ -0,0 +1,669 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
#ifndef PX_METADATAOBJECTS_H
|
||||
#define PX_METADATAOBJECTS_H
|
||||
#include "foundation/PxMemory.h"
|
||||
|
||||
// include the base headers instead of the PxPhysicsAPI.h
|
||||
//Geometry Library
|
||||
#include "geometry/PxBoxGeometry.h"
|
||||
#include "geometry/PxCapsuleGeometry.h"
|
||||
#include "geometry/PxConvexMesh.h"
|
||||
#include "geometry/PxConvexMeshGeometry.h"
|
||||
#include "geometry/PxGeometry.h"
|
||||
#include "geometry/PxGeometryHelpers.h"
|
||||
#include "geometry/PxGeometryQuery.h"
|
||||
#include "geometry/PxHeightField.h"
|
||||
#include "geometry/PxHeightFieldDesc.h"
|
||||
#include "geometry/PxHeightFieldFlag.h"
|
||||
#include "geometry/PxHeightFieldGeometry.h"
|
||||
#include "geometry/PxHeightFieldSample.h"
|
||||
#include "geometry/PxMeshQuery.h"
|
||||
#include "geometry/PxMeshScale.h"
|
||||
#include "geometry/PxPlaneGeometry.h"
|
||||
#include "geometry/PxSimpleTriangleMesh.h"
|
||||
#include "geometry/PxSphereGeometry.h"
|
||||
#include "geometry/PxTriangle.h"
|
||||
#include "geometry/PxTriangleMesh.h"
|
||||
#include "geometry/PxTriangleMeshGeometry.h"
|
||||
|
||||
// PhysX Core SDK
|
||||
#include "PxActor.h"
|
||||
#include "PxAggregate.h"
|
||||
#include "PxArticulation.h"
|
||||
#include "PxArticulationJoint.h"
|
||||
#include "PxArticulationReducedCoordinate.h"
|
||||
#include "PxArticulationJointReducedCoordinate.h"
|
||||
#include "PxArticulationLink.h"
|
||||
#include "PxBatchQuery.h"
|
||||
#include "PxBatchQueryDesc.h"
|
||||
#include "PxClient.h"
|
||||
#include "PxConstraint.h"
|
||||
#include "PxConstraintDesc.h"
|
||||
#include "PxContact.h"
|
||||
#include "PxContactModifyCallback.h"
|
||||
#include "PxDeletionListener.h"
|
||||
#include "PxFiltering.h"
|
||||
#include "PxForceMode.h"
|
||||
#include "PxLockedData.h"
|
||||
#include "PxMaterial.h"
|
||||
#include "PxPhysics.h"
|
||||
#include "PxPhysicsVersion.h"
|
||||
#include "PxPhysXConfig.h"
|
||||
#include "PxQueryFiltering.h"
|
||||
#include "PxQueryReport.h"
|
||||
#include "PxRigidActor.h"
|
||||
#include "PxRigidBody.h"
|
||||
#include "PxRigidDynamic.h"
|
||||
#include "PxRigidStatic.h"
|
||||
#include "PxScene.h"
|
||||
#include "PxSceneDesc.h"
|
||||
#include "PxSceneLock.h"
|
||||
#include "PxShape.h"
|
||||
#include "PxSimulationEventCallback.h"
|
||||
#include "PxSimulationStatistics.h"
|
||||
#include "PxVisualizationParameter.h"
|
||||
#include "PxPruningStructure.h"
|
||||
|
||||
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
namespace physx
|
||||
{
|
||||
|
||||
class PxArticulationLink;
|
||||
class PxArticulationJoint;
|
||||
class PxArticulationJointReducedCoordinate;
|
||||
class PxArticulationJointBase;
|
||||
|
||||
struct PxPropertyInfoName
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
Unnamed = 0,
|
||||
#include "PxAutoGeneratedMetaDataObjectNames.h"
|
||||
LastPxPropertyInfoName
|
||||
};
|
||||
};
|
||||
|
||||
struct PxU32ToName
|
||||
{
|
||||
const char* mName;
|
||||
PxU32 mValue;
|
||||
};
|
||||
|
||||
struct PxPropertyInfoBase
|
||||
{
|
||||
const char* mName;
|
||||
PxU32 mKey;
|
||||
PxPropertyInfoBase( const char* n, PxU32 inKey )
|
||||
: mName( n )
|
||||
, mKey( inKey )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template<PxU32 TKey>
|
||||
struct PxPropertyInfoParameterizedBase : public PxPropertyInfoBase
|
||||
{
|
||||
PxPropertyInfoParameterizedBase( const char* inName )
|
||||
: PxPropertyInfoBase( inName, TKey ) {}
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
struct PxReadOnlyPropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef TPropertyType (*TGetterType)( const TObjType* );
|
||||
TGetterType mGetter;
|
||||
PxReadOnlyPropertyInfo( const char* inName, TGetterType inGetter )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( inName )
|
||||
, mGetter( inGetter ) {}
|
||||
TPropertyType get( const TObjType* inObj ) const { return mGetter( inObj ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
struct PxWriteOnlyPropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef void(*TSetterType)( TObjType*, TPropertyType inArg );
|
||||
TSetterType mSetter;
|
||||
PxWriteOnlyPropertyInfo( const char* inName, TSetterType inSetter )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( inName )
|
||||
, mSetter( inSetter ) {}
|
||||
void set( TObjType* inObj, TPropertyType inArg ) const { mSetter( inObj, inArg ); }
|
||||
};
|
||||
|
||||
|
||||
//Define the property types on the auto-generated objects.
|
||||
template<PxU32 TKey, typename TObjType, typename TSetPropType, typename TGetPropType>
|
||||
struct PxPropertyInfo : public PxReadOnlyPropertyInfo<TKey, TObjType, TGetPropType>
|
||||
{
|
||||
typedef typename PxReadOnlyPropertyInfo<TKey, TObjType, TGetPropType>::TGetterType TGetterType;
|
||||
typedef void(*TSetterType)( TObjType*, TSetPropType inArg );
|
||||
TSetterType mSetter;
|
||||
|
||||
PxPropertyInfo( const char* inName, TSetterType inSetter, TGetterType inGetter )
|
||||
: PxReadOnlyPropertyInfo<TKey, TObjType, TGetPropType>( inName, inGetter )
|
||||
, mSetter( inSetter ) {}
|
||||
void set( TObjType* inObj, TSetPropType inArg ) const { mSetter( inObj, inArg ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
struct PxRangePropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef void (*TSetterType)( TObjType*,TPropertyType,TPropertyType);
|
||||
typedef void (*TGetterType)( const TObjType*,TPropertyType&,TPropertyType&);
|
||||
|
||||
const char* mArg0Name;
|
||||
const char* mArg1Name;
|
||||
|
||||
TSetterType mSetter;
|
||||
TGetterType mGetter;
|
||||
|
||||
PxRangePropertyInfo( const char* name, const char* arg0Name, const char* arg1Name
|
||||
, TSetterType setter, TGetterType getter )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( name )
|
||||
, mArg0Name( arg0Name )
|
||||
, mArg1Name( arg1Name )
|
||||
, mSetter( setter )
|
||||
, mGetter( getter )
|
||||
{
|
||||
}
|
||||
void set( TObjType* inObj, TPropertyType arg0, TPropertyType arg1 ) const { mSetter( inObj, arg0, arg1 ); }
|
||||
void get( const TObjType* inObj, TPropertyType& arg0, TPropertyType& arg1 ) const { mGetter( inObj, arg0, arg1 ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
struct PxIndexedPropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef void (*TSetterType)( TObjType*, TIndexType, TPropertyType );
|
||||
typedef TPropertyType (*TGetterType)( const TObjType* inObj, TIndexType );
|
||||
|
||||
TSetterType mSetter;
|
||||
TGetterType mGetter;
|
||||
|
||||
PxIndexedPropertyInfo( const char* name, TSetterType setter, TGetterType getter )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( name )
|
||||
, mSetter( setter )
|
||||
, mGetter( getter )
|
||||
{
|
||||
}
|
||||
void set( TObjType* inObj, TIndexType inIndex, TPropertyType arg ) const { mSetter( inObj, inIndex, arg ); }
|
||||
TPropertyType get( const TObjType* inObj, TIndexType inIndex ) const { return mGetter( inObj, inIndex ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
struct PxExtendedIndexedPropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef PxU32 (*TNbObjectsMember)( const TObjType* );
|
||||
typedef void (*TSetterType)( TObjType*, TIndexType, TPropertyType );
|
||||
typedef TPropertyType (*TGetterType)( const TObjType* inObj, TIndexType );
|
||||
|
||||
TSetterType mSetter;
|
||||
TGetterType mGetter;
|
||||
PxU32 mCount;
|
||||
TNbObjectsMember mNbObjectsMember;
|
||||
|
||||
PxExtendedIndexedPropertyInfo( const char* name, TGetterType getter, TNbObjectsMember inNb, TSetterType setter)
|
||||
: PxPropertyInfoParameterizedBase<TKey>( name )
|
||||
, mSetter( setter )
|
||||
, mGetter( getter )
|
||||
, mNbObjectsMember( inNb )
|
||||
{
|
||||
}
|
||||
|
||||
PxU32 size( const TObjType* inObj ) const { return mNbObjectsMember( inObj ); }
|
||||
void set( TObjType* inObj, TIndexType inIndex, TPropertyType arg ) const { mSetter( inObj, inIndex, arg ); }
|
||||
TPropertyType get( const TObjType* inObj, TIndexType inIndex ) const { return mGetter( inObj, inIndex ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndex1Type, typename TIndex2Type, typename TPropertyType>
|
||||
struct PxDualIndexedPropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef void (*TSetterType)( TObjType*, TIndex1Type, TIndex2Type, TPropertyType );
|
||||
typedef TPropertyType (*TGetterType)( const TObjType* inObj, TIndex1Type, TIndex2Type );
|
||||
|
||||
TSetterType mSetter;
|
||||
TGetterType mGetter;
|
||||
|
||||
PxDualIndexedPropertyInfo( const char* name, TSetterType setter, TGetterType getter )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( name )
|
||||
, mSetter( setter )
|
||||
, mGetter( getter )
|
||||
{
|
||||
}
|
||||
void set( TObjType* inObj, TIndex1Type inIdx1, TIndex2Type inIdx2, TPropertyType arg ) const { mSetter( inObj, inIdx1, inIdx2, arg ); }
|
||||
TPropertyType get( const TObjType* inObj, TIndex1Type inIdx1, TIndex2Type inIdx2 ) const { return mGetter( inObj, inIdx1, inIdx2 ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndex1Type, typename TIndex2Type, typename TPropertyType>
|
||||
struct PxExtendedDualIndexedPropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef void (*TSetterType)( TObjType*, TIndex1Type, TIndex2Type, TPropertyType );
|
||||
typedef TPropertyType (*TGetterType)( const TObjType* inObj, TIndex1Type, TIndex2Type );
|
||||
|
||||
TSetterType mSetter;
|
||||
TGetterType mGetter;
|
||||
PxU32 mId0Count;
|
||||
PxU32 mId1Count;
|
||||
|
||||
PxExtendedDualIndexedPropertyInfo( const char* name, TSetterType setter, TGetterType getter, PxU32 id0Count, PxU32 id1Count )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( name )
|
||||
, mSetter( setter )
|
||||
, mGetter( getter )
|
||||
, mId0Count( id0Count )
|
||||
, mId1Count( id1Count )
|
||||
{
|
||||
}
|
||||
|
||||
void set( TObjType* inObj, TIndex1Type inIdx1, TIndex2Type inIdx2, TPropertyType arg ) const { mSetter( inObj, inIdx1, inIdx2, arg ); }
|
||||
TPropertyType get( const TObjType* inObj, TIndex1Type inIdx1, TIndex2Type inIdx2 ) const { return mGetter( inObj, inIdx1, inIdx2 ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType>
|
||||
struct PxBufferCollectionPropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef PxU32 (*TNbObjectsMember)( const TObjType* );
|
||||
typedef PxU32 (*TGetObjectsMember)( const TObjType*, TCollectionType*, PxU32 );
|
||||
typedef void (*TSetObjectsMember)( TObjType*, TCollectionType*, PxU32 );
|
||||
|
||||
TGetObjectsMember mGetObjectsMember;
|
||||
TNbObjectsMember mNbObjectsMember;
|
||||
TSetObjectsMember mSetObjectsMember;
|
||||
|
||||
PxBufferCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TSetObjectsMember inSet )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( inName )
|
||||
, mGetObjectsMember( inGetter )
|
||||
, mNbObjectsMember( inNb )
|
||||
, mSetObjectsMember( inSet )
|
||||
{
|
||||
}
|
||||
PxU32 size( const TObjType* inObj ) const { return mNbObjectsMember( inObj ); }
|
||||
PxU32 get( const TObjType* inObj, TCollectionType* inBuffer, PxU32 inNumItems ) const { return mGetObjectsMember( inObj, inBuffer, inNumItems ); }
|
||||
void set( TObjType* inObj, TCollectionType* inBuffer, PxU32 inNumItems ) const { mSetObjectsMember( inObj, inBuffer, inNumItems); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
struct PxFixedSizeLookupTablePropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef PxU32 (*TNbObjectsMember)( const TObjType* );
|
||||
typedef PxReal (*TGetXMember)( const TObjType*, PxU32 );
|
||||
typedef PxReal (*TGetYMember)( const TObjType*, PxU32 );
|
||||
typedef void (*TAddPairMember)( TObjType*, PxReal, PxReal );
|
||||
typedef void (*TClearMember)( TObjType* );
|
||||
|
||||
TGetXMember mGetXMember;
|
||||
TGetYMember mGetYMember;
|
||||
TNbObjectsMember mNbObjectsMember;
|
||||
TAddPairMember mAddPairMember;
|
||||
TClearMember mClearMember;
|
||||
|
||||
PxFixedSizeLookupTablePropertyInfo( const char* inName, TGetXMember inGetterX, TGetYMember inGetterY, TNbObjectsMember inNb, TAddPairMember inAddPair, TClearMember inClear )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( inName )
|
||||
, mGetXMember( inGetterX )
|
||||
, mGetYMember( inGetterY )
|
||||
, mNbObjectsMember( inNb )
|
||||
, mAddPairMember( inAddPair )
|
||||
, mClearMember( inClear )
|
||||
|
||||
{
|
||||
}
|
||||
PxU32 size( const TObjType* inObj ) const { return mNbObjectsMember( inObj ); }
|
||||
PxReal getX( const TObjType* inObj, const PxU32 index ) const { return mGetXMember( inObj, index ); }
|
||||
PxReal getY( const TObjType* inObj, const PxU32 index ) const { return mGetYMember( inObj, index ); }
|
||||
void addPair( TObjType* inObj, const PxReal x, const PxReal y ) { mAddPairMember( inObj, x, y ); }
|
||||
void clear( TObjType* inObj ) { mClearMember( inObj ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType>
|
||||
struct PxReadOnlyCollectionPropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef PxU32 (*TNbObjectsMember)( const TObjType* );
|
||||
typedef PxU32 (*TGetObjectsMember)( const TObjType*, TCollectionType*, PxU32 );
|
||||
|
||||
TGetObjectsMember mGetObjectsMember;
|
||||
TNbObjectsMember mNbObjectsMember;
|
||||
|
||||
PxReadOnlyCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( inName )
|
||||
, mGetObjectsMember( inGetter )
|
||||
, mNbObjectsMember( inNb )
|
||||
{
|
||||
}
|
||||
PxU32 size( const TObjType* inObj ) const { return mNbObjectsMember( inObj ); }
|
||||
PxU32 get( const TObjType* inObj, TCollectionType* inBuffer, PxU32 inBufSize ) const { return mGetObjectsMember( inObj, inBuffer, inBufSize); }
|
||||
};
|
||||
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType, typename TFilterType>
|
||||
struct PxReadOnlyFilteredCollectionPropertyInfo : public PxPropertyInfoParameterizedBase<TKey>
|
||||
{
|
||||
typedef PxU32 (*TNbObjectsMember)( const TObjType*, TFilterType );
|
||||
typedef PxU32 (*TGetObjectsMember)( const TObjType*, TFilterType, TCollectionType*, PxU32 );
|
||||
|
||||
TGetObjectsMember mGetObjectsMember;
|
||||
TNbObjectsMember mNbObjectsMember;
|
||||
|
||||
PxReadOnlyFilteredCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb )
|
||||
: PxPropertyInfoParameterizedBase<TKey>( inName )
|
||||
, mGetObjectsMember( inGetter )
|
||||
, mNbObjectsMember( inNb )
|
||||
{
|
||||
}
|
||||
|
||||
PxU32 size( const TObjType* inObj, TFilterType inFilter ) const { return mNbObjectsMember( inObj, inFilter ); }
|
||||
PxU32 get( const TObjType* inObj, TFilterType inFilter, TCollectionType* inBuffer, PxU32 inBufSize ) const { return mGetObjectsMember( inObj, inFilter, inBuffer, inBufSize); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType, typename TCreateArg>
|
||||
struct PxFactoryCollectionPropertyInfo : public PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >
|
||||
{
|
||||
typedef typename PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >::TGetObjectsMember TGetObjectsMember;
|
||||
typedef typename PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >::TNbObjectsMember TNbObjectsMember;
|
||||
typedef TCollectionType (*TCreateMember)( TObjType*, TCreateArg );
|
||||
|
||||
TCreateMember mCreateMember;
|
||||
PxFactoryCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TCreateMember inMember )
|
||||
: PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >( inName, inGetter, inNb )
|
||||
, mCreateMember( inMember )
|
||||
{
|
||||
}
|
||||
TCollectionType create( TObjType* inObj, TCreateArg inArg ) const { return mCreateMember( inObj, inArg ); }
|
||||
};
|
||||
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType>
|
||||
struct PxCollectionPropertyInfo : public PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >
|
||||
{
|
||||
typedef typename PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >::TGetObjectsMember TGetObjectsMember;
|
||||
typedef typename PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >::TNbObjectsMember TNbObjectsMember;
|
||||
typedef void (*TAddMember)(TObjType*, TCollectionType&);
|
||||
typedef void (*TRemoveMember)(TObjType*, TCollectionType&);
|
||||
|
||||
TAddMember mAddMember;
|
||||
TRemoveMember mRemoveMember;
|
||||
|
||||
PxCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TAddMember inMember, TRemoveMember inRemoveMember )
|
||||
: PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >( inName, inGetter, inNb )
|
||||
, mAddMember( inMember )
|
||||
, mRemoveMember( inRemoveMember )
|
||||
{
|
||||
}
|
||||
void add( TObjType* inObj, TCollectionType& inArg ) const { mAddMember(inObj, inArg ); }
|
||||
void remove( TObjType* inObj, TCollectionType& inArg ) const { mRemoveMember( inObj, inArg ); }
|
||||
};
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType, typename TFilterType>
|
||||
struct PxFilteredCollectionPropertyInfo : public PxReadOnlyFilteredCollectionPropertyInfo<TKey, TObjType, TCollectionType, TFilterType>
|
||||
{
|
||||
typedef typename PxReadOnlyFilteredCollectionPropertyInfo< TKey, TObjType, TCollectionType, TFilterType >::TGetObjectsMember TGetObjectsMember;
|
||||
typedef typename PxReadOnlyFilteredCollectionPropertyInfo< TKey, TObjType, TCollectionType, TFilterType >::TNbObjectsMember TNbObjectsMember;
|
||||
typedef void (*TAddMember)(TObjType*, TCollectionType&);
|
||||
typedef void (*TRemoveMember)(TObjType*, TCollectionType&);
|
||||
|
||||
TAddMember mAddMember;
|
||||
TRemoveMember mRemoveMember;
|
||||
|
||||
PxFilteredCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TAddMember inMember, TRemoveMember inRemoveMember )
|
||||
: PxReadOnlyFilteredCollectionPropertyInfo<TKey, TObjType, TCollectionType, TFilterType>( inName, inGetter, inNb )
|
||||
, mAddMember( inMember )
|
||||
, mRemoveMember( inRemoveMember )
|
||||
{
|
||||
}
|
||||
void add( TObjType* inObj, TCollectionType& inArg ) const { mAddMember(inObj, inArg ); }
|
||||
void remove( TObjType* inObj, TCollectionType& inArg ) const { mRemoveMember( inObj, inArg ); }
|
||||
};
|
||||
|
||||
//create a default info class for when we can't match
|
||||
//the type correctly.
|
||||
struct PxUnknownClassInfo
|
||||
{
|
||||
static const char* getClassName() { return "__unknown_class"; }
|
||||
template<typename TReturnType, typename TOperator>
|
||||
TReturnType visitType( TOperator )
|
||||
{
|
||||
return TReturnType();
|
||||
}
|
||||
template<typename TOperator>
|
||||
void visitBases( TOperator )
|
||||
{
|
||||
}
|
||||
template<typename TOperator>
|
||||
PxU32 visitBaseProperties( TOperator, PxU32 inStartIndex = 0 ) const
|
||||
{
|
||||
return inStartIndex;
|
||||
}
|
||||
template<typename TOperator>
|
||||
PxU32 visitInstanceProperties( TOperator, PxU32 inStartIndex = 0 ) const
|
||||
{
|
||||
return inStartIndex;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename TDataType>
|
||||
struct PxClassInfoTraits
|
||||
{
|
||||
PxUnknownClassInfo Info;
|
||||
static bool getInfo() { return false;}
|
||||
};
|
||||
|
||||
//move the bool typedef to the global namespace.
|
||||
typedef bool _Bool;
|
||||
|
||||
|
||||
template<PxU32 TPropertyName>
|
||||
struct PxPropertyToValueStructMemberMap
|
||||
{
|
||||
bool Offset;
|
||||
};
|
||||
|
||||
|
||||
#define DEFINE_PROPERTY_TO_VALUE_STRUCT_MAP( type, prop, valueStruct ) \
|
||||
template<> struct PxPropertyToValueStructMemberMap< PxPropertyInfoName::type##_##prop > \
|
||||
{ \
|
||||
PxU32 Offset; \
|
||||
PxPropertyToValueStructMemberMap< PxPropertyInfoName::type##_##prop >() : Offset( PX_OFFSET_OF_RT( valueStruct, prop ) ) {} \
|
||||
template<typename TOperator> void visitProp( TOperator inOperator, valueStruct& inStruct ) { inOperator( inStruct.prop ); } \
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct PxShapeGeometryPropertyHelper
|
||||
{
|
||||
PX_PHYSX_CORE_API PxGeometryType::Enum getGeometryType(const PxShape* inShape) const;
|
||||
PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxBoxGeometry& geometry) const;
|
||||
PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxSphereGeometry& geometry) const;
|
||||
PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxCapsuleGeometry& geometry) const;
|
||||
PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxPlaneGeometry& geometry) const;
|
||||
PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxConvexMeshGeometry& geometry) const;
|
||||
PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxTriangleMeshGeometry& geometry) const;
|
||||
PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxHeightFieldGeometry& geometry) const;
|
||||
};
|
||||
|
||||
|
||||
struct PxShapeGeometryProperty : public PxWriteOnlyPropertyInfo< PxPropertyInfoName::PxShape_Geometry, PxShape, const PxGeometry & >
|
||||
, public PxShapeGeometryPropertyHelper
|
||||
{
|
||||
typedef PxWriteOnlyPropertyInfo< PxPropertyInfoName::PxShape_Geometry, PxShape, const PxGeometry & >::TSetterType TSetterType;
|
||||
typedef PxGeometryHolder (*TGetterType)( const PxShape* inObj );
|
||||
PxShapeGeometryProperty( const char* inName, TSetterType inSetter, TGetterType )
|
||||
: PxWriteOnlyPropertyInfo< PxPropertyInfoName::PxShape_Geometry, PxShape, const PxGeometry & >( inName, inSetter )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct PxShapeMaterialsPropertyHelper
|
||||
{
|
||||
PX_PHYSX_CORE_API void setMaterials(PxShape* inShape, PxMaterial*const* materials, PxU16 materialCount) const;
|
||||
};
|
||||
|
||||
struct PxShapeMaterialsProperty : public PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxShape_Materials, PxShape, PxMaterial*>
|
||||
, public PxShapeMaterialsPropertyHelper
|
||||
{
|
||||
typedef PxReadOnlyCollectionPropertyInfo< PxPropertyInfoName::PxShape_Materials, PxShape, PxMaterial* >::TGetObjectsMember TGetObjectsMember;
|
||||
typedef PxReadOnlyCollectionPropertyInfo< PxPropertyInfoName::PxShape_Materials, PxShape, PxMaterial* >::TNbObjectsMember TNbObjectsMember;
|
||||
PxShapeMaterialsProperty( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb )
|
||||
: PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxShape_Materials, PxShape, PxMaterial*>( inName, inGetter, inNb )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
typedef PxPropertyInfo<PxPropertyInfoName::PxRigidActor_GlobalPose, PxRigidActor, const PxTransform &, PxTransform > PxRigidActorGlobalPosePropertyInfo;
|
||||
|
||||
struct PxRigidActorShapeCollectionHelper
|
||||
{
|
||||
PX_PHYSX_CORE_API PxShape* createShape(PxRigidActor* inActor, const PxGeometry& geometry, PxMaterial& material, PxShapeFlags shapeFlags = PxShapeFlag::eVISUALIZATION | PxShapeFlag::eSCENE_QUERY_SHAPE | PxShapeFlag::eSIMULATION_SHAPE) const;
|
||||
PX_PHYSX_CORE_API PxShape* createShape(PxRigidActor* inActor, const PxGeometry& geometry, PxMaterial *const* materials, PxU16 materialCount, PxShapeFlags shapeFlags = PxShapeFlag::eVISUALIZATION | PxShapeFlag::eSCENE_QUERY_SHAPE | PxShapeFlag::eSIMULATION_SHAPE) const;
|
||||
};
|
||||
|
||||
struct PxRigidActorShapeCollection : public PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxRigidActor_Shapes, PxRigidActor, PxShape*>
|
||||
, public PxRigidActorShapeCollectionHelper
|
||||
{
|
||||
typedef PxReadOnlyCollectionPropertyInfo< PxPropertyInfoName::PxRigidActor_Shapes, PxRigidActor, PxShape* >::TGetObjectsMember TGetObjectsMember;
|
||||
typedef PxReadOnlyCollectionPropertyInfo< PxPropertyInfoName::PxRigidActor_Shapes, PxRigidActor, PxShape* >::TNbObjectsMember TNbObjectsMember;
|
||||
PxRigidActorShapeCollection( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb )
|
||||
: PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxRigidActor_Shapes, PxRigidActor, PxShape*>( inName, inGetter, inNb )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct PxArticulationLinkCollectionPropHelper
|
||||
{
|
||||
PX_PHYSX_CORE_API PxArticulationLink* createLink(PxArticulation* inArticulation, PxArticulationLink* parent, const PxTransform& pose) const;
|
||||
};
|
||||
|
||||
struct PxArticulationReducedCoordinateLinkCollectionPropHelper
|
||||
{
|
||||
PX_PHYSX_CORE_API PxArticulationLink* createLink(PxArticulationReducedCoordinate* inArticulation, PxArticulationLink* parent, const PxTransform& pose) const;
|
||||
};
|
||||
|
||||
struct PxArticulationLinkCollectionProp : public PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxArticulationBase_Links, PxArticulationBase, PxArticulationLink*>
|
||||
, public PxArticulationLinkCollectionPropHelper
|
||||
{
|
||||
PxArticulationLinkCollectionProp( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb )
|
||||
: PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxArticulationBase_Links, PxArticulationBase, PxArticulationLink*>( inName, inGetter, inNb )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template<typename TDataType>
|
||||
struct PxEnumTraits { PxEnumTraits() : NameConversion( false ) {} bool NameConversion; };
|
||||
|
||||
struct NbShapesProperty : public PxIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbShapes, PxSimulationStatistics, PxGeometryType::Enum, PxU32>
|
||||
{
|
||||
PX_PHYSX_CORE_API NbShapesProperty();
|
||||
};
|
||||
|
||||
|
||||
struct NbDiscreteContactPairsProperty : public PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbDiscreteContactPairs
|
||||
, PxSimulationStatistics
|
||||
, PxGeometryType::Enum
|
||||
, PxGeometryType::Enum
|
||||
, PxU32>
|
||||
{
|
||||
PX_PHYSX_CORE_API NbDiscreteContactPairsProperty();
|
||||
};
|
||||
struct NbModifiedContactPairsProperty : public PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbModifiedContactPairs
|
||||
, PxSimulationStatistics
|
||||
, PxGeometryType::Enum
|
||||
, PxGeometryType::Enum
|
||||
, PxU32>
|
||||
{
|
||||
PX_PHYSX_CORE_API NbModifiedContactPairsProperty();
|
||||
};
|
||||
|
||||
struct NbCCDPairsProperty : public PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbCCDPairs
|
||||
, PxSimulationStatistics
|
||||
, PxGeometryType::Enum
|
||||
, PxGeometryType::Enum
|
||||
, PxU32>
|
||||
{
|
||||
PX_PHYSX_CORE_API NbCCDPairsProperty();
|
||||
};
|
||||
|
||||
struct NbTriggerPairsProperty : public PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbTriggerPairs
|
||||
, PxSimulationStatistics
|
||||
, PxGeometryType::Enum
|
||||
, PxGeometryType::Enum
|
||||
, PxU32>
|
||||
{
|
||||
PX_PHYSX_CORE_API NbTriggerPairsProperty();
|
||||
};
|
||||
|
||||
|
||||
struct SimulationStatisticsProperty : public PxReadOnlyPropertyInfo<PxPropertyInfoName::PxScene_SimulationStatistics, PxScene, PxSimulationStatistics>
|
||||
{
|
||||
PX_PHYSX_CORE_API SimulationStatisticsProperty();
|
||||
};
|
||||
|
||||
struct PxMetaDataPlane
|
||||
{
|
||||
PxVec3 normal;
|
||||
PxReal distance;
|
||||
PxMetaDataPlane( PxVec3 n = PxVec3( 0, 0, 0 ), PxReal d = 0 )
|
||||
: normal( n )
|
||||
, distance( d )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
#include "PxAutoGeneratedMetaDataObjects.h"
|
||||
|
||||
#undef DEFINE_PROPERTY_TO_VALUE_STRUCT_MAP
|
||||
|
||||
static PxU32ToName g_physx__PxQueryFlag__EnumConversion[] = {
|
||||
{ "eSTATIC", static_cast<PxU32>( PxQueryFlag::eSTATIC ) },
|
||||
{ "eDYNAMIC", static_cast<PxU32>( PxQueryFlag::eDYNAMIC ) },
|
||||
{ "ePREFILTER", static_cast<PxU32>( PxQueryFlag::ePREFILTER ) },
|
||||
{ "ePOSTFILTER", static_cast<PxU32>( PxQueryFlag::ePOSTFILTER ) },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
template<> struct PxEnumTraits<PxQueryFlag::Enum > { PxEnumTraits() : NameConversion( g_physx__PxQueryFlag__EnumConversion ) {} const PxU32ToName* NameConversion; };
|
||||
|
||||
|
||||
template<typename TObjType, typename TOperator>
|
||||
inline PxU32 visitAllProperties( TOperator inOperator )
|
||||
{
|
||||
PxU32 thePropCount = PxClassInfoTraits<TObjType>().Info.visitBaseProperties( inOperator );
|
||||
return PxClassInfoTraits<TObjType>().Info.visitInstanceProperties( inOperator, thePropCount );
|
||||
}
|
||||
|
||||
template<typename TObjType, typename TOperator>
|
||||
inline void visitInstanceProperties( TOperator inOperator )
|
||||
{
|
||||
PxClassInfoTraits<TObjType>().Info.visitInstanceProperties( inOperator, 0 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** @} */
|
||||
#endif
|
||||
@ -0,0 +1,221 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
#ifndef PX_REPX_META_DATA_PROPERTY_VISITOR_H
|
||||
#define PX_REPX_META_DATA_PROPERTY_VISITOR_H
|
||||
#include "PvdMetaDataPropertyVisitor.h"
|
||||
|
||||
namespace physx {
|
||||
|
||||
template<PxU32 TKey, typename TObjectType,typename TSetPropType, typename TPropertyType>
|
||||
struct PxRepXPropertyAccessor : public Vd::ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxPropertyInfo<TKey,TObjectType,TSetPropType,TPropertyType> TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
|
||||
const TPropertyInfoType mProperty;
|
||||
PxRepXPropertyAccessor( const TPropertyInfoType& inProp )
|
||||
: mProperty( inProp )
|
||||
{
|
||||
}
|
||||
prop_type get( const TObjectType* inObj ) const { return mProperty.get( inObj ); }
|
||||
void set( TObjectType* inObj, prop_type val ) const { return mProperty.set( inObj, val ); }
|
||||
|
||||
private:
|
||||
PxRepXPropertyAccessor& operator=(const PxRepXPropertyAccessor&);
|
||||
};
|
||||
|
||||
template<typename TSetPropType, typename TPropertyType>
|
||||
struct PxRepXPropertyAccessor<PxPropertyInfoName::PxRigidDynamic_WakeCounter, PxRigidDynamic, TSetPropType, TPropertyType> : public Vd::ValueStructOffsetRecord
|
||||
{
|
||||
typedef PxPropertyInfo<PxPropertyInfoName::PxRigidDynamic_WakeCounter,PxRigidDynamic,TSetPropType,TPropertyType> TPropertyInfoType;
|
||||
typedef TPropertyType prop_type;
|
||||
|
||||
const TPropertyInfoType mProperty;
|
||||
PxRepXPropertyAccessor( const TPropertyInfoType& inProp )
|
||||
: mProperty( inProp )
|
||||
{
|
||||
}
|
||||
prop_type get( const PxRigidDynamic* inObj ) const { return mProperty.get( inObj ); }
|
||||
void set( PxRigidDynamic* inObj, prop_type val ) const
|
||||
{
|
||||
PX_UNUSED(val);
|
||||
PxRigidBodyFlags flags = inObj->getRigidBodyFlags();
|
||||
if( !(flags & PxRigidBodyFlag::eKINEMATIC) )
|
||||
return mProperty.set( inObj, val );
|
||||
}
|
||||
private:
|
||||
PxRepXPropertyAccessor& operator=(const PxRepXPropertyAccessor&);
|
||||
};
|
||||
|
||||
typedef PxReadOnlyPropertyInfo<PxPropertyInfoName::PxArticulationLink_InboundJoint, PxArticulationLink, PxArticulationJointBase *> TIncomingJointPropType;
|
||||
|
||||
|
||||
//RepX cares about fewer property types than PVD does,
|
||||
//but I want to reuse the accessor architecture as it
|
||||
//greatly simplifies clients dealing with complex datatypes
|
||||
template<typename TOperatorType>
|
||||
struct RepXPropertyFilter
|
||||
{
|
||||
RepXPropertyFilter<TOperatorType> &operator=(const RepXPropertyFilter<TOperatorType> &);
|
||||
|
||||
Vd::PvdPropertyFilter<TOperatorType> mFilter;
|
||||
RepXPropertyFilter( TOperatorType op ) : mFilter( op ) {}
|
||||
RepXPropertyFilter( const RepXPropertyFilter<TOperatorType>& other ) : mFilter( other.mFilter ) {}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
void operator()( const PxReadOnlyPropertyInfo<TKey,TObjType,TPropertyType>&, PxU32 ) {} //repx ignores read only and write only properties
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
void operator()( const PxWriteOnlyPropertyInfo<TKey,TObjType,TPropertyType>&, PxU32 ) {}
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType>
|
||||
void operator()( const PxReadOnlyCollectionPropertyInfo<TKey, TObjType, TCollectionType>&, PxU32 ) {}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TCollectionType, typename TFilterType>
|
||||
void operator()( const PxReadOnlyFilteredCollectionPropertyInfo<TKey, TObjType, TCollectionType, TFilterType >&, PxU32 ) {}
|
||||
//forward these properties verbatim.
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
void operator()( const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, PxU32 idx )
|
||||
{
|
||||
mFilter( inProp, idx );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
void operator()( const PxFixedSizeLookupTablePropertyInfo<TKey, TObjType, TIndexType,TPropertyType >& inProp, PxU32 idx )
|
||||
{
|
||||
mFilter( inProp, idx );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
|
||||
void operator()( const PxExtendedIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, PxU32 idx)
|
||||
{
|
||||
mFilter( inProp, idx);
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
|
||||
void operator()( const PxDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >& inProp, PxU32 idx )
|
||||
{
|
||||
mFilter( inProp, idx );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
|
||||
void operator()( const PxExtendedDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >& inProp, PxU32 idx )
|
||||
{
|
||||
mFilter( inProp, idx );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
void operator()( const PxRangePropertyInfo<TKey, TObjType, TPropertyType>& inProp, PxU32 idx )
|
||||
{
|
||||
mFilter( inProp, idx );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TPropertyType>
|
||||
void operator()( const PxBufferCollectionPropertyInfo<TKey, TObjType, TPropertyType>& inProp, PxU32 count )
|
||||
{
|
||||
mFilter( inProp, count );
|
||||
}
|
||||
|
||||
template<PxU32 TKey, typename TObjType, typename TSetPropType, typename TPropertyType>
|
||||
void operator()( const PxPropertyInfo<TKey,TObjType,TSetPropType,TPropertyType>& prop, PxU32 )
|
||||
{
|
||||
PxRepXPropertyAccessor< TKey, TObjType, TSetPropType, TPropertyType > theAccessor( prop );
|
||||
mFilter.mOperator.pushName( prop.mName );
|
||||
mFilter.template handleAccessor<TKey>( theAccessor );
|
||||
mFilter.mOperator.popName();
|
||||
}
|
||||
|
||||
void operator()( const PxRigidActorGlobalPosePropertyInfo& inProp, PxU32 )
|
||||
{
|
||||
mFilter.mOperator.pushName( inProp.mName );
|
||||
mFilter.mOperator.handleRigidActorGlobalPose( inProp );
|
||||
mFilter.mOperator.popName();
|
||||
}
|
||||
|
||||
void operator()( const PxRigidActorShapeCollection& inProp, PxU32 )
|
||||
{
|
||||
mFilter.mOperator.pushName( "Shapes" );
|
||||
mFilter.mOperator.handleShapes( inProp );
|
||||
mFilter.mOperator.popName();
|
||||
}
|
||||
|
||||
void operator()( const PxArticulationLinkCollectionProp& inProp, PxU32 )
|
||||
{
|
||||
mFilter.mOperator.pushName( "Links" );
|
||||
mFilter.mOperator.handleArticulationLinks( inProp );
|
||||
mFilter.mOperator.popName();
|
||||
}
|
||||
|
||||
void operator()( const PxShapeMaterialsProperty& inProp, PxU32 )
|
||||
{
|
||||
mFilter.mOperator.pushName( "Materials" );
|
||||
mFilter.mOperator.handleShapeMaterials( inProp );
|
||||
mFilter.mOperator.popName();
|
||||
}
|
||||
|
||||
void operator()( const TIncomingJointPropType& inProp, PxU32 )
|
||||
{
|
||||
mFilter.mOperator.handleIncomingJoint( inProp );
|
||||
}
|
||||
|
||||
void operator()( const PxShapeGeometryProperty& inProp, PxU32 )
|
||||
{
|
||||
mFilter.mOperator.handleGeometryProperty( inProp );
|
||||
}
|
||||
|
||||
#define DEFINE_REPX_PROPERTY_NOP(datatype) \
|
||||
template<PxU32 TKey, typename TObjType, typename TSetPropType> \
|
||||
void operator()( const PxPropertyInfo<TKey,TObjType,TSetPropType,datatype>&, PxU32 ){}
|
||||
|
||||
DEFINE_REPX_PROPERTY_NOP( const void* )
|
||||
DEFINE_REPX_PROPERTY_NOP( void* )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxSimulationFilterCallback * )
|
||||
DEFINE_REPX_PROPERTY_NOP( physx::PxTaskManager * )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxSimulationFilterShader * )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxSimulationFilterShader)
|
||||
DEFINE_REPX_PROPERTY_NOP( PxContactModifyCallback * )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxCCDContactModifyCallback * )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxSimulationEventCallback * )
|
||||
DEFINE_REPX_PROPERTY_NOP( physx::PxCudaContextManager* )
|
||||
DEFINE_REPX_PROPERTY_NOP( physx::PxCpuDispatcher * )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxRigidActor )
|
||||
DEFINE_REPX_PROPERTY_NOP( const PxRigidActor )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxRigidActor& )
|
||||
DEFINE_REPX_PROPERTY_NOP( const PxRigidActor& )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxScene* )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxAggregate * )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxArticulation& )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxArticulationReducedCoordinate& )
|
||||
DEFINE_REPX_PROPERTY_NOP( const PxArticulationLink * )
|
||||
DEFINE_REPX_PROPERTY_NOP( const PxRigidDynamic * )
|
||||
DEFINE_REPX_PROPERTY_NOP( const PxRigidStatic * )
|
||||
DEFINE_REPX_PROPERTY_NOP( PxStridedData ) //These are handled in a custom fasion.
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
148
physx/source/physxmetadata/core/src/PxMetaDataObjects.cpp
Normal file
148
physx/source/physxmetadata/core/src/PxMetaDataObjects.cpp
Normal file
@ -0,0 +1,148 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
#include "PsFoundation.h"
|
||||
#include "PsUtilities.h"
|
||||
#include "CmPhysXCommon.h"
|
||||
|
||||
#include "PxMetaDataObjects.h"
|
||||
|
||||
using namespace physx;
|
||||
|
||||
PX_PHYSX_CORE_API PxGeometryType::Enum PxShapeGeometryPropertyHelper::getGeometryType(const PxShape* inShape) const { return inShape->getGeometryType(); }
|
||||
PX_PHYSX_CORE_API bool PxShapeGeometryPropertyHelper::getGeometry(const PxShape* inShape, PxBoxGeometry& geometry) const { return inShape->getBoxGeometry( geometry ); }
|
||||
PX_PHYSX_CORE_API bool PxShapeGeometryPropertyHelper::getGeometry(const PxShape* inShape, PxSphereGeometry& geometry) const { return inShape->getSphereGeometry( geometry ); }
|
||||
PX_PHYSX_CORE_API bool PxShapeGeometryPropertyHelper::getGeometry(const PxShape* inShape, PxCapsuleGeometry& geometry) const { return inShape->getCapsuleGeometry( geometry ); }
|
||||
PX_PHYSX_CORE_API bool PxShapeGeometryPropertyHelper::getGeometry(const PxShape* inShape, PxPlaneGeometry& geometry) const { return inShape->getPlaneGeometry( geometry ); }
|
||||
PX_PHYSX_CORE_API bool PxShapeGeometryPropertyHelper::getGeometry(const PxShape* inShape, PxConvexMeshGeometry& geometry) const { return inShape->getConvexMeshGeometry( geometry ); }
|
||||
PX_PHYSX_CORE_API bool PxShapeGeometryPropertyHelper::getGeometry(const PxShape* inShape, PxTriangleMeshGeometry& geometry) const { return inShape->getTriangleMeshGeometry( geometry ); }
|
||||
PX_PHYSX_CORE_API bool PxShapeGeometryPropertyHelper::getGeometry(const PxShape* inShape, PxHeightFieldGeometry& geometry) const { return inShape->getHeightFieldGeometry( geometry ); }
|
||||
|
||||
PX_PHYSX_CORE_API void PxShapeMaterialsPropertyHelper::setMaterials(PxShape* inShape, PxMaterial*const* materials, PxU16 materialCount) const
|
||||
{
|
||||
inShape->setMaterials( materials, materialCount );
|
||||
}
|
||||
|
||||
PX_PHYSX_CORE_API PxShape* PxRigidActorShapeCollectionHelper::createShape(PxRigidActor* inActor, const PxGeometry& geometry, PxMaterial& material,
|
||||
PxShapeFlags shapeFlags ) const
|
||||
{
|
||||
PxMaterial* materialPtr = const_cast<PxMaterial*>(&material);
|
||||
PxShape* shape = PxGetPhysics().createShape(geometry, &materialPtr, 1, true, shapeFlags);
|
||||
if (shape)
|
||||
{
|
||||
inActor->attachShape(*shape); // attach can fail, if e.g. we try and attach a trimesh simulation shape to a dynamic actor
|
||||
shape->release(); // if attach fails, we hold the only counted reference, and so this cleans up properly
|
||||
}
|
||||
return shape;
|
||||
}
|
||||
PX_PHYSX_CORE_API PxShape* PxRigidActorShapeCollectionHelper::createShape(PxRigidActor* inActor, const PxGeometry& geometry, PxMaterial *const* materials,
|
||||
PxU16 materialCount, PxShapeFlags shapeFlags ) const
|
||||
{
|
||||
PxShape* shape = PxGetPhysics().createShape(geometry, materials, materialCount, true, shapeFlags);
|
||||
if (shape)
|
||||
{
|
||||
inActor->attachShape(*shape); // attach can fail, if e.g. we try and attach a trimesh simulation shape to a dynamic actor
|
||||
shape->release(); // if attach fails, we hold the only counted reference, and so this cleans up properly
|
||||
}
|
||||
return shape;
|
||||
}
|
||||
|
||||
PX_PHYSX_CORE_API PxArticulationLink* PxArticulationLinkCollectionPropHelper::createLink(PxArticulation* inArticulation, PxArticulationLink* parent,
|
||||
const PxTransform& pose) const
|
||||
{
|
||||
PX_CHECK_AND_RETURN_NULL(pose.isValid(), "PxArticulationLinkCollectionPropHelper::createLink pose is not valid.");
|
||||
return inArticulation->createLink(parent, pose );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
inline void SetNbShape( PxSimulationStatistics* inStats, PxGeometryType::Enum data, PxU32 val ) { inStats->nbShapes[data] = val; }
|
||||
inline PxU32 GetNbShape( const PxSimulationStatistics* inStats, PxGeometryType::Enum data) { return inStats->nbShapes[data]; }
|
||||
|
||||
|
||||
PX_PHYSX_CORE_API NbShapesProperty::NbShapesProperty()
|
||||
: PxIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbShapes
|
||||
, PxSimulationStatistics
|
||||
, PxGeometryType::Enum
|
||||
, PxU32> ( "NbShapes", SetNbShape, GetNbShape )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline void SetNbDiscreteContactPairs( PxSimulationStatistics* inStats, PxGeometryType::Enum idx1, PxGeometryType::Enum idx2, PxU32 val ) { inStats->nbDiscreteContactPairs[idx1][idx2] = val; }
|
||||
inline PxU32 GetNbDiscreteContactPairs( const PxSimulationStatistics* inStats, PxGeometryType::Enum idx1, PxGeometryType::Enum idx2 ) { return inStats->nbDiscreteContactPairs[idx1][idx2]; }
|
||||
PX_PHYSX_CORE_API NbDiscreteContactPairsProperty::NbDiscreteContactPairsProperty()
|
||||
: PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbDiscreteContactPairs
|
||||
, PxSimulationStatistics
|
||||
, PxGeometryType::Enum
|
||||
, PxGeometryType::Enum
|
||||
, PxU32> ( "NbDiscreteContactPairs", SetNbDiscreteContactPairs, GetNbDiscreteContactPairs )
|
||||
{
|
||||
}
|
||||
|
||||
inline void SetNbModifiedContactPairs( PxSimulationStatistics* inStats, PxGeometryType::Enum idx1, PxGeometryType::Enum idx2, PxU32 val ) { inStats->nbModifiedContactPairs[idx1][idx2] = val; }
|
||||
inline PxU32 GetNbModifiedContactPairs( const PxSimulationStatistics* inStats, PxGeometryType::Enum idx1, PxGeometryType::Enum idx2 ) { return inStats->nbModifiedContactPairs[idx1][idx2]; }
|
||||
PX_PHYSX_CORE_API NbModifiedContactPairsProperty::NbModifiedContactPairsProperty()
|
||||
: PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbModifiedContactPairs
|
||||
, PxSimulationStatistics
|
||||
, PxGeometryType::Enum
|
||||
, PxGeometryType::Enum
|
||||
, PxU32> ( "NbModifiedContactPairs", SetNbModifiedContactPairs, GetNbModifiedContactPairs )
|
||||
{
|
||||
}
|
||||
|
||||
inline void SetNbCCDPairs( PxSimulationStatistics* inStats, PxGeometryType::Enum idx1, PxGeometryType::Enum idx2, PxU32 val ) { inStats->nbCCDPairs[idx1][idx2] = val; }
|
||||
inline PxU32 GetNbCCDPairs( const PxSimulationStatistics* inStats, PxGeometryType::Enum idx1, PxGeometryType::Enum idx2 ) { return inStats->nbCCDPairs[idx1][idx2]; }
|
||||
PX_PHYSX_CORE_API NbCCDPairsProperty::NbCCDPairsProperty()
|
||||
: PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbCCDPairs
|
||||
, PxSimulationStatistics
|
||||
, PxGeometryType::Enum
|
||||
, PxGeometryType::Enum
|
||||
, PxU32> ( "NbCCDPairs", SetNbCCDPairs, GetNbCCDPairs )
|
||||
{
|
||||
}
|
||||
|
||||
inline void SetNbTriggerPairs( PxSimulationStatistics* inStats, PxGeometryType::Enum idx1, PxGeometryType::Enum idx2, PxU32 val ) { inStats->nbTriggerPairs[idx1][idx2] = val; }
|
||||
inline PxU32 GetNbTriggerPairs( const PxSimulationStatistics* inStats, PxGeometryType::Enum idx1, PxGeometryType::Enum idx2 ) { return inStats->nbTriggerPairs[idx1][idx2]; }
|
||||
PX_PHYSX_CORE_API NbTriggerPairsProperty::NbTriggerPairsProperty()
|
||||
: PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbTriggerPairs
|
||||
, PxSimulationStatistics
|
||||
, PxGeometryType::Enum
|
||||
, PxGeometryType::Enum
|
||||
, PxU32> ( "NbTriggerPairs", SetNbTriggerPairs, GetNbTriggerPairs )
|
||||
{
|
||||
}
|
||||
|
||||
inline PxSimulationStatistics GetStats( const PxScene* inScene ) { PxSimulationStatistics stats; inScene->getSimulationStatistics( stats ); return stats; }
|
||||
PX_PHYSX_CORE_API SimulationStatisticsProperty::SimulationStatisticsProperty()
|
||||
: PxReadOnlyPropertyInfo<PxPropertyInfoName::PxScene_SimulationStatistics, PxScene, PxSimulationStatistics >( "SimulationStatistics", GetStats )
|
||||
{
|
||||
}
|
||||
|
||||
@ -0,0 +1,162 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
// This code is auto-generated by the PhysX Clang metadata generator. Do not edit or be
|
||||
// prepared for your edits to be quietly ignored next time the clang metadata generator is
|
||||
// run. You can find the most recent version of clang metadata generator by contacting
|
||||
// Chris Nuernberger <chrisn@nvidia.com> or Dilip or Adam.
|
||||
// The source code for the generate was at one time checked into:
|
||||
// physx/PhysXMetaDataGenerator/llvm/tools/clang/lib/Frontend/PhysXMetaDataAction.cpp
|
||||
#define THERE_IS_NO_INCLUDE_GUARD_HERE_FOR_A_REASON
|
||||
|
||||
PxJoint_PropertiesStart,
|
||||
PxJoint_Actors,
|
||||
PxJoint_LocalPose,
|
||||
PxJoint_RelativeTransform,
|
||||
PxJoint_RelativeLinearVelocity,
|
||||
PxJoint_RelativeAngularVelocity,
|
||||
PxJoint_BreakForce,
|
||||
PxJoint_ConstraintFlags,
|
||||
PxJoint_InvMassScale0,
|
||||
PxJoint_InvInertiaScale0,
|
||||
PxJoint_InvMassScale1,
|
||||
PxJoint_InvInertiaScale1,
|
||||
PxJoint_Constraint,
|
||||
PxJoint_Name,
|
||||
PxJoint_Scene,
|
||||
PxJoint_UserData,
|
||||
PxJoint_PropertiesStop,
|
||||
PxD6Joint_PropertiesStart,
|
||||
PxD6Joint_Motion,
|
||||
PxD6Joint_TwistAngle,
|
||||
PxD6Joint_Twist,
|
||||
PxD6Joint_SwingYAngle,
|
||||
PxD6Joint_SwingZAngle,
|
||||
PxD6Joint_DistanceLimit,
|
||||
PxD6Joint_LinearLimit,
|
||||
PxD6Joint_TwistLimit,
|
||||
PxD6Joint_SwingLimit,
|
||||
PxD6Joint_PyramidSwingLimit,
|
||||
PxD6Joint_Drive,
|
||||
PxD6Joint_DrivePosition,
|
||||
PxD6Joint_ProjectionLinearTolerance,
|
||||
PxD6Joint_ProjectionAngularTolerance,
|
||||
PxD6Joint_ConcreteTypeName,
|
||||
PxD6Joint_PropertiesStop,
|
||||
PxDistanceJoint_PropertiesStart,
|
||||
PxDistanceJoint_Distance,
|
||||
PxDistanceJoint_MinDistance,
|
||||
PxDistanceJoint_MaxDistance,
|
||||
PxDistanceJoint_Tolerance,
|
||||
PxDistanceJoint_Stiffness,
|
||||
PxDistanceJoint_Damping,
|
||||
PxDistanceJoint_DistanceJointFlags,
|
||||
PxDistanceJoint_ConcreteTypeName,
|
||||
PxDistanceJoint_PropertiesStop,
|
||||
PxContactJoint_PropertiesStart,
|
||||
PxContactJoint_Contact,
|
||||
PxContactJoint_ContactNormal,
|
||||
PxContactJoint_Penetration,
|
||||
PxContactJoint_Resititution,
|
||||
PxContactJoint_BounceThreshold,
|
||||
PxContactJoint_ConcreteTypeName,
|
||||
PxContactJoint_PropertiesStop,
|
||||
PxFixedJoint_PropertiesStart,
|
||||
PxFixedJoint_ProjectionLinearTolerance,
|
||||
PxFixedJoint_ProjectionAngularTolerance,
|
||||
PxFixedJoint_ConcreteTypeName,
|
||||
PxFixedJoint_PropertiesStop,
|
||||
PxPrismaticJoint_PropertiesStart,
|
||||
PxPrismaticJoint_Position,
|
||||
PxPrismaticJoint_Velocity,
|
||||
PxPrismaticJoint_Limit,
|
||||
PxPrismaticJoint_PrismaticJointFlags,
|
||||
PxPrismaticJoint_ProjectionLinearTolerance,
|
||||
PxPrismaticJoint_ProjectionAngularTolerance,
|
||||
PxPrismaticJoint_ConcreteTypeName,
|
||||
PxPrismaticJoint_PropertiesStop,
|
||||
PxRevoluteJoint_PropertiesStart,
|
||||
PxRevoluteJoint_Angle,
|
||||
PxRevoluteJoint_Velocity,
|
||||
PxRevoluteJoint_Limit,
|
||||
PxRevoluteJoint_DriveVelocity,
|
||||
PxRevoluteJoint_DriveForceLimit,
|
||||
PxRevoluteJoint_DriveGearRatio,
|
||||
PxRevoluteJoint_RevoluteJointFlags,
|
||||
PxRevoluteJoint_ProjectionLinearTolerance,
|
||||
PxRevoluteJoint_ProjectionAngularTolerance,
|
||||
PxRevoluteJoint_ConcreteTypeName,
|
||||
PxRevoluteJoint_PropertiesStop,
|
||||
PxSphericalJoint_PropertiesStart,
|
||||
PxSphericalJoint_LimitCone,
|
||||
PxSphericalJoint_SwingYAngle,
|
||||
PxSphericalJoint_SwingZAngle,
|
||||
PxSphericalJoint_SphericalJointFlags,
|
||||
PxSphericalJoint_ProjectionLinearTolerance,
|
||||
PxSphericalJoint_ConcreteTypeName,
|
||||
PxSphericalJoint_PropertiesStop,
|
||||
PxJointLimitParameters_PropertiesStart,
|
||||
PxJointLimitParameters_Restitution,
|
||||
PxJointLimitParameters_BounceThreshold,
|
||||
PxJointLimitParameters_Stiffness,
|
||||
PxJointLimitParameters_Damping,
|
||||
PxJointLimitParameters_ContactDistance,
|
||||
PxJointLimitParameters_PropertiesStop,
|
||||
PxJointLinearLimit_PropertiesStart,
|
||||
PxJointLinearLimit_Value,
|
||||
PxJointLinearLimit_PropertiesStop,
|
||||
PxJointLinearLimitPair_PropertiesStart,
|
||||
PxJointLinearLimitPair_Upper,
|
||||
PxJointLinearLimitPair_Lower,
|
||||
PxJointLinearLimitPair_PropertiesStop,
|
||||
PxJointAngularLimitPair_PropertiesStart,
|
||||
PxJointAngularLimitPair_Upper,
|
||||
PxJointAngularLimitPair_Lower,
|
||||
PxJointAngularLimitPair_PropertiesStop,
|
||||
PxJointLimitCone_PropertiesStart,
|
||||
PxJointLimitCone_YAngle,
|
||||
PxJointLimitCone_ZAngle,
|
||||
PxJointLimitCone_PropertiesStop,
|
||||
PxJointLimitPyramid_PropertiesStart,
|
||||
PxJointLimitPyramid_YAngleMin,
|
||||
PxJointLimitPyramid_YAngleMax,
|
||||
PxJointLimitPyramid_ZAngleMin,
|
||||
PxJointLimitPyramid_ZAngleMax,
|
||||
PxJointLimitPyramid_PropertiesStop,
|
||||
PxSpring_PropertiesStart,
|
||||
PxSpring_Stiffness,
|
||||
PxSpring_Damping,
|
||||
PxSpring_PropertiesStop,
|
||||
PxD6JointDrive_PropertiesStart,
|
||||
PxD6JointDrive_ForceLimit,
|
||||
PxD6JointDrive_Flags,
|
||||
PxD6JointDrive_PropertiesStop,
|
||||
|
||||
|
||||
#undef THERE_IS_NO_INCLUDE_GUARD_HERE_FOR_A_REASON
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,72 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
#ifndef PX_EXTENSION_METADATAOBJECTS_H
|
||||
#define PX_EXTENSION_METADATAOBJECTS_H
|
||||
#include "PxPhysicsAPI.h"
|
||||
#include "extensions/PxExtensionsAPI.h"
|
||||
#include "PxMetaDataObjects.h"
|
||||
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
namespace physx
|
||||
{
|
||||
|
||||
class PxD6Joint;
|
||||
class PxJointLimitPair;
|
||||
class PxJointLimitCone;
|
||||
|
||||
struct PxExtensionsPropertyInfoName
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
Unnamed = PxPropertyInfoName::LastPxPropertyInfoName,
|
||||
#include "PxExtensionAutoGeneratedMetaDataObjectNames.h"
|
||||
LastPxPropertyInfoName
|
||||
};
|
||||
};
|
||||
|
||||
#define DEFINE_PROPERTY_TO_VALUE_STRUCT_MAP( type, prop, valueStruct ) \
|
||||
template<> struct PxPropertyToValueStructMemberMap< PxExtensionsPropertyInfoName::type##_##prop > \
|
||||
{ \
|
||||
PxU32 Offset; \
|
||||
PxPropertyToValueStructMemberMap< PxExtensionsPropertyInfoName::type##_##prop >() : Offset( PX_OFFSET_OF_RT( valueStruct, prop ) ) {} \
|
||||
template<typename TOperator> void visitProp( TOperator inOperator, valueStruct& inStruct ) { inOperator( inStruct.prop ); } \
|
||||
};
|
||||
|
||||
#include "PxExtensionAutoGeneratedMetaDataObjects.h"
|
||||
|
||||
#undef DEFINE_PROPERTY_TO_VALUE_STRUCT_MAP
|
||||
|
||||
}
|
||||
|
||||
/** @} */
|
||||
#endif
|
||||
@ -0,0 +1,488 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
// This code is auto-generated by the PhysX Clang metadata generator. Do not edit or be
|
||||
// prepared for your edits to be quietly ignored next time the clang metadata generator is
|
||||
// run. You can find the most recent version of clang metadata generator by contacting
|
||||
// Chris Nuernberger <chrisn@nvidia.com> or Dilip or Adam.
|
||||
// The source code for the generate was at one time checked into:
|
||||
// physx/PhysXMetaDataGenerator/llvm/tools/clang/lib/Frontend/PhysXMetaDataAction.cpp
|
||||
#include "PxExtensionMetaDataObjects.h"
|
||||
#include "PxMetaDataCppPrefix.h"
|
||||
#include "extensions/PxExtensionsAPI.h"
|
||||
using namespace physx;
|
||||
void setPxJoint_Actors( PxJoint* inObj, PxRigidActor * inArg0, PxRigidActor * inArg1 ) { inObj->setActors( inArg0, inArg1 ); }
|
||||
void getPxJoint_Actors( const PxJoint* inObj, PxRigidActor *& inArg0, PxRigidActor *& inArg1 ) { inObj->getActors( inArg0, inArg1 ); }
|
||||
void setPxJoint_LocalPose( PxJoint* inObj, PxJointActorIndex::Enum inIndex, PxTransform inArg ){ inObj->setLocalPose( inIndex, inArg ); }
|
||||
PxTransform getPxJoint_LocalPose( const PxJoint* inObj, PxJointActorIndex::Enum inIndex ) { return inObj->getLocalPose( inIndex ); }
|
||||
PxTransform getPxJoint_RelativeTransform( const PxJoint* inObj ) { return inObj->getRelativeTransform(); }
|
||||
PxVec3 getPxJoint_RelativeLinearVelocity( const PxJoint* inObj ) { return inObj->getRelativeLinearVelocity(); }
|
||||
PxVec3 getPxJoint_RelativeAngularVelocity( const PxJoint* inObj ) { return inObj->getRelativeAngularVelocity(); }
|
||||
void setPxJoint_BreakForce( PxJoint* inObj, PxReal inArg0, PxReal inArg1 ) { inObj->setBreakForce( inArg0, inArg1 ); }
|
||||
void getPxJoint_BreakForce( const PxJoint* inObj, PxReal& inArg0, PxReal& inArg1 ) { inObj->getBreakForce( inArg0, inArg1 ); }
|
||||
void setPxJoint_ConstraintFlags( PxJoint* inObj, PxConstraintFlags inArg){ inObj->setConstraintFlags( inArg ); }
|
||||
PxConstraintFlags getPxJoint_ConstraintFlags( const PxJoint* inObj ) { return inObj->getConstraintFlags(); }
|
||||
void setPxJoint_InvMassScale0( PxJoint* inObj, PxReal inArg){ inObj->setInvMassScale0( inArg ); }
|
||||
PxReal getPxJoint_InvMassScale0( const PxJoint* inObj ) { return inObj->getInvMassScale0(); }
|
||||
void setPxJoint_InvInertiaScale0( PxJoint* inObj, PxReal inArg){ inObj->setInvInertiaScale0( inArg ); }
|
||||
PxReal getPxJoint_InvInertiaScale0( const PxJoint* inObj ) { return inObj->getInvInertiaScale0(); }
|
||||
void setPxJoint_InvMassScale1( PxJoint* inObj, PxReal inArg){ inObj->setInvMassScale1( inArg ); }
|
||||
PxReal getPxJoint_InvMassScale1( const PxJoint* inObj ) { return inObj->getInvMassScale1(); }
|
||||
void setPxJoint_InvInertiaScale1( PxJoint* inObj, PxReal inArg){ inObj->setInvInertiaScale1( inArg ); }
|
||||
PxReal getPxJoint_InvInertiaScale1( const PxJoint* inObj ) { return inObj->getInvInertiaScale1(); }
|
||||
PxConstraint * getPxJoint_Constraint( const PxJoint* inObj ) { return inObj->getConstraint(); }
|
||||
void setPxJoint_Name( PxJoint* inObj, const char * inArg){ inObj->setName( inArg ); }
|
||||
const char * getPxJoint_Name( const PxJoint* inObj ) { return inObj->getName(); }
|
||||
PxScene * getPxJoint_Scene( const PxJoint* inObj ) { return inObj->getScene(); }
|
||||
inline void * getPxJointUserData( const PxJoint* inOwner ) { return inOwner->userData; }
|
||||
inline void setPxJointUserData( PxJoint* inOwner, void * inData) { inOwner->userData = inData; }
|
||||
PxJointGeneratedInfo::PxJointGeneratedInfo()
|
||||
: Actors( "Actors", "actor0", "actor1", setPxJoint_Actors, getPxJoint_Actors)
|
||||
, LocalPose( "LocalPose", setPxJoint_LocalPose, getPxJoint_LocalPose)
|
||||
, RelativeTransform( "RelativeTransform", getPxJoint_RelativeTransform)
|
||||
, RelativeLinearVelocity( "RelativeLinearVelocity", getPxJoint_RelativeLinearVelocity)
|
||||
, RelativeAngularVelocity( "RelativeAngularVelocity", getPxJoint_RelativeAngularVelocity)
|
||||
, BreakForce( "BreakForce", "force", "torque", setPxJoint_BreakForce, getPxJoint_BreakForce)
|
||||
, ConstraintFlags( "ConstraintFlags", setPxJoint_ConstraintFlags, getPxJoint_ConstraintFlags)
|
||||
, InvMassScale0( "InvMassScale0", setPxJoint_InvMassScale0, getPxJoint_InvMassScale0)
|
||||
, InvInertiaScale0( "InvInertiaScale0", setPxJoint_InvInertiaScale0, getPxJoint_InvInertiaScale0)
|
||||
, InvMassScale1( "InvMassScale1", setPxJoint_InvMassScale1, getPxJoint_InvMassScale1)
|
||||
, InvInertiaScale1( "InvInertiaScale1", setPxJoint_InvInertiaScale1, getPxJoint_InvInertiaScale1)
|
||||
, Constraint( "Constraint", getPxJoint_Constraint)
|
||||
, Name( "Name", setPxJoint_Name, getPxJoint_Name)
|
||||
, Scene( "Scene", getPxJoint_Scene)
|
||||
, UserData( "UserData", setPxJointUserData, getPxJointUserData )
|
||||
{}
|
||||
PxJointGeneratedValues::PxJointGeneratedValues( const PxJoint* inSource )
|
||||
:RelativeTransform( getPxJoint_RelativeTransform( inSource ) )
|
||||
,RelativeLinearVelocity( getPxJoint_RelativeLinearVelocity( inSource ) )
|
||||
,RelativeAngularVelocity( getPxJoint_RelativeAngularVelocity( inSource ) )
|
||||
,ConstraintFlags( getPxJoint_ConstraintFlags( inSource ) )
|
||||
,InvMassScale0( getPxJoint_InvMassScale0( inSource ) )
|
||||
,InvInertiaScale0( getPxJoint_InvInertiaScale0( inSource ) )
|
||||
,InvMassScale1( getPxJoint_InvMassScale1( inSource ) )
|
||||
,InvInertiaScale1( getPxJoint_InvInertiaScale1( inSource ) )
|
||||
,Constraint( getPxJoint_Constraint( inSource ) )
|
||||
,Name( getPxJoint_Name( inSource ) )
|
||||
,Scene( getPxJoint_Scene( inSource ) )
|
||||
,UserData( inSource->userData )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
getPxJoint_Actors( inSource, Actors[0], Actors[1] );
|
||||
for ( PxU32 idx = 0; idx < static_cast<PxU32>( physx::PxJointActorIndex::COUNT ); ++idx )
|
||||
LocalPose[idx] = getPxJoint_LocalPose( inSource, static_cast< PxJointActorIndex::Enum >( idx ) );
|
||||
getPxJoint_BreakForce( inSource, BreakForce[0], BreakForce[1] );
|
||||
}
|
||||
void setPxD6Joint_Motion( PxD6Joint* inObj, PxD6Axis::Enum inIndex, PxD6Motion::Enum inArg ){ inObj->setMotion( inIndex, inArg ); }
|
||||
PxD6Motion::Enum getPxD6Joint_Motion( const PxD6Joint* inObj, PxD6Axis::Enum inIndex ) { return inObj->getMotion( inIndex ); }
|
||||
PxReal getPxD6Joint_TwistAngle( const PxD6Joint* inObj ) { return inObj->getTwistAngle(); }
|
||||
PxReal getPxD6Joint_Twist( const PxD6Joint* inObj ) { return inObj->getTwist(); }
|
||||
PxReal getPxD6Joint_SwingYAngle( const PxD6Joint* inObj ) { return inObj->getSwingYAngle(); }
|
||||
PxReal getPxD6Joint_SwingZAngle( const PxD6Joint* inObj ) { return inObj->getSwingZAngle(); }
|
||||
void setPxD6Joint_DistanceLimit( PxD6Joint* inObj, const PxJointLinearLimit & inArg){ inObj->setDistanceLimit( inArg ); }
|
||||
PxJointLinearLimit getPxD6Joint_DistanceLimit( const PxD6Joint* inObj ) { return inObj->getDistanceLimit(); }
|
||||
void setPxD6Joint_LinearLimit( PxD6Joint* inObj, const PxJointLinearLimit & inArg){ inObj->setLinearLimit( inArg ); }
|
||||
PxJointLinearLimit getPxD6Joint_LinearLimit( const PxD6Joint* inObj ) { return inObj->getLinearLimit(); }
|
||||
void setPxD6Joint_TwistLimit( PxD6Joint* inObj, const PxJointAngularLimitPair & inArg){ inObj->setTwistLimit( inArg ); }
|
||||
PxJointAngularLimitPair getPxD6Joint_TwistLimit( const PxD6Joint* inObj ) { return inObj->getTwistLimit(); }
|
||||
void setPxD6Joint_SwingLimit( PxD6Joint* inObj, const PxJointLimitCone & inArg){ inObj->setSwingLimit( inArg ); }
|
||||
PxJointLimitCone getPxD6Joint_SwingLimit( const PxD6Joint* inObj ) { return inObj->getSwingLimit(); }
|
||||
void setPxD6Joint_PyramidSwingLimit( PxD6Joint* inObj, const PxJointLimitPyramid & inArg){ inObj->setPyramidSwingLimit( inArg ); }
|
||||
PxJointLimitPyramid getPxD6Joint_PyramidSwingLimit( const PxD6Joint* inObj ) { return inObj->getPyramidSwingLimit(); }
|
||||
void setPxD6Joint_Drive( PxD6Joint* inObj, PxD6Drive::Enum inIndex, PxD6JointDrive inArg ){ inObj->setDrive( inIndex, inArg ); }
|
||||
PxD6JointDrive getPxD6Joint_Drive( const PxD6Joint* inObj, PxD6Drive::Enum inIndex ) { return inObj->getDrive( inIndex ); }
|
||||
void setPxD6Joint_DrivePosition( PxD6Joint* inObj, const PxTransform & inArg){ inObj->setDrivePosition( inArg ); }
|
||||
PxTransform getPxD6Joint_DrivePosition( const PxD6Joint* inObj ) { return inObj->getDrivePosition(); }
|
||||
void setPxD6Joint_ProjectionLinearTolerance( PxD6Joint* inObj, PxReal inArg){ inObj->setProjectionLinearTolerance( inArg ); }
|
||||
PxReal getPxD6Joint_ProjectionLinearTolerance( const PxD6Joint* inObj ) { return inObj->getProjectionLinearTolerance(); }
|
||||
void setPxD6Joint_ProjectionAngularTolerance( PxD6Joint* inObj, PxReal inArg){ inObj->setProjectionAngularTolerance( inArg ); }
|
||||
PxReal getPxD6Joint_ProjectionAngularTolerance( const PxD6Joint* inObj ) { return inObj->getProjectionAngularTolerance(); }
|
||||
const char * getPxD6Joint_ConcreteTypeName( const PxD6Joint* inObj ) { return inObj->getConcreteTypeName(); }
|
||||
PxD6JointGeneratedInfo::PxD6JointGeneratedInfo()
|
||||
: Motion( "Motion", setPxD6Joint_Motion, getPxD6Joint_Motion)
|
||||
, TwistAngle( "TwistAngle", getPxD6Joint_TwistAngle)
|
||||
, Twist( "Twist", getPxD6Joint_Twist)
|
||||
, SwingYAngle( "SwingYAngle", getPxD6Joint_SwingYAngle)
|
||||
, SwingZAngle( "SwingZAngle", getPxD6Joint_SwingZAngle)
|
||||
, DistanceLimit( "DistanceLimit", setPxD6Joint_DistanceLimit, getPxD6Joint_DistanceLimit)
|
||||
, LinearLimit( "LinearLimit", setPxD6Joint_LinearLimit, getPxD6Joint_LinearLimit)
|
||||
, TwistLimit( "TwistLimit", setPxD6Joint_TwistLimit, getPxD6Joint_TwistLimit)
|
||||
, SwingLimit( "SwingLimit", setPxD6Joint_SwingLimit, getPxD6Joint_SwingLimit)
|
||||
, PyramidSwingLimit( "PyramidSwingLimit", setPxD6Joint_PyramidSwingLimit, getPxD6Joint_PyramidSwingLimit)
|
||||
, Drive( "Drive", setPxD6Joint_Drive, getPxD6Joint_Drive)
|
||||
, DrivePosition( "DrivePosition", setPxD6Joint_DrivePosition, getPxD6Joint_DrivePosition)
|
||||
, ProjectionLinearTolerance( "ProjectionLinearTolerance", setPxD6Joint_ProjectionLinearTolerance, getPxD6Joint_ProjectionLinearTolerance)
|
||||
, ProjectionAngularTolerance( "ProjectionAngularTolerance", setPxD6Joint_ProjectionAngularTolerance, getPxD6Joint_ProjectionAngularTolerance)
|
||||
, ConcreteTypeName( "ConcreteTypeName", getPxD6Joint_ConcreteTypeName)
|
||||
{}
|
||||
PxD6JointGeneratedValues::PxD6JointGeneratedValues( const PxD6Joint* inSource )
|
||||
:PxJointGeneratedValues( inSource )
|
||||
,TwistAngle( getPxD6Joint_TwistAngle( inSource ) )
|
||||
,Twist( getPxD6Joint_Twist( inSource ) )
|
||||
,SwingYAngle( getPxD6Joint_SwingYAngle( inSource ) )
|
||||
,SwingZAngle( getPxD6Joint_SwingZAngle( inSource ) )
|
||||
,DistanceLimit( getPxD6Joint_DistanceLimit( inSource ) )
|
||||
,LinearLimit( getPxD6Joint_LinearLimit( inSource ) )
|
||||
,TwistLimit( getPxD6Joint_TwistLimit( inSource ) )
|
||||
,SwingLimit( getPxD6Joint_SwingLimit( inSource ) )
|
||||
,PyramidSwingLimit( getPxD6Joint_PyramidSwingLimit( inSource ) )
|
||||
,DrivePosition( getPxD6Joint_DrivePosition( inSource ) )
|
||||
,ProjectionLinearTolerance( getPxD6Joint_ProjectionLinearTolerance( inSource ) )
|
||||
,ProjectionAngularTolerance( getPxD6Joint_ProjectionAngularTolerance( inSource ) )
|
||||
,ConcreteTypeName( getPxD6Joint_ConcreteTypeName( inSource ) )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
for ( PxU32 idx = 0; idx < static_cast<PxU32>( physx::PxD6Axis::eCOUNT ); ++idx )
|
||||
Motion[idx] = getPxD6Joint_Motion( inSource, static_cast< PxD6Axis::Enum >( idx ) );
|
||||
for ( PxU32 idx = 0; idx < static_cast<PxU32>( physx::PxD6Drive::eCOUNT ); ++idx )
|
||||
Drive[idx] = getPxD6Joint_Drive( inSource, static_cast< PxD6Drive::Enum >( idx ) );
|
||||
}
|
||||
PxReal getPxDistanceJoint_Distance( const PxDistanceJoint* inObj ) { return inObj->getDistance(); }
|
||||
void setPxDistanceJoint_MinDistance( PxDistanceJoint* inObj, PxReal inArg){ inObj->setMinDistance( inArg ); }
|
||||
PxReal getPxDistanceJoint_MinDistance( const PxDistanceJoint* inObj ) { return inObj->getMinDistance(); }
|
||||
void setPxDistanceJoint_MaxDistance( PxDistanceJoint* inObj, PxReal inArg){ inObj->setMaxDistance( inArg ); }
|
||||
PxReal getPxDistanceJoint_MaxDistance( const PxDistanceJoint* inObj ) { return inObj->getMaxDistance(); }
|
||||
void setPxDistanceJoint_Tolerance( PxDistanceJoint* inObj, PxReal inArg){ inObj->setTolerance( inArg ); }
|
||||
PxReal getPxDistanceJoint_Tolerance( const PxDistanceJoint* inObj ) { return inObj->getTolerance(); }
|
||||
void setPxDistanceJoint_Stiffness( PxDistanceJoint* inObj, PxReal inArg){ inObj->setStiffness( inArg ); }
|
||||
PxReal getPxDistanceJoint_Stiffness( const PxDistanceJoint* inObj ) { return inObj->getStiffness(); }
|
||||
void setPxDistanceJoint_Damping( PxDistanceJoint* inObj, PxReal inArg){ inObj->setDamping( inArg ); }
|
||||
PxReal getPxDistanceJoint_Damping( const PxDistanceJoint* inObj ) { return inObj->getDamping(); }
|
||||
void setPxDistanceJoint_DistanceJointFlags( PxDistanceJoint* inObj, PxDistanceJointFlags inArg){ inObj->setDistanceJointFlags( inArg ); }
|
||||
PxDistanceJointFlags getPxDistanceJoint_DistanceJointFlags( const PxDistanceJoint* inObj ) { return inObj->getDistanceJointFlags(); }
|
||||
const char * getPxDistanceJoint_ConcreteTypeName( const PxDistanceJoint* inObj ) { return inObj->getConcreteTypeName(); }
|
||||
PxDistanceJointGeneratedInfo::PxDistanceJointGeneratedInfo()
|
||||
: Distance( "Distance", getPxDistanceJoint_Distance)
|
||||
, MinDistance( "MinDistance", setPxDistanceJoint_MinDistance, getPxDistanceJoint_MinDistance)
|
||||
, MaxDistance( "MaxDistance", setPxDistanceJoint_MaxDistance, getPxDistanceJoint_MaxDistance)
|
||||
, Tolerance( "Tolerance", setPxDistanceJoint_Tolerance, getPxDistanceJoint_Tolerance)
|
||||
, Stiffness( "Stiffness", setPxDistanceJoint_Stiffness, getPxDistanceJoint_Stiffness)
|
||||
, Damping( "Damping", setPxDistanceJoint_Damping, getPxDistanceJoint_Damping)
|
||||
, DistanceJointFlags( "DistanceJointFlags", setPxDistanceJoint_DistanceJointFlags, getPxDistanceJoint_DistanceJointFlags)
|
||||
, ConcreteTypeName( "ConcreteTypeName", getPxDistanceJoint_ConcreteTypeName)
|
||||
{}
|
||||
PxDistanceJointGeneratedValues::PxDistanceJointGeneratedValues( const PxDistanceJoint* inSource )
|
||||
:PxJointGeneratedValues( inSource )
|
||||
,Distance( getPxDistanceJoint_Distance( inSource ) )
|
||||
,MinDistance( getPxDistanceJoint_MinDistance( inSource ) )
|
||||
,MaxDistance( getPxDistanceJoint_MaxDistance( inSource ) )
|
||||
,Tolerance( getPxDistanceJoint_Tolerance( inSource ) )
|
||||
,Stiffness( getPxDistanceJoint_Stiffness( inSource ) )
|
||||
,Damping( getPxDistanceJoint_Damping( inSource ) )
|
||||
,DistanceJointFlags( getPxDistanceJoint_DistanceJointFlags( inSource ) )
|
||||
,ConcreteTypeName( getPxDistanceJoint_ConcreteTypeName( inSource ) )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
void setPxContactJoint_Contact( PxContactJoint* inObj, const PxVec3 & inArg){ inObj->setContact( inArg ); }
|
||||
PxVec3 getPxContactJoint_Contact( const PxContactJoint* inObj ) { return inObj->getContact(); }
|
||||
void setPxContactJoint_ContactNormal( PxContactJoint* inObj, const PxVec3 & inArg){ inObj->setContactNormal( inArg ); }
|
||||
PxVec3 getPxContactJoint_ContactNormal( const PxContactJoint* inObj ) { return inObj->getContactNormal(); }
|
||||
void setPxContactJoint_Penetration( PxContactJoint* inObj, const PxReal inArg){ inObj->setPenetration( inArg ); }
|
||||
PxReal getPxContactJoint_Penetration( const PxContactJoint* inObj ) { return inObj->getPenetration(); }
|
||||
void setPxContactJoint_Resititution( PxContactJoint* inObj, const PxReal inArg){ inObj->setResititution( inArg ); }
|
||||
PxReal getPxContactJoint_Resititution( const PxContactJoint* inObj ) { return inObj->getResititution(); }
|
||||
void setPxContactJoint_BounceThreshold( PxContactJoint* inObj, const PxReal inArg){ inObj->setBounceThreshold( inArg ); }
|
||||
PxReal getPxContactJoint_BounceThreshold( const PxContactJoint* inObj ) { return inObj->getBounceThreshold(); }
|
||||
const char * getPxContactJoint_ConcreteTypeName( const PxContactJoint* inObj ) { return inObj->getConcreteTypeName(); }
|
||||
PxContactJointGeneratedInfo::PxContactJointGeneratedInfo()
|
||||
: Contact( "Contact", setPxContactJoint_Contact, getPxContactJoint_Contact)
|
||||
, ContactNormal( "ContactNormal", setPxContactJoint_ContactNormal, getPxContactJoint_ContactNormal)
|
||||
, Penetration( "Penetration", setPxContactJoint_Penetration, getPxContactJoint_Penetration)
|
||||
, Resititution( "Resititution", setPxContactJoint_Resititution, getPxContactJoint_Resititution)
|
||||
, BounceThreshold( "BounceThreshold", setPxContactJoint_BounceThreshold, getPxContactJoint_BounceThreshold)
|
||||
, ConcreteTypeName( "ConcreteTypeName", getPxContactJoint_ConcreteTypeName)
|
||||
{}
|
||||
PxContactJointGeneratedValues::PxContactJointGeneratedValues( const PxContactJoint* inSource )
|
||||
:PxJointGeneratedValues( inSource )
|
||||
,Contact( getPxContactJoint_Contact( inSource ) )
|
||||
,ContactNormal( getPxContactJoint_ContactNormal( inSource ) )
|
||||
,Penetration( getPxContactJoint_Penetration( inSource ) )
|
||||
,Resititution( getPxContactJoint_Resititution( inSource ) )
|
||||
,BounceThreshold( getPxContactJoint_BounceThreshold( inSource ) )
|
||||
,ConcreteTypeName( getPxContactJoint_ConcreteTypeName( inSource ) )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
void setPxFixedJoint_ProjectionLinearTolerance( PxFixedJoint* inObj, PxReal inArg){ inObj->setProjectionLinearTolerance( inArg ); }
|
||||
PxReal getPxFixedJoint_ProjectionLinearTolerance( const PxFixedJoint* inObj ) { return inObj->getProjectionLinearTolerance(); }
|
||||
void setPxFixedJoint_ProjectionAngularTolerance( PxFixedJoint* inObj, PxReal inArg){ inObj->setProjectionAngularTolerance( inArg ); }
|
||||
PxReal getPxFixedJoint_ProjectionAngularTolerance( const PxFixedJoint* inObj ) { return inObj->getProjectionAngularTolerance(); }
|
||||
const char * getPxFixedJoint_ConcreteTypeName( const PxFixedJoint* inObj ) { return inObj->getConcreteTypeName(); }
|
||||
PxFixedJointGeneratedInfo::PxFixedJointGeneratedInfo()
|
||||
: ProjectionLinearTolerance( "ProjectionLinearTolerance", setPxFixedJoint_ProjectionLinearTolerance, getPxFixedJoint_ProjectionLinearTolerance)
|
||||
, ProjectionAngularTolerance( "ProjectionAngularTolerance", setPxFixedJoint_ProjectionAngularTolerance, getPxFixedJoint_ProjectionAngularTolerance)
|
||||
, ConcreteTypeName( "ConcreteTypeName", getPxFixedJoint_ConcreteTypeName)
|
||||
{}
|
||||
PxFixedJointGeneratedValues::PxFixedJointGeneratedValues( const PxFixedJoint* inSource )
|
||||
:PxJointGeneratedValues( inSource )
|
||||
,ProjectionLinearTolerance( getPxFixedJoint_ProjectionLinearTolerance( inSource ) )
|
||||
,ProjectionAngularTolerance( getPxFixedJoint_ProjectionAngularTolerance( inSource ) )
|
||||
,ConcreteTypeName( getPxFixedJoint_ConcreteTypeName( inSource ) )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
PxReal getPxPrismaticJoint_Position( const PxPrismaticJoint* inObj ) { return inObj->getPosition(); }
|
||||
PxReal getPxPrismaticJoint_Velocity( const PxPrismaticJoint* inObj ) { return inObj->getVelocity(); }
|
||||
void setPxPrismaticJoint_Limit( PxPrismaticJoint* inObj, const PxJointLinearLimitPair & inArg){ inObj->setLimit( inArg ); }
|
||||
PxJointLinearLimitPair getPxPrismaticJoint_Limit( const PxPrismaticJoint* inObj ) { return inObj->getLimit(); }
|
||||
void setPxPrismaticJoint_PrismaticJointFlags( PxPrismaticJoint* inObj, PxPrismaticJointFlags inArg){ inObj->setPrismaticJointFlags( inArg ); }
|
||||
PxPrismaticJointFlags getPxPrismaticJoint_PrismaticJointFlags( const PxPrismaticJoint* inObj ) { return inObj->getPrismaticJointFlags(); }
|
||||
void setPxPrismaticJoint_ProjectionLinearTolerance( PxPrismaticJoint* inObj, PxReal inArg){ inObj->setProjectionLinearTolerance( inArg ); }
|
||||
PxReal getPxPrismaticJoint_ProjectionLinearTolerance( const PxPrismaticJoint* inObj ) { return inObj->getProjectionLinearTolerance(); }
|
||||
void setPxPrismaticJoint_ProjectionAngularTolerance( PxPrismaticJoint* inObj, PxReal inArg){ inObj->setProjectionAngularTolerance( inArg ); }
|
||||
PxReal getPxPrismaticJoint_ProjectionAngularTolerance( const PxPrismaticJoint* inObj ) { return inObj->getProjectionAngularTolerance(); }
|
||||
const char * getPxPrismaticJoint_ConcreteTypeName( const PxPrismaticJoint* inObj ) { return inObj->getConcreteTypeName(); }
|
||||
PxPrismaticJointGeneratedInfo::PxPrismaticJointGeneratedInfo()
|
||||
: Position( "Position", getPxPrismaticJoint_Position)
|
||||
, Velocity( "Velocity", getPxPrismaticJoint_Velocity)
|
||||
, Limit( "Limit", setPxPrismaticJoint_Limit, getPxPrismaticJoint_Limit)
|
||||
, PrismaticJointFlags( "PrismaticJointFlags", setPxPrismaticJoint_PrismaticJointFlags, getPxPrismaticJoint_PrismaticJointFlags)
|
||||
, ProjectionLinearTolerance( "ProjectionLinearTolerance", setPxPrismaticJoint_ProjectionLinearTolerance, getPxPrismaticJoint_ProjectionLinearTolerance)
|
||||
, ProjectionAngularTolerance( "ProjectionAngularTolerance", setPxPrismaticJoint_ProjectionAngularTolerance, getPxPrismaticJoint_ProjectionAngularTolerance)
|
||||
, ConcreteTypeName( "ConcreteTypeName", getPxPrismaticJoint_ConcreteTypeName)
|
||||
{}
|
||||
PxPrismaticJointGeneratedValues::PxPrismaticJointGeneratedValues( const PxPrismaticJoint* inSource )
|
||||
:PxJointGeneratedValues( inSource )
|
||||
,Position( getPxPrismaticJoint_Position( inSource ) )
|
||||
,Velocity( getPxPrismaticJoint_Velocity( inSource ) )
|
||||
,Limit( getPxPrismaticJoint_Limit( inSource ) )
|
||||
,PrismaticJointFlags( getPxPrismaticJoint_PrismaticJointFlags( inSource ) )
|
||||
,ProjectionLinearTolerance( getPxPrismaticJoint_ProjectionLinearTolerance( inSource ) )
|
||||
,ProjectionAngularTolerance( getPxPrismaticJoint_ProjectionAngularTolerance( inSource ) )
|
||||
,ConcreteTypeName( getPxPrismaticJoint_ConcreteTypeName( inSource ) )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
PxReal getPxRevoluteJoint_Angle( const PxRevoluteJoint* inObj ) { return inObj->getAngle(); }
|
||||
PxReal getPxRevoluteJoint_Velocity( const PxRevoluteJoint* inObj ) { return inObj->getVelocity(); }
|
||||
void setPxRevoluteJoint_Limit( PxRevoluteJoint* inObj, const PxJointAngularLimitPair & inArg){ inObj->setLimit( inArg ); }
|
||||
PxJointAngularLimitPair getPxRevoluteJoint_Limit( const PxRevoluteJoint* inObj ) { return inObj->getLimit(); }
|
||||
void setPxRevoluteJoint_DriveVelocity( PxRevoluteJoint* inObj, PxReal inArg){ inObj->setDriveVelocity( inArg ); }
|
||||
PxReal getPxRevoluteJoint_DriveVelocity( const PxRevoluteJoint* inObj ) { return inObj->getDriveVelocity(); }
|
||||
void setPxRevoluteJoint_DriveForceLimit( PxRevoluteJoint* inObj, PxReal inArg){ inObj->setDriveForceLimit( inArg ); }
|
||||
PxReal getPxRevoluteJoint_DriveForceLimit( const PxRevoluteJoint* inObj ) { return inObj->getDriveForceLimit(); }
|
||||
void setPxRevoluteJoint_DriveGearRatio( PxRevoluteJoint* inObj, PxReal inArg){ inObj->setDriveGearRatio( inArg ); }
|
||||
PxReal getPxRevoluteJoint_DriveGearRatio( const PxRevoluteJoint* inObj ) { return inObj->getDriveGearRatio(); }
|
||||
void setPxRevoluteJoint_RevoluteJointFlags( PxRevoluteJoint* inObj, PxRevoluteJointFlags inArg){ inObj->setRevoluteJointFlags( inArg ); }
|
||||
PxRevoluteJointFlags getPxRevoluteJoint_RevoluteJointFlags( const PxRevoluteJoint* inObj ) { return inObj->getRevoluteJointFlags(); }
|
||||
void setPxRevoluteJoint_ProjectionLinearTolerance( PxRevoluteJoint* inObj, PxReal inArg){ inObj->setProjectionLinearTolerance( inArg ); }
|
||||
PxReal getPxRevoluteJoint_ProjectionLinearTolerance( const PxRevoluteJoint* inObj ) { return inObj->getProjectionLinearTolerance(); }
|
||||
void setPxRevoluteJoint_ProjectionAngularTolerance( PxRevoluteJoint* inObj, PxReal inArg){ inObj->setProjectionAngularTolerance( inArg ); }
|
||||
PxReal getPxRevoluteJoint_ProjectionAngularTolerance( const PxRevoluteJoint* inObj ) { return inObj->getProjectionAngularTolerance(); }
|
||||
const char * getPxRevoluteJoint_ConcreteTypeName( const PxRevoluteJoint* inObj ) { return inObj->getConcreteTypeName(); }
|
||||
PxRevoluteJointGeneratedInfo::PxRevoluteJointGeneratedInfo()
|
||||
: Angle( "Angle", getPxRevoluteJoint_Angle)
|
||||
, Velocity( "Velocity", getPxRevoluteJoint_Velocity)
|
||||
, Limit( "Limit", setPxRevoluteJoint_Limit, getPxRevoluteJoint_Limit)
|
||||
, DriveVelocity( "DriveVelocity", setPxRevoluteJoint_DriveVelocity, getPxRevoluteJoint_DriveVelocity)
|
||||
, DriveForceLimit( "DriveForceLimit", setPxRevoluteJoint_DriveForceLimit, getPxRevoluteJoint_DriveForceLimit)
|
||||
, DriveGearRatio( "DriveGearRatio", setPxRevoluteJoint_DriveGearRatio, getPxRevoluteJoint_DriveGearRatio)
|
||||
, RevoluteJointFlags( "RevoluteJointFlags", setPxRevoluteJoint_RevoluteJointFlags, getPxRevoluteJoint_RevoluteJointFlags)
|
||||
, ProjectionLinearTolerance( "ProjectionLinearTolerance", setPxRevoluteJoint_ProjectionLinearTolerance, getPxRevoluteJoint_ProjectionLinearTolerance)
|
||||
, ProjectionAngularTolerance( "ProjectionAngularTolerance", setPxRevoluteJoint_ProjectionAngularTolerance, getPxRevoluteJoint_ProjectionAngularTolerance)
|
||||
, ConcreteTypeName( "ConcreteTypeName", getPxRevoluteJoint_ConcreteTypeName)
|
||||
{}
|
||||
PxRevoluteJointGeneratedValues::PxRevoluteJointGeneratedValues( const PxRevoluteJoint* inSource )
|
||||
:PxJointGeneratedValues( inSource )
|
||||
,Angle( getPxRevoluteJoint_Angle( inSource ) )
|
||||
,Velocity( getPxRevoluteJoint_Velocity( inSource ) )
|
||||
,Limit( getPxRevoluteJoint_Limit( inSource ) )
|
||||
,DriveVelocity( getPxRevoluteJoint_DriveVelocity( inSource ) )
|
||||
,DriveForceLimit( getPxRevoluteJoint_DriveForceLimit( inSource ) )
|
||||
,DriveGearRatio( getPxRevoluteJoint_DriveGearRatio( inSource ) )
|
||||
,RevoluteJointFlags( getPxRevoluteJoint_RevoluteJointFlags( inSource ) )
|
||||
,ProjectionLinearTolerance( getPxRevoluteJoint_ProjectionLinearTolerance( inSource ) )
|
||||
,ProjectionAngularTolerance( getPxRevoluteJoint_ProjectionAngularTolerance( inSource ) )
|
||||
,ConcreteTypeName( getPxRevoluteJoint_ConcreteTypeName( inSource ) )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
void setPxSphericalJoint_LimitCone( PxSphericalJoint* inObj, const PxJointLimitCone & inArg){ inObj->setLimitCone( inArg ); }
|
||||
PxJointLimitCone getPxSphericalJoint_LimitCone( const PxSphericalJoint* inObj ) { return inObj->getLimitCone(); }
|
||||
PxReal getPxSphericalJoint_SwingYAngle( const PxSphericalJoint* inObj ) { return inObj->getSwingYAngle(); }
|
||||
PxReal getPxSphericalJoint_SwingZAngle( const PxSphericalJoint* inObj ) { return inObj->getSwingZAngle(); }
|
||||
void setPxSphericalJoint_SphericalJointFlags( PxSphericalJoint* inObj, PxSphericalJointFlags inArg){ inObj->setSphericalJointFlags( inArg ); }
|
||||
PxSphericalJointFlags getPxSphericalJoint_SphericalJointFlags( const PxSphericalJoint* inObj ) { return inObj->getSphericalJointFlags(); }
|
||||
void setPxSphericalJoint_ProjectionLinearTolerance( PxSphericalJoint* inObj, PxReal inArg){ inObj->setProjectionLinearTolerance( inArg ); }
|
||||
PxReal getPxSphericalJoint_ProjectionLinearTolerance( const PxSphericalJoint* inObj ) { return inObj->getProjectionLinearTolerance(); }
|
||||
const char * getPxSphericalJoint_ConcreteTypeName( const PxSphericalJoint* inObj ) { return inObj->getConcreteTypeName(); }
|
||||
PxSphericalJointGeneratedInfo::PxSphericalJointGeneratedInfo()
|
||||
: LimitCone( "LimitCone", setPxSphericalJoint_LimitCone, getPxSphericalJoint_LimitCone)
|
||||
, SwingYAngle( "SwingYAngle", getPxSphericalJoint_SwingYAngle)
|
||||
, SwingZAngle( "SwingZAngle", getPxSphericalJoint_SwingZAngle)
|
||||
, SphericalJointFlags( "SphericalJointFlags", setPxSphericalJoint_SphericalJointFlags, getPxSphericalJoint_SphericalJointFlags)
|
||||
, ProjectionLinearTolerance( "ProjectionLinearTolerance", setPxSphericalJoint_ProjectionLinearTolerance, getPxSphericalJoint_ProjectionLinearTolerance)
|
||||
, ConcreteTypeName( "ConcreteTypeName", getPxSphericalJoint_ConcreteTypeName)
|
||||
{}
|
||||
PxSphericalJointGeneratedValues::PxSphericalJointGeneratedValues( const PxSphericalJoint* inSource )
|
||||
:PxJointGeneratedValues( inSource )
|
||||
,LimitCone( getPxSphericalJoint_LimitCone( inSource ) )
|
||||
,SwingYAngle( getPxSphericalJoint_SwingYAngle( inSource ) )
|
||||
,SwingZAngle( getPxSphericalJoint_SwingZAngle( inSource ) )
|
||||
,SphericalJointFlags( getPxSphericalJoint_SphericalJointFlags( inSource ) )
|
||||
,ProjectionLinearTolerance( getPxSphericalJoint_ProjectionLinearTolerance( inSource ) )
|
||||
,ConcreteTypeName( getPxSphericalJoint_ConcreteTypeName( inSource ) )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
inline PxReal getPxJointLimitParametersRestitution( const PxJointLimitParameters* inOwner ) { return inOwner->restitution; }
|
||||
inline void setPxJointLimitParametersRestitution( PxJointLimitParameters* inOwner, PxReal inData) { inOwner->restitution = inData; }
|
||||
inline PxReal getPxJointLimitParametersBounceThreshold( const PxJointLimitParameters* inOwner ) { return inOwner->bounceThreshold; }
|
||||
inline void setPxJointLimitParametersBounceThreshold( PxJointLimitParameters* inOwner, PxReal inData) { inOwner->bounceThreshold = inData; }
|
||||
inline PxReal getPxJointLimitParametersStiffness( const PxJointLimitParameters* inOwner ) { return inOwner->stiffness; }
|
||||
inline void setPxJointLimitParametersStiffness( PxJointLimitParameters* inOwner, PxReal inData) { inOwner->stiffness = inData; }
|
||||
inline PxReal getPxJointLimitParametersDamping( const PxJointLimitParameters* inOwner ) { return inOwner->damping; }
|
||||
inline void setPxJointLimitParametersDamping( PxJointLimitParameters* inOwner, PxReal inData) { inOwner->damping = inData; }
|
||||
inline PxReal getPxJointLimitParametersContactDistance( const PxJointLimitParameters* inOwner ) { return inOwner->contactDistance; }
|
||||
inline void setPxJointLimitParametersContactDistance( PxJointLimitParameters* inOwner, PxReal inData) { inOwner->contactDistance = inData; }
|
||||
PxJointLimitParametersGeneratedInfo::PxJointLimitParametersGeneratedInfo()
|
||||
: Restitution( "Restitution", setPxJointLimitParametersRestitution, getPxJointLimitParametersRestitution )
|
||||
, BounceThreshold( "BounceThreshold", setPxJointLimitParametersBounceThreshold, getPxJointLimitParametersBounceThreshold )
|
||||
, Stiffness( "Stiffness", setPxJointLimitParametersStiffness, getPxJointLimitParametersStiffness )
|
||||
, Damping( "Damping", setPxJointLimitParametersDamping, getPxJointLimitParametersDamping )
|
||||
, ContactDistance( "ContactDistance", setPxJointLimitParametersContactDistance, getPxJointLimitParametersContactDistance )
|
||||
{}
|
||||
PxJointLimitParametersGeneratedValues::PxJointLimitParametersGeneratedValues( const PxJointLimitParameters* inSource )
|
||||
:Restitution( inSource->restitution )
|
||||
,BounceThreshold( inSource->bounceThreshold )
|
||||
,Stiffness( inSource->stiffness )
|
||||
,Damping( inSource->damping )
|
||||
,ContactDistance( inSource->contactDistance )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
inline PxReal getPxJointLinearLimitValue( const PxJointLinearLimit* inOwner ) { return inOwner->value; }
|
||||
inline void setPxJointLinearLimitValue( PxJointLinearLimit* inOwner, PxReal inData) { inOwner->value = inData; }
|
||||
PxJointLinearLimitGeneratedInfo::PxJointLinearLimitGeneratedInfo()
|
||||
: Value( "Value", setPxJointLinearLimitValue, getPxJointLinearLimitValue )
|
||||
{}
|
||||
PxJointLinearLimitGeneratedValues::PxJointLinearLimitGeneratedValues( const PxJointLinearLimit* inSource )
|
||||
:PxJointLimitParametersGeneratedValues( inSource )
|
||||
,Value( inSource->value )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
inline PxReal getPxJointLinearLimitPairUpper( const PxJointLinearLimitPair* inOwner ) { return inOwner->upper; }
|
||||
inline void setPxJointLinearLimitPairUpper( PxJointLinearLimitPair* inOwner, PxReal inData) { inOwner->upper = inData; }
|
||||
inline PxReal getPxJointLinearLimitPairLower( const PxJointLinearLimitPair* inOwner ) { return inOwner->lower; }
|
||||
inline void setPxJointLinearLimitPairLower( PxJointLinearLimitPair* inOwner, PxReal inData) { inOwner->lower = inData; }
|
||||
PxJointLinearLimitPairGeneratedInfo::PxJointLinearLimitPairGeneratedInfo()
|
||||
: Upper( "Upper", setPxJointLinearLimitPairUpper, getPxJointLinearLimitPairUpper )
|
||||
, Lower( "Lower", setPxJointLinearLimitPairLower, getPxJointLinearLimitPairLower )
|
||||
{}
|
||||
PxJointLinearLimitPairGeneratedValues::PxJointLinearLimitPairGeneratedValues( const PxJointLinearLimitPair* inSource )
|
||||
:PxJointLimitParametersGeneratedValues( inSource )
|
||||
,Upper( inSource->upper )
|
||||
,Lower( inSource->lower )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
inline PxReal getPxJointAngularLimitPairUpper( const PxJointAngularLimitPair* inOwner ) { return inOwner->upper; }
|
||||
inline void setPxJointAngularLimitPairUpper( PxJointAngularLimitPair* inOwner, PxReal inData) { inOwner->upper = inData; }
|
||||
inline PxReal getPxJointAngularLimitPairLower( const PxJointAngularLimitPair* inOwner ) { return inOwner->lower; }
|
||||
inline void setPxJointAngularLimitPairLower( PxJointAngularLimitPair* inOwner, PxReal inData) { inOwner->lower = inData; }
|
||||
PxJointAngularLimitPairGeneratedInfo::PxJointAngularLimitPairGeneratedInfo()
|
||||
: Upper( "Upper", setPxJointAngularLimitPairUpper, getPxJointAngularLimitPairUpper )
|
||||
, Lower( "Lower", setPxJointAngularLimitPairLower, getPxJointAngularLimitPairLower )
|
||||
{}
|
||||
PxJointAngularLimitPairGeneratedValues::PxJointAngularLimitPairGeneratedValues( const PxJointAngularLimitPair* inSource )
|
||||
:PxJointLimitParametersGeneratedValues( inSource )
|
||||
,Upper( inSource->upper )
|
||||
,Lower( inSource->lower )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
inline PxReal getPxJointLimitConeYAngle( const PxJointLimitCone* inOwner ) { return inOwner->yAngle; }
|
||||
inline void setPxJointLimitConeYAngle( PxJointLimitCone* inOwner, PxReal inData) { inOwner->yAngle = inData; }
|
||||
inline PxReal getPxJointLimitConeZAngle( const PxJointLimitCone* inOwner ) { return inOwner->zAngle; }
|
||||
inline void setPxJointLimitConeZAngle( PxJointLimitCone* inOwner, PxReal inData) { inOwner->zAngle = inData; }
|
||||
PxJointLimitConeGeneratedInfo::PxJointLimitConeGeneratedInfo()
|
||||
: YAngle( "YAngle", setPxJointLimitConeYAngle, getPxJointLimitConeYAngle )
|
||||
, ZAngle( "ZAngle", setPxJointLimitConeZAngle, getPxJointLimitConeZAngle )
|
||||
{}
|
||||
PxJointLimitConeGeneratedValues::PxJointLimitConeGeneratedValues( const PxJointLimitCone* inSource )
|
||||
:PxJointLimitParametersGeneratedValues( inSource )
|
||||
,YAngle( inSource->yAngle )
|
||||
,ZAngle( inSource->zAngle )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
inline PxReal getPxJointLimitPyramidYAngleMin( const PxJointLimitPyramid* inOwner ) { return inOwner->yAngleMin; }
|
||||
inline void setPxJointLimitPyramidYAngleMin( PxJointLimitPyramid* inOwner, PxReal inData) { inOwner->yAngleMin = inData; }
|
||||
inline PxReal getPxJointLimitPyramidYAngleMax( const PxJointLimitPyramid* inOwner ) { return inOwner->yAngleMax; }
|
||||
inline void setPxJointLimitPyramidYAngleMax( PxJointLimitPyramid* inOwner, PxReal inData) { inOwner->yAngleMax = inData; }
|
||||
inline PxReal getPxJointLimitPyramidZAngleMin( const PxJointLimitPyramid* inOwner ) { return inOwner->zAngleMin; }
|
||||
inline void setPxJointLimitPyramidZAngleMin( PxJointLimitPyramid* inOwner, PxReal inData) { inOwner->zAngleMin = inData; }
|
||||
inline PxReal getPxJointLimitPyramidZAngleMax( const PxJointLimitPyramid* inOwner ) { return inOwner->zAngleMax; }
|
||||
inline void setPxJointLimitPyramidZAngleMax( PxJointLimitPyramid* inOwner, PxReal inData) { inOwner->zAngleMax = inData; }
|
||||
PxJointLimitPyramidGeneratedInfo::PxJointLimitPyramidGeneratedInfo()
|
||||
: YAngleMin( "YAngleMin", setPxJointLimitPyramidYAngleMin, getPxJointLimitPyramidYAngleMin )
|
||||
, YAngleMax( "YAngleMax", setPxJointLimitPyramidYAngleMax, getPxJointLimitPyramidYAngleMax )
|
||||
, ZAngleMin( "ZAngleMin", setPxJointLimitPyramidZAngleMin, getPxJointLimitPyramidZAngleMin )
|
||||
, ZAngleMax( "ZAngleMax", setPxJointLimitPyramidZAngleMax, getPxJointLimitPyramidZAngleMax )
|
||||
{}
|
||||
PxJointLimitPyramidGeneratedValues::PxJointLimitPyramidGeneratedValues( const PxJointLimitPyramid* inSource )
|
||||
:PxJointLimitParametersGeneratedValues( inSource )
|
||||
,YAngleMin( inSource->yAngleMin )
|
||||
,YAngleMax( inSource->yAngleMax )
|
||||
,ZAngleMin( inSource->zAngleMin )
|
||||
,ZAngleMax( inSource->zAngleMax )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
inline PxReal getPxSpringStiffness( const PxSpring* inOwner ) { return inOwner->stiffness; }
|
||||
inline void setPxSpringStiffness( PxSpring* inOwner, PxReal inData) { inOwner->stiffness = inData; }
|
||||
inline PxReal getPxSpringDamping( const PxSpring* inOwner ) { return inOwner->damping; }
|
||||
inline void setPxSpringDamping( PxSpring* inOwner, PxReal inData) { inOwner->damping = inData; }
|
||||
PxSpringGeneratedInfo::PxSpringGeneratedInfo()
|
||||
: Stiffness( "Stiffness", setPxSpringStiffness, getPxSpringStiffness )
|
||||
, Damping( "Damping", setPxSpringDamping, getPxSpringDamping )
|
||||
{}
|
||||
PxSpringGeneratedValues::PxSpringGeneratedValues( const PxSpring* inSource )
|
||||
:Stiffness( inSource->stiffness )
|
||||
,Damping( inSource->damping )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
inline PxReal getPxD6JointDriveForceLimit( const PxD6JointDrive* inOwner ) { return inOwner->forceLimit; }
|
||||
inline void setPxD6JointDriveForceLimit( PxD6JointDrive* inOwner, PxReal inData) { inOwner->forceLimit = inData; }
|
||||
inline PxD6JointDriveFlags getPxD6JointDriveFlags( const PxD6JointDrive* inOwner ) { return inOwner->flags; }
|
||||
inline void setPxD6JointDriveFlags( PxD6JointDrive* inOwner, PxD6JointDriveFlags inData) { inOwner->flags = inData; }
|
||||
PxD6JointDriveGeneratedInfo::PxD6JointDriveGeneratedInfo()
|
||||
: ForceLimit( "ForceLimit", setPxD6JointDriveForceLimit, getPxD6JointDriveForceLimit )
|
||||
, Flags( "Flags", setPxD6JointDriveFlags, getPxD6JointDriveFlags )
|
||||
{}
|
||||
PxD6JointDriveGeneratedValues::PxD6JointDriveGeneratedValues( const PxD6JointDrive* inSource )
|
||||
:PxSpringGeneratedValues( inSource )
|
||||
,ForceLimit( inSource->forceLimit )
|
||||
,Flags( inSource->flags )
|
||||
{
|
||||
PX_UNUSED(inSource);
|
||||
}
|
||||
Reference in New Issue
Block a user