From: Eunki, Hong Date: Tue, 7 Mar 2023 16:17:01 +0000 (+0900) Subject: [Tizen] Clean up Scene3D namespace and header definition X-Git-Tag: accepted/tizen/7.0/unified/20230327.042629^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F34%2F289434%2F3;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Clean up Scene3D namespace and header definition Change-Id: I28f91a4fb9af661ff61a12f00c1f6fd900cbdeec Signed-off-by: Eunki, Hong --- diff --git a/dali-scene3d/internal/loader/dli-loader-impl.cpp b/dali-scene3d/internal/loader/dli-loader-impl.cpp index 3a12582..26525e3 100644 --- a/dali-scene3d/internal/loader/dli-loader-impl.cpp +++ b/dali-scene3d/internal/loader/dli-loader-impl.cpp @@ -19,16 +19,17 @@ #include // EXTERNAL INCLUDES +#include +#include +#include +#include + #include #include #include #include #include #include -#include "dali-toolkit/devel-api/builder/json-parser.h" -#include "dali/devel-api/common/map-wrapper.h" -#include "dali/integration-api/debug.h" -#include "dali/public-api/object/property-array.h" // INTERNAL INCLUDES #include @@ -502,8 +503,7 @@ void DliLoaderImpl::Impl::ParseScene(LoadParams& params) void DliLoaderImpl::Impl::ParseSceneInternal(Index iScene, const Toolkit::TreeNode* tnScenes, const Toolkit::TreeNode* tnNodes, LoadParams& params) { - auto getSceneRootIdx = [tnScenes, tnNodes](Index iScene) - { + auto getSceneRootIdx = [tnScenes, tnNodes](Index iScene) { auto tn = GetNthChild(tnScenes, iScene); // now a "scene" object if(!tn) { @@ -586,8 +586,7 @@ void DliLoaderImpl::Impl::ParseSkeletons(const TreeNode* skeletons, Dali::Scene3 uint32_t jointCount = 0; std::function visitFn; auto& ibms = mInverseBindMatrices; - visitFn = [&](Index id) - { + visitFn = [&](Index id) { auto node = scene.GetNode(id); jointCount += ibms.find(id) != ibms.end(); @@ -606,8 +605,7 @@ void DliLoaderImpl::Impl::ParseSkeletons(const TreeNode* skeletons, Dali::Scene3 skeleton.mJoints.reserve(jointCount); - visitFn = [&](Index id) - { + visitFn = [&](Index id) { auto iFind = ibms.find(id); if(iFind != ibms.end() && skeleton.mJoints.size() < Skinning::MAX_JOINTS) { @@ -1098,8 +1096,7 @@ void DliLoaderImpl::Impl::ParseNodes(const TreeNode* const nodes, Index index, L virtual unsigned int Resolve(Index iDli) override { - auto iFind = std::lower_bound(mIndices.begin(), mIndices.end(), iDli, [](const Entry& idx, Index iDli) - { return idx.iDli < iDli; }); + auto iFind = std::lower_bound(mIndices.begin(), mIndices.end(), iDli, [](const Entry& idx, Index iDli) { return idx.iDli < iDli; }); DALI_ASSERT_ALWAYS(iFind != mIndices.end()); return iFind->iScene; } @@ -1446,8 +1443,7 @@ void DliLoaderImpl::Impl::ParseAnimations(const TreeNode* tnAnimations, LoadPara AnimationDefinition animDef; ReadString(tnAnim.GetChild(NAME), animDef.mName); - auto iFind = std::lower_bound(definitions.begin(), definitions.end(), animDef, [](const AnimationDefinition& ad0, const AnimationDefinition& ad1) - { return ad0.mName < ad1.mName; }); + auto iFind = std::lower_bound(definitions.begin(), definitions.end(), animDef, [](const AnimationDefinition& ad0, const AnimationDefinition& ad1) { return ad0.mName < ad1.mName; }); const bool overwrite = iFind != definitions.end() && iFind->mName == animDef.mName; if(overwrite) { @@ -1713,8 +1709,7 @@ void DliLoaderImpl::Impl::ParseAnimationGroups(const Toolkit::TreeNode* tnAnimat continue; } - auto iFind = std::lower_bound(animGroups.begin(), animGroups.end(), groupName, [](const AnimationGroupDefinition& group, const std::string& name) - { return group.mName < name; }); + auto iFind = std::lower_bound(animGroups.begin(), animGroups.end(), groupName, [](const AnimationGroupDefinition& group, const std::string& name) { return group.mName < name; }); if(iFind != animGroups.end() && iFind->mName == groupName) { mOnError(FormatString("Animation group with name '%s' already exists; new entries will be merged.", groupName.c_str())); diff --git a/dali-scene3d/internal/loader/dli-loader-impl.h b/dali-scene3d/internal/loader/dli-loader-impl.h index ed0af39..ba6b117 100644 --- a/dali-scene3d/internal/loader/dli-loader-impl.h +++ b/dali-scene3d/internal/loader/dli-loader-impl.h @@ -17,6 +17,9 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include #include @@ -27,16 +30,7 @@ #include #include -// EXTERNAL INCLUDES -#include - -namespace Dali -{ -namespace Scene3D -{ -namespace Loader -{ -namespace Internal +namespace Dali::Scene3D::Loader::Internal { typedef std::pair Metadata; @@ -76,9 +70,6 @@ private: const std::unique_ptr mImpl; }; -} // namespace Internal -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader::Internal #endif // DALI_SCENE3D_LOADER_DLI_LOADER_IMPL_H diff --git a/dali-scene3d/internal/loader/glb-loader-impl.cpp b/dali-scene3d/internal/loader/glb-loader-impl.cpp index 0bfae86..4ab9f70 100644 --- a/dali-scene3d/internal/loader/glb-loader-impl.cpp +++ b/dali-scene3d/internal/loader/glb-loader-impl.cpp @@ -30,13 +30,7 @@ namespace gt = gltf2; namespace js = json; -namespace Dali -{ -namespace Scene3D -{ -namespace Loader -{ -namespace Internal +namespace Dali::Scene3D::Loader::Internal { namespace { @@ -138,12 +132,9 @@ bool GlbLoaderImpl::LoadModel(const std::string& url, Dali::Scene3D::Loader::Loa outBuffers.emplace_back(std::move(dataBuffer)); } - Gltf2Util::ConvertGltfToContext(document, context,isMRendererModel); + Gltf2Util::ConvertGltfToContext(document, context, isMRendererModel); return true; } -} // namespace Internal -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader::Internal diff --git a/dali-scene3d/internal/loader/glb-loader-impl.h b/dali-scene3d/internal/loader/glb-loader-impl.h index 4e9607b..05c9d9c 100644 --- a/dali-scene3d/internal/loader/glb-loader-impl.h +++ b/dali-scene3d/internal/loader/glb-loader-impl.h @@ -17,36 +17,25 @@ * */ -// INTERNAL INCLUDES -#include -#include - // EXTERNAL INCLUDES #include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader -{ -namespace Internal -{ +// INTERNAL INCLUDES +#include +#include +namespace Dali::Scene3D::Loader::Internal +{ class GlbLoaderImpl : public ModelLoaderImpl { public: - /** * @copydoc Dali::Scene3D::Loader::Internal::ModelLoaderImpl::LoadMode() */ bool LoadModel(const std::string& url, Dali::Scene3D::Loader::LoadResult& result) override; }; -} // namespace Internal -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader::Internal #endif // DALI_SCENE3D_LOADER_GLB_LOADER_IMPL_H diff --git a/dali-scene3d/internal/loader/gltf2-asset.cpp b/dali-scene3d/internal/loader/gltf2-asset.cpp index a747405..1012292 100644 --- a/dali-scene3d/internal/loader/gltf2-asset.cpp +++ b/dali-scene3d/internal/loader/gltf2-asset.cpp @@ -37,7 +37,8 @@ constexpr uint32_t ACCESSOR_TYPE_ELEMENT_COUNT[]{ 4, 9, 16, - static_cast(-1)}; + static_cast(-1), +}; const std::map ACCESSOR_TYPES{ ENUM_STRING_MAPPING(AccessorType, SCALAR), diff --git a/dali-scene3d/internal/loader/gltf2-asset.h b/dali-scene3d/internal/loader/gltf2-asset.h index 6576803..7a8af2b 100644 --- a/dali-scene3d/internal/loader/gltf2-asset.h +++ b/dali-scene3d/internal/loader/gltf2-asset.h @@ -17,10 +17,6 @@ * */ -// INTERNAL INCLUDES -#include -#include - // EXTERNAL INCLUDES #include #include @@ -29,6 +25,10 @@ #include #include +// INTERNAL INCLUDES +#include +#include + #define ENUM_STRING_MAPPING(t, x) \ { \ #x, t::x \ diff --git a/dali-scene3d/internal/loader/gltf2-loader-impl.cpp b/dali-scene3d/internal/loader/gltf2-loader-impl.cpp index ae08709..d4e0614 100644 --- a/dali-scene3d/internal/loader/gltf2-loader-impl.cpp +++ b/dali-scene3d/internal/loader/gltf2-loader-impl.cpp @@ -29,15 +29,8 @@ namespace gt = gltf2; namespace js = json; -namespace Dali +namespace Dali::Scene3D::Loader::Internal { -namespace Scene3D -{ -namespace Loader -{ -namespace Internal -{ - bool Gltf2LoaderImpl::LoadModel(const std::string& url, Dali::Scene3D::Loader::LoadResult& result) { bool failed = false; @@ -71,7 +64,4 @@ bool Gltf2LoaderImpl::LoadModel(const std::string& url, Dali::Scene3D::Loader::L return true; } -} // namespace Internal -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader::Internal diff --git a/dali-scene3d/internal/loader/gltf2-loader-impl.h b/dali-scene3d/internal/loader/gltf2-loader-impl.h index 319d91c..a4dfc6e 100644 --- a/dali-scene3d/internal/loader/gltf2-loader-impl.h +++ b/dali-scene3d/internal/loader/gltf2-loader-impl.h @@ -17,36 +17,25 @@ * */ -// INTERNAL INCLUDES -#include -#include - // EXTERNAL INCLUDES #include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader -{ -namespace Internal -{ +// INTERNAL INCLUDES +#include +#include +namespace Dali::Scene3D::Loader::Internal +{ class Gltf2LoaderImpl : public ModelLoaderImpl { public: - /** * @copydoc Dali::Scene3D::Loader::Internal::ModelLoaderImpl::LoadMode() */ bool LoadModel(const std::string& url, Dali::Scene3D::Loader::LoadResult& result) override; }; -} // namespace Internal -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader::Internal #endif // DALI_SCENE3D_LOADER_GLTF2_LOADER_IMPL_H diff --git a/dali-scene3d/internal/loader/gltf2-util.cpp b/dali-scene3d/internal/loader/gltf2-util.cpp index 15361b7..96925cc 100644 --- a/dali-scene3d/internal/loader/gltf2-util.cpp +++ b/dali-scene3d/internal/loader/gltf2-util.cpp @@ -18,15 +18,12 @@ // CLASS HEADER #include +// EXTERNAL INCLUDES +#include + using namespace Dali::Scene3D::Loader; -namespace Dali -{ -namespace Scene3D -{ -namespace Loader -{ -namespace Internal +namespace Dali::Scene3D::Loader::Internal { namespace Gltf2Util { @@ -49,7 +46,7 @@ static const Geometry::Type GLTF2_TO_DALI_PRIMITIVES[]{ static struct AttributeMapping { - gltf2::Attribute::Type mType; + gltf2::Attribute::Type mType; MeshDefinition::Accessor MeshDefinition::*mAccessor; uint16_t mElementSizeRequired; } ATTRIBUTE_MAPPINGS[]{ @@ -110,14 +107,14 @@ const auto ACCESSOR_SPARSE_READER = std::move(json::Reader() .Register(*new json::Property>("bufferView", - gltf2::RefReader::Read, - &gltf2::Accessor::mBufferView)) + gltf2::RefReader::Read, + &gltf2::Accessor::mBufferView)) .Register(*new json::Property("byteOffset", - json::Read::Number, - &gltf2::Accessor::mByteOffset)) + json::Read::Number, + &gltf2::Accessor::mByteOffset)) .Register(*new json::Property("componentType", - json::Read::Enum, - &gltf2::Accessor::mComponentType)) + json::Read::Enum, + &gltf2::Accessor::mComponentType)) .Register(*new json::Property("name", json::Read::StringView, &gltf2::Accessor::mName)) .Register(*json::MakeProperty("count", json::Read::Number, &gltf2::Accessor::mCount)) .Register(*json::MakeProperty("normalized", json::Read::Boolean, &gltf2::Accessor::mNormalized)) @@ -182,22 +179,22 @@ const auto MATERIAL_READER = std::move(json::Reader() std::map> ReadMeshPrimitiveAttributes(const json_value_s& j) { - auto& jo = json::Cast(j); + auto& jo = json::Cast(j); std::map> result; auto i = jo.start; while(i) { - auto jstr = *i->name; + auto jstr = *i->name; result[gltf2::Attribute::FromString(jstr.string, jstr.string_size)] = gltf2::RefReader::Read(*i->value); - i = i->next; + i = i->next; } return result; } std::vector>> ReadMeshPrimitiveTargets(const json_value_s& j) { - auto& jo = json::Cast(j); + auto& jo = json::Cast(j); std::vector>> result; result.reserve(jo.length); @@ -222,21 +219,21 @@ const auto MESH_PRIMITIVE_READER = std::move(json::Reader() .Register(*new json::Property("name", json::Read::StringView, &gltf2::Mesh::mName)) .Register(*json::MakeProperty("primitives", - json::Read::Array::Read>, - &gltf2::Mesh::mPrimitives)) + json::Read::Array::Read>, + &gltf2::Mesh::mPrimitives)) .Register(*json::MakeProperty("weights", json::Read::Array, &gltf2::Mesh::mWeights))); const auto SKIN_READER = std::move(json::Reader() .Register(*new json::Property("name", json::Read::StringView, &gltf2::Skin::mName)) .Register(*json::MakeProperty("inverseBindMatrices", - gltf2::RefReader::Read, - &gltf2::Skin::mInverseBindMatrices)) + gltf2::RefReader::Read, + &gltf2::Skin::mInverseBindMatrices)) .Register(*json::MakeProperty("skeleton", - gltf2::RefReader::Read, - &gltf2::Skin::mSkeleton)) + gltf2::RefReader::Read, + &gltf2::Skin::mSkeleton)) .Register(*json::MakeProperty("joints", - json::Read::Array, gltf2::RefReader::Read>, - &gltf2::Skin::mJoints))); + json::Read::Array, gltf2::RefReader::Read>, + &gltf2::Skin::mJoints))); const auto CAMERA_PERSPECTIVE_READER = std::move(json::Reader() .Register(*json::MakeProperty("aspectRatio", json::Read::Number, &gltf2::Camera::Perspective::mAspectRatio)) @@ -283,58 +280,58 @@ const auto ANIMATION_CHANNEL_READER = std::move(json::Reader() .Register(*new json::Property("name", json::Read::StringView, &gltf2::Animation::mName)) .Register(*json::MakeProperty("samplers", - json::Read::Array::Read>, - &gltf2::Animation::mSamplers)) + json::Read::Array::Read>, + &gltf2::Animation::mSamplers)) .Register(*json::MakeProperty("channels", - json::Read::Array::Read>, - &gltf2::Animation::mChannels))); + json::Read::Array::Read>, + &gltf2::Animation::mChannels))); const auto SCENE_READER = std::move(json::Reader() .Register(*new json::Property("name", json::Read::StringView, &gltf2::Scene::mName)) .Register(*json::MakeProperty("nodes", - json::Read::Array, gltf2::RefReader::Read>, - &gltf2::Scene::mNodes))); + json::Read::Array, gltf2::RefReader::Read>, + &gltf2::Scene::mNodes))); const auto DOCUMENT_READER = std::move(json::Reader() .Register(*json::MakeProperty("buffers", - json::Read::Array::Read>, - &gltf2::Document::mBuffers)) + json::Read::Array::Read>, + &gltf2::Document::mBuffers)) .Register(*json::MakeProperty("bufferViews", - json::Read::Array::Read>, - &gltf2::Document::mBufferViews)) + json::Read::Array::Read>, + &gltf2::Document::mBufferViews)) .Register(*json::MakeProperty("accessors", - json::Read::Array::Read>, - &gltf2::Document::mAccessors)) + json::Read::Array::Read>, + &gltf2::Document::mAccessors)) .Register(*json::MakeProperty("images", - json::Read::Array::Read>, - &gltf2::Document::mImages)) + json::Read::Array::Read>, + &gltf2::Document::mImages)) .Register(*json::MakeProperty("samplers", - json::Read::Array::Read>, - &gltf2::Document::mSamplers)) + json::Read::Array::Read>, + &gltf2::Document::mSamplers)) .Register(*json::MakeProperty("textures", - json::Read::Array::Read>, - &gltf2::Document::mTextures)) + json::Read::Array::Read>, + &gltf2::Document::mTextures)) .Register(*json::MakeProperty("materials", - json::Read::Array::Read>, - &gltf2::Document::mMaterials)) + json::Read::Array::Read>, + &gltf2::Document::mMaterials)) .Register(*json::MakeProperty("meshes", - json::Read::Array::Read>, - &gltf2::Document::mMeshes)) + json::Read::Array::Read>, + &gltf2::Document::mMeshes)) .Register(*json::MakeProperty("skins", - json::Read::Array::Read>, - &gltf2::Document::mSkins)) + json::Read::Array::Read>, + &gltf2::Document::mSkins)) .Register(*json::MakeProperty("cameras", - json::Read::Array::Read>, - &gltf2::Document::mCameras)) + json::Read::Array::Read>, + &gltf2::Document::mCameras)) .Register(*json::MakeProperty("nodes", - json::Read::Array::Read>, - &gltf2::Document::mNodes)) + json::Read::Array::Read>, + &gltf2::Document::mNodes)) .Register(*json::MakeProperty("animations", - ReadAnimationArray, - &gltf2::Document::mAnimations)) + ReadAnimationArray, + &gltf2::Document::mAnimations)) .Register(*json::MakeProperty("scenes", - json::Read::Array::Read>, - &gltf2::Document::mScenes)) + json::Read::Array::Read>, + &gltf2::Document::mScenes)) .Register(*json::MakeProperty("scene", gltf2::RefReader::Read, &gltf2::Document::mScene))); void ConvertBuffer(const gltf2::Buffer& buffer, decltype(ResourceBundle::mBuffers)& outBuffers, const std::string& resourcePath) @@ -425,8 +422,7 @@ TextureDefinition ConvertTextureInfo(const gltf2::TextureInfo& mm, ConversionCon void ConvertMaterial(const gltf2::Material& material, const std::unordered_map& imageMetaData, decltype(ResourceBundle::mMaterials)& outMaterials, ConversionContext& context) { - auto getTextureMetaData = [](const std::unordered_map& metaData, const gltf2::TextureInfo& info) - { + auto getTextureMetaData = [](const std::unordered_map& metaData, const gltf2::TextureInfo& info) { if(!info.mTexture->mSource->mUri.empty()) { if(auto search = metaData.find(info.mTexture->mSource->mUri.data()); search != metaData.end()) @@ -784,8 +780,7 @@ void ConvertNode(gltf2::Node const& node, const Index gltfIdx, Index parentIdx, auto& resources = output.mResources; const auto idx = scene.GetNodeCount(); - auto weakNode = scene.AddNode([&]() - { + auto weakNode = scene.AddNode([&]() { std::unique_ptr nodeDef{new NodeDefinition()}; nodeDef->mParentIdx = parentIdx; @@ -1323,7 +1318,4 @@ void ConvertGltfToContext(gt::Document& document, Gltf2Util::ConversionContext& } // namespace Gltf2Util -} // namespace Internal -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader::Internal \ No newline at end of file diff --git a/dali-scene3d/internal/loader/gltf2-util.h b/dali-scene3d/internal/loader/gltf2-util.h index d84ce05..909ae59 100644 --- a/dali-scene3d/internal/loader/gltf2-util.h +++ b/dali-scene3d/internal/loader/gltf2-util.h @@ -17,6 +17,10 @@ * */ +// EXTERNAL INCLUDES +#include +#include + // INTERNAL INCLUDES #include #include @@ -24,24 +28,13 @@ #include #include -// EXTERNAL INCLUDES -#include -#include - namespace gt = gltf2; namespace js = json; -namespace Dali -{ -namespace Scene3D -{ -namespace Loader -{ -namespace Internal +namespace Dali::Scene3D::Loader::Internal { namespace Gltf2Util { - struct NodeMapping { Index gltfIdx; @@ -56,8 +49,8 @@ struct NodeMapping class NodeIndexMapper { public: - NodeIndexMapper() = default; - NodeIndexMapper(const NodeIndexMapper&) = delete; + NodeIndexMapper() = default; + NodeIndexMapper(const NodeIndexMapper&) = delete; NodeIndexMapper& operator=(const NodeIndexMapper&) = delete; ///@brief Registers a mapping of the @a gltfIdx of a node to its @a runtimeIdx . @@ -127,9 +120,6 @@ void ConvertGltfToContext(gt::Document& document, Gltf2Util::ConversionContext& } // namespace Gltf2Util -} // namespace Internal -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader::Internal #endif // DALI_SCENE3D_LOADER_GLTF2_UTIL_H diff --git a/dali-scene3d/internal/loader/hash.cpp b/dali-scene3d/internal/loader/hash.cpp index d1ea70f..7abb277 100644 --- a/dali-scene3d/internal/loader/hash.cpp +++ b/dali-scene3d/internal/loader/hash.cpp @@ -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. @@ -14,13 +14,11 @@ * limitations under the License. * */ -#include "dali-scene3d/internal/loader/hash.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// CLASS HEADER +#include + +namespace Dali::Scene3D::Loader { Hash::Hash(uint64_t initial) : mValue(initial) @@ -93,6 +91,4 @@ uint64_t Hash::Concatenate(uint64_t value) return mValue * 31 + value; } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/internal/loader/hash.h b/dali-scene3d/internal/loader/hash.h index a5bba8e..0f63c94 100644 --- a/dali-scene3d/internal/loader/hash.h +++ b/dali-scene3d/internal/loader/hash.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_HASH_H_ #define DALI_SCENE3D_LOADER_HASH_H_ /* - * 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. @@ -17,15 +17,12 @@ * */ +// EXTERNAL INCLUDES #include #include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { /** * @brief Rudimentary hash generator that follows a builder pattern. @@ -119,8 +116,6 @@ Hash& Hash::AddObjectBytes(const T& value) return *this; } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_HASH_H_ diff --git a/dali-scene3d/internal/loader/json-reader.cpp b/dali-scene3d/internal/loader/json-reader.cpp index ead6269..2ea2925 100644 --- a/dali-scene3d/internal/loader/json-reader.cpp +++ b/dali-scene3d/internal/loader/json-reader.cpp @@ -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. @@ -14,7 +14,11 @@ * limitations under the License. * */ -#include "dali-scene3d/internal/loader/json-reader.h" + +// CLASS HEADER +#include + +// EXTERNAL INCLUDES #include #include diff --git a/dali-scene3d/internal/loader/json-reader.h b/dali-scene3d/internal/loader/json-reader.h index c0a8abd..100472a 100644 --- a/dali-scene3d/internal/loader/json-reader.h +++ b/dali-scene3d/internal/loader/json-reader.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_JSON_READER_H_ #define DALI_SCENE3D_LOADER_JSON_READER_H_ /* - * 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. @@ -17,17 +17,17 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/third-party/json.h" - // EXTERNAL INCLUDES +#include #include #include #include #include #include #include -#include "dali/public-api/common/vector-wrapper.h" + +// INTERNAL INCLUDES +#include // TODO : Since license issue, We shoud replace this thing as namespace json { diff --git a/dali-scene3d/internal/loader/json-util.cpp b/dali-scene3d/internal/loader/json-util.cpp index fcb91ad..ec6e95f 100644 --- a/dali-scene3d/internal/loader/json-util.cpp +++ b/dali-scene3d/internal/loader/json-util.cpp @@ -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. @@ -14,19 +14,21 @@ * limitations under the License. * */ -#include "dali-scene3d/internal/loader/json-util.h" + +// CLASS HEADER +#include // EXTERNAL INCLUDES +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include "dali/devel-api/common/map-wrapper.h" -#include "dali/public-api/common/extents.h" -#include "dali/public-api/math/matrix.h" -#include "dali/public-api/math/matrix3.h" -#include "dali/public-api/math/quaternion.h" -#include "dali/public-api/math/radian.h" -#include "dali/public-api/math/vector2.h" -#include "dali/public-api/math/vector3.h" -#include "dali/public-api/object/property-value.h" namespace Dali { diff --git a/dali-scene3d/internal/loader/json-util.h b/dali-scene3d/internal/loader/json-util.h index 1d2b983..e7c222d 100644 --- a/dali-scene3d/internal/loader/json-util.h +++ b/dali-scene3d/internal/loader/json-util.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_JSON_UTIL_H_ #define DALI_SCENE3D_LOADER_JSON_UTIL_H_ /* - * 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. @@ -17,21 +17,17 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/loader/index.h" - // EXTERNAL INCLUDES -#include "dali-toolkit/devel-api/builder/tree-node.h" -#include "dali/public-api/animation/time-period.h" -#include "dali/public-api/common/vector-wrapper.h" -#include "dali/public-api/math/vector4.h" -#include "dali/public-api/object/property.h" +#include +#include +#include +#include +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { bool ReadBool(const Toolkit::TreeNode* node, bool& num); @@ -90,8 +86,6 @@ Property::Value ReadPropertyValue(const Property::Type& propType, const Toolkit: */ Property::Value ReadPropertyValue(const Toolkit::TreeNode& tn); -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_JSON_UTIL_H_ diff --git a/dali-scene3d/public-api/controls/model/model.h b/dali-scene3d/public-api/controls/model/model.h index ce723ea..da3f7a6 100644 --- a/dali-scene3d/public-api/controls/model/model.h +++ b/dali-scene3d/public-api/controls/model/model.h @@ -18,15 +18,15 @@ * */ -// INTERNAL INCLUDES -#include - // EXTERNAL INCLUDES #include #include #include #include +// INTERNAL INCLUDES +#include + namespace Dali { namespace Scene3D diff --git a/dali-scene3d/public-api/controls/scene-view/scene-view.h b/dali-scene3d/public-api/controls/scene-view/scene-view.h index 1a3407f..f64715d 100644 --- a/dali-scene3d/public-api/controls/scene-view/scene-view.h +++ b/dali-scene3d/public-api/controls/scene-view/scene-view.h @@ -18,15 +18,15 @@ * */ -// INTERNAL INCLUDES -#include -#include - // EXTERNAL INCLUDES #include #include #include +// INTERNAL INCLUDES +#include +#include + namespace Dali { namespace Scene3D diff --git a/dali-scene3d/public-api/loader/alpha-function-helper.cpp b/dali-scene3d/public-api/loader/alpha-function-helper.cpp index 1ac61ee..2aecc50 100644 --- a/dali-scene3d/public-api/loader/alpha-function-helper.cpp +++ b/dali-scene3d/public-api/loader/alpha-function-helper.cpp @@ -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. @@ -14,14 +14,14 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/alpha-function-helper.h" + +// CLASS HEADER +#include + +// EXTERNAL INCLUDES #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -67,6 +67,4 @@ void RegisterAlphaFunction(const std::string& name, AlphaFunction alphaFn) "Function with given key already exists."); } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/alpha-function-helper.h b/dali-scene3d/public-api/loader/alpha-function-helper.h index d421a3e..3fdb4ed 100644 --- a/dali-scene3d/public-api/loader/alpha-function-helper.h +++ b/dali-scene3d/public-api/loader/alpha-function-helper.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_ALPHA_FUNCTION_HELPER_H_ #define DALI_SCENE3D_LOADER_ALPHA_FUNCTION_HELPER_H_ /* - * 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. @@ -17,16 +17,14 @@ * */ -#include "dali-scene3d/public-api/api.h" - +// EXTERNAL INCLUDES +#include #include -#include "dali/public-api/animation/alpha-function.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { /** * @return Given a name, provide a AlphaFunction; if the name was not @@ -40,8 +38,6 @@ AlphaFunction DALI_SCENE3D_API GetAlphaFunction(const std::string& name, bool* f */ void DALI_SCENE3D_API RegisterAlphaFunction(const std::string& name, AlphaFunction alphaFn) noexcept(false); -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_ALPHA_FUNCTION_HELPER_H_ diff --git a/dali-scene3d/public-api/loader/animated-property.cpp b/dali-scene3d/public-api/loader/animated-property.cpp index 83ae2df..a3969ff 100644 --- a/dali-scene3d/public-api/loader/animated-property.cpp +++ b/dali-scene3d/public-api/loader/animated-property.cpp @@ -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. @@ -14,13 +14,11 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/animated-property.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// CLASS HEADER +#include + +namespace Dali::Scene3D::Loader { void AnimatedProperty::Animate(Animation& anim, GetActor getActor) { @@ -45,6 +43,4 @@ void AnimatedProperty::Animate(Animation& anim, GetActor getActor) } } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader \ No newline at end of file diff --git a/dali-scene3d/public-api/loader/animated-property.h b/dali-scene3d/public-api/loader/animated-property.h index 87fe87a..07b251f 100644 --- a/dali-scene3d/public-api/loader/animated-property.h +++ b/dali-scene3d/public-api/loader/animated-property.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_ANIMATED_PROPERTY_H #define DALI_SCENE3D_LOADER_ANIMATED_PROPERTY_H /* - * 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. @@ -17,23 +17,18 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" -#include "dali-scene3d/public-api/loader/index.h" - - // EXTERNAL INCLUDES +#include +#include +#include #include #include -#include "dali/public-api/actors/actor.h" -#include "dali/public-api/animation/animation.h" -#include "dali/public-api/object/property.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include +#include + +namespace Dali::Scene3D::Loader { /** * @brief Intermediate representation for a property that's given to @@ -95,8 +90,6 @@ public: // DATA TimePeriod mTimePeriod = TimePeriod(0.f); }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_ANIMATED_PROPERTY_H diff --git a/dali-scene3d/public-api/loader/animation-definition.cpp b/dali-scene3d/public-api/loader/animation-definition.cpp index c201314..31c5ed1 100644 --- a/dali-scene3d/public-api/loader/animation-definition.cpp +++ b/dali-scene3d/public-api/loader/animation-definition.cpp @@ -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. @@ -14,13 +14,11 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/animation-definition.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// CLASS HEADER +#include + +namespace Dali::Scene3D::Loader { const float AnimationDefinition::DEFAULT_DURATION_SECONDS = 1.f; const float AnimationDefinition::MIN_DURATION_SECONDS = 1e-2f; @@ -85,6 +83,4 @@ AnimationDefinition& AnimationDefinition::operator=(AnimationDefinition&& other) return *this; } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/animation-definition.h b/dali-scene3d/public-api/loader/animation-definition.h index cb8e5db..27fe2ac 100644 --- a/dali-scene3d/public-api/loader/animation-definition.h +++ b/dali-scene3d/public-api/loader/animation-definition.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_ANIMATION_DEFINITION_H #define DALI_SCENE3D_LOADER_ANIMATION_DEFINITION_H /* - * 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. @@ -17,15 +17,14 @@ * */ -#include "dali-scene3d/public-api/api.h" -#include "dali-scene3d/public-api/loader/animated-property.h" -#include "dali/public-api/common/vector-wrapper.h" +// EXTERNAL INCLUDES +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include +#include + +namespace Dali::Scene3D::Loader { /** * @brief Animation handle + name + definition of properties. @@ -83,8 +82,6 @@ struct AnimationGroupDefinition std::vector mAnimations; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_ANIMATION_DEFINITION_H diff --git a/dali-scene3d/public-api/loader/blend-shape-details.cpp b/dali-scene3d/public-api/loader/blend-shape-details.cpp index 01601f9..d238452 100644 --- a/dali-scene3d/public-api/loader/blend-shape-details.cpp +++ b/dali-scene3d/public-api/loader/blend-shape-details.cpp @@ -1,6 +1,6 @@ /* -* 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. @@ -26,11 +26,7 @@ // INTERNAL INCLUDES #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { const std::string BlendShapes::NUMBER_OF_BLEND_SHAPES("uNumberOfBlendShapes"); const std::string BlendShapes::UNNORMALIZE_FACTOR("uBlendShapeUnnormalizeFactor"); @@ -85,6 +81,4 @@ void BlendShapes::ConfigureProperties(const std::pair +#include #include -#include "dali/public-api/actors/actor.h" -#include "dali/public-api/rendering/shader.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { struct MeshDefinition; struct MeshGeometry; @@ -73,8 +69,6 @@ struct DALI_SCENE3D_API BlendShapes BlendShapes() = delete; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_BLEND_SHAPE_DETAILS_H diff --git a/dali-scene3d/public-api/loader/buffer-definition.cpp b/dali-scene3d/public-api/loader/buffer-definition.cpp index 2b85631..8f2bc57 100644 --- a/dali-scene3d/public-api/loader/buffer-definition.cpp +++ b/dali-scene3d/public-api/loader/buffer-definition.cpp @@ -15,7 +15,7 @@ * */ -// INTERNAL INCLUDES +// CLASS HEADER #include // EXTERNAL INCLUDES @@ -23,11 +23,7 @@ #include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -111,6 +107,4 @@ void BufferDefinition::LoadBuffer() } } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/buffer-definition.h b/dali-scene3d/public-api/loader/buffer-definition.h index 808d5a0..533aa04 100644 --- a/dali-scene3d/public-api/loader/buffer-definition.h +++ b/dali-scene3d/public-api/loader/buffer-definition.h @@ -17,20 +17,16 @@ * */ -// INTERNAL INCLUDES -#include - // EXTERNAL INCLUDES +#include +#include #include #include -#include -#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { /** * @brief Defines a buffer that is loaded from input uri. @@ -45,7 +41,7 @@ struct DALI_SCENE3D_API BufferDefinition ~BufferDefinition(); - BufferDefinition(const BufferDefinition& other) = default; + BufferDefinition(const BufferDefinition& other) = default; BufferDefinition& operator=(const BufferDefinition& other) = default; BufferDefinition(BufferDefinition&& other); @@ -89,8 +85,6 @@ private: bool mIsEmbedded{false}; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_BUFFER_DEFINITION_H diff --git a/dali-scene3d/public-api/loader/bvh-loader.cpp b/dali-scene3d/public-api/loader/bvh-loader.cpp index 7d3b775..93a826d 100644 --- a/dali-scene3d/public-api/loader/bvh-loader.cpp +++ b/dali-scene3d/public-api/loader/bvh-loader.cpp @@ -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. @@ -25,11 +25,7 @@ #include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -340,6 +336,4 @@ AnimationDefinition LoadBvh(const std::string& path, const std::string& animatio return GenerateAnimation(animationName, rootJoint, frameCount, frameTime, scale); } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali \ No newline at end of file +} // namespace Dali::Scene3D::Loader \ No newline at end of file diff --git a/dali-scene3d/public-api/loader/bvh-loader.h b/dali-scene3d/public-api/loader/bvh-loader.h index 2c3dbc7..9830031 100644 --- a/dali-scene3d/public-api/loader/bvh-loader.h +++ b/dali-scene3d/public-api/loader/bvh-loader.h @@ -2,7 +2,7 @@ #define DALI_SCENE3D_LOADER_BVH_LOADER_H /* - * 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. @@ -21,13 +21,8 @@ // INTERNAL INCLUDES #include -namespace Dali +namespace Dali::Scene3D::Loader { -namespace Scene3D -{ -namespace Loader -{ - /** * @brief Loads motion capture data from bvh file format. * @@ -38,8 +33,6 @@ namespace Loader */ DALI_SCENE3D_API AnimationDefinition LoadBvh(const std::string& path, const std::string& animationName, const Vector3& scale = Vector3::ONE); -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_BVH_LOADER_H \ No newline at end of file diff --git a/dali-scene3d/public-api/loader/camera-parameters.cpp b/dali-scene3d/public-api/loader/camera-parameters.cpp index cc9a351..05bcef1 100644 --- a/dali-scene3d/public-api/loader/camera-parameters.cpp +++ b/dali-scene3d/public-api/loader/camera-parameters.cpp @@ -28,11 +28,7 @@ #include // for gltf2::UNDEFINED_FLOAT_VALUE #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -270,6 +266,4 @@ bool CameraParameters::ConfigureCamera(CameraActor& camera, bool invertY) const return true; } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader \ No newline at end of file diff --git a/dali-scene3d/public-api/loader/customization.cpp b/dali-scene3d/public-api/loader/customization.cpp index f48c191..7922400 100644 --- a/dali-scene3d/public-api/loader/customization.cpp +++ b/dali-scene3d/public-api/loader/customization.cpp @@ -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. @@ -14,14 +14,14 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/customization.h" -#include "dali/devel-api/common/map-wrapper.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// CLASS HEADER +#include + +// EXTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { struct Customization::Map::Impl { @@ -111,6 +111,4 @@ void Customization::Choices::Clear() mImpl->mOptions.clear(); } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader \ No newline at end of file diff --git a/dali-scene3d/public-api/loader/customization.h b/dali-scene3d/public-api/loader/customization.h index 667cada..90a42bf 100644 --- a/dali-scene3d/public-api/loader/customization.h +++ b/dali-scene3d/public-api/loader/customization.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_CUSTOMIZATION_STATE_H_ #define DALI_SCENE3D_LOADER_CUSTOMIZATION_STATE_H_ /* - * 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. @@ -17,19 +17,15 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES +#include #include #include -#include "dali/public-api/common/vector-wrapper.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { /** * @brief Offers a description of an aspect of the scene that can be customized: @@ -119,8 +115,6 @@ struct DALI_SCENE3D_API Customization std::vector nodes; // to apply option to. }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_CUSTOMIZATION_STATE_H_ diff --git a/dali-scene3d/public-api/loader/dli-input-parameter.h b/dali-scene3d/public-api/loader/dli-input-parameter.h index a81ba0c..1db4844 100644 --- a/dali-scene3d/public-api/loader/dli-input-parameter.h +++ b/dali-scene3d/public-api/loader/dli-input-parameter.h @@ -17,20 +17,15 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include #include -// EXTERNAL INCLUDES -#include - -namespace Dali -{ -namespace Scene3D +namespace Dali::Scene3D::Loader { -namespace Loader -{ - class DliInputParameter : public ModelLoader::InputParameter { public: @@ -88,8 +83,6 @@ public: AnimationProcessor mAnimationPropertyProcessor; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_DLI_INPUT_PARAMETER_H diff --git a/dali-scene3d/public-api/loader/environment-definition.cpp b/dali-scene3d/public-api/loader/environment-definition.cpp index 9b19610..8f196bb 100644 --- a/dali-scene3d/public-api/loader/environment-definition.cpp +++ b/dali-scene3d/public-api/loader/environment-definition.cpp @@ -15,14 +15,16 @@ * */ +// CLASS HEADER +#include + // EXTERNAL INCLUDES #include #include // INTERNAL INCLUDES -#include "dali-scene3d/public-api/loader/environment-map-loader.h" -#include "dali-scene3d/public-api/loader/environment-definition.h" -#include "dali-scene3d/public-api/loader/utils.h" +#include +#include namespace { @@ -35,11 +37,7 @@ std::string GetDaliImagePath() static constexpr float DEFAULT_INTENSITY = 1.0f; } // unnamed namespace -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -109,6 +107,4 @@ float EnvironmentDefinition::GetDefaultIntensity() return DEFAULT_INTENSITY; } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader \ No newline at end of file diff --git a/dali-scene3d/public-api/loader/environment-definition.h b/dali-scene3d/public-api/loader/environment-definition.h index 8f1525d..3c4ceee 100644 --- a/dali-scene3d/public-api/loader/environment-definition.h +++ b/dali-scene3d/public-api/loader/environment-definition.h @@ -17,20 +17,16 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" -#include "dali-scene3d/public-api/loader/environment-map-data.h" - // EXTERNAL INCLUDES +#include +#include #include -#include "dali/public-api/math/quaternion.h" -#include "dali/public-api/rendering/texture.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include +#include + +namespace Dali::Scene3D::Loader { /** * @brief Defines an environment map with either or both of radiance @@ -62,10 +58,10 @@ struct DALI_SCENE3D_API EnvironmentDefinition EnvironmentDefinition() = default; - EnvironmentDefinition(const EnvironmentDefinition&) = delete; + EnvironmentDefinition(const EnvironmentDefinition&) = delete; EnvironmentDefinition& operator=(const EnvironmentDefinition&) = delete; - EnvironmentDefinition(EnvironmentDefinition&&) = default; + EnvironmentDefinition(EnvironmentDefinition&&) = default; EnvironmentDefinition& operator=(EnvironmentDefinition&&) = default; /** @@ -97,8 +93,6 @@ public: // DATA bool mUseBrdfTexture = false; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_ENVIRONMENT_DEFINITION_H diff --git a/dali-scene3d/public-api/loader/environment-map-data.cpp b/dali-scene3d/public-api/loader/environment-map-data.cpp index fdbd159..cca2952 100644 --- a/dali-scene3d/public-api/loader/environment-map-data.cpp +++ b/dali-scene3d/public-api/loader/environment-map-data.cpp @@ -24,11 +24,7 @@ // INTERNAL INCLUDES #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { Texture EnvironmentMapData::GetTexture() { @@ -67,6 +63,4 @@ Texture EnvironmentMapData::GetTexture() return mEnvironmentMapTexture; } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/environment-map-data.h b/dali-scene3d/public-api/loader/environment-map-data.h index 7f3ee8c..2feac5b 100644 --- a/dali-scene3d/public-api/loader/environment-map-data.h +++ b/dali-scene3d/public-api/loader/environment-map-data.h @@ -17,21 +17,17 @@ * */ -// INTERNAL INCLUDES -#include -#include - // EXTERNAL INCLUDES #include #include -#include #include +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include +#include + +namespace Dali::Scene3D::Loader { /** * @brief Stores the pixel data objects for environment map texture. @@ -78,8 +74,6 @@ private: Dali::Scene3D::EnvironmentMapType mEnvironmentMapType{Dali::Scene3D::EnvironmentMapType::AUTO}; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_ENVIRONMENT_MAP_DATA_H diff --git a/dali-scene3d/public-api/loader/environment-map-loader.cpp b/dali-scene3d/public-api/loader/environment-map-loader.cpp index 175c19a..e2e2156 100644 --- a/dali-scene3d/public-api/loader/environment-map-loader.cpp +++ b/dali-scene3d/public-api/loader/environment-map-loader.cpp @@ -18,14 +18,14 @@ // FILE HEADER #include -// INTERNAL INCLUDES -#include - // EXTERNAL INCLUDES #include #include #include +// INTERNAL INCLUDES +#include + namespace Dali { namespace @@ -49,7 +49,7 @@ static constexpr Vector2 NUMBER_OF_CUBE_FACE[NUMBER_OF_CUBE_MAP_TYPE] = Vector2(4, 3), Vector2(6, 1), Vector2(3, 4), - Vector2(1, 6) + Vector2(1, 6), }; static constexpr float expectedAspectRatios[NUMBER_OF_ENVIRONMENT_MAP_TYPE] = @@ -58,7 +58,7 @@ static constexpr float expectedAspectRatios[NUMBER_OF_ENVIRONMENT_MAP_TYPE] = 6.0f / 1.0f, 3.0f / 4.0f, 1.0f / 6.0f, - 2.0f / 1.0f + 2.0f / 1.0f, }; enum CubeType @@ -189,7 +189,6 @@ namespace Scene3D { namespace Loader { - bool LoadEnvironmentMap(const std::string& environmentMapUrl, EnvironmentMapData& environmentMapData) { std::filesystem::path modelPath(environmentMapUrl); diff --git a/dali-scene3d/public-api/loader/environment-map-loader.h b/dali-scene3d/public-api/loader/environment-map-loader.h index 57047ea..f07f28c 100644 --- a/dali-scene3d/public-api/loader/environment-map-loader.h +++ b/dali-scene3d/public-api/loader/environment-map-loader.h @@ -19,16 +19,11 @@ // INTERNAL INCLUDES #include -#include #include +#include -namespace Dali -{ -namespace Scene3D +namespace Dali::Scene3D::Loader { -namespace Loader -{ - /** * @brief Loads environment map data from a environment map file. * @@ -38,8 +33,6 @@ namespace Loader */ bool DALI_SCENE3D_API LoadEnvironmentMap(const std::string& environmentMapUrl, EnvironmentMapData& environmentMapData); -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_ENVIRONMENT_MAP_LOADER_H diff --git a/dali-scene3d/public-api/loader/index.h b/dali-scene3d/public-api/loader/index.h index 3048def..cbf09a2 100644 --- a/dali-scene3d/public-api/loader/index.h +++ b/dali-scene3d/public-api/loader/index.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_INDEX_H_ #define DALI_SCENE3D_LOADER_INDEX_H_ /* - * 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. @@ -17,24 +17,18 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { using Index = uint32_t; constexpr Index INVALID_INDEX = static_cast(-1); -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_INDEX_H_ diff --git a/dali-scene3d/public-api/loader/ktx-loader.h b/dali-scene3d/public-api/loader/ktx-loader.h index fcb3b7d..d495ee0 100644 --- a/dali-scene3d/public-api/loader/ktx-loader.h +++ b/dali-scene3d/public-api/loader/ktx-loader.h @@ -21,11 +21,7 @@ #include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { /** * @brief Loads cube map data texture from a ktx file. @@ -36,8 +32,6 @@ namespace Loader */ bool LoadKtxData(const std::string& path, EnvironmentMapData& environmentMapData); -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_KTX_LOADER_H diff --git a/dali-scene3d/public-api/loader/light-parameters.h b/dali-scene3d/public-api/loader/light-parameters.h index 2fde52e..e148413 100644 --- a/dali-scene3d/public-api/loader/light-parameters.h +++ b/dali-scene3d/public-api/loader/light-parameters.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_LIGHT_PARAMETERS_H #define DALI_SCENE3D_LOADER_LIGHT_PARAMETERS_H /* - * 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. @@ -17,19 +17,15 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES +#include +#include #include -#include "dali/public-api/math/matrix.h" -#include "dali/public-api/math/vector3.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { struct DALI_SCENE3D_API LightParameters { @@ -42,8 +38,6 @@ struct DALI_SCENE3D_API LightParameters float orthographicSize; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_LIGHT_PARAMETERS_H diff --git a/dali-scene3d/public-api/loader/load-result.h b/dali-scene3d/public-api/loader/load-result.h index bd7e486..da05a36 100644 --- a/dali-scene3d/public-api/loader/load-result.h +++ b/dali-scene3d/public-api/loader/load-result.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_OUTPUT_H #define DALI_SCENE3D_LOADER_OUTPUT_H /* - * 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. @@ -24,11 +24,7 @@ #include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { class ResourceBundle; class SceneDefinition; @@ -74,8 +70,6 @@ struct DALI_SCENE3D_API LoadResult std::vector& mLightParameters; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_OUTPUT_H diff --git a/dali-scene3d/public-api/loader/material-definition.cpp b/dali-scene3d/public-api/loader/material-definition.cpp index 58ab65d..ac6b73a 100644 --- a/dali-scene3d/public-api/loader/material-definition.cpp +++ b/dali-scene3d/public-api/loader/material-definition.cpp @@ -15,7 +15,7 @@ * */ -// INTERNAL INCLUDES +// CLASS HEADER #include // EXTERNAL INCLUDES diff --git a/dali-scene3d/public-api/loader/material-definition.h b/dali-scene3d/public-api/loader/material-definition.h index ca63129..b40a746 100644 --- a/dali-scene3d/public-api/loader/material-definition.h +++ b/dali-scene3d/public-api/loader/material-definition.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_MATERIAL_DEFINITION_H #define DALI_SCENE3D_LOADER_MATERIAL_DEFINITION_H /* - * 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. @@ -17,23 +17,19 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" -#include "dali-scene3d/public-api/loader/environment-definition.h" -#include "dali-scene3d/public-api/loader/index.h" -#include "dali-scene3d/public-api/loader/utils.h" - // EXTERNAL INCLUDES +#include #include +#include #include -#include "dali/public-api/common/vector-wrapper.h" -#include "dali/public-api/math/vector4.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include +#include +#include +#include + +namespace Dali::Scene3D::Loader { /** * @brief Helper enum for encoding and decoding sampler states. @@ -254,8 +250,6 @@ public: // DATA std::vector mTextureStages; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_MATERIAL_DEFINITION_H diff --git a/dali-scene3d/public-api/loader/matrix-stack.cpp b/dali-scene3d/public-api/loader/matrix-stack.cpp index a7b8870..146e4ed 100644 --- a/dali-scene3d/public-api/loader/matrix-stack.cpp +++ b/dali-scene3d/public-api/loader/matrix-stack.cpp @@ -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. @@ -14,14 +14,14 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/matrix-stack.h" -#include "dali-scene3d/public-api/loader/utils.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// CLASS HEADER +#include + +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { MatrixStack::MatrixStack() { @@ -63,6 +63,4 @@ void MatrixStack::PopAll() mStack.clear(); } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/matrix-stack.h b/dali-scene3d/public-api/loader/matrix-stack.h index 63bbc90..f34614b 100644 --- a/dali-scene3d/public-api/loader/matrix-stack.h +++ b/dali-scene3d/public-api/loader/matrix-stack.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADERER_MATRIX_STACK_H_ #define DALI_SCENE3D_LOADERER_MATRIX_STACK_H_ /* - * 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. @@ -17,18 +17,14 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES -#include "dali/public-api/common/vector-wrapper.h" -#include "dali/public-api/math/matrix.h" +#include +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { /** * @brief A stack of matrices whereby each newly pushed matrix is stored @@ -50,8 +46,6 @@ private: std::vector mStack; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADERER_MATRIX_STACK_H_ diff --git a/dali-scene3d/public-api/loader/mesh-definition.cpp b/dali-scene3d/public-api/loader/mesh-definition.cpp index 6c4c104..b977c65 100644 --- a/dali-scene3d/public-api/loader/mesh-definition.cpp +++ b/dali-scene3d/public-api/loader/mesh-definition.cpp @@ -15,8 +15,8 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/loader/mesh-definition.h" +// CLASS HEADER +#include // EXTERNAL INCLUDES #include @@ -27,11 +27,7 @@ #include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -1032,6 +1028,4 @@ MeshGeometry MeshDefinition::Load(RawData&& raw) const return meshGeometry; } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/mesh-definition.h b/dali-scene3d/public-api/loader/mesh-definition.h index bb4d716..7289b40 100644 --- a/dali-scene3d/public-api/loader/mesh-definition.h +++ b/dali-scene3d/public-api/loader/mesh-definition.h @@ -17,23 +17,19 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" -#include "dali-scene3d/public-api/loader/blend-shape-details.h" -#include "dali-scene3d/public-api/loader/index.h" -#include "dali-scene3d/public-api/loader/mesh-geometry.h" -#include "dali-scene3d/public-api/loader/utils.h" -#include - // EXTERNAL INCLUDES +#include #include -#include "dali/public-api/common/vector-wrapper.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include +#include +#include +#include +#include +#include + +namespace Dali::Scene3D::Loader { /** * @brief Defines a mesh with its attributes, the primitive type to render it as, @@ -177,10 +173,10 @@ struct DALI_SCENE3D_API MeshDefinition Accessor(const MeshDefinition::Blob& blob, const MeshDefinition::SparseBlob& sparse, - Index bufferIndex = INVALID_INDEX); + Index bufferIndex = INVALID_INDEX); Accessor(MeshDefinition::Blob&& blob, MeshDefinition::SparseBlob&& sparse, - Index bufferIndex = INVALID_INDEX); + Index bufferIndex = INVALID_INDEX); bool IsDefined() const { @@ -295,8 +291,6 @@ public: // DATA Index mSkeletonIdx = INVALID_INDEX; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_MESH_DEFINITION_H diff --git a/dali-scene3d/public-api/loader/mesh-geometry.h b/dali-scene3d/public-api/loader/mesh-geometry.h index 331acf7..1ce30a7 100644 --- a/dali-scene3d/public-api/loader/mesh-geometry.h +++ b/dali-scene3d/public-api/loader/mesh-geometry.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADERER_MESH_GEOMETRY_H #define DALI_SCENE3D_LOADERER_MESH_GEOMETRY_H /* - * 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. @@ -17,18 +17,14 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES -#include "dali/public-api/rendering/geometry.h" -#include "dali/public-api/rendering/texture.h" +#include +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { struct DALI_SCENE3D_API MeshGeometry { @@ -38,8 +34,6 @@ struct DALI_SCENE3D_API MeshGeometry unsigned int blendShapeBufferOffset{0}; ///< Offset used to calculate the start of each blend shape. }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADERER_MESH_GEOMETRY_H diff --git a/dali-scene3d/public-api/loader/model-loader.cpp b/dali-scene3d/public-api/loader/model-loader.cpp index 219f0a9..2f5c34e 100644 --- a/dali-scene3d/public-api/loader/model-loader.cpp +++ b/dali-scene3d/public-api/loader/model-loader.cpp @@ -25,15 +25,11 @@ // INTERNAL INCLUDES #include -#include #include +#include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -156,6 +152,4 @@ void ModelLoader::LoadResource(Dali::Scene3D::Loader::ResourceBundle::PathProvid } } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/model-loader.h b/dali-scene3d/public-api/loader/model-loader.h index 7cec995..702b308 100644 --- a/dali-scene3d/public-api/loader/model-loader.h +++ b/dali-scene3d/public-api/loader/model-loader.h @@ -25,11 +25,7 @@ // EXTERNAL INCLUDES #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace Internal { @@ -119,8 +115,6 @@ private: std::shared_ptr mImpl; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_MODEL_LOADER_H diff --git a/dali-scene3d/public-api/loader/node-definition.cpp b/dali-scene3d/public-api/loader/node-definition.cpp index b47c203..4df8903 100644 --- a/dali-scene3d/public-api/loader/node-definition.cpp +++ b/dali-scene3d/public-api/loader/node-definition.cpp @@ -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. @@ -15,10 +15,12 @@ * */ -// INTERNAL -#include "dali-scene3d/public-api/loader/node-definition.h" -#include "dali-scene3d/public-api/loader/renderer-state.h" -#include "dali-scene3d/public-api/loader/utils.h" +// CLASS HEADER +#include + +// INTERNAL INCLUDES +#include +#include namespace Dali { diff --git a/dali-scene3d/public-api/loader/node-definition.h b/dali-scene3d/public-api/loader/node-definition.h index d713ed5..112a574 100644 --- a/dali-scene3d/public-api/loader/node-definition.h +++ b/dali-scene3d/public-api/loader/node-definition.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_NODE_DEFINITION_H_ #define DALI_SCENE3D_LOADER_NODE_DEFINITION_H_ /* - * 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. @@ -17,19 +17,19 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/loader/customization.h" -#include "dali-scene3d/public-api/loader/matrix-stack.h" -#include "dali-scene3d/public-api/loader/resource-bundle.h" - // EXTERNAL INCLUDES +#include +#include +#include +#include #include #include #include -#include "dali/public-api/actors/actor.h" -#include "dali/public-api/math/matrix.h" -#include "dali/public-api/math/quaternion.h" -#include "dali/public-api/math/vector4.h" + +// INTERNAL INCLUDES +#include +#include +#include namespace Dali { diff --git a/dali-scene3d/public-api/loader/parse-renderer-state.cpp b/dali-scene3d/public-api/loader/parse-renderer-state.cpp index 3c01701..30b4d44 100644 --- a/dali-scene3d/public-api/loader/parse-renderer-state.cpp +++ b/dali-scene3d/public-api/loader/parse-renderer-state.cpp @@ -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. @@ -15,15 +15,14 @@ * */ -#include "dali-scene3d/public-api/loader/parse-renderer-state.h" +// CLASS HEADER +#include + +// EXTERNAL INCLUDES +#include #include -#include "dali/devel-api/common/map-wrapper.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace RendererState { @@ -168,6 +167,4 @@ Type Parse(const char* string, size_t length, StringCallback onError) } } // namespace RendererState -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/parse-renderer-state.h b/dali-scene3d/public-api/loader/parse-renderer-state.h index 43ca5b3..65a6269 100644 --- a/dali-scene3d/public-api/loader/parse-renderer-state.h +++ b/dali-scene3d/public-api/loader/parse-renderer-state.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADERERER_INTERPRET_RENDERER_STATE_H #define DALI_SCENE3D_LOADERERER_INTERPRET_RENDERER_STATE_H /* - * 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. @@ -17,14 +17,11 @@ * */ -#include "dali-scene3d/public-api/loader/renderer-state.h" -#include "dali-scene3d/public-api/loader/string-callback.h" +// INTERNAL INCLUDES +#include +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace RendererState { @@ -44,8 +41,6 @@ namespace RendererState DALI_SCENE3D_API Type Parse(const char* string, size_t length = 0, StringCallback onError = DefaultErrorCallback); } // namespace RendererState -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADERERER_INTERPRET_RENDERER_STATE_H diff --git a/dali-scene3d/public-api/loader/renderer-state.cpp b/dali-scene3d/public-api/loader/renderer-state.cpp index cc2837b..c14d8a6 100644 --- a/dali-scene3d/public-api/loader/renderer-state.cpp +++ b/dali-scene3d/public-api/loader/renderer-state.cpp @@ -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. @@ -14,14 +14,14 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/renderer-state.h" -#include "dali-scene3d/public-api/loader/utils.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// CLASS HEADER +#include + +// INTENRAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { namespace { @@ -97,6 +97,4 @@ void Apply(Type rendererState, Renderer& renderer) } // namespace RendererState -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/renderer-state.h b/dali-scene3d/public-api/loader/renderer-state.h index 0dc3c52..240a343 100644 --- a/dali-scene3d/public-api/loader/renderer-state.h +++ b/dali-scene3d/public-api/loader/renderer-state.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_RENDERER_STATE_H #define DALI_SCENE3D_LOADER_RENDERER_STATE_H /* - * 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. @@ -17,17 +17,13 @@ * */ -// INTERAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES -#include "dali/public-api/rendering/renderer.h" +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { /* * @brief Contains values for comparison functions used in depth and stencil testing. @@ -158,8 +154,6 @@ DALI_SCENE3D_API void Apply(Type rendererState, Renderer& renderer); } // namespace RendererState -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_RENDERER_STATE_H diff --git a/dali-scene3d/public-api/loader/resource-bundle.cpp b/dali-scene3d/public-api/loader/resource-bundle.cpp index c414c1f..6b4dde6 100644 --- a/dali-scene3d/public-api/loader/resource-bundle.cpp +++ b/dali-scene3d/public-api/loader/resource-bundle.cpp @@ -18,7 +18,7 @@ // FILE HEADER #include -// EXTERNAL +// EXTERNAL INCLUDES #include #include #include @@ -53,9 +53,7 @@ ResourceBundle::ResourceBundle() : mRawResourcesLoading(false), mResourcesGenerating(false), mRawResourcesLoaded(false), - mResourcesGenerated(false) -{ -}; + mResourcesGenerated(false){}; ResourceRefCounts ResourceBundle::CreateRefCounter() const { diff --git a/dali-scene3d/public-api/loader/resource-bundle.h b/dali-scene3d/public-api/loader/resource-bundle.h index ee56e70..fe386ca 100644 --- a/dali-scene3d/public-api/loader/resource-bundle.h +++ b/dali-scene3d/public-api/loader/resource-bundle.h @@ -17,7 +17,14 @@ * */ -// INTERNAL +// EXTERNAL INCLUDES +#include +#include +#include +#include +#include + +// INTERNAL INCLUDES #include #include #include @@ -25,18 +32,7 @@ #include #include -// EXTERNAL -#include -#include -#include -#include -#include - -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { /* * @brief The types of resources that .dli may define. @@ -160,8 +156,6 @@ public: // DATA bool mResourcesGenerated; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADERERERERER_RESOURCE_BUNDLE_H_ diff --git a/dali-scene3d/public-api/loader/scene-definition.cpp b/dali-scene3d/public-api/loader/scene-definition.cpp index 3241769..96420e5 100644 --- a/dali-scene3d/public-api/loader/scene-definition.cpp +++ b/dali-scene3d/public-api/loader/scene-definition.cpp @@ -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. @@ -15,16 +15,18 @@ * */ -// EXTERNAL -#include "dali/devel-api/common/map-wrapper.h" -#include "dali/public-api/animation/constraints.h" +// CLASS HEADER +#include + +// EXTERNAL INCLUDES +#include +#include // INTERNAL -#include "dali-scene3d/internal/graphics/builtin-shader-extern-gen.h" -#include "dali-scene3d/public-api/loader/blend-shape-details.h" -#include "dali-scene3d/public-api/loader/scene-definition.h" -#include "dali-scene3d/public-api/loader/skinning-details.h" -#include "dali-scene3d/public-api/loader/utils.h" +#include +#include +#include +#include //#define DEBUG_SCENE_DEFINITION //#define DEBUG_JOINTS @@ -37,11 +39,7 @@ #define LOGD(x) DEBUG_ONLY(printf x; printf("\n"); fflush(stdout)) -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -1195,6 +1193,4 @@ bool SceneDefinition::FindNode(const std::string& name, std::unique_ptr +#include +#include +#include #include #include -#include "dali/public-api/actors/actor.h" -#include "dali/public-api/math/matrix.h" -#include "dali/public-api/math/quaternion.h" -#include "dali/public-api/math/vector4.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include +#include +#include +#include + +namespace Dali::Scene3D::Loader { class MatrixStack; @@ -274,8 +270,6 @@ private: // DATA std::vector mRootNodeIds; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADERER_SCENE_DEFINITION_H_ diff --git a/dali-scene3d/public-api/loader/shader-definition-factory.cpp b/dali-scene3d/public-api/loader/shader-definition-factory.cpp index b5566e0..5db7ab0 100644 --- a/dali-scene3d/public-api/loader/shader-definition-factory.cpp +++ b/dali-scene3d/public-api/loader/shader-definition-factory.cpp @@ -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. @@ -14,18 +14,20 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/shader-definition-factory.h" + +// CLASS HEADER +#include + +// EXTERNAL INCLUDES +#include #include -#include "dali-scene3d/internal/loader/hash.h" -#include "dali-scene3d/public-api/loader/blend-shape-details.h" -#include "dali-scene3d/public-api/loader/node-definition.h" -#include "dali/devel-api/common/map-wrapper.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include +#include +#include + +namespace Dali::Scene3D::Loader { namespace { @@ -375,6 +377,4 @@ Index ShaderDefinitionFactory::ProduceShader(NodeDefinition::Renderable& rendera return renderable.mShaderIdx; } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/shader-definition-factory.h b/dali-scene3d/public-api/loader/shader-definition-factory.h index b7e9195..273ac8f 100644 --- a/dali-scene3d/public-api/loader/shader-definition-factory.h +++ b/dali-scene3d/public-api/loader/shader-definition-factory.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_SHADER_DEFINITION_FACTORY_H_ #define DALI_SCENE3D_LOADER_SHADER_DEFINITION_FACTORY_H_ /* - * 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. @@ -17,19 +17,15 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" -#include "dali-scene3d/public-api/loader/index.h" -#include - // EXTERNAL INCLUDER #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include +#include +#include + +namespace Dali::Scene3D::Loader { struct NodeDefinition; class ResourceBundle; @@ -59,8 +55,6 @@ private: const std::unique_ptr mImpl; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_SHADER_DEFINITION_FACTORY_H_ diff --git a/dali-scene3d/public-api/loader/shader-definition.cpp b/dali-scene3d/public-api/loader/shader-definition.cpp index 729fa1d..25544cd 100644 --- a/dali-scene3d/public-api/loader/shader-definition.cpp +++ b/dali-scene3d/public-api/loader/shader-definition.cpp @@ -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. @@ -15,16 +15,14 @@ * */ +// CLASS HEADER +#include + // INTERNAL INCLUDES -#include "dali-scene3d/public-api/loader/shader-definition.h" #include -#include "dali-scene3d/public-api/loader/utils.h" +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -145,6 +143,4 @@ Shader ShaderDefinition::Load(RawData&& raw) const return shader; } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/shader-definition.h b/dali-scene3d/public-api/loader/shader-definition.h index 3d3236b..27bb051 100644 --- a/dali-scene3d/public-api/loader/shader-definition.h +++ b/dali-scene3d/public-api/loader/shader-definition.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_SHADER_DEFINITION_H #define DALI_SCENE3D_LOADER_SHADER_DEFINITION_H /* - * 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. @@ -17,19 +17,15 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/loader/renderer-state.h" - // EXTERNAL INCLUDES +#include +#include #include -#include "dali/public-api/common/vector-wrapper.h" -#include "dali/public-api/rendering/shader.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { /* * @brief Defines a shader with paths to the files which define its @@ -56,7 +52,7 @@ struct DALI_SCENE3D_API ShaderDefinition ShaderDefinition(const ShaderDefinition& other); ShaderDefinition& operator=(const ShaderDefinition& other); - ShaderDefinition(ShaderDefinition&&) = default; + ShaderDefinition(ShaderDefinition&&) = default; ShaderDefinition& operator=(ShaderDefinition&&) = default; /* @@ -86,8 +82,6 @@ public: // DATA bool mUseBuiltInShader{false}; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_SHADER_DEFINITION_H diff --git a/dali-scene3d/public-api/loader/skeleton-definition.h b/dali-scene3d/public-api/loader/skeleton-definition.h index b2d61a8..7161a34 100644 --- a/dali-scene3d/public-api/loader/skeleton-definition.h +++ b/dali-scene3d/public-api/loader/skeleton-definition.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADERER_SKELETON_H #define DALI_SCENE3D_LOADERER_SKELETON_H /* - * 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. @@ -18,17 +18,13 @@ */ // INTERNAL INCLUDES -#include "dali-scene3d/public-api/loader/index.h" +#include // EXTERNAL INCLUDES -#include "dali/public-api/common/vector-wrapper.h" -#include "dali/public-api/math/matrix.h" +#include +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { /* * @brief A set of joints (stored as node indices), and an optional root node index. @@ -50,8 +46,6 @@ struct DALI_SCENE3D_API SkeletonDefinition std::vector mJoints; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADERER_SKELETON_H diff --git a/dali-scene3d/public-api/loader/skinning-details.cpp b/dali-scene3d/public-api/loader/skinning-details.cpp index 128a19b..941bf57 100644 --- a/dali-scene3d/public-api/loader/skinning-details.cpp +++ b/dali-scene3d/public-api/loader/skinning-details.cpp @@ -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. @@ -14,21 +14,18 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/skinning-details.h" -#include "dali/public-api/animation/constraints.h" -#include "dali/public-api/object/property.h" -#include "dali/public-api/rendering/shader.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// CLASS HEADER +#include + +// EXTERNAL INCLUDES +#include +#include +#include + +namespace Dali::Scene3D::Loader { const unsigned int Skinning::MAX_JOINTS = 64; const std::string Skinning::BONE_UNIFORM_NAME = "uBone"; - -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/skinning-details.h b/dali-scene3d/public-api/loader/skinning-details.h index 78ba38c..ab04423 100644 --- a/dali-scene3d/public-api/loader/skinning-details.h +++ b/dali-scene3d/public-api/loader/skinning-details.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_SKINNING_DETAILS_H_ #define DALI_SCENE3D_LOADER_SKINNING_DETAILS_H_ /* - * 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. @@ -17,18 +17,14 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES +#include #include -#include "dali/public-api/rendering/shader.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { struct DALI_SCENE3D_API Skinning { @@ -45,8 +41,6 @@ struct DALI_SCENE3D_API Skinning Skinning() = delete; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif // DALI_SCENE3D_LOADER_SKINNING_DETAILS_H_ diff --git a/dali-scene3d/public-api/loader/string-callback.cpp b/dali-scene3d/public-api/loader/string-callback.cpp index 5d46cb7..eb85bad 100644 --- a/dali-scene3d/public-api/loader/string-callback.cpp +++ b/dali-scene3d/public-api/loader/string-callback.cpp @@ -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. @@ -14,20 +14,18 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/string-callback.h" -#include "dali/integration-api/debug.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// CLASS HEADER +#include + +// EXTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { void DefaultErrorCallback(const std::string& message) { DALI_LOG_ERROR("%s", message.c_str()); } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/string-callback.h b/dali-scene3d/public-api/loader/string-callback.h index 4f00a10..7a3564d 100644 --- a/dali-scene3d/public-api/loader/string-callback.h +++ b/dali-scene3d/public-api/loader/string-callback.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_STRING_CALLBACK_H #define DALI_SCENE3D_LOADER_STRING_CALLBACK_H /* - * 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. @@ -17,18 +17,14 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES #include #include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { /* * @brief A callback to post strings to. @@ -40,8 +36,6 @@ using StringCallback = std::function; */ DALI_SCENE3D_API void DefaultErrorCallback(const std::string& message); -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_STRING_CALLBACK_H diff --git a/dali-scene3d/public-api/loader/utils.cpp b/dali-scene3d/public-api/loader/utils.cpp index 14b4150..9120b65 100644 --- a/dali-scene3d/public-api/loader/utils.cpp +++ b/dali-scene3d/public-api/loader/utils.cpp @@ -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. @@ -15,22 +15,18 @@ * */ -// INTERNAL -#include "dali-scene3d/public-api/loader/utils.h" +// CLASS HEADER +#include -// EXTERNAL +// EXTERNAL INCLUDES +#include +#include #include #include #include #include -#include "dali/public-api/animation/constraints.h" -#include "dali/public-api/common/vector-wrapper.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +namespace Dali::Scene3D::Loader { namespace { @@ -152,6 +148,4 @@ void ToUnixFileSeparators(std::string& path) std::replace(path.begin(), path.end(), '\\', '/'); } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/utils.h b/dali-scene3d/public-api/loader/utils.h index 3a84f09..17d4261 100644 --- a/dali-scene3d/public-api/loader/utils.h +++ b/dali-scene3d/public-api/loader/utils.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_UTILS_H_ #define DALI_SCENE3D_LOADER_UTILS_H_ /* - * 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. @@ -17,21 +17,17 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES +#include +#include +#include #include #include -#include "dali/public-api/actors/actor.h" -#include "dali/public-api/common/dali-common.h" -#include "dali/public-api/rendering/renderer.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { /* * @brief Fixed size backing buffer to use with std::ostreams where control over @@ -199,8 +195,6 @@ DALI_SCENE3D_API Geometry MakeTexturedQuadGeometry(TexturedQuadOptions::Type opt */ DALI_SCENE3D_API void ToUnixFileSeparators(std::string& path); -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif /* DALI_SCENE3D_LOADER_UTILS_H_ */ diff --git a/dali-scene3d/public-api/loader/view-projection.cpp b/dali-scene3d/public-api/loader/view-projection.cpp index ac970ca..259892f 100644 --- a/dali-scene3d/public-api/loader/view-projection.cpp +++ b/dali-scene3d/public-api/loader/view-projection.cpp @@ -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. @@ -14,14 +14,14 @@ * limitations under the License. * */ -#include "dali-scene3d/public-api/loader/view-projection.h" -#include "dali-scene3d/public-api/loader/utils.h" -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// CLASS HEADER +#include + +// INTERNAL INCLDUES +#include + +namespace Dali::Scene3D::Loader { void ViewProjection::Update() { @@ -34,6 +34,4 @@ void ViewProjection::Update() } } -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader diff --git a/dali-scene3d/public-api/loader/view-projection.h b/dali-scene3d/public-api/loader/view-projection.h index db7be74..c1e5532 100644 --- a/dali-scene3d/public-api/loader/view-projection.h +++ b/dali-scene3d/public-api/loader/view-projection.h @@ -1,7 +1,7 @@ #ifndef DALI_SCENE3D_LOADER_VIEW_PROJECTION_H_ #define DALI_SCENE3D_LOADER_VIEW_PROJECTION_H_ /* - * 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. @@ -17,17 +17,13 @@ * */ -// INTERNAL INCLUDES -#include "dali-scene3d/public-api/api.h" - // EXTERNAL INCLUDES -#include "dali/public-api/math/matrix.h" +#include -namespace Dali -{ -namespace Scene3D -{ -namespace Loader +// INTERNAL INCLUDES +#include + +namespace Dali::Scene3D::Loader { /** * @brief Contains view and projection matrices, also caching the view-projection @@ -74,8 +70,6 @@ private: Matrix mViewProjection; }; -} // namespace Loader -} // namespace Scene3D -} // namespace Dali +} // namespace Dali::Scene3D::Loader #endif //DALI_SCENE3D_LOADER_VIEW_PROJECTION_H_