License conversion from Flora to Apache 2.0
[platform/core/uifw/dali-core.git] / dali / internal / event / dynamics / dynamics-slider-joint-impl.h
1 #ifndef __DYNAMICS_SLIDER_JOINT_IMPL_H__
2 #define __DYNAMICS_SLIDER_JOINT_IMPL_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // BASE CLASS HEADER
22 #include <dali/internal/event/dynamics/dynamics-joint-impl.h>
23
24 // INTERNAL HEADERS
25 #include <dali/internal/event/dynamics/dynamics-declarations.h>
26
27 namespace Dali
28 {
29
30 struct Degree;
31 struct Vector3;
32
33 namespace Internal
34 {
35
36 namespace SceneGraph
37 {
38 class DynamicsSliderJoint;
39 } // namespace SceneGraph
40
41 class DynamicsSliderJoint : public DynamicsJoint
42 {
43 public:
44   /**
45    * Constructor.
46    * @copydoc Dali::DynamicsJoint::NewSlider
47    */
48   DynamicsSliderJoint(DynamicsWorldPtr world,
49                       DynamicsBodyPtr bodyA, DynamicsBodyPtr bodyB,
50                       const Vector3& pointA, const Vector3& pointB, const Vector3& axis,
51                       const float translationLowerLimit, const float translationUpperLimit,
52                       const Radian& rotationLowerLimit, const Radian& rotationUpperLimit );
53
54 protected:
55   /**
56    * Destructor.
57    * A reference counted object may only be deleted by calling Unreference()
58    */
59   virtual ~DynamicsSliderJoint();
60
61 private:
62   // unimplemented copy constructor and assignment operator
63   DynamicsSliderJoint(const DynamicsSliderJoint&);
64   DynamicsSliderJoint& operator=(const DynamicsSliderJoint&);
65
66   // Methods
67 public:
68   /// @copydoc Dali::DynamicsSliderJoint::GetTranslationLowerLimit
69   float GetTranslationLowerLimit() const;
70
71   /// @copydoc Dali::DynamicsSliderJoint::SetTranslationLowerLimit
72   void SetTranslationLowerLimit( const float limit );
73
74   /// @copydoc Dali::DynamicsSliderJoint::GetTranslationUpperLimit
75   float GetTranslationUpperLimit() const;
76
77   /// @copydoc Dali::DynamicsSliderJoint::SetTranslationUpperLimit
78   void SetTranslationUpperLimit( const float limit );
79
80   /// @copydoc Dali::DynamicsSliderJoint::GetRotationLowerLimit
81   Radian GetRotationLowerLimit() const;
82
83   /// @copydoc Dali::DynamicsSliderJoint::SetRotationLowerLimit
84   void SetRotationLowerLimit( const Radian& limit );
85
86   /// @copydoc Dali::DynamicsSliderJoint::GetRotationUpperLimit
87   Radian GetRotationUpperLimit() const;
88
89   /// @copydoc Dali::DynamicsSliderJoint::SetRotationUpperLimit
90   void SetRotationUpperLimit( const Radian& limit );
91
92   SceneGraph::DynamicsSliderJoint* GetSceneObject() const;
93
94 private:
95   float mTranslationLowerLimit;
96   float mTranslationUpperLimit;
97   Radian mRotationLowerLimit;
98   Radian mRotationUpperLimit;
99 }; // class DynamicsSliderJoint
100
101 } // namespace Internal
102
103 } // namespace Dali
104
105 #endif // __DYNAMICS_SLIDER_JOINT_IMPL_H__