2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/public-api/dynamics/dynamics-world-config.h>
22 #ifdef DYNAMICS_SUPPORT
23 #include <dali/internal/event/dynamics/dynamics-world-config-impl.h>
29 DynamicsWorldConfig DynamicsWorldConfig::New()
31 #ifdef DYNAMICS_SUPPORT
32 Internal::DynamicsWorldConfigPtr internal( new Internal::DynamicsWorldConfig() );
34 return DynamicsWorldConfig( internal.Get() );
36 return DynamicsWorldConfig();
40 DynamicsWorldConfig::DynamicsWorldConfig()
44 DynamicsWorldConfig::~DynamicsWorldConfig()
48 void DynamicsWorldConfig::SetType( const DynamicsWorldConfig::WorldType type )
50 #ifdef DYNAMICS_SUPPORT
51 GetImplementation(*this).SetType( type );
55 DynamicsWorldConfig::WorldType DynamicsWorldConfig::GetType() const
57 #ifdef DYNAMICS_SUPPORT
58 return GetImplementation(*this).GetType();
60 return DynamicsWorldConfig::RIGID;
64 void DynamicsWorldConfig::SetUnit(float unit)
66 #ifdef DYNAMICS_SUPPORT
67 GetImplementation(*this).SetUnit( unit );
71 float DynamicsWorldConfig::GetUnit() const
73 #ifdef DYNAMICS_SUPPORT
74 return GetImplementation(*this).GetUnit();
80 void DynamicsWorldConfig::SetSimulationSubSteps(int subSteps)
82 #ifdef DYNAMICS_SUPPORT
83 GetImplementation(*this).SetSimulationSubSteps( subSteps );
87 int DynamicsWorldConfig::GetSimulationSubSteps() const
89 #ifdef DYNAMICS_SUPPORT
90 return GetImplementation(*this).GetSimulationSubSteps();
96 DynamicsWorldConfig::DynamicsWorldConfig( Internal::DynamicsWorldConfig* internal )
97 #ifdef DYNAMICS_SUPPORT
98 : BaseHandle(internal)