Merge "Fix Klocwork issue." into devel/master
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / dali-test-suite-utils / test-dynamics.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
18 #include "test-dynamics.h"
19
20 using namespace Dali;
21
22 namespace Dali
23 {
24
25
26 TestDynamicsJoint::TestDynamicsJoint( TraceCallStack& trace )
27 : mTrace( trace )
28 {
29   mTrace.PushCall( "DynamicsJoint::DynamicsJoint", "" );
30 }
31
32 TestDynamicsJoint::~TestDynamicsJoint()
33 {
34   mTrace.PushCall( "DynamicsJoint::~DynamicsJoint", "" );
35 }
36
37 void TestDynamicsJoint::Initialize(
38   Integration::DynamicsBody* bodyA, const Vector3& positionA, const Quaternion& rotationA, const Vector3& offsetA,
39   Integration::DynamicsBody* bodyB, const Vector3& positionB, const Quaternion& rotationB, const Vector3& offsetB )
40 {
41   mTrace.PushCall( "DynamicsJoint::Initialize", "" );
42 }
43
44 void TestDynamicsJoint::SetLimit( const int axisIndex, const float lowerLimit, const float upperLimit )
45 {
46   mTrace.PushCall( "DynamicsJoint::SetLimit", "" );
47 }
48
49 void TestDynamicsJoint::EnableSpring( int axisIndex, bool flag )
50 {
51   mTrace.PushCall( "DynamicsJoint::EnableSpring", "" );
52 }
53
54 void TestDynamicsJoint::SetSpringStiffness( int axisIndex, float stiffness )
55 {
56   mTrace.PushCall( "DynamicsJoint::SetSpringStiffness", "" );
57 }
58
59 void TestDynamicsJoint::SetSpringDamping( int axisIndex, float damping )
60 {
61   mTrace.PushCall( "DynamicsJoint::SetSpringDamping", "" );
62 }
63
64 void TestDynamicsJoint::SetSpringCenterPoint( int axisIndex, float ratio )
65 {
66   mTrace.PushCall( "DynamicsJoint::SetSpringCenterPoint", "" );
67 }
68
69 void TestDynamicsJoint::EnableMotor( int axisIndex, bool flag )
70 {
71   mTrace.PushCall( "DynamicsJoint::EnableMotor", "" );
72 }
73
74 void TestDynamicsJoint::SetMotorVelocity( int axisIndex, float velocity )
75 {
76   mTrace.PushCall( "DynamicsJoint::SetMotorVelocity", "" );
77 }
78
79 void TestDynamicsJoint::SetMotorForce( int axisIndex, float force )
80 {
81   mTrace.PushCall( "DynamicsJoint::SetMotorForce", "" );
82 }
83
84
85 TestDynamicsShape::TestDynamicsShape( TraceCallStack& trace )
86 : mTrace( trace )
87 {
88   mTrace.PushCall( "DynamicsShape::DynamicsShape", "" );
89 }
90
91 TestDynamicsShape::~TestDynamicsShape()
92 {
93   mTrace.PushCall( "DynamicsShape::~DynamicsShape", "" );
94 }
95
96 void TestDynamicsShape::Initialize( int type, const Vector3& dimensions )
97 {
98   mTrace.PushCall( "DynamicsShape::Initialize", "" );
99 }
100
101 void TestDynamicsShape::Initialize( int type, Geometry geometry )
102 {
103   mTrace.PushCall( "DynamicsShape::Initialize", "" );
104 }
105
106 TestDynamicsBody::TestDynamicsBody( TraceCallStack& trace )
107 : mSettings( NULL ),
108   mConserveVolume( false ),
109   mConserveShape( false ),
110   mKinematic( false ),
111   mActivationState( true ),
112   mCollisionGroup( 0 ),
113   mCollisionMask( 0 ),
114   mTrace( trace )
115 {
116   mTrace.PushCall( "DynamicsBody::DynamicsBody", "" );
117 }
118
119 TestDynamicsBody::~TestDynamicsBody()
120 {
121   mTrace.PushCall( "DynamicsBody::~DynamicsBody", "" );
122 }
123
124 TestDynamicsWorld::TestDynamicsWorld( TraceCallStack& trace )
125 : mSettings( NULL ),
126   mTrace( trace )
127 {
128   mTrace.PushCall( "DynamicsWorld::DynamicsWorld", "" );
129 }
130
131 TestDynamicsWorld::~TestDynamicsWorld()
132 {
133   mTrace.PushCall( "DynamicsWorld::~DynamicsWorld", "" );
134 }
135
136
137 TestDynamicsFactory::TestDynamicsFactory( TraceCallStack& trace ) : mTrace( trace )
138 {
139 }
140
141 TestDynamicsFactory::~TestDynamicsFactory()
142 {
143 }
144
145 bool TestDynamicsFactory::InitializeDynamics( const Integration::DynamicsWorldSettings& worldSettings )
146 {
147   mTrace.PushCall( "DynamicsFactory::InitializeDynamics", "" );
148   return true;
149 }
150
151 void TestDynamicsFactory::TerminateDynamics()
152 {
153   mTrace.PushCall( "DynamicsFactory::InitializeDynamics", "" );
154 }
155
156 Integration::DynamicsWorld* TestDynamicsFactory::CreateDynamicsWorld()
157 {
158   mTrace.PushCall( "DynamicsFactory::CreateDynamicsWorld", "" );
159   return new TestDynamicsWorld( mTrace );
160 }
161
162 Integration::DynamicsBody* TestDynamicsFactory::CreateDynamicsBody()
163 {
164   mTrace.PushCall( "DynamicsFactory::CreateDynamicsBody", "" );
165   return new TestDynamicsBody( mTrace );
166 }
167
168 Integration::DynamicsJoint* TestDynamicsFactory::CreateDynamicsJoint()
169 {
170   mTrace.PushCall( "DynamicsFactory::CreateDynamicsJoint", "" );
171   return new TestDynamicsJoint( mTrace );
172 }
173
174 Integration::DynamicsShape* TestDynamicsFactory::CreateDynamicsShape()
175 {
176   mTrace.PushCall( "DynamicsFactory::CreateDynamicsShape", "" );
177  return new TestDynamicsShape( mTrace );
178 }
179
180
181 } //namespace Dali