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/geometry/cloth.h>
22 #include <dali/public-api/geometry/mesh-factory.h>
23 #include <dali/internal/event/modeling/cloth-impl.h>
41 Cloth::Cloth(const Cloth& handle)
46 Cloth& Cloth::operator=(const Cloth& rhs)
48 BaseHandle::operator=(rhs);
52 Cloth Cloth::New( const float width, const float height, const int xSteps, const int ySteps, const Rect<float>& textureCoordinates )
54 MeshData meshData( MeshFactory::NewPlane(width, height, xSteps, ySteps, textureCoordinates) );
56 Internal::ClothIPtr clothPtr = Internal::Cloth::New( meshData );
57 return Cloth( clothPtr.Get() );
60 Cloth Cloth::DownCast( BaseHandle handle )
62 return Cloth( dynamic_cast<Dali::Internal::Cloth*>(handle.GetObjectPtr()) );
65 Cloth::Cloth(Internal::Cloth* internal)