1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#pragma once
4
5#include "BsPhysXPrerequisites.h"
6#include "Physics/BsSphericalJoint.h"
7#include "PxPhysics.h"
8#include "extensions/PxSphericalJoint.h"
9
10namespace bs
11{
12 /** @addtogroup PhysX
13 * @{
14 */
15
16 /** PhysX implementation of a SphericalJoint. */
17 class PhysXSphericalJoint : public SphericalJoint
18 {
19 public:
20 PhysXSphericalJoint(physx::PxPhysics* physx, const SPHERICAL_JOINT_DESC& desc);
21 ~PhysXSphericalJoint();
22
23 /** @copydoc SphericalJoint::getLimit */
24 LimitConeRange getLimit() const override;
25
26 /** @copydoc SphericalJoint::setLimit */
27 void setLimit(const LimitConeRange& limit) override;
28
29 /** @copydoc SphericalJoint::setFlag */
30 void setFlag(SphericalJointFlag flag, bool enabled) override;
31
32 /** @copydoc SphericalJoint::hasFlag */
33 bool hasFlag(SphericalJointFlag flag) const override;
34
35 private:
36 /** Returns the internal PhysX representation of the spherical joint. */
37 inline physx::PxSphericalJoint* getInternal() const;
38 };
39
40 /** @} */
41}