Merge "Combine Internal::ProxyObject & Internal::Object" into tizen
[platform/core/uifw/dali-core.git] / dali / internal / event / modeling / model-archive.h
1 #if !defined(__DALI_INTERNAL_MODEL_ARCHIVE_H__)
2 #define __DALI_INTERNAL_MODEL_ARCHIVE_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <string>
23
24 // INTERNAL INCLUDES
25 #include <dali/internal/event/modeling/model-data-impl.h>
26 #include <dali/internal/event/modeling/material-impl.h>
27 #include <dali/internal/event/resources/archive.h>
28
29 namespace Dali
30 {
31 class MeshData;
32
33 /**
34  * Vertex element types.
35  * Defines the shape of a vertex
36  */
37 enum VertexElementType
38 {
39   VET_Position,             ///< Vector3
40   VET_BoneWeights,          ///< Array of 4 floats
41   VET_BoneIndices,          ///< Array of 4 uint8_t
42   VET_Normal,               ///< Vector3
43   VET_Diffuse,              ///< Vertex color - Vector4
44   VET_Specular,             ///< Vertex color - Vector4
45   VET_UV,                   ///< Texture coordinate - Vector2
46   VET_Bitangent,            ///< Bitangent (positive Y texture axis) - Vector3
47   VET_Tangent,              ///< Tangent  (positive X texture axis) - Vector3
48   VET_Custom                ///< User defined 1 float
49 }; // VertexElementType
50
51 namespace Internal
52 {
53 class Material;
54 struct MaterialProperties;
55 class ModelData;
56
57 namespace Serialize
58 {
59
60 //---------- MaterialProperties ----------//
61 Archive& operator<< (Archive& ar, const MaterialProperties& t);
62 Archive& operator>> (Archive& ar, MaterialProperties& t);
63 //---------- Material ----------//
64 Archive& operator<< (Archive& ar, const Material& t);
65 Archive& operator>> (Archive& ar, Material& t);
66 /*---- Vertex ----*/
67 Archive& operator<< (Archive&, const Dali::MeshData::Vertex&);
68 Archive& operator>> (Archive&, Dali::MeshData::Vertex&);
69 /*---- Light ----*/
70 Archive& operator<< (Archive&, const Dali::Light&);
71 Archive& operator>> (Archive&, Dali::Light&);
72 /*---- Bone ----*/
73 Archive& operator<< (Archive&, const Dali::Bone&);
74 Archive& operator>> (Archive&, Dali::Bone&);
75 /*---- MeshData ----*/
76 Archive& operator<< (Archive&, const Dali::MeshData&);
77 Archive& operator>> (Archive&, MeshData&);
78 /*---- EntityAnimatorMap ----*/
79 Archive& operator<< (Archive&, const Dali::EntityAnimatorMap&);
80 Archive& operator>> (Archive&, Dali::EntityAnimatorMap&);
81 /*---- ModelAnimationMap ----*/
82 Archive& operator<< (Archive&, const Dali::ModelAnimationMap&);
83 Archive& operator>> (Archive&, ModelAnimationMap&);
84 /*---- Entity ----*/
85 Archive& operator<< (Archive&, const Dali::Entity&);
86 Archive& operator>> (Archive&, Dali::Entity&);
87 /*---- ModelData ----*/
88 Archive& operator<< (Archive&, const ModelData&);
89 Archive& operator>> (Archive&, ModelData&);
90
91 } // namespace Serialize
92
93 } // Internal
94
95 } // Dali
96
97 #endif // !defined(__DALI_INTERNAL_MODEL_ARCHIVE_H__)