#ifndef NX_PHYSICS_NXJOINTLIMITDESC #define NX_PHYSICS_NXJOINTLIMITDESC /*----------------------------------------------------------------------------*\ | | Public Interface to Ageia PhysX Technology | | www.ageia.com | \*----------------------------------------------------------------------------*/ /** \addtogroup physics @{ */ /** \brief Describes a joint limit.

Example

\include NxSpringDesc_NxJointLimitDesc_Example.cpp Platform: \li PC SW: Yes \li PPU : Yes \li PS3 : Yes \li XB360: Yes @see NxRevoluteJoint NxSphericalJoint NxJointLimitPairDesc */ class NxJointLimitDesc { public: /** \brief The angle / position beyond which the limit is active. Which side the limit restricts depends on whether this is a high or low limit. Unit: Angular: Radians Range: Angular: (-PI,PI)
Range: Positional: (-inf,inf)
Default: 0.0 */ NxReal value; /** \brief limit bounce Range: [0,1]
Default: 0.0 */ NxReal restitution; /** \brief [not yet implemented!] limit can be made softer by setting this to less than 1. Range: [0,1]
Default: 1.0 */ NxReal hardness; /** \brief Constructor, sets members to default values. */ NX_INLINE NxJointLimitDesc(); /** \brief Sets members to default values. */ NX_INLINE void setToDefault(); /** \brief Returns true if the descriptor is valid. \return true if the current settings are valid */ NX_INLINE bool isValid() const; }; NX_INLINE NxJointLimitDesc::NxJointLimitDesc() { setToDefault(); } NX_INLINE void NxJointLimitDesc::setToDefault() { value = 0; restitution = 0; hardness = 1; } NX_INLINE bool NxJointLimitDesc::isValid() const { return (restitution >= 0 && restitution <= 1 && hardness >= 0 && hardness <= 1); } /** @} */ #endif //AGCOPYRIGHTBEGIN /////////////////////////////////////////////////////////////////////////// // Copyright (c) 2005 AGEIA Technologies. // All rights reserved. www.ageia.com /////////////////////////////////////////////////////////////////////////// //AGCOPYRIGHTEND