| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsCorePrerequisites.h"
- #include "BsSliderJoint.h"
- #include "BsCJoint.h"
- namespace BansheeEngine
- {
- /** @addtogroup Components-Core
- * @{
- */
- /**
- * @copydoc SliderJoint
- *
- * Wraps SliderJoint as a Component.
- */
- class BS_CORE_EXPORT CSliderJoint : public CJoint
- {
- public:
- CSliderJoint(const HSceneObject& parent);
- /** @copydoc SliderJoint::getPosition */
- inline float getPosition() const;
- /** @copydoc SliderJoint::getSpeed */
- inline float getSpeed() const;
- /** @copydoc SliderJoint::getLimit */
- inline LimitLinearRange getLimit() const;
- /** @copydoc SliderJoint::setLimit */
- inline void setLimit(const LimitLinearRange& limit);
- /** @copydoc SliderJoint::setFlag */
- inline void setFlag(SliderJoint::Flag flag, bool enabled);
- /** @copydoc SliderJoint::hasFlag */
- inline bool hasFlag(SliderJoint::Flag flag) const;
- /** @name Internal
- * @{
- */
- /** Returns the slider joint that this component wraps. */
- SliderJoint* _getInternal() const { return static_cast<SliderJoint*>(mInternal.get()); }
- /** @} */
- /************************************************************************/
- /* COMPONENT OVERRIDES */
- /************************************************************************/
- protected:
- friend class SceneObject;
- /** @copydoc CJoint::createInternal */
- SPtr<Joint> createInternal() override;
- SliderJoint::Flag mFlag = (SliderJoint::Flag)0;
- LimitLinearRange mLimit;
- /************************************************************************/
- /* RTTI */
- /************************************************************************/
- public:
- friend class CSliderJointRTTI;
- static RTTITypeBase* getRTTIStatic();
- RTTITypeBase* getRTTI() const override;
- protected:
- CSliderJoint() {} // Serialization only
- };
- /** @} */
- }
|