Property enum name changes in dali-core: Core changes
[platform/core/uifw/dali-core.git] / dali / public-api / geometry / cloth.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 // CLASS HEADER
19 #include <dali/public-api/geometry/cloth.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/geometry/mesh-factory.h>
23 #include <dali/internal/event/modeling/cloth-impl.h>
24
25 namespace Dali
26 {
27
28 namespace
29 {
30
31 } // namespace
32
33 Cloth::Cloth()
34 {
35 }
36
37 Cloth::~Cloth()
38 {
39 }
40
41 Cloth::Cloth(const Cloth& handle)
42 : Mesh(handle)
43 {
44 }
45
46 Cloth& Cloth::operator=(const Cloth& rhs)
47 {
48   BaseHandle::operator=(rhs);
49   return *this;
50 }
51
52 Cloth Cloth::New( const float width, const float height, const int xSteps, const int ySteps, const Rect<float>& textureCoordinates )
53 {
54   MeshData meshData( MeshFactory::NewPlane(width, height, xSteps, ySteps, textureCoordinates) );
55
56   Internal::ClothIPtr clothPtr = Internal::Cloth::New( meshData );
57   return Cloth( clothPtr.Get() );
58 }
59
60 Cloth Cloth::DownCast( BaseHandle handle )
61 {
62   return Cloth( dynamic_cast<Dali::Internal::Cloth*>(handle.GetObjectPtr()) );
63 }
64
65 Cloth::Cloth(Internal::Cloth* internal)
66 : Mesh(internal)
67 {
68 }
69
70 } // namespace Dali