length() member functions are constexpr #657
This commit is contained in:
@@ -24,6 +24,14 @@ namespace glm
|
||||
col_type value[2];
|
||||
|
||||
public:
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
|
||||
@@ -66,14 +74,6 @@ namespace glm
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
|
||||
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 2;}
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL mat<2, 2, T, P> & operator=(mat<2, 2, T, P> const & v) GLM_DEFAULT;
|
||||
|
||||
@@ -25,6 +25,14 @@ namespace glm
|
||||
col_type value[2];
|
||||
|
||||
public:
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
|
||||
@@ -67,14 +75,6 @@ namespace glm
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
|
||||
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 2;}
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL mat<2, 3, T, P> & operator=(mat<2, 3, T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -25,6 +25,14 @@ namespace glm
|
||||
col_type value[2];
|
||||
|
||||
public:
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
|
||||
@@ -69,14 +77,6 @@ namespace glm
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
|
||||
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 2;}
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL mat<2, 4, T, P> & operator=(mat<2, 4, T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -25,6 +25,14 @@ namespace glm
|
||||
col_type value[3];
|
||||
|
||||
public:
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
|
||||
@@ -74,14 +82,6 @@ namespace glm
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
|
||||
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 3;}
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL mat<3, 2, T, P> & operator=(mat<3, 2, T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -24,6 +24,14 @@ namespace glm
|
||||
col_type value[3];
|
||||
|
||||
public:
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
|
||||
@@ -73,14 +81,6 @@ namespace glm
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
|
||||
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 3;}
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL mat<3, 3, T, P> & operator=(mat<3, 3, T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -25,6 +25,14 @@ namespace glm
|
||||
col_type value[3];
|
||||
|
||||
public:
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
|
||||
@@ -74,14 +82,6 @@ namespace glm
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
|
||||
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 3;}
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL mat<3, 4, T, P> & operator=(mat<3, 4, T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -25,6 +25,14 @@ namespace glm
|
||||
col_type value[4];
|
||||
|
||||
public:
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
|
||||
@@ -79,14 +87,6 @@ namespace glm
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
|
||||
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 4;}
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL mat<4, 2, T, P> & operator=(mat<4, 2, T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -25,6 +25,14 @@ namespace glm
|
||||
col_type value[4];
|
||||
|
||||
public:
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
|
||||
@@ -79,14 +87,6 @@ namespace glm
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
|
||||
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
|
||||
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 4;}
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL mat<4, 3, T, P> & operator=(mat<4, 3, T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace glm
|
||||
// -- Accesses --
|
||||
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 4;}
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
|
||||
|
||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace glm
|
||||
|
||||
/// Return the count of components of the vector
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 1;}
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 1;}
|
||||
|
||||
GLM_FUNC_DECL T & operator[](length_type i);
|
||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace glm
|
||||
|
||||
/// Return the count of components of the vector
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 2;}
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 2;}
|
||||
|
||||
GLM_FUNC_DECL T& operator[](length_type i);
|
||||
GLM_FUNC_DECL T const& operator[](length_type i) const;
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace glm
|
||||
|
||||
/// Return the count of components of the vector
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 3;}
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 3;}
|
||||
|
||||
GLM_FUNC_DECL T & operator[](length_type i);
|
||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace glm
|
||||
|
||||
/// Return the count of components of the vector
|
||||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static length_type length(){return 4;}
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
|
||||
|
||||
GLM_FUNC_DECL T & operator[](length_type i);
|
||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace glm
|
||||
|
||||
typedef length_t length_type;
|
||||
/// Return the count of components of a quaternion
|
||||
GLM_FUNC_DECL static length_type length(){return 4;}
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
|
||||
|
||||
GLM_FUNC_DECL T & operator[](length_type i);
|
||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace glm
|
||||
|
||||
typedef length_t length_type;
|
||||
/// Return the count of components of a dual quaternion
|
||||
GLM_FUNC_DECL static length_type length(){return 2;}
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 2;}
|
||||
|
||||
GLM_FUNC_DECL part_type & operator[](length_type i);
|
||||
GLM_FUNC_DECL part_type const & operator[](length_type i) const;
|
||||
|
||||
Reference in New Issue
Block a user