Emscripten workarounds and llvm syntax fixes
[platform/core/uifw/dali-core.git] / dali / integration-api / dynamics / dynamics-collision-data.h
1 #ifndef __DALI_INTEGRATION_DYNAMICS_COLLISION_DATA_H__
2 #define __DALI_INTEGRATION_DYNAMICS_COLLISION_DATA_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 //INTERNAL HEADERS
21 #include <dali/public-api/math/vector3.h>
22
23 namespace Dali
24 {
25
26 struct Vector3;
27
28 namespace Integration
29 {
30
31 class DynamicsBody;
32
33 struct DynamicsCollisionData
34 {
35 public:
36   DynamicsCollisionData(DynamicsBody* bodyA, DynamicsBody* bodyB, const Vector3& pointOnA, const Vector3& pointOnB, const Vector3& normal, const float impact)
37   : mBodyA(bodyA),
38     mBodyB(bodyB),
39     mPointOnA(pointOnA),
40     mPointOnB(pointOnB),
41     mNormal(normal),
42     mImpact(impact)
43   {
44   }
45
46   DynamicsCollisionData(const DynamicsCollisionData& rhs)
47   : mBodyA(rhs.mBodyA),
48     mBodyB(rhs.mBodyB),
49     mPointOnA(rhs.mPointOnA),
50     mPointOnB(rhs.mPointOnB),
51     mNormal(rhs.mNormal),
52     mImpact(rhs.mImpact)
53   {
54   }
55
56   DynamicsCollisionData()
57   : mBodyA(NULL),
58     mBodyB(NULL),
59     mImpact(0.0f)
60   {
61   }
62
63   ~DynamicsCollisionData()
64   {
65   }
66
67   DynamicsCollisionData& operator=(const DynamicsCollisionData& rhs)
68   {
69     if( this != &rhs )
70     {
71       mBodyA = rhs.mBodyA;
72       mBodyB = rhs.mBodyB;
73       mPointOnA = rhs.mPointOnA;
74       mPointOnB = rhs.mPointOnB;
75       mNormal = rhs.mNormal;
76       mImpact = rhs.mImpact;
77     }
78     return *this;
79   }
80
81   DynamicsBody* mBodyA;
82   DynamicsBody* mBodyB;
83   Vector3       mPointOnA;
84   Vector3       mPointOnB;
85   Vector3       mNormal;
86   float         mImpact;
87 }; // struct DynamicsCollisionData
88
89 } // namespace Integration
90
91 } // namespace Dali
92
93 #endif // __DALI_INTEGRATION_DYNAMICS_COLLISION_DATA_H__