X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-scene3d%2Fpublic-api%2Floader%2Fmesh-definition.h;h=1030c7cd890cac35032bcbba2397bf70bbc257e3;hb=d3ab7a4cc307562e687de2b2751f2f0a687c2835;hp=445fbe71fc4c17e4cdeae8a3e73a1f5740208b36;hpb=f2ee13ccda8c768fddc68f5208b7dcfa54c07242;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-scene3d/public-api/loader/mesh-definition.h b/dali-scene3d/public-api/loader/mesh-definition.h index 445fbe7..1030c7c 100644 --- a/dali-scene3d/public-api/loader/mesh-definition.h +++ b/dali-scene3d/public-api/loader/mesh-definition.h @@ -86,6 +86,12 @@ struct DALI_SCENE3D_API MeshDefinition Blob() = default; + Blob(const Blob&) = default; + Blob& operator=(const Blob&) = default; + + Blob(Blob&&) = default; + Blob& operator=(Blob&&) = default; + Blob(uint32_t offset, uint32_t length, uint16_t stride = 0, uint16_t elementSizeHint = 0, const std::vector& min = {}, const std::vector& max = {}); /** @@ -138,7 +144,14 @@ struct DALI_SCENE3D_API MeshDefinition { SparseBlob() = default; + SparseBlob(const SparseBlob&) = default; + SparseBlob& operator=(const SparseBlob&) = default; + + SparseBlob(SparseBlob&&) = default; + SparseBlob& operator=(SparseBlob&&) = default; + SparseBlob(const Blob& indices, const Blob& values, uint32_t count); + SparseBlob(Blob&& indices, Blob&& values, uint32_t count); Blob mIndices; Blob mValues; @@ -160,6 +173,8 @@ struct DALI_SCENE3D_API MeshDefinition Accessor(const MeshDefinition::Blob& blob, const MeshDefinition::SparseBlob& sparse); + Accessor(MeshDefinition::Blob&& blob, + MeshDefinition::SparseBlob&& sparse); bool IsDefined() const { @@ -253,18 +268,19 @@ struct DALI_SCENE3D_API MeshDefinition MeshGeometry Load(RawData&& raw) const; public: // DATA - uint32_t mFlags = 0x0; - Geometry::Type mPrimitiveType = Geometry::TRIANGLES; - std::string mUri; - Accessor mIndices; - Accessor mPositions; - Accessor mNormals; // data can be generated based on positions - Accessor mTexCoords; - Accessor mColors; - Accessor mTangents; // data can be generated based on normals and texCoords (the latter isn't mandatory; the results will be better if available) - Accessor mJoints0; - Accessor mWeights0; - Property::Type mTangentType{Property::VECTOR3}; + std::shared_ptr mRawData; + uint32_t mFlags = 0x0; + Geometry::Type mPrimitiveType = Geometry::TRIANGLES; + std::string mUri; + Accessor mIndices; + Accessor mPositions; + Accessor mNormals; // data can be generated based on positions + Accessor mTexCoords; + Accessor mColors; + Accessor mTangents; // data can be generated based on normals and texCoords (the latter isn't mandatory; the results will be better if available) + Accessor mJoints0; + Accessor mWeights0; + Property::Type mTangentType{Property::VECTOR3}; Blob mBlendShapeHeader; std::vector mBlendShapes;