Emscripten workarounds and llvm syntax fixes
[platform/core/uifw/dali-core.git] / dali / public-api / modeling / bone.h
1 #ifndef __DALI_BONE_H__
2 #define __DALI_BONE_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 // INTERNAL INCLUDES
21 #include <dali/public-api/common/vector-wrapper.h>
22 #include <dali/public-api/math/matrix.h>
23
24 namespace Dali DALI_IMPORT_API
25 {
26
27 class Matrix;
28
29 class Bone;
30 typedef std::vector< Bone >           BoneContainer;
31 typedef BoneContainer::iterator       BoneIter;
32 typedef BoneContainer::const_iterator BoneConstIter;
33
34 /**
35  * A single bone in a mesh
36  */
37 class Bone
38 {
39 public:
40   /**
41    * Default constructor
42    */
43   Bone ();
44
45   /**
46    * Constructor
47    * @param name of the bone
48    * @param offsetMatrix for the bone
49    */
50   Bone( const std::string& name, const Matrix& offsetMatrix );
51
52   /**
53    * Destructor.
54    */
55   ~Bone();
56
57   /**
58    * Copy constructor
59    */
60   Bone( const Bone& rhs );
61
62   /**
63    * Assignment operator
64    */
65   Bone& operator=(const Bone& rhs);
66
67   /**
68    * Get name
69    * @return returns the name of the bone
70    */
71   const std::string& GetName() const;
72
73   /**
74    * Get offset matrix
75    * @return returns the offset matrix for this bone
76    */
77    const Matrix& GetOffsetMatrix() const;
78
79 private:
80   // Attributes
81   std::string   mName;         ///< Name of bone
82   Matrix        mOffsetMatrix; ///< Transform from mesh space to bone space in bind pose.
83
84 }; // struct Bone
85
86 } // namespace Dali
87
88 #endif // __DALI_BONE_H__