Wired up material API for blending options
[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 TestDynamicsBody::TestDynamicsBody( TraceCallStack& trace )
102 : mSettings( NULL ),
103   mConserveVolume( false ),
104   mConserveShape( false ),
105   mKinematic( false ),
106   mActivationState( true ),
107   mCollisionGroup( 0 ),
108   mCollisionMask( 0 ),
109   mTrace( trace )
110 {
111   mTrace.PushCall( "DynamicsBody::DynamicsBody", "" );
112 }
113
114 TestDynamicsBody::~TestDynamicsBody()
115 {
116   mTrace.PushCall( "DynamicsBody::~DynamicsBody", "" );
117 }
118
119 TestDynamicsWorld::TestDynamicsWorld( TraceCallStack& trace )
120 : mSettings( NULL ),
121   mTrace( trace )
122 {
123   mTrace.PushCall( "DynamicsWorld::DynamicsWorld", "" );
124 }
125
126 TestDynamicsWorld::~TestDynamicsWorld()
127 {
128   mTrace.PushCall( "DynamicsWorld::~DynamicsWorld", "" );
129 }
130
131
132 TestDynamicsFactory::TestDynamicsFactory( TraceCallStack& trace ) : mTrace( trace )
133 {
134 }
135
136 TestDynamicsFactory::~TestDynamicsFactory()
137 {
138 }
139
140 bool TestDynamicsFactory::InitializeDynamics( const Integration::DynamicsWorldSettings& worldSettings )
141 {
142   mTrace.PushCall( "DynamicsFactory::InitializeDynamics", "" );
143   return true;
144 }
145
146 void TestDynamicsFactory::TerminateDynamics()
147 {
148   mTrace.PushCall( "DynamicsFactory::InitializeDynamics", "" );
149 }
150
151 Integration::DynamicsWorld* TestDynamicsFactory::CreateDynamicsWorld()
152 {
153   mTrace.PushCall( "DynamicsFactory::CreateDynamicsWorld", "" );
154   return new TestDynamicsWorld( mTrace );
155 }
156
157 Integration::DynamicsBody* TestDynamicsFactory::CreateDynamicsBody()
158 {
159   mTrace.PushCall( "DynamicsFactory::CreateDynamicsBody", "" );
160   return new TestDynamicsBody( mTrace );
161 }
162
163 Integration::DynamicsJoint* TestDynamicsFactory::CreateDynamicsJoint()
164 {
165   mTrace.PushCall( "DynamicsFactory::CreateDynamicsJoint", "" );
166   return new TestDynamicsJoint( mTrace );
167 }
168
169 Integration::DynamicsShape* TestDynamicsFactory::CreateDynamicsShape()
170 {
171   mTrace.PushCall( "DynamicsFactory::CreateDynamicsShape", "" );
172  return new TestDynamicsShape( mTrace );
173 }
174
175
176 } //namespace Dali