2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiEffects_RendererMathMatrix1Traits.h
20 * @brief The Matrix1Traits class
24 #ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX1_TRAITS_H_
25 #define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX1_TRAITS_H_
27 #include <renderer/math/FUiEffects_RendererMathMatrixTraits.h>
28 #include <renderer/math/FUiEffects_RendererMathCommon.h>
29 #include <renderer/math/FUiEffects_RendererMathAdapterFunctions.h>
31 namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math
35 class MatrixTraits<T, 1> :
36 public MatrixTraitsBase<T, 1>
39 typedef Matrix<T, 1> MatrixType;
40 typedef Vector<T, 1> VectorType;
41 typedef MatrixTraitsBase<T, 1> MatrixTraitsBaseType;
42 typedef typename MatrixTraitsBaseType::TypeReference TypeReference;
44 using MatrixTraitsBaseType::data;
46 inline VectorType& I(void);
47 inline const VectorType& I(void) const;
49 inline MatrixType& Set(const VectorType& i);
50 inline MatrixType& Set(const TypeReference a0);
52 inline static MatrixType& GetIdentity(void);
54 inline VectorType& ApplyTransform(void) const;
55 inline VectorType GetAppliedTransform(void) const;
57 inline MatrixType& MakeScale(const TypeReference x, const TypeReference y);
58 inline MatrixType& SetScale(const TypeReference x, const TypeReference y);
59 static inline MatrixType CreateScale(const TypeReference x, const TypeReference y);
60 inline MatrixType& Scale(const TypeReference x, const TypeReference y);
64 typename MatrixTraits<T, 1>::VectorType& MatrixTraits<T, 1>::I(void)
70 const typename MatrixTraits<T, 1>::VectorType& MatrixTraits<T, 1>::I(void) const
76 typename MatrixTraits<T, 1>::MatrixType& MatrixTraits<T, 1>::Set(const VectorType& i)
79 return *(static_cast<MatrixType*>(this));
83 typename MatrixTraits<T, 1>::MatrixType& MatrixTraits<T, 1>::Set(const TypeReference a0)
86 return *(static_cast<MatrixType*>(this));
90 typename MatrixTraits<T, 1>::MatrixType& MatrixTraits<T, 1>::GetIdentity(void)
92 static MatrixType identityMatrix = MatrixType(T(1.0f));
93 return identityMatrix;
96 }}}}} //Tizen::Ui::Effects::_Renderer::Math
99 #endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX1_TRAITS_H_