feat(physics): wire physx sdk into build
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
// 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-2025 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,
|
||||
PxRackAndPinionJoint_PropertiesStart,
|
||||
PxRackAndPinionJoint_Ratio,
|
||||
PxRackAndPinionJoint_ConcreteTypeName,
|
||||
PxRackAndPinionJoint_PropertiesStop,
|
||||
PxGearJoint_PropertiesStart,
|
||||
PxGearJoint_GearRatio,
|
||||
PxGearJoint_ConcreteTypeName,
|
||||
PxGearJoint_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_ConcreteTypeName,
|
||||
PxD6Joint_AngularDriveConfig,
|
||||
PxD6Joint_PropertiesStop,
|
||||
PxDistanceJoint_PropertiesStart,
|
||||
PxDistanceJoint_Distance,
|
||||
PxDistanceJoint_MinDistance,
|
||||
PxDistanceJoint_MaxDistance,
|
||||
PxDistanceJoint_Tolerance,
|
||||
PxDistanceJoint_Stiffness,
|
||||
PxDistanceJoint_Damping,
|
||||
PxDistanceJoint_DistanceJointFlags,
|
||||
PxDistanceJoint_ConcreteTypeName,
|
||||
PxDistanceJoint_PropertiesStop,
|
||||
PxFixedJoint_PropertiesStart,
|
||||
PxFixedJoint_ConcreteTypeName,
|
||||
PxFixedJoint_PropertiesStop,
|
||||
PxPrismaticJoint_PropertiesStart,
|
||||
PxPrismaticJoint_Position,
|
||||
PxPrismaticJoint_Velocity,
|
||||
PxPrismaticJoint_Limit,
|
||||
PxPrismaticJoint_PrismaticJointFlags,
|
||||
PxPrismaticJoint_ConcreteTypeName,
|
||||
PxPrismaticJoint_PropertiesStop,
|
||||
PxRevoluteJoint_PropertiesStart,
|
||||
PxRevoluteJoint_Angle,
|
||||
PxRevoluteJoint_Velocity,
|
||||
PxRevoluteJoint_Limit,
|
||||
PxRevoluteJoint_DriveVelocity,
|
||||
PxRevoluteJoint_DriveForceLimit,
|
||||
PxRevoluteJoint_DriveGearRatio,
|
||||
PxRevoluteJoint_RevoluteJointFlags,
|
||||
PxRevoluteJoint_ConcreteTypeName,
|
||||
PxRevoluteJoint_PropertiesStop,
|
||||
PxSphericalJoint_PropertiesStart,
|
||||
PxSphericalJoint_LimitCone,
|
||||
PxSphericalJoint_SwingYAngle,
|
||||
PxSphericalJoint_SwingZAngle,
|
||||
PxSphericalJoint_SphericalJointFlags,
|
||||
PxSphericalJoint_ConcreteTypeName,
|
||||
PxSphericalJoint_PropertiesStop,
|
||||
PxJointLimitParameters_PropertiesStart,
|
||||
PxJointLimitParameters_Restitution,
|
||||
PxJointLimitParameters_BounceThreshold,
|
||||
PxJointLimitParameters_Stiffness,
|
||||
PxJointLimitParameters_Damping,
|
||||
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
107
engine/third_party/physx/source/physxmetadata/extensions/include/PxExtensionMetaDataObjects.h
vendored
Normal file
107
engine/third_party/physx/source/physxmetadata/extensions/include/PxExtensionMetaDataObjects.h
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
// 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-2025 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"
|
||||
|
||||
|
||||
namespace physx
|
||||
{
|
||||
|
||||
class PxD6Joint;
|
||||
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 ); } \
|
||||
};
|
||||
|
||||
#if PX_LINUX && PX_CLANG
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-identifier"
|
||||
#endif
|
||||
#include "PxExtensionAutoGeneratedMetaDataObjects.h"
|
||||
#if PX_LINUX && PX_CLANG
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#undef DEFINE_PROPERTY_TO_VALUE_STRUCT_MAP
|
||||
|
||||
PX_FORCE_INLINE bool isD6JointDriveAccessAllowed(PxD6Drive::Enum driveType, PxD6AngularDriveConfig::Enum angDriveConfig)
|
||||
{
|
||||
PX_COMPILE_TIME_ASSERT(PxD6Drive::eX < PxD6Drive::eY);
|
||||
PX_COMPILE_TIME_ASSERT(PxD6Drive::eY < PxD6Drive::eZ);
|
||||
PX_COMPILE_TIME_ASSERT(PxD6Drive::eZ < PxD6Drive::eSWING);
|
||||
PX_COMPILE_TIME_ASSERT(PxD6Drive::eZ < PxD6Drive::eTWIST);
|
||||
PX_COMPILE_TIME_ASSERT(PxD6Drive::eZ < PxD6Drive::eSLERP);
|
||||
PX_COMPILE_TIME_ASSERT(PxD6Drive::eZ < PxD6Drive::eSWING1);
|
||||
PX_COMPILE_TIME_ASSERT(PxD6Drive::eZ < PxD6Drive::eSWING2);
|
||||
|
||||
if (driveType > PxD6Drive::eZ)
|
||||
{
|
||||
if (angDriveConfig == PxD6AngularDriveConfig::eSWING_TWIST)
|
||||
{
|
||||
if ((driveType != PxD6Drive::eTWIST) && (driveType != PxD6Drive::eSWING1) && (driveType != PxD6Drive::eSWING2))
|
||||
return false;
|
||||
}
|
||||
else if (angDriveConfig == PxD6AngularDriveConfig::eSLERP)
|
||||
{
|
||||
if (driveType != PxD6Drive::eSLERP)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
PX_ASSERT(angDriveConfig == PxD6AngularDriveConfig::eLEGACY);
|
||||
|
||||
if ((driveType != PxD6Drive::eSWING) && (driveType != PxD6Drive::eTWIST) && (driveType != PxD6Drive::eSLERP))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user