Files
o3de/Gems/PhysX/Code/Source/System/PhysXJointInterface.h
T
amzn-sean 9f62d631fb Physics joints updated to the new API (#1361)
Co-authored-by: Ulugbek Adilbekov <ulugbek@amazon.com>
2021-06-17 15:52:27 +01:00

53 lines
2.1 KiB
C++

/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates, or
* a third party where indicated.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <AzCore/Interface/Interface.h>
#include <AzFramework/Physics/Common/PhysicsJoint.h>
namespace AzPhysics
{
struct JointConfiguration;
}
namespace PhysX
{
class PhysXJointHelpersInterface
: public AZ::Interface<AzPhysics::JointHelpersInterface>::Registrar
{
public:
AZ_RTTI(PhysX::PhysXJointHelpersInterface, "{48AC5137-2226-4C57-8E4C-FCF3C1965252}", AzPhysics::JointHelpersInterface);
const AZStd::vector<AZ::TypeId> GetSupportedJointTypeIds() const override;
AZStd::optional<const AZ::TypeId> GetSupportedJointTypeId(AzPhysics::JointType typeEnum) const override;
AZStd::unique_ptr<AzPhysics::JointConfiguration> ComputeInitialJointLimitConfiguration(
const AZ::TypeId& jointLimitTypeId,
const AZ::Quaternion& parentWorldRotation,
const AZ::Quaternion& childWorldRotation,
const AZ::Vector3& axis,
const AZStd::vector<AZ::Quaternion>& exampleLocalRotations) override;
void GenerateJointLimitVisualizationData(
const AzPhysics::JointConfiguration& configuration,
const AZ::Quaternion& parentRotation,
const AZ::Quaternion& childRotation,
float scale,
AZ::u32 angularSubdivisions,
AZ::u32 radialSubdivisions,
AZStd::vector<AZ::Vector3>& vertexBufferOut,
AZStd::vector<AZ::u32>& indexBufferOut,
AZStd::vector<AZ::Vector3>& lineBufferOut,
AZStd::vector<bool>& lineValidityBufferOut) override;
};
}