Parse gltf mesh extra and extensions + Get BlendShape index by name
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / public-api / controls / model / model.cpp
index fa792f9..5673d1a 100644 (file)
@@ -20,6 +20,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-scene3d/internal/controls/model/model-impl.h>
+#include <dali-scene3d/public-api/model-components/model-node.h>
 
 namespace Dali
 {
@@ -31,11 +32,11 @@ Model::Model()
 
 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()
 {
@@ -62,11 +63,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 +103,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);
@@ -137,6 +143,21 @@ 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);
+}
+
 } // namespace Scene3D
 
 } // namespace Dali