4 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #include <dali/integration-api/processor-interface.h>
22 #include <dali/public-api/common/vector-wrapper.h>
23 #include <dali/public-api/object/base-handle.h>
24 #include <dali/public-api/object/base-object.h>
25 #include <dali/public-api/signals/connection-tracker.h>
28 #include <dali-scene3d/internal/event/collider-mesh-processor.h>
29 #include <dali-scene3d/public-api/controls/model/model.h>
30 #include <dali-scene3d/public-api/controls/scene-view/scene-view.h>
32 namespace Dali::Scene3D
36 class ColliderMeshProcessor : public BaseObject, public Dali::ConnectionTracker, public Integration::Processor
39 ColliderMeshProcessor();
41 ~ColliderMeshProcessor();
43 void ColliderMeshChanged(Scene3D::Model model);
46 void ModelOnScene(Actor actor);
48 void AddSceneViewParentToProcessingQueue(Scene3D::Model model);
50 protected: // Implementation of Processor
52 * @copydoc Dali::Integration::Processor::Process()
54 void Process(bool /*postProcessor*/) override;
57 * @copydoc Dali::Integration::Processor::GetProcessorName()
59 std::string_view GetProcessorName() const override
61 return "ColliderMeshProcessor";
65 std::vector<Scene3D::SceneView> mSceneViewsToProcess;
66 std::vector<Scene3D::SceneView> mConnectedSceneViews;
69 } // namespace Internal
71 inline Internal::ColliderMeshProcessor& GetImpl(ColliderMeshProcessor& obj)
73 DALI_ASSERT_ALWAYS(obj);
75 Dali::BaseObject& handle = obj.GetBaseObject();
77 return static_cast<Internal::ColliderMeshProcessor&>(handle);
80 inline const Internal::ColliderMeshProcessor& GetImpl(const ColliderMeshProcessor& obj)
82 DALI_ASSERT_ALWAYS(obj);
84 const Dali::BaseObject& handle = obj.GetBaseObject();
86 return static_cast<const Internal::ColliderMeshProcessor&>(handle);
89 } // namespace Dali::Scene3D