Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / automated-tests / src / dali-unmanaged / dali-test-suite-utils / test-dynamics.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 #include "test-dynamics.h"
18
19 using namespace Dali;
20
21 namespace Dali
22 {
23
24
25 TestDynamicsJoint::TestDynamicsJoint( TraceCallStack& trace )
26 : mTrace( trace )
27 {
28   mTrace.PushCall( "DynamicsJoint::DynamicsJoint", "" );
29 }
30
31 TestDynamicsJoint::~TestDynamicsJoint()
32 {
33   mTrace.PushCall( "DynamicsJoint::~DynamicsJoint", "" );
34 }
35
36 void TestDynamicsJoint::Initialize(
37   Integration::DynamicsBody* bodyA, const Vector3& positionA, const Quaternion& rotationA, const Vector3& offsetA,
38   Integration::DynamicsBody* bodyB, const Vector3& positionB, const Quaternion& rotationB, const Vector3& offsetB )
39 {
40   mTrace.PushCall( "DynamicsJoint::Initialize", "" );
41 }
42
43 void TestDynamicsJoint::SetLimit( const int axisIndex, const float lowerLimit, const float upperLimit )
44 {
45   mTrace.PushCall( "DynamicsJoint::SetLimit", "" );
46 }
47
48 void TestDynamicsJoint::EnableSpring( int axisIndex, bool flag )
49 {
50   mTrace.PushCall( "DynamicsJoint::EnableSpring", "" );
51 }
52
53 void TestDynamicsJoint::SetSpringStiffness( int axisIndex, float stiffness )
54 {
55   mTrace.PushCall( "DynamicsJoint::SetSpringStiffness", "" );
56 }
57
58 void TestDynamicsJoint::SetSpringDamping( int axisIndex, float damping )
59 {
60   mTrace.PushCall( "DynamicsJoint::SetSpringDamping", "" );
61 }
62
63 void TestDynamicsJoint::SetSpringCenterPoint( int axisIndex, float ratio )
64 {
65   mTrace.PushCall( "DynamicsJoint::SetSpringCenterPoint", "" );
66 }
67
68 void TestDynamicsJoint::EnableMotor( int axisIndex, bool flag )
69 {
70   mTrace.PushCall( "DynamicsJoint::EnableMotor", "" );
71 }
72
73 void TestDynamicsJoint::SetMotorVelocity( int axisIndex, float velocity )
74 {
75   mTrace.PushCall( "DynamicsJoint::SetMotorVelocity", "" );
76 }
77
78 void TestDynamicsJoint::SetMotorForce( int axisIndex, float force )
79 {
80   mTrace.PushCall( "DynamicsJoint::SetMotorForce", "" );
81 }
82
83
84 TestDynamicsShape::TestDynamicsShape( TraceCallStack& trace )
85 : mVertices( NULL ),
86   mFaces( NULL ),
87   mTrace( trace )
88 {
89   mTrace.PushCall( "DynamicsShape::DynamicsShape", "" );
90 }
91
92 TestDynamicsShape::~TestDynamicsShape()
93 {
94   mTrace.PushCall( "DynamicsShape::~DynamicsShape", "" );
95 }
96
97 void TestDynamicsShape::Initialize( int type, const Vector3& dimensions )
98 {
99   mTrace.PushCall( "DynamicsShape::Initialize", "" );
100 }
101
102 void TestDynamicsShape::Initialize( int type, const MeshData::VertexContainer& vertices, const MeshData::FaceIndices& faceIndices )
103 {
104   mTrace.PushCall( "DynamicsShape::Initialize", "mesh" );
105 }
106
107 TestDynamicsBody::TestDynamicsBody( TraceCallStack& trace )
108 : mSettings( NULL ),
109   mConserveVolume( false ),
110   mConserveShape( false ),
111   mKinematic( false ),
112   mActivationState( true ),
113   mCollisionGroup( 0 ),
114   mCollisionMask( 0 ),
115   mTrace( trace )
116 {
117   mTrace.PushCall( "DynamicsBody::DynamicsBody", "" );
118 }
119
120 TestDynamicsBody::~TestDynamicsBody()
121 {
122   mTrace.PushCall( "DynamicsBody::~DynamicsBody", "" );
123 }
124
125 TestDynamicsWorld::TestDynamicsWorld( TraceCallStack& trace )
126 : mSettings( NULL ),
127   mTrace( trace )
128 {
129   mTrace.PushCall( "DynamicsWorld::DynamicsWorld", "" );
130 }
131
132 TestDynamicsWorld::~TestDynamicsWorld()
133 {
134   mTrace.PushCall( "DynamicsWorld::~DynamicsWorld", "" );
135 }
136
137
138 TestDynamicsFactory::TestDynamicsFactory( TraceCallStack& trace ) : mTrace( trace )
139 {
140 }
141
142 TestDynamicsFactory::~TestDynamicsFactory()
143 {
144 }
145
146 bool TestDynamicsFactory::InitializeDynamics( const Integration::DynamicsWorldSettings& worldSettings )
147 {
148   mTrace.PushCall( "DynamicsFactory::InitializeDynamics", "" );
149   return true;
150 }
151
152 void TestDynamicsFactory::TerminateDynamics()
153 {
154   mTrace.PushCall( "DynamicsFactory::InitializeDynamics", "" );
155 }
156
157 Integration::DynamicsWorld* TestDynamicsFactory::CreateDynamicsWorld()
158 {
159   mTrace.PushCall( "DynamicsFactory::CreateDynamicsWorld", "" );
160   return new TestDynamicsWorld( mTrace );
161 }
162
163 Integration::DynamicsBody* TestDynamicsFactory::CreateDynamicsBody()
164 {
165   mTrace.PushCall( "DynamicsFactory::CreateDynamicsBody", "" );
166   return new TestDynamicsBody( mTrace );
167 }
168
169 Integration::DynamicsJoint* TestDynamicsFactory::CreateDynamicsJoint()
170 {
171   mTrace.PushCall( "DynamicsFactory::CreateDynamicsJoint", "" );
172   return new TestDynamicsJoint( mTrace );
173 }
174
175 Integration::DynamicsShape* TestDynamicsFactory::CreateDynamicsShape()
176 {
177   mTrace.PushCall( "DynamicsFactory::CreateDynamicsShape", "" );
178  return new TestDynamicsShape( mTrace );
179 }
180
181
182 } //namespace Dali