Flow Visualisation
_swizzle.hpp File Reference
#include "_swizzle_func.hpp"
Include dependency graph for _swizzle.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  glm::detail::_swizzle_base0< T, N >
 
struct  glm::detail::_swizzle_base1< T, V, E0, E1, E2, E3, N >
 
struct  glm::detail::_swizzle_base1< T, V, E0, E1,-1,-2, 2 >
 
struct  glm::detail::_swizzle_base1< T, V, E0, E1, E2,-1, 3 >
 
struct  glm::detail::_swizzle_base1< T, V, E0, E1, E2, E3, 4 >
 
struct  glm::detail::_swizzle_base2< ValueType, VecType, N, E0, E1, E2, E3, DUPLICATE_ELEMENTS >
 
struct  glm::detail::_swizzle_base2< ValueType, VecType, N, E0, E1, E2, E3, 1 >
 
struct  glm::detail::_swizzle_base2< ValueType, VecType, N, E0, E1, E2, E3, 1 >::Stub
 
struct  glm::detail::swizzle< N, ValueType, VecType, E0, E1, E2, E3 >
 

Namespaces

 glm
 
 glm::detail
 

Macros

#define _GLM_SWIZZLE_TEMPLATE1   template <int N, typename T, typename V, int E0, int E1, int E2, int E3>
 
#define _GLM_SWIZZLE_TEMPLATE2   template <int N, typename T, typename V, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3>
 
#define _GLM_SWIZZLE_TYPE1   glm::detail::swizzle<N,T,V,E0,E1,E2,E3>
 
#define _GLM_SWIZZLE_TYPE2   glm::detail::swizzle<N,T,V,F0,F1,F2,F3>
 
#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND)
 
#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND)
 
#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE, FUNCTION)
 
#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE, FUNCTION)
 
#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE, FUNCTION)
 
#define _GLM_SWIZZLE2_2_MEMBERS(T, P, E0, E1)
 
#define _GLM_SWIZZLE2_3_MEMBERS(T, P2, E0, E1)
 
#define _GLM_SWIZZLE2_4_MEMBERS(T, P2, E0, E1)
 
#define _GLM_SWIZZLE3_2_MEMBERS(T, P2, E0, E1, E2)
 
#define _GLM_SWIZZLE3_3_MEMBERS(T, P, E0, E1, E2)
 
#define _GLM_SWIZZLE3_4_MEMBERS(T, P2, E0, E1, E2)
 
#define _GLM_SWIZZLE4_2_MEMBERS(T, P, E0, E1, E2, E3)
 
#define _GLM_SWIZZLE4_3_MEMBERS(T, P, E0, E1, E2, E3)
 
#define _GLM_SWIZZLE4_4_MEMBERS(T, P, E0, E1, E2, E3)
 

Enumerations

enum  glm::comp {
  glm::X = 0, glm::R = 0, glm::S = 0, glm::Y = 1,
  glm::G = 1, glm::T = 1, glm::Z = 2, glm::B = 2,
  glm::P = 2, glm::W = 3, glm::A = 3, glm::Q = 3
}
 

Detailed Description

OpenGL Mathematics (glm.g-truc.net)

Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

GLM Core

Date
2006-04-20 / 2011-02-16
Author
Christophe Riccio

Macro Definition Documentation

