#include <dali-scene3d/internal/loader/dli-loader-impl.h>
// EXTERNAL INCLUDES
+#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>
+
#include <algorithm>
#include <cmath>
#include <filesystem>
#include <fstream>
#include <limits>
#include <memory>
-#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 <dali-scene3d/internal/loader/json-util.h>
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)
{
uint32_t jointCount = 0;
std::function<void(Index)> visitFn;
auto& ibms = mInverseBindMatrices;
- visitFn = [&](Index id)
- {
+ visitFn = [&](Index id) {
auto node = scene.GetNode(id);
jointCount += ibms.find(id) != ibms.end();
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)
{
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;
}
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)
{
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()));
*
*/
+// EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
+
// INTERNAL INCLUDES
#include <dali-scene3d/internal/loader/model-loader-impl.h>
#include <dali-scene3d/public-api/api.h>
#include <dali-scene3d/public-api/loader/node-definition.h>
#include <dali-scene3d/public-api/loader/string-callback.h>
-// EXTERNAL INCLUDES
-#include <dali/public-api/common/vector-wrapper.h>
-
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
-{
-namespace Internal
+namespace Dali::Scene3D::Loader::Internal
{
typedef std::pair<std::string, std::string> Metadata;
const std::unique_ptr<Impl> mImpl;
};
-} // namespace Internal
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader::Internal
#endif // DALI_SCENE3D_LOADER_DLI_LOADER_IMPL_H
namespace gt = gltf2;
namespace js = json;
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
-{
-namespace Internal
+namespace Dali::Scene3D::Loader::Internal
{
namespace
{
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
*
*/
-// INTERNAL INCLUDES
-#include <dali-scene3d/internal/loader/model-loader-impl.h>
-#include <dali-scene3d/public-api/api.h>
-
// EXTERNAL INCLUDES
#include <dali/devel-api/threading/mutex.h>
#include <string>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
-{
-namespace Internal
-{
+// INTERNAL INCLUDES
+#include <dali-scene3d/internal/loader/model-loader-impl.h>
+#include <dali-scene3d/public-api/api.h>
+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
4,
9,
16,
- static_cast<uint32_t>(-1)};
+ static_cast<uint32_t>(-1),
+};
const std::map<std::string_view, AccessorType::Type> ACCESSOR_TYPES{
ENUM_STRING_MAPPING(AccessorType, SCALAR),
*
*/
-// INTERNAL INCLUDES
-#include <dali-scene3d/internal/loader/json-reader.h>
-#include <dali-scene3d/public-api/loader/index.h>
-
// EXTERNAL INCLUDES
#include <dali/devel-api/common/map-wrapper.h>
#include <dali/public-api/common/vector-wrapper.h>
#include <cstdint>
#include <memory>
+// INTERNAL INCLUDES
+#include <dali-scene3d/internal/loader/json-reader.h>
+#include <dali-scene3d/public-api/loader/index.h>
+
#define ENUM_STRING_MAPPING(t, x) \
{ \
#x, t::x \
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;
return true;
}
-} // namespace Internal
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader::Internal
*
*/
-// INTERNAL INCLUDES
-#include <dali-scene3d/internal/loader/model-loader-impl.h>
-#include <dali-scene3d/public-api/api.h>
-
// EXTERNAL INCLUDES
#include <dali/devel-api/threading/mutex.h>
#include <string>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
-{
-namespace Internal
-{
+// INTERNAL INCLUDES
+#include <dali-scene3d/internal/loader/model-loader-impl.h>
+#include <dali-scene3d/public-api/api.h>
+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
// CLASS HEADER
#include <dali-scene3d/internal/loader/gltf2-util.h>
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
using namespace Dali::Scene3D::Loader;
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
-{
-namespace Internal
+namespace Dali::Scene3D::Loader::Internal
{
namespace Gltf2Util
{
static struct AttributeMapping
{
- gltf2::Attribute::Type mType;
+ gltf2::Attribute::Type mType;
MeshDefinition::Accessor MeshDefinition::*mAccessor;
uint16_t mElementSizeRequired;
} ATTRIBUTE_MAPPINGS[]{
const auto ACCESSOR_READER = std::move(json::Reader<gltf2::Accessor>()
.Register(*new json::Property<gltf2::Accessor, gltf2::Ref<gltf2::BufferView>>("bufferView",
- gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>,
- &gltf2::Accessor::mBufferView))
+ gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>,
+ &gltf2::Accessor::mBufferView))
.Register(*new json::Property<gltf2::Accessor, uint32_t>("byteOffset",
- json::Read::Number<uint32_t>,
- &gltf2::Accessor::mByteOffset))
+ json::Read::Number<uint32_t>,
+ &gltf2::Accessor::mByteOffset))
.Register(*new json::Property<gltf2::Accessor, gltf2::Component::Type>("componentType",
- json::Read::Enum<gltf2::Component::Type>,
- &gltf2::Accessor::mComponentType))
+ json::Read::Enum<gltf2::Component::Type>,
+ &gltf2::Accessor::mComponentType))
.Register(*new json::Property<gltf2::Accessor, std::string_view>("name", json::Read::StringView, &gltf2::Accessor::mName))
.Register(*json::MakeProperty("count", json::Read::Number<uint32_t>, &gltf2::Accessor::mCount))
.Register(*json::MakeProperty("normalized", json::Read::Boolean, &gltf2::Accessor::mNormalized))
std::map<gltf2::Attribute::Type, gltf2::Ref<gltf2::Accessor>> ReadMeshPrimitiveAttributes(const json_value_s& j)
{
- auto& jo = json::Cast<json_object_s>(j);
+ auto& jo = json::Cast<json_object_s>(j);
std::map<gltf2::Attribute::Type, gltf2::Ref<gltf2::Accessor>> 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<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>(*i->value);
- i = i->next;
+ i = i->next;
}
return result;
}
std::vector<std::map<gltf2::Attribute::Type, gltf2::Ref<gltf2::Accessor>>> ReadMeshPrimitiveTargets(const json_value_s& j)
{
- auto& jo = json::Cast<json_array_s>(j);
+ auto& jo = json::Cast<json_array_s>(j);
std::vector<std::map<gltf2::Attribute::Type, gltf2::Ref<gltf2::Accessor>>> result;
result.reserve(jo.length);
const auto MESH_READER = std::move(json::Reader<gltf2::Mesh>()
.Register(*new json::Property<gltf2::Mesh, std::string_view>("name", json::Read::StringView, &gltf2::Mesh::mName))
.Register(*json::MakeProperty("primitives",
- json::Read::Array<gltf2::Mesh::Primitive, json::ObjectReader<gltf2::Mesh::Primitive>::Read>,
- &gltf2::Mesh::mPrimitives))
+ json::Read::Array<gltf2::Mesh::Primitive, json::ObjectReader<gltf2::Mesh::Primitive>::Read>,
+ &gltf2::Mesh::mPrimitives))
.Register(*json::MakeProperty("weights", json::Read::Array<float, json::Read::Number>, &gltf2::Mesh::mWeights)));
const auto SKIN_READER = std::move(json::Reader<gltf2::Skin>()
.Register(*new json::Property<gltf2::Skin, std::string_view>("name", json::Read::StringView, &gltf2::Skin::mName))
.Register(*json::MakeProperty("inverseBindMatrices",
- gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>,
- &gltf2::Skin::mInverseBindMatrices))
+ gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>,
+ &gltf2::Skin::mInverseBindMatrices))
.Register(*json::MakeProperty("skeleton",
- gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>,
- &gltf2::Skin::mSkeleton))
+ gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>,
+ &gltf2::Skin::mSkeleton))
.Register(*json::MakeProperty("joints",
- json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>,
- &gltf2::Skin::mJoints)));
+ json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>,
+ &gltf2::Skin::mJoints)));
const auto CAMERA_PERSPECTIVE_READER = std::move(json::Reader<gltf2::Camera::Perspective>()
.Register(*json::MakeProperty("aspectRatio", json::Read::Number<float>, &gltf2::Camera::Perspective::mAspectRatio))
const auto ANIMATION_READER = std::move(json::Reader<gltf2::Animation>()
.Register(*new json::Property<gltf2::Animation, std::string_view>("name", json::Read::StringView, &gltf2::Animation::mName))
.Register(*json::MakeProperty("samplers",
- json::Read::Array<gltf2::Animation::Sampler, json::ObjectReader<gltf2::Animation::Sampler>::Read>,
- &gltf2::Animation::mSamplers))
+ json::Read::Array<gltf2::Animation::Sampler, json::ObjectReader<gltf2::Animation::Sampler>::Read>,
+ &gltf2::Animation::mSamplers))
.Register(*json::MakeProperty("channels",
- json::Read::Array<gltf2::Animation::Channel, json::ObjectReader<gltf2::Animation::Channel>::Read>,
- &gltf2::Animation::mChannels)));
+ json::Read::Array<gltf2::Animation::Channel, json::ObjectReader<gltf2::Animation::Channel>::Read>,
+ &gltf2::Animation::mChannels)));
const auto SCENE_READER = std::move(json::Reader<gltf2::Scene>()
.Register(*new json::Property<gltf2::Scene, std::string_view>("name", json::Read::StringView, &gltf2::Scene::mName))
.Register(*json::MakeProperty("nodes",
- json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>,
- &gltf2::Scene::mNodes)));
+ json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>,
+ &gltf2::Scene::mNodes)));
const auto DOCUMENT_READER = std::move(json::Reader<gltf2::Document>()
.Register(*json::MakeProperty("buffers",
- json::Read::Array<gltf2::Buffer, json::ObjectReader<gltf2::Buffer>::Read>,
- &gltf2::Document::mBuffers))
+ json::Read::Array<gltf2::Buffer, json::ObjectReader<gltf2::Buffer>::Read>,
+ &gltf2::Document::mBuffers))
.Register(*json::MakeProperty("bufferViews",
- json::Read::Array<gltf2::BufferView, json::ObjectReader<gltf2::BufferView>::Read>,
- &gltf2::Document::mBufferViews))
+ json::Read::Array<gltf2::BufferView, json::ObjectReader<gltf2::BufferView>::Read>,
+ &gltf2::Document::mBufferViews))
.Register(*json::MakeProperty("accessors",
- json::Read::Array<gltf2::Accessor, json::ObjectReader<gltf2::Accessor>::Read>,
- &gltf2::Document::mAccessors))
+ json::Read::Array<gltf2::Accessor, json::ObjectReader<gltf2::Accessor>::Read>,
+ &gltf2::Document::mAccessors))
.Register(*json::MakeProperty("images",
- json::Read::Array<gltf2::Image, json::ObjectReader<gltf2::Image>::Read>,
- &gltf2::Document::mImages))
+ json::Read::Array<gltf2::Image, json::ObjectReader<gltf2::Image>::Read>,
+ &gltf2::Document::mImages))
.Register(*json::MakeProperty("samplers",
- json::Read::Array<gltf2::Sampler, json::ObjectReader<gltf2::Sampler>::Read>,
- &gltf2::Document::mSamplers))
+ json::Read::Array<gltf2::Sampler, json::ObjectReader<gltf2::Sampler>::Read>,
+ &gltf2::Document::mSamplers))
.Register(*json::MakeProperty("textures",
- json::Read::Array<gltf2::Texture, json::ObjectReader<gltf2::Texture>::Read>,
- &gltf2::Document::mTextures))
+ json::Read::Array<gltf2::Texture, json::ObjectReader<gltf2::Texture>::Read>,
+ &gltf2::Document::mTextures))
.Register(*json::MakeProperty("materials",
- json::Read::Array<gltf2::Material, json::ObjectReader<gltf2::Material>::Read>,
- &gltf2::Document::mMaterials))
+ json::Read::Array<gltf2::Material, json::ObjectReader<gltf2::Material>::Read>,
+ &gltf2::Document::mMaterials))
.Register(*json::MakeProperty("meshes",
- json::Read::Array<gltf2::Mesh, json::ObjectReader<gltf2::Mesh>::Read>,
- &gltf2::Document::mMeshes))
+ json::Read::Array<gltf2::Mesh, json::ObjectReader<gltf2::Mesh>::Read>,
+ &gltf2::Document::mMeshes))
.Register(*json::MakeProperty("skins",
- json::Read::Array<gltf2::Skin, json::ObjectReader<gltf2::Skin>::Read>,
- &gltf2::Document::mSkins))
+ json::Read::Array<gltf2::Skin, json::ObjectReader<gltf2::Skin>::Read>,
+ &gltf2::Document::mSkins))
.Register(*json::MakeProperty("cameras",
- json::Read::Array<gltf2::Camera, json::ObjectReader<gltf2::Camera>::Read>,
- &gltf2::Document::mCameras))
+ json::Read::Array<gltf2::Camera, json::ObjectReader<gltf2::Camera>::Read>,
+ &gltf2::Document::mCameras))
.Register(*json::MakeProperty("nodes",
- json::Read::Array<gltf2::Node, json::ObjectReader<gltf2::Node>::Read>,
- &gltf2::Document::mNodes))
+ json::Read::Array<gltf2::Node, json::ObjectReader<gltf2::Node>::Read>,
+ &gltf2::Document::mNodes))
.Register(*json::MakeProperty("animations",
- ReadAnimationArray,
- &gltf2::Document::mAnimations))
+ ReadAnimationArray,
+ &gltf2::Document::mAnimations))
.Register(*json::MakeProperty("scenes",
- json::Read::Array<gltf2::Scene, json::ObjectReader<gltf2::Scene>::Read>,
- &gltf2::Document::mScenes))
+ json::Read::Array<gltf2::Scene, json::ObjectReader<gltf2::Scene>::Read>,
+ &gltf2::Document::mScenes))
.Register(*json::MakeProperty("scene", gltf2::RefReader<gltf2::Document>::Read<gltf2::Scene, &gltf2::Document::mScenes>, &gltf2::Document::mScene)));
void ConvertBuffer(const gltf2::Buffer& buffer, decltype(ResourceBundle::mBuffers)& outBuffers, const std::string& resourcePath)
void ConvertMaterial(const gltf2::Material& material, const std::unordered_map<std::string, ImageMetadata>& imageMetaData, decltype(ResourceBundle::mMaterials)& outMaterials, ConversionContext& context)
{
- auto getTextureMetaData = [](const std::unordered_map<std::string, ImageMetadata>& metaData, const gltf2::TextureInfo& info)
- {
+ auto getTextureMetaData = [](const std::unordered_map<std::string, ImageMetadata>& metaData, const gltf2::TextureInfo& info) {
if(!info.mTexture->mSource->mUri.empty())
{
if(auto search = metaData.find(info.mTexture->mSource->mUri.data()); search != metaData.end())
auto& resources = output.mResources;
const auto idx = scene.GetNodeCount();
- auto weakNode = scene.AddNode([&]()
- {
+ auto weakNode = scene.AddNode([&]() {
std::unique_ptr<NodeDefinition> nodeDef{new NodeDefinition()};
nodeDef->mParentIdx = parentIdx;
} // namespace Gltf2Util
-} // namespace Internal
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader::Internal
\ No newline at end of file
*
*/
+// EXTERNAL INCLUDES
+#include <dali/devel-api/threading/mutex.h>
+#include <dali/public-api/common/dali-common.h>
+
// INTERNAL INCLUDES
#include <dali-scene3d/internal/loader/gltf2-asset.h>
#include <dali-scene3d/public-api/loader/load-result.h>
#include <dali-scene3d/public-api/loader/scene-definition.h>
#include <dali-scene3d/public-api/loader/shader-definition-factory.h>
-// EXTERNAL INCLUDES
-#include <dali/devel-api/threading/mutex.h>
-#include <dali/integration-api/debug.h>
-
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;
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 .
} // namespace Gltf2Util
-} // namespace Internal
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader::Internal
#endif // DALI_SCENE3D_LOADER_GLTF2_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.
* limitations under the License.
*
*/
-#include "dali-scene3d/internal/loader/hash.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// CLASS HEADER
+#include <dali-scene3d/internal/loader/hash.h>
+
+namespace Dali::Scene3D::Loader
{
Hash::Hash(uint64_t initial)
: mValue(initial)
return mValue * 31 + value;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
+// EXTERNAL INCLUDES
#include <cstdint>
#include <cstring>
#include <string>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
/**
* @brief Rudimentary hash generator that follows a builder pattern.
return *this;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif // 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.
* limitations under the License.
*
*/
-#include "dali-scene3d/internal/loader/json-reader.h"
+
+// CLASS HEADER
+#include <dali-scene3d/internal/loader/json-reader.h>
+
+// EXTERNAL INCLUDES
#include <algorithm>
#include <cstring>
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/third-party/json.h"
-
// EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
#include <algorithm>
#include <cstring>
#include <map>
#include <memory>
#include <sstream>
#include <string_view>
-#include "dali/public-api/common/vector-wrapper.h"
+
+// INTERNAL INCLUDES
+#include <dali-scene3d/third-party/json.h> // TODO : Since license issue, We shoud replace this thing as <dali-toolkit/devel-api/builder/json-parser.h>
namespace json
{
/*
- * 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.
* limitations under the License.
*
*/
-#include "dali-scene3d/internal/loader/json-util.h"
+
+// CLASS HEADER
+#include <dali-scene3d/internal/loader/json-util.h>
// EXTERNAL INCLUDES
+#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>
#include <array>
-#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
{
#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.
*
*/
-// 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 <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>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/loader/index.h>
+
+namespace Dali::Scene3D::Loader
{
bool ReadBool(const Toolkit::TreeNode* node, bool& num);
*/
Property::Value ReadPropertyValue(const Toolkit::TreeNode& tn);
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADER_JSON_UTIL_H_
*
*/
-// INTERNAL INCLUDES
-#include <dali-scene3d/public-api/api.h>
-
// EXTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
#include <dali/public-api/actors/camera-actor.h>
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/rendering/texture.h>
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
namespace Dali
{
namespace Scene3D
*
*/
-// INTERNAL INCLUDES
-#include <dali-scene3d/public-api/api.h>
-#include <dali-scene3d/public-api/common/environment-map.h>
-
// EXTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
#include <dali/public-api/actors/camera-actor.h>
#include <dali/public-api/common/dali-common.h>
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+#include <dali-scene3d/public-api/common/environment-map.h>
+
namespace Dali
{
namespace Scene3D
/*
- * 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.
* limitations under the License.
*
*/
-#include "dali-scene3d/public-api/loader/alpha-function-helper.h"
+
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/alpha-function-helper.h>
+
+// EXTERNAL INCLUDES
#include <unordered_map>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace
{
"Function with given key already exists.");
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
-#include "dali-scene3d/public-api/api.h"
-
+// EXTERNAL INCLUDES
+#include <dali/public-api/animation/alpha-function.h>
#include <string>
-#include "dali/public-api/animation/alpha-function.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
/**
* @return Given a name, provide a AlphaFunction; if the name was not
*/
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_
/*
- * 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.
* limitations under the License.
*
*/
-#include "dali-scene3d/public-api/loader/animated-property.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/animated-property.h>
+
+namespace Dali::Scene3D::Loader
{
void AnimatedProperty::Animate(Animation& anim, GetActor getActor)
{
}
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
\ No newline at end of file
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-#include "dali-scene3d/public-api/loader/index.h"
-
-
// EXTERNAL INCLUDES
+#include <dali/public-api/actors/actor.h>
+#include <dali/public-api/animation/animation.h>
+#include <dali/public-api/object/property.h>
#include <functional>
#include <memory>
-#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 <dali-scene3d/public-api/api.h>
+#include <dali-scene3d/public-api/loader/index.h>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief Intermediate representation for a property that's given to
TimePeriod mTimePeriod = TimePeriod(0.f);
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //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.
* limitations under the License.
*
*/
-#include "dali-scene3d/public-api/loader/animation-definition.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/animation-definition.h>
+
+namespace Dali::Scene3D::Loader
{
const float AnimationDefinition::DEFAULT_DURATION_SECONDS = 1.f;
const float AnimationDefinition::MIN_DURATION_SECONDS = 1e-2f;
return *this;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
-#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 <dali/public-api/common/vector-wrapper.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+#include <dali-scene3d/public-api/loader/animated-property.h>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief Animation handle + name + definition of properties.
std::vector<std::string> mAnimations;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //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.
// INTERNAL INCLUDES
#include <dali-scene3d/public-api/loader/resource-bundle.h>
-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");
}
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#ifndef DALI_SCENE3D_LOADER_BLEND_SHAPE_DETAILS_H
#define DALI_SCENE3D_LOADER_BLEND_SHAPE_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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-
// EXTERNAL INCLUDES
+#include <dali/public-api/actors/actor.h>
+#include <dali/public-api/rendering/shader.h>
#include <string>
-#include "dali/public-api/actors/actor.h"
-#include "dali/public-api/rendering/shader.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
struct MeshDefinition;
struct MeshGeometry;
BlendShapes() = delete;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif // DALI_SCENE3D_LOADER_BLEND_SHAPE_DETAILS_H
*
*/
-// INTERNAL INCLUDES
+// CLASS HEADER
#include <dali-scene3d/public-api/loader/buffer-definition.h>
// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/file-stream.h>
#include <dali/integration-api/debug.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace
{
}
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
*
*/
-// INTERNAL INCLUDES
-#include <dali-scene3d/public-api/api.h>
-
// EXTERNAL INCLUDES
+#include <dali/public-api/common/dali-vector.h>
+#include <dali/public-api/common/vector-wrapper.h>
#include <fstream>
#include <memory>
-#include <vector>
-#include <dali/public-api/common/dali-vector.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief Defines a buffer that is loaded from input uri.
~BufferDefinition();
- BufferDefinition(const BufferDefinition& other) = default;
+ BufferDefinition(const BufferDefinition& other) = default;
BufferDefinition& operator=(const BufferDefinition& other) = default;
BufferDefinition(BufferDefinition&& other);
bool mIsEmbedded{false};
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif // DALI_SCENE3D_LOADER_BUFFER_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.
#include <sstream>
#include <string_view>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace
{
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
#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.
// INTERNAL INCLUDES
#include <dali-scene3d/public-api/loader/animation-definition.h>
-namespace Dali
+namespace Dali::Scene3D::Loader
{
-namespace Scene3D
-{
-namespace Loader
-{
-
/**
* @brief Loads motion capture data from bvh file format.
*
*/
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
#include <dali-scene3d/internal/loader/gltf2-asset.h> // for gltf2::UNDEFINED_FLOAT_VALUE
#include <dali-scene3d/public-api/loader/utils.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace
{
return true;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
\ No newline at end of file
/*
- * 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.
* 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 <dali-scene3d/public-api/loader/customization.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/common/map-wrapper.h>
+
+namespace Dali::Scene3D::Loader
{
struct Customization::Map::Impl
{
mImpl->mOptions.clear();
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
\ No newline at end of file
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-
// EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
#include <memory>
#include <string>
-#include "dali/public-api/common/vector-wrapper.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief Offers a description of an aspect of the scene that can be customized:
std::vector<std::string> nodes; // to apply option to.
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADER_CUSTOMIZATION_STATE_H_
*
*/
+// EXTERNAL INCLUDES
+#include <string>
+
// INTERNAL INCLUDES
#include <dali-scene3d/public-api/api.h>
#include <dali-scene3d/public-api/loader/model-loader.h>
-// EXTERNAL INCLUDES
-#include <string>
-
-namespace Dali
-{
-namespace Scene3D
+namespace Dali::Scene3D::Loader
{
-namespace Loader
-{
-
class DliInputParameter : public ModelLoader::InputParameter
{
public:
AnimationProcessor mAnimationPropertyProcessor;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif // DALI_SCENE3D_LOADER_DLI_INPUT_PARAMETER_H
*
*/
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/environment-definition.h>
+
// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/environment-variable.h>
#include <dali/devel-api/adaptor-framework/image-loading.h>
// 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 <dali-scene3d/public-api/loader/environment-map-loader.h>
+#include <dali-scene3d/public-api/loader/utils.h>
namespace
{
static constexpr float DEFAULT_INTENSITY = 1.0f;
} // unnamed namespace
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace
{
return DEFAULT_INTENSITY;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
\ No newline at end of file
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-#include "dali-scene3d/public-api/loader/environment-map-data.h"
-
// EXTERNAL INCLUDES
+#include <dali/public-api/math/quaternion.h>
+#include <dali/public-api/rendering/texture.h>
#include <memory>
-#include "dali/public-api/math/quaternion.h"
-#include "dali/public-api/rendering/texture.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+#include <dali-scene3d/public-api/loader/environment-map-data.h>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief Defines an environment map with either or both of radiance
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;
/**
bool mUseBrdfTexture = false;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif // DALI_SCENE3D_LOADER_ENVIRONMENT_DEFINITION_H
// INTERNAL INCLUDES
#include <dali-scene3d/internal/graphics/builtin-shader-extern-gen.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
Texture EnvironmentMapData::GetTexture()
{
return mEnvironmentMapTexture;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
*
*/
-// INTERNAL INCLUDES
-#include <dali-scene3d/public-api/api.h>
-#include <dali-scene3d/public-api/common/environment-map.h>
-
// EXTERNAL INCLUDES
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/images/pixel-data.h>
-#include <dali/public-api/rendering/texture.h>
#include <dali/public-api/rendering/shader.h>
+#include <dali/public-api/rendering/texture.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+#include <dali-scene3d/public-api/common/environment-map.h>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief Stores the pixel data objects for environment map texture.
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
// FILE HEADER
#include <dali-scene3d/public-api/loader/environment-map-loader.h>
-// INTERNAL INCLUDES
-#include <dali-scene3d/public-api/loader/ktx-loader.h>
-
// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/image-loading.h>
#include <string.h>
#include <filesystem>
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/loader/ktx-loader.h>
+
namespace Dali
{
namespace
Vector2(4, 3),
Vector2(6, 1),
Vector2(3, 4),
- Vector2(1, 6)
+ Vector2(1, 6),
};
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
{
namespace Loader
{
-
bool LoadEnvironmentMap(const std::string& environmentMapUrl, EnvironmentMapData& environmentMapData)
{
std::filesystem::path modelPath(environmentMapUrl);
// INTERNAL INCLUDES
#include <dali-scene3d/public-api/api.h>
-#include <dali-scene3d/public-api/loader/environment-map-data.h>
#include <dali-scene3d/public-api/common/environment-map.h>
+#include <dali-scene3d/public-api/loader/environment-map-data.h>
-namespace Dali
-{
-namespace Scene3D
+namespace Dali::Scene3D::Loader
{
-namespace Loader
-{
-
/**
* @brief Loads environment map data from a environment map file.
*
*/
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
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-
// EXTERNAL INCLUDES
#include <cstdint>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
using Index = uint32_t;
constexpr Index INVALID_INDEX = static_cast<Index>(-1);
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADER_INDEX_H_
#include <dali-scene3d/public-api/api.h>
#include <dali-scene3d/public-api/loader/environment-map-data.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
/**
* @brief Loads cube map data texture from a ktx file.
*/
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
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-
// EXTERNAL INCLUDES
+#include <dali/public-api/math/matrix.h>
+#include <dali/public-api/math/vector3.h>
#include <stdint.h>
-#include "dali/public-api/math/matrix.h"
-#include "dali/public-api/math/vector3.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
struct DALI_SCENE3D_API LightParameters
{
float orthographicSize;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif // DALI_SCENE3D_LOADER_LIGHT_PARAMETERS_H
#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.
#include <dali-scene3d/public-api/loader/light-parameters.h>
#include <dali-scene3d/public-api/loader/load-scene-metadata.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
class ResourceBundle;
class SceneDefinition;
std::vector<LightParameters>& mLightParameters;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADER_OUTPUT_H
*
*/
-// INTERNAL INCLUDES
+// CLASS HEADER
#include <dali-scene3d/public-api/loader/material-definition.h>
// EXTERNAL INCLUDES
#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.
*
*/
-// 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 <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/images/image-operations.h>
+#include <dali/public-api/math/vector4.h>
#include <cmath>
-#include "dali/public-api/common/vector-wrapper.h"
-#include "dali/public-api/math/vector4.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// 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>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief Helper enum for encoding and decoding sampler states.
std::vector<TextureStage> mTextureStages;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //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.
* 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 <dali-scene3d/public-api/loader/matrix-stack.h>
+
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/loader/utils.h>
+
+namespace Dali::Scene3D::Loader
{
MatrixStack::MatrixStack()
{
mStack.clear();
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
-// 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 <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/math/matrix.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief A stack of matrices whereby each newly pushed matrix is stored
std::vector<Matrix> mStack;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADERER_MATRIX_STACK_H_
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/loader/mesh-definition.h"
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/mesh-definition.h>
// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/file-stream.h>
#include <fstream>
#include <type_traits>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace
{
return meshGeometry;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
*
*/
-// 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 <dali-scene3d/public-api/loader/buffer-definition.h>
-
// EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
#include <memory>
-#include "dali/public-api/common/vector-wrapper.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// 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/buffer-definition.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>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief Defines a mesh with its attributes, the primitive type to render it as,
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
{
Index mSkeletonIdx = INVALID_INDEX;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADER_MESH_DEFINITION_H
#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.
*
*/
-// 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 <dali/public-api/rendering/geometry.h>
+#include <dali/public-api/rendering/texture.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
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
// INTERNAL INCLUDES
#include <dali-scene3d/internal/loader/dli-loader-impl.h>
-#include <dali-scene3d/internal/loader/gltf2-loader-impl.h>
#include <dali-scene3d/internal/loader/glb-loader-impl.h>
+#include <dali-scene3d/internal/loader/gltf2-loader-impl.h>
#include <dali-scene3d/internal/loader/model-loader-impl.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace
{
}
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
// EXTERNAL INCLUDES
#include <string>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace Internal
{
std::shared_ptr<Internal::ModelLoaderImpl> mImpl;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif // DALI_SCENE3D_LOADER_MODEL_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.
*
*/
-// 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 <dali-scene3d/public-api/loader/node-definition.h>
+
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/loader/renderer-state.h>
+#include <dali-scene3d/public-api/loader/utils.h>
namespace Dali
{
#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.
*
*/
-// 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 <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>
#include <functional>
#include <memory>
#include <string>
-#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 <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>
namespace Dali
{
/*
- * 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.
*
*/
-#include "dali-scene3d/public-api/loader/parse-renderer-state.h"
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/parse-renderer-state.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/common/map-wrapper.h>
#include <cstring>
-#include "dali/devel-api/common/map-wrapper.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace RendererState
{
}
} // namespace RendererState
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
-#include "dali-scene3d/public-api/loader/renderer-state.h"
-#include "dali-scene3d/public-api/loader/string-callback.h"
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/loader/renderer-state.h>
+#include <dali-scene3d/public-api/loader/string-callback.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
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
/*
- * 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.
* 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 <dali-scene3d/public-api/loader/renderer-state.h>
+
+// INTENRAL INCLUDES
+#include <dali-scene3d/public-api/loader/utils.h>
+
+namespace Dali::Scene3D::Loader
{
namespace
{
} // namespace RendererState
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
-// INTERAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-
// EXTERNAL INCLUDES
-#include "dali/public-api/rendering/renderer.h"
+#include <dali/public-api/rendering/renderer.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
/*
* @brief Contains values for comparison functions used in depth and stencil testing.
} // namespace RendererState
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADER_RENDERER_STATE_H
// FILE HEADER
#include <dali-scene3d/public-api/loader/resource-bundle.h>
-// EXTERNAL
+// EXTERNAL INCLUDES
#include <dali-toolkit/public-api/image-loader/sync-image-loader.h>
#include <dali/public-api/rendering/sampler.h>
#include <cstring>
: mRawResourcesLoading(false),
mResourcesGenerating(false),
mRawResourcesLoaded(false),
- mResourcesGenerated(false)
-{
-};
+ mResourcesGenerated(false){};
ResourceRefCounts ResourceBundle::CreateRefCounter() const
{
*
*/
-// INTERNAL
+// EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/rendering/shader.h>
+#include <dali/public-api/rendering/texture-set.h>
+#include <functional>
+#include <memory>
+
+// INTERNAL INCLUDES
#include <dali-scene3d/public-api/loader/buffer-definition.h>
#include <dali-scene3d/public-api/loader/environment-definition.h>
#include <dali-scene3d/public-api/loader/material-definition.h>
#include <dali-scene3d/public-api/loader/shader-definition.h>
#include <dali-scene3d/public-api/loader/skeleton-definition.h>
-// EXTERNAL
-#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/rendering/shader.h>
-#include <dali/public-api/rendering/texture-set.h>
-#include <functional>
-#include <memory>
-
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
/*
* @brief The types of resources that .dli may define.
bool mResourcesGenerated;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADERERERERER_RESOURCE_BUNDLE_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.
*
*/
-// EXTERNAL
-#include "dali/devel-api/common/map-wrapper.h"
-#include "dali/public-api/animation/constraints.h"
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/scene-definition.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/common/map-wrapper.h>
+#include <dali/public-api/animation/constraints.h>
// 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 <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/skinning-details.h>
+#include <dali-scene3d/public-api/loader/utils.h>
//#define DEBUG_SCENE_DEFINITION
//#define DEBUG_JOINTS
#define LOGD(x) DEBUG_ONLY(printf x; printf("\n"); fflush(stdout))
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace
{
return success;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#ifndef DALI_SCENE3D_LOADERER_SCENE_DEFINITION_H_
#define DALI_SCENE3D_LOADERER_SCENE_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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/loader/customization.h"
-#include "dali-scene3d/public-api/loader/node-definition.h"
-#include "dali-scene3d/public-api/loader/string-callback.h"
-#include "dali-scene3d/public-api/loader/utils.h"
-
// EXTERNAL INCLUDES
+#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>
#include <memory>
#include <string>
-#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 <dali-scene3d/public-api/loader/customization.h>
+#include <dali-scene3d/public-api/loader/node-definition.h>
+#include <dali-scene3d/public-api/loader/string-callback.h>
+#include <dali-scene3d/public-api/loader/utils.h>
+
+namespace Dali::Scene3D::Loader
{
class MatrixStack;
std::vector<Index> mRootNodeIds;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADERER_SCENE_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.
* limitations under the License.
*
*/
-#include "dali-scene3d/public-api/loader/shader-definition-factory.h"
+
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/shader-definition-factory.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/common/map-wrapper.h>
#include <cstring>
-#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 <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>
+
+namespace Dali::Scene3D::Loader
{
namespace
{
return renderable.mShaderIdx;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-#include "dali-scene3d/public-api/loader/index.h"
-#include <dali-scene3d/public-api/loader/node-definition.h>
-
// EXTERNAL INCLUDER
#include <memory>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+#include <dali-scene3d/public-api/loader/index.h>
+#include <dali-scene3d/public-api/loader/node-definition.h>
+
+namespace Dali::Scene3D::Loader
{
struct NodeDefinition;
class ResourceBundle;
const std::unique_ptr<Impl> mImpl;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //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.
*
*/
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/shader-definition.h>
+
// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/loader/shader-definition.h"
#include <dali-scene3d/internal/graphics/builtin-shader-extern-gen.h>
-#include "dali-scene3d/public-api/loader/utils.h"
+#include <dali-scene3d/public-api/loader/utils.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
{
namespace
{
return shader;
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/loader/renderer-state.h"
-
// EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/rendering/shader.h>
#include <memory>
-#include "dali/public-api/common/vector-wrapper.h"
-#include "dali/public-api/rendering/shader.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/loader/renderer-state.h>
+
+namespace Dali::Scene3D::Loader
{
/*
* @brief Defines a shader with paths to the files which define its
ShaderDefinition(const ShaderDefinition& other);
ShaderDefinition& operator=(const ShaderDefinition& other);
- ShaderDefinition(ShaderDefinition&&) = default;
+ ShaderDefinition(ShaderDefinition&&) = default;
ShaderDefinition& operator=(ShaderDefinition&&) = default;
/*
bool mUseBuiltInShader{false};
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif // DALI_SCENE3D_LOADER_SHADER_DEFINITION_H
#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.
*/
// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/loader/index.h"
+#include <dali-scene3d/public-api/loader/index.h>
// EXTERNAL INCLUDES
-#include "dali/public-api/common/vector-wrapper.h"
-#include "dali/public-api/math/matrix.h"
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/math/matrix.h>
-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.
std::vector<Joint> mJoints;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //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.
* 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 <dali-scene3d/public-api/loader/skinning-details.h>
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/animation/constraints.h>
+#include <dali/public-api/object/property.h>
+#include <dali/public-api/rendering/shader.h>
+
+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
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-
// EXTERNAL INCLUDES
+#include <dali/public-api/rendering/shader.h>
#include <string>
-#include "dali/public-api/rendering/shader.h"
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
struct DALI_SCENE3D_API Skinning
{
Skinning() = delete;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif // 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.
* 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 <dali-scene3d/public-api/loader/string-callback.h>
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
+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
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-
// EXTERNAL INCLUDES
#include <functional>
#include <string>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
/*
* @brief A callback to post strings to.
*/
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
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
*/
-// INTERNAL
-#include "dali-scene3d/public-api/loader/utils.h"
+// CLASS HEADER
+#include <dali-scene3d/public-api/loader/utils.h>
-// EXTERNAL
+// EXTERNAL INCLUDES
+#include <dali/public-api/animation/constraints.h>
+#include <dali/public-api/common/vector-wrapper.h>
#include <stdarg.h>
#include <cstring>
#include <fstream>
#include <iostream>
-#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
{
std::replace(path.begin(), path.end(), '\\', '/');
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-
// EXTERNAL INCLUDES
+#include <dali/public-api/actors/actor.h>
+#include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/rendering/renderer.h>
#include <cctype>
#include <sstream>
-#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 <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
/*
* @brief Fixed size backing buffer to use with std::ostreams where control over
*/
DALI_SCENE3D_API void ToUnixFileSeparators(std::string& path);
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif /* 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.
* 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 <dali-scene3d/public-api/loader/view-projection.h>
+
+// INTERNAL INCLDUES
+#include <dali-scene3d/public-api/loader/utils.h>
+
+namespace Dali::Scene3D::Loader
{
void ViewProjection::Update()
{
}
}
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#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.
*
*/
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/api.h"
-
// EXTERNAL INCLUDES
-#include "dali/public-api/math/matrix.h"
+#include <dali/public-api/math/matrix.h>
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/api.h>
+
+namespace Dali::Scene3D::Loader
{
/**
* @brief Contains view and projection matrices, also caching the view-projection
Matrix mViewProjection;
};
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
#endif //DALI_SCENE3D_LOADER_VIEW_PROJECTION_H_