[dali_2.3.23] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / public-api / controls / model / model.cpp
index c0369ab..eda0041 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // INTERNAL INCLUDES
 #include <dali-scene3d/internal/controls/model/model-impl.h>
+#include <dali-scene3d/public-api/model-components/model-node.h>
 
-namespace Dali
+namespace Dali::Scene3D
 {
-namespace Scene3D
-{
-Model::Model()
-{
-}
+Model::Model() = default;
 
 Model::Model(const Model& model) = default;
 
-Model::Model(Model&& rhs) = default;
+Model::Model(Model&& rhs) noexcept = default;
 
 Model& Model::operator=(const Model& model) = default;
 
-Model& Model::operator=(Model&& rhs) = default;
+Model& Model::operator=(Model&& rhs) noexcept = default;
 
-Model::~Model()
-{
-}
+Model::~Model() = default;
 
 Model Model::New(const std::string& modelUrl, const std::string& resourceDirectoryUrl)
 {
@@ -62,11 +57,21 @@ Model::Model(Dali::Internal::CustomActor* internal)
   VerifyCustomActorPointer<Internal::Model>(internal);
 }
 
-const Actor Model::GetModelRoot() const
+const ModelNode Model::GetModelRoot() const
 {
   return GetImpl(*this).GetModelRoot();
 }
 
+void Model::AddModelNode(ModelNode modelNode)
+{
+  return GetImpl(*this).AddModelNode(modelNode);
+}
+
+void Model::RemoveModelNode(ModelNode modelNode)
+{
+  return GetImpl(*this).RemoveModelNode(modelNode);
+}
+
 void Model::SetChildrenSensitive(bool enable)
 {
   GetImpl(*this).SetChildrenSensitive(enable);
@@ -92,11 +97,6 @@ void Model::SetImageBasedLightSource(const std::string& diffuseUrl, const std::s
   GetImpl(*this).SetImageBasedLightSource(diffuseUrl, specularUrl, scaleFactor);
 }
 
-void Model::SetImageBasedLightTexture(Texture diffuseTexture, Texture specularTexture, float scaleFactor)
-{
-  GetImpl(*this).SetImageBasedLightTexture(diffuseTexture, specularTexture, scaleFactor);
-}
-
 void Model::SetImageBasedLightScaleFactor(float scaleFactor)
 {
   GetImpl(*this).SetImageBasedLightScaleFactor(scaleFactor);
@@ -122,6 +122,69 @@ Dali::Animation Model::GetAnimation(const std::string& name) const
   return GetImpl(*this).GetAnimation(name);
 }
 
-} // namespace Scene3D
+uint32_t Model::GetCameraCount() const
+{
+  return GetImpl(*this).GetCameraCount();
+}
+
+Dali::CameraActor Model::GenerateCamera(uint32_t index) const
+{
+  return GetImpl(*this).GenerateCamera(index);
+}
+
+bool Model::ApplyCamera(uint32_t index, Dali::CameraActor camera) const
+{
+  return GetImpl(*this).ApplyCamera(index, camera);
+}
+
+ModelNode Model::FindChildModelNodeByName(std::string_view nodeName)
+{
+  return GetImpl(*this).FindChildModelNodeByName(nodeName);
+}
+
+void Model::RetrieveBlendShapeNames(std::vector<std::string>& blendShapeNames) const
+{
+  GetImpl(*this).RetrieveBlendShapeNames(blendShapeNames);
+}
+
+void Model::RetrieveModelNodesByBlendShapeName(std::string_view blendShapeName, std::vector<ModelNode>& modelNodes) const
+{
+  GetImpl(*this).RetrieveModelNodesByBlendShapeName(blendShapeName, modelNodes);
+}
+
+Dali::Animation Model::GenerateMotionDataAnimation(MotionData motionData)
+{
+  return GetImpl(*this).GenerateMotionDataAnimation(motionData);
+}
+
+void Model::SetMotionData(MotionData motionData)
+{
+  GetImpl(*this).SetMotionData(motionData);
+}
+
+void Model::CastShadow(bool castShadow)
+{
+  GetImpl(*this).CastShadow(castShadow);
+}
+
+bool Model::IsShadowCasting() const
+{
+  return GetImpl(*this).IsShadowCasting();
+}
+
+void Model::ReceiveShadow(bool receiveShadow)
+{
+  GetImpl(*this).ReceiveShadow(receiveShadow);
+}
+
+bool Model::IsShadowReceiving() const
+{
+  return GetImpl(*this).IsShadowReceiving();
+}
+
+Model::MeshHitSignalType& Model::MeshHitSignal()
+{
+  return GetImpl(*this).MeshHitSignal();
+}
 
-} // namespace Dali
+} // namespace Dali::Scene3D