2 * Copyright (c) 2023 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-scene3d/public-api/model-components/model-primitive.h>
22 #include <dali-scene3d/internal/model-components/model-primitive-impl.h>
28 ModelPrimitive ModelPrimitive::New()
30 Internal::ModelPrimitivePtr internal = Internal::ModelPrimitive::New();
32 return ModelPrimitive(internal.Get());
35 ModelPrimitive::ModelPrimitive()
39 ModelPrimitive::ModelPrimitive(const ModelPrimitive& modelPrimitive) = default;
41 ModelPrimitive::ModelPrimitive(ModelPrimitive&& rhs) noexcept = default;
43 ModelPrimitive::~ModelPrimitive()
47 ModelPrimitive& ModelPrimitive::operator=(const ModelPrimitive& handle) = default;
49 ModelPrimitive& ModelPrimitive::operator=(ModelPrimitive&& rhs) noexcept = default;
51 ModelPrimitive ModelPrimitive::DownCast(BaseHandle handle)
53 return ModelPrimitive(dynamic_cast<Dali::Scene3D::Internal::ModelPrimitive*>(handle.GetObjectPtr()));
56 ModelPrimitive::ModelPrimitive(Dali::Scene3D::Internal::ModelPrimitive* internal)
57 : BaseHandle(internal)
62 void ModelPrimitive::SetGeometry(Dali::Geometry geometry)
64 GetImplementation(*this).SetGeometry(geometry);
67 Dali::Geometry ModelPrimitive::GetGeometry() const
69 return GetImplementation(*this).GetGeometry();
72 void ModelPrimitive::SetMaterial(Dali::Scene3D::Material material)
74 GetImplementation(*this).SetMaterial(material);
77 Dali::Scene3D::Material ModelPrimitive::GetMaterial() const
79 return GetImplementation(*this).GetMaterial();
82 } // namespace Scene3D