~mir-team/mir/in-process-egl+input-conglomeration

« back to all changes in this revision

Viewing changes to 3rd_party/glm/glm/gtx/matrix_cross_product.inl

Merged trunk and fixed issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
///////////////////////////////////////////////////////////////////////////////////////////////////
2
 
// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3
 
///////////////////////////////////////////////////////////////////////////////////////////////////
4
 
// Created : 2005-12-21
5
 
// Updated : 2005-12-21
6
 
// Licence : This source is under MIT License
7
 
// File    : glm/gtx/matrix_cross_product.inl
8
 
///////////////////////////////////////////////////////////////////////////////////////////////////
9
 
 
10
 
namespace glm
11
 
{
12
 
        template <typename T> 
13
 
        GLM_FUNC_QUALIFIER detail::tmat3x3<T> matrixCross3
14
 
        (
15
 
                detail::tvec3<T> const & x
16
 
        )
17
 
        {
18
 
                detail::tmat3x3<T> Result(T(0));
19
 
                Result[0][1] = x.z;
20
 
                Result[1][0] = -x.z;
21
 
                Result[0][2] = -x.y;
22
 
                Result[2][0] = x.y;
23
 
                Result[1][2] = x.x;
24
 
                Result[2][1] = -x.x;
25
 
                return Result;
26
 
        }
27
 
 
28
 
        template <typename T> 
29
 
        GLM_FUNC_QUALIFIER detail::tmat4x4<T> matrixCross4
30
 
        (
31
 
                detail::tvec3<T> const & x
32
 
        )
33
 
        {
34
 
                detail::tmat4x4<T> Result(T(0));
35
 
                Result[0][1] = x.z;
36
 
                Result[1][0] = -x.z;
37
 
                Result[0][2] = -x.y;
38
 
                Result[2][0] = x.y;
39
 
                Result[1][2] = x.x;
40
 
                Result[2][1] = -x.x;
41
 
                return Result;
42
 
        }
43
 
 
44
 
}//namespace glm