Emscripten workarounds and llvm syntax fixes
[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 Flora License, Version 1.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://floralicense.org/license/
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 // EXTERNAL INCLUDES
21 #include <string>
22
23 // INTERNAL INCLUDES
24 #include <dali/internal/event/modeling/model-data-impl.h>
25 #include <dali/internal/event/modeling/material-impl.h>
26 #include <dali/internal/event/resources/archive.h>
27
28 namespace Dali
29 {
30 class MeshData;
31
32 /**
33  * Vertex element types.
34  * Defines the shape of a vertex
35  */
36 enum VertexElementType
37 {
38   VET_Position,             ///< Vector3
39   VET_BoneWeights,          ///< Array of 4 floats
40   VET_BoneIndices,          ///< Array of 4 uint8_t
41   VET_Normal,               ///< Vector3
42   VET_Diffuse,              ///< Vertex color - Vector4
43   VET_Specular,             ///< Vertex color - Vector4
44   VET_UV,                   ///< Texture coordinate - Vector2
45   VET_Bitangent,            ///< Bitangent (positive Y texture axis) - Vector3
46   VET_Tangent,              ///< Tangent  (positive X texture axis) - Vector3
47   VET_Custom                ///< User defined 1 float
48 }; // VertexElementType
49
50 namespace Internal
51 {
52 class Material;
53 struct MaterialProperties;
54 class ModelData;
55
56 namespace Serialize
57 {
58
59 //---------- MaterialProperties ----------//
60 Archive& operator<< (Archive& ar, const MaterialProperties& t);
61 Archive& operator>> (Archive& ar, MaterialProperties& t);
62 //---------- Material ----------//
63 Archive& operator<< (Archive& ar, const Material& t);
64 Archive& operator>> (Archive& ar, Material& t);
65 /*---- Vertex ----*/
66 Archive& operator<< (Archive&, const Dali::MeshData::Vertex&);
67 Archive& operator>> (Archive&, Dali::MeshData::Vertex&);
68 /*---- Light ----*/
69 Archive& operator<< (Archive&, const Dali::Light&);
70 Archive& operator>> (Archive&, Dali::Light&);
71 /*---- Bone ----*/
72 Archive& operator<< (Archive&, const Dali::Bone&);
73 Archive& operator>> (Archive&, Dali::Bone&);
74 /*---- MeshData ----*/
75 Archive& operator<< (Archive&, const Dali::MeshData&);
76 Archive& operator>> (Archive&, MeshData&);
77 /*---- EntityAnimatorMap ----*/
78 Archive& operator<< (Archive&, const Dali::EntityAnimatorMap&);
79 Archive& operator>> (Archive&, Dali::EntityAnimatorMap&);
80 /*---- ModelAnimationMap ----*/
81 Archive& operator<< (Archive&, const Dali::ModelAnimationMap&);
82 Archive& operator>> (Archive&, ModelAnimationMap&);
83 /*---- Entity ----*/
84 Archive& operator<< (Archive&, const Dali::Entity&);
85 Archive& operator>> (Archive&, Dali::Entity&);
86 /*---- ModelData ----*/
87 Archive& operator<< (Archive&, const ModelData&);
88 Archive& operator>> (Archive&, ModelData&);
89
90 } // namespace Serialize
91
92 } // Internal
93
94 } // Dali
95
96 #endif // !defined(__DALI_INTERNAL_MODEL_ARCHIVE_H__)