#define _GLM_SWIZZLE2_2_MEMBERS (   T,
  P,
  E0,
  E1 
)
Value:
struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \
struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \
struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \
struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; };
Definition: _swizzle.hpp:204
Definition: _swizzle.hpp:46
Definition: _swizzle.hpp:43
#define _GLM_SWIZZLE2_3_MEMBERS (   T,
  P2,
  E0,
  E1 
)
Value:
struct { glm::detail::swizzle<3,T,P2,0,0,0,-1> E0 ## E0 ## E0; }; \
struct { glm::detail::swizzle<3,T,P2,0,0,1,-1> E0 ## E0 ## E1; }; \
struct { glm::detail::swizzle<3,T,P2,0,1,0,-1> E0 ## E1 ## E0; }; \
struct { glm::detail::swizzle<3,T,P2,0,1,1,-1> E0 ## E1 ## E1; }; \
struct { glm::detail::swizzle<3,T,P2,1,0,0,-1> E1 ## E0 ## E0; }; \
struct { glm::detail::swizzle<3,T,P2,1,0,1,-1> E1 ## E0 ## E1; }; \
struct { glm::detail::swizzle<3,T,P2,1,1,0,-1> E1 ## E1 ## E0; }; \
struct { glm::detail::swizzle<3,T,P2,1,1,1,-1> E1 ## E1 ## E1; };
Definition: _swizzle.hpp:204
Definition: _swizzle.hpp:43
#define _GLM_SWIZZLE2_4_MEMBERS (   T,
  P2,
  E0,
  E1 
)
Value:
struct { glm::detail::swizzle<4,T,P2,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
struct { glm::detail::swizzle<4,T,P2,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
struct { glm::detail::swizzle<4,T,P2,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
struct { glm::detail::swizzle<4,T,P2,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
struct { glm::detail::swizzle<4,T,P2,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
struct { glm::detail::swizzle<4,T,P2,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
struct { glm::detail::swizzle<4,T,P2,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
struct { glm::detail::swizzle<4,T,P2,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
struct { glm::detail::swizzle<4,T,P2,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
struct { glm::detail::swizzle<4,T,P2,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
struct { glm::detail::swizzle<4,T,P2,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
struct { glm::detail::swizzle<4,T,P2,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
struct { glm::detail::swizzle<4,T,P2,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
struct { glm::detail::swizzle<4,T,P2,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
struct { glm::detail::swizzle<4,T,P2,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
struct { glm::detail::swizzle<4,T,P2,1,1,1,1> E1 ## E1 ## E1 ## E1; };
Definition: _swizzle.hpp:204
#define _GLM_SWIZZLE3_2_MEMBERS (   T,
  P2,
  E0,
  E1,
  E2 
)
Value:
struct { glm::detail::swizzle<2,T,P2,0,0,-1,-2> E0 ## E0; }; \
struct { glm::detail::swizzle<2,T,P2,0,1,-1,-2> E0 ## E1; }; \
struct { glm::detail::swizzle<2,T,P2,0,2,-1,-2> E0 ## E2; }; \
struct { glm::detail::swizzle<2,T,P2,1,0,-1,-2> E1 ## E0; }; \
struct { glm::detail::swizzle<2,T,P2,1,1,-1,-2> E1 ## E1; }; \
struct { glm::detail::swizzle<2,T,P2,1,2,-1,-2> E1 ## E2; }; \
struct { glm::detail::swizzle<2,T,P2,2,0,-1,-2> E2 ## E0; }; \
struct { glm::detail::swizzle<2,T,P2,2,1,-1,-2> E2 ## E1; }; \
struct { glm::detail::swizzle<2,T,P2,2,2,-1,-2> E2 ## E2; };
Definition: _swizzle.hpp:204
Definition: _swizzle.hpp:43
#define _GLM_SWIZZLE3_3_MEMBERS (   T,
  P,
  E0,
  E1,
  E2 
)
Value:
struct { glm::detail::swizzle<3,T,P,0,0,0,-1> E0 ## E0 ## E0; }; \
struct { glm::detail::swizzle<3,T,P,0,0,1,-1> E0 ## E0 ## E1; }; \
struct { glm::detail::swizzle<3,T,P,0,0,2,-1> E0 ## E0 ## E2; }; \
struct { glm::detail::swizzle<3,T,P,0,1,0,-1> E0 ## E1 ## E0; }; \
struct { glm::detail::swizzle<3,T,P,0,1,1,-1> E0 ## E1 ## E1; }; \
struct { glm::detail::swizzle<3,T,P,0,1,2,-1> E0 ## E1 ## E2; }; \
struct { glm::detail::swizzle<3,T,P,0,2,0,-1> E0 ## E2 ## E0; }; \
struct { glm::detail::swizzle<3,T,P,0,2,1,-1> E0 ## E2 ## E1; }; \
struct { glm::detail::swizzle<3,T,P,0,2,2,-1> E0 ## E2 ## E2; }; \
struct { glm::detail::swizzle<3,T,P,1,0,0,-1> E1 ## E0 ## E0; }; \
struct { glm::detail::swizzle<3,T,P,1,0,1,-1> E1 ## E0 ## E1; }; \
struct { glm::detail::swizzle<3,T,P,1,0,2,-1> E1 ## E0 ## E2; }; \
struct { glm::detail::swizzle<3,T,P,1,1,0,-1> E1 ## E1 ## E0; }; \
struct { glm::detail::swizzle<3,T,P,1,1,1,-1> E1 ## E1 ## E1; }; \
struct { glm::detail::swizzle<3,T,P,1,1,2,-1> E1 ## E1 ## E2; }; \
struct { glm::detail::swizzle<3,T,P,1,2,0,-1> E1 ## E2 ## E0; }; \
struct { glm::detail::swizzle<3,T,P,1,2,1,-1> E1 ## E2 ## E1; }; \
struct { glm::detail::swizzle<3,T,P,1,2,2,-1> E1 ## E2 ## E2; }; \
struct { glm::detail::swizzle<3,T,P,2,0,0,-1> E2 ## E0 ## E0; }; \
struct { glm::detail::swizzle<3,T,P,2,0,1,-1> E2 ## E0 ## E1; }; \
struct { glm::detail::swizzle<3,T,P,2,0,2,-1> E2 ## E0 ## E2; }; \
struct { glm::detail::swizzle<3,T,P,2,1,0,-1> E2 ## E1 ## E0; }; \
struct { glm::detail::swizzle<3,T,P,2,1,1,-1> E2 ## E1 ## E1; }; \
struct { glm::detail::swizzle<3,T,P,2,1,2,-1> E2 ## E1 ## E2; }; \
struct { glm::detail::swizzle<3,T,P,2,2,0,-1> E2 ## E2 ## E0; }; \
struct { glm::detail::swizzle<3,T,P,2,2,1,-1> E2 ## E2 ## E1; }; \
struct { glm::detail::swizzle<3,T,P,2,2,2,-1> E2 ## E2 ## E2; };
Definition: _swizzle.hpp:204
Definition: _swizzle.hpp:46
Definition: _swizzle.hpp:43
#define _GLM_SWIZZLE3_4_MEMBERS (   T,
  P2,
  E0,
  E1,
  E2 
)
#define _GLM_SWIZZLE4_2_MEMBERS (   T,
  P,
  E0,
  E1,
  E2,
  E3 
)
Value:
struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \
struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \
struct { glm::detail::swizzle<2,T,P,0,2,-1,-2> E0 ## E2; }; \
struct { glm::detail::swizzle<2,T,P,0,3,-1,-2> E0 ## E3; }; \
struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \
struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; }; \
struct { glm::detail::swizzle<2,T,P,1,2,-1,-2> E1 ## E2; }; \
struct { glm::detail::swizzle<2,T,P,1,3,-1,-2> E1 ## E3; }; \
struct { glm::detail::swizzle<2,T,P,2,0,-1,-2> E2 ## E0; }; \
struct { glm::detail::swizzle<2,T,P,2,1,-1,-2> E2 ## E1; }; \
struct { glm::detail::swizzle<2,T,P,2,2,-1,-2> E2 ## E2; }; \
struct { glm::detail::swizzle<2,T,P,2,3,-1,-2> E2 ## E3; }; \
struct { glm::detail::swizzle<2,T,P,3,0,-1,-2> E3 ## E0; }; \
struct { glm::detail::swizzle<2,T,P,3,1,-1,-2> E3 ## E1; }; \
struct { glm::detail::swizzle<2,T,P,3,2,-1,-2> E3 ## E2; }; \
struct { glm::detail::swizzle<2,T,P,3,3,-1,-2> E3 ## E3; };
Definition: _swizzle.hpp:204
Definition: _swizzle.hpp:46
Definition: _swizzle.hpp:43
#define _GLM_SWIZZLE4_3_MEMBERS (   T,
  P,
  E0,
  E1,
  E2,
  E3 
)
#define _GLM_SWIZZLE4_4_MEMBERS (   T,
  P,
  E0,
  E1,
  E2,
  E3 
)
#define _GLM_SWIZZLE_FUNCTION_1_ARGS (   RETURN_TYPE,
  FUNCTION 
)
Value:
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \
{ \
return FUNCTION(a()); \
}
#define _GLM_SWIZZLE_TYPE1
Definition: _swizzle.hpp:218
#define _GLM_SWIZZLE_FUNCTION_2_ARGS (   RETURN_TYPE,
  FUNCTION 
)
Value:
_GLM_SWIZZLE_TEMPLATE2 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
{ \
return FUNCTION(a(), b()); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \
{ \
return FUNCTION(a(), b()); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \
{ \
return FUNCTION(a(), b); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \
{ \
return FUNCTION(a, b()); \
}
#define _GLM_SWIZZLE_TYPE2
Definition: _swizzle.hpp:219
#define _GLM_SWIZZLE_TYPE1
Definition: _swizzle.hpp:218
#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR (   RETURN_TYPE,
  FUNCTION 
)
Value:
_GLM_SWIZZLE_TEMPLATE2 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \
{ \
return FUNCTION(a(), b(), c); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
{ \
return FUNCTION(a(), b(), c); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\
{ \
return FUNCTION(a(), b, c); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
{ \
return FUNCTION(a, b(), c); \
}
Definition: _swizzle.hpp:43
#define _GLM_SWIZZLE_TYPE2
Definition: _swizzle.hpp:219
#define _GLM_SWIZZLE_TYPE1
Definition: _swizzle.hpp:218
#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION (   OPERAND)
Value:
_GLM_SWIZZLE_TEMPLATE1 \
V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \
{ \
return a() OPERAND b; \
} \
V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \
{ \
return a OPERAND b(); \
}
Definition: _swizzle.hpp:43
#define _GLM_SWIZZLE_TEMPLATE1
Definition: _swizzle.hpp:216
#define _GLM_SWIZZLE_TYPE1
Definition: _swizzle.hpp:218
#define _GLM_SWIZZLE_TEMPLATE1   template <int N, typename T, typename V, int E0, int E1, int E2, int E3>
#define _GLM_SWIZZLE_TEMPLATE2   template <int N, typename T, typename V, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3>
#define _GLM_SWIZZLE_TYPE1   glm::detail::swizzle<N,T,V,E0,E1,E2,E3>
#define _GLM_SWIZZLE_TYPE2   glm::detail::swizzle<N,T,V,F0,F1,F2,F3>
#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION (   OPERAND)
Value:
_GLM_SWIZZLE_TEMPLATE2 \
V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
{ \
return a() OPERAND b(); \
} \
V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \
{ \
return a() OPERAND b; \
} \
V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \
{ \
return a OPERAND b(); \
}
#define _GLM_SWIZZLE_TEMPLATE1
Definition: _swizzle.hpp:216
#define _GLM_SWIZZLE_TYPE2
Definition: _swizzle.hpp:219
#define _GLM_SWIZZLE_TYPE1
Definition: _swizzle.hpp:218