using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace BansheeEngine { /** @addtogroup Physics * @{ */ /// /// A spherical joint removes all translational degrees of freedom but allows all rotational degrees of freedom. /// Essentially this ensures that the anchor points of the two bodies are always coincident. Bodies are allowed to rotate /// around the anchor points, and their rotatation can be limited by an elliptical cone. /// [ShowInInspector] public partial class SphericalJoint : Joint { private SphericalJoint(bool __dummy0) { } protected SphericalJoint() { } /// /// Determines the limit of the joint. This clamps the rotation inside an eliptical angular cone. You must enable limit /// flag on the joint in order for this to be recognized. /// [ShowInInspector] [NativeWrapper] public LimitConeRange Limit { get { LimitConeRange temp; Internal_getLimit(mCachedPtr, out temp); return temp; } set { Internal_setLimit(mCachedPtr, ref value); } } /// Enables or disables a flag that controls the joint's behaviour. public void SetFlag(SphericalJointFlag flag, bool enabled) { Internal_setFlag(mCachedPtr, flag, enabled); } /// Checks is the specified flag enabled. public bool HasFlag(SphericalJointFlag flag) { return Internal_hasFlag(mCachedPtr, flag); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_getLimit(IntPtr thisPtr, out LimitConeRange __output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_setLimit(IntPtr thisPtr, ref LimitConeRange limit); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_setFlag(IntPtr thisPtr, SphericalJointFlag flag, bool enabled); [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool Internal_hasFlag(IntPtr thisPtr, SphericalJointFlag flag); } /** @} */ }