Back to Mame

0.9.8: type_mat2x4.hpp Source File

3rdparty/glm/doc/api/a00117_source.html

latest7.2 KB
Original Source

| | 0.9.8 |

type_mat2x4.hpp

Go to the documentation of this file.

1

4 #pragma once

5

6 #include "../fwd.hpp"

7 #include "type_vec2.hpp"

8 #include "type_vec4.hpp"

9 #include "type_mat.hpp"

10 #include <limits>

11 #include <cstddef>

12

13 namespace glm

14 {

15template <typename T, precision P = defaultp>

16struct tmat2x4

17 {

18typedef tvec4<T, P> col_type;

19typedef tvec2<T, P> row_type;

20typedef tmat2x4<T, P> type;

21typedef tmat4x2<T, P> transpose_type;

22typedef T value_type;

23

24private:

25 col_type value[2];

26

27public:

28// -- Constructors --

29

30 GLM_FUNC_DECL tmat2x4() GLM_DEFAULT_CTOR;

31 GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m) GLM_DEFAULT;

32 template <precision Q>

33 GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);

34

35 GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat2x4(ctor);

36 GLM_FUNC_DECL explicit tmat2x4(T scalar);

37 GLM_FUNC_DECL tmat2x4(

38 T x0, T y0, T z0, T w0,

39 T x1, T y1, T z1, T w1);

40 GLM_FUNC_DECL tmat2x4(

41 col_type const & v0,

42 col_type const & v1);

43

44// -- Conversions --

45

46 template <

47 typename X1, typename Y1, typename Z1, typename W1,

48 typename X2, typename Y2, typename Z2, typename W2>

49 GLM_FUNC_DECL tmat2x4(

50 X1 x1, Y1 y1, Z1 z1, W1 w1,

51 X2 x2, Y2 y2, Z2 z2, W2 w2);

52

53 template <typename U, typename V>

54 GLM_FUNC_DECL tmat2x4(

55 tvec4<U, P> const & v1,

56 tvec4<V, P> const & v2);

57

58// -- Matrix conversions --

59

60 template <typename U, precision Q>

61 GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x4<U, Q> const & m);

62

63 GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x2<T, P> const & x);

64 GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x3<T, P> const & x);

65 GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x4<T, P> const & x);

66 GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x3<T, P> const & x);

67 GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x2<T, P> const & x);

68 GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x4<T, P> const & x);

69 GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x2<T, P> const & x);

70 GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x3<T, P> const & x);

71

72// -- Accesses --

73

74 typedef length_t length_type;

75 GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;

76

77 GLM_FUNC_DECL col_type & operator[](length_type i);

78 GLM_FUNC_DECL col_type const & operator[](length_type i) const;

79

80// -- Unary arithmetic operators --

81

82 GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m) GLM_DEFAULT;

83

84 template <typename U>

85 GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<U, P> const & m);

86 template <typename U>

87 GLM_FUNC_DECL tmat2x4<T, P> & operator+=(U s);

88 template <typename U>

89 GLM_FUNC_DECL tmat2x4<T, P> & operator+=(tmat2x4<U, P> const & m);

90 template <typename U>

91 GLM_FUNC_DECL tmat2x4<T, P> & operator-=(U s);

92 template <typename U>

93 GLM_FUNC_DECL tmat2x4<T, P> & operator-=(tmat2x4<U, P> const & m);

94 template <typename U>

95 GLM_FUNC_DECL tmat2x4<T, P> & operator*=(U s);

96 template <typename U>

97 GLM_FUNC_DECL tmat2x4<T, P> & operator/=(U s);

98

99// -- Increment and decrement operators --

100

101 GLM_FUNC_DECL tmat2x4<T, P> & operator++ ();

102 GLM_FUNC_DECL tmat2x4<T, P> & operator-- ();

103 GLM_FUNC_DECL tmat2x4<T, P> operator++(int);

104 GLM_FUNC_DECL tmat2x4<T, P> operator--(int);

105 };

106

107// -- Unary operators --

108

109 template <typename T, precision P>

110 GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m);

111

112 template <typename T, precision P>

113 GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m);

114

115// -- Binary operators --

116

117 template <typename T, precision P>

118 GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T scalar);

119

120 template <typename T, precision P>

121 GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);

122

123 template <typename T, precision P>

124 GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T scalar);

125

126 template <typename T, precision P>

127 GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);

128

129 template <typename T, precision P>

130 GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T scalar);

131

132 template <typename T, precision P>

133 GLM_FUNC_DECL tmat2x4<T, P> operator*(T scalar, tmat2x4<T, P> const & m);

134

135 template <typename T, precision P>

136 GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator*(tmat2x4<T, P> const & m, typename tmat2x4<T, P>::row_type const & v);

137

138 template <typename T, precision P>

139 GLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator*(typename tmat2x4<T, P>::col_type const & v, tmat2x4<T, P> const & m);

140

141 template <typename T, precision P>

142 GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat4x2<T, P> const & m2);

143

144 template <typename T, precision P>

145 GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat2x2<T, P> const & m2);

146

147 template <typename T, precision P>

148 GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat3x2<T, P> const & m2);

149

150 template <typename T, precision P>

151 GLM_FUNC_DECL tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T scalar);

152

153 template <typename T, precision P>

154 GLM_FUNC_DECL tmat2x4<T, P> operator/(T scalar, tmat2x4<T, P> const & m);

155

156// -- Boolean operators --

157

158 template <typename T, precision P>

159 GLM_FUNC_DECL bool operator==(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);

160

161 template <typename T, precision P>

162 GLM_FUNC_DECL bool operator!=(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);

163 }//namespace glm

164

165 #ifndef GLM_EXTERNAL_TEMPLATE

166 #include "type_mat2x4.inl"

167 #endif

glm

Definition: _noise.hpp:11

type_mat.hpp

GLM Core

type_vec2.hpp

GLM Core

type_vec4.hpp

GLM Core

glm::length

GLM_FUNC_DECL T length(vecType< T, P > const &x)

Returns the length of x, i.e., sqrt(x * x).


Generated by 1.8.10