2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 // http://floralicense.org/license/
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.
18 #include <dali/public-api/dynamics/dynamics-world-config.h>
21 #ifdef DYNAMICS_SUPPORT
22 #include <dali/internal/event/dynamics/dynamics-world-config-impl.h>
28 DynamicsWorldConfig DynamicsWorldConfig::New()
30 #ifdef DYNAMICS_SUPPORT
31 Internal::DynamicsWorldConfigPtr internal( new Internal::DynamicsWorldConfig() );
33 return DynamicsWorldConfig( internal.Get() );
35 return DynamicsWorldConfig();
39 DynamicsWorldConfig::DynamicsWorldConfig()
43 DynamicsWorldConfig::~DynamicsWorldConfig()
47 void DynamicsWorldConfig::SetType( const DynamicsWorldConfig::WorldType type )
49 #ifdef DYNAMICS_SUPPORT
50 GetImplementation(*this).SetType( type );
54 DynamicsWorldConfig::WorldType DynamicsWorldConfig::GetType() const
56 #ifdef DYNAMICS_SUPPORT
57 return GetImplementation(*this).GetType();
59 return DynamicsWorldConfig::RIGID;
63 void DynamicsWorldConfig::SetUnit(float unit)
65 #ifdef DYNAMICS_SUPPORT
66 GetImplementation(*this).SetUnit( unit );
70 float DynamicsWorldConfig::GetUnit() const
72 #ifdef DYNAMICS_SUPPORT
73 return GetImplementation(*this).GetUnit();
79 void DynamicsWorldConfig::SetSimulationSubSteps(int subSteps)
81 #ifdef DYNAMICS_SUPPORT
82 GetImplementation(*this).SetSimulationSubSteps( subSteps );
86 int DynamicsWorldConfig::GetSimulationSubSteps() const
88 #ifdef DYNAMICS_SUPPORT
89 return GetImplementation(*this).GetSimulationSubSteps();
95 DynamicsWorldConfig::DynamicsWorldConfig( Internal::DynamicsWorldConfig* internal )
96 #ifdef DYNAMICS_SUPPORT
97 : BaseHandle(internal)