License conversion from Flora to Apache 2.0
[platform/core/uifw/dali-core.git] / dali / internal / event / dynamics / dynamics-universal-joint-impl.h
1 #ifndef __DYNAMICS_UNIVERSAL_JOINT_IMPL_H__
2 #define __DYNAMICS_UNIVERSAL_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 class Quaternion;
31 struct Vector3;
32
33 namespace Internal
34 {
35
36 namespace SceneGraph
37 {
38 class DynamicsUniversalJoint;
39 } // namespace SceneGraph
40
41 /// @copydoc Dali::DynamicsUniversalJoint
42 class DynamicsUniversalJoint : public DynamicsJoint
43 {
44 public:
45
46   /**
47    * Constructor.
48    * @copydoc Dali::DynamicsJoint::NewUniversal
49    */
50   DynamicsUniversalJoint(DynamicsWorldPtr world,
51                          DynamicsBodyPtr bodyA, DynamicsBodyPtr bodyB,
52                          const Vector3& pointA, const Quaternion& orientationA,
53                          const Vector3& pointB, const Quaternion& orientationB );
54
55 protected:
56   /**
57    * Destructor.
58    * A reference counted object may only be deleted by calling Unreference()
59    */
60   virtual ~DynamicsUniversalJoint();
61
62 private:
63   // unimplemented copy constructor and assignment operator
64   DynamicsUniversalJoint(const DynamicsUniversalJoint&);
65   DynamicsUniversalJoint& operator=(const DynamicsUniversalJoint&);
66
67   // Methods
68 public:
69   /// @copydoc Dali::DynamicsJoint::GetTranslationLowerLimit
70   Vector3 GetTranslationLowerLimit() const;
71
72   /// @copydoc Dali::DynamicsJoint::SetTranslationLowerLimit
73   void SetTranslationLowerLimit( const Vector3& limit );
74
75   /// @copydoc Dali::DynamicsJoint::GetTranslationUpperLimit
76   Vector3 GetTranslationUpperLimit() const;
77
78   /// @copydoc Dali::DynamicsJoint::SetTranslationUpperLimit
79   void SetTranslationUpperLimit( const Vector3& limit );
80
81   /// @copydoc Dali::DynamicsJoint::GetRotationLowerLimit
82   Vector3 GetRotationLowerLimit() const;
83
84   /// @copydoc Dali::DynamicsJoint::SetRotationLowerLimit
85   void SetRotationLowerLimit( const Vector3& limit );
86
87   /// @copydoc Dali::DynamicsJoint::GetRotationUpperLimit
88   Vector3 GetRotationUpperLimit() const;
89
90   /// @copydoc Dali::DynamicsJoint::SetRotationUpperLimit
91   void SetRotationUpperLimit( const Vector3& limit );
92
93   SceneGraph::DynamicsUniversalJoint* GetSceneObject() const;
94
95 private:
96   Vector3     mTranslationLowerLimit;
97   Vector3     mTranslationUpperLimit;
98   Vector3     mRotationLowerLimit;
99   Vector3     mRotationUpperLimit;
100 }; // class DynamicsUniversalJoint
101
102 } // namespace Internal
103
104 } // namespace Dali
105
106 #endif // __DYNAMICS_UNIVERSAL_JOINT_IMPL_H__