Back to Mame

0.9.8: rotate_vector.hpp Source File

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

latest5.0 KB
Original Source

| | 0.9.8 |

rotate_vector.hpp

Go to the documentation of this file.

1

14 #pragma once

15

16 // Dependency:

17 #include "../glm.hpp"

18 #include "../gtx/transform.hpp"

19

20 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)

21 # pragma message("GLM: GLM_GTX_rotate_vector extension included")

22 #endif

23

24 namespace glm

25 {

28

36template <typename T, precision P>

37 GLM_FUNC_DECL tvec3<T, P> slerp(

38 tvec3<T, P> const & x,

39 tvec3<T, P> const & y,

40 T const & a);

41

44template <typename T, precision P>

45 GLM_FUNC_DECL tvec2<T, P> rotate(

46 tvec2<T, P> const & v,

47 T const & angle);

48

51template <typename T, precision P>

52 GLM_FUNC_DECL tvec3<T, P> rotate(

53 tvec3<T, P> const & v,

54 T const & angle,

55 tvec3<T, P> const & normal);

56

59template <typename T, precision P>

60 GLM_FUNC_DECL tvec4<T, P> rotate(

61 tvec4<T, P> const & v,

62 T const & angle,

63 tvec3<T, P> const & normal);

64

67template <typename T, precision P>

68 GLM_FUNC_DECL tvec3<T, P> rotateX(

69 tvec3<T, P> const & v,

70 T const & angle);

71

74template <typename T, precision P>

75 GLM_FUNC_DECL tvec3<T, P> rotateY(

76 tvec3<T, P> const & v,

77 T const & angle);

78

81template <typename T, precision P>

82 GLM_FUNC_DECL tvec3<T, P> rotateZ(

83 tvec3<T, P> const & v,

84 T const & angle);

85

88template <typename T, precision P>

89 GLM_FUNC_DECL tvec4<T, P> rotateX(

90 tvec4<T, P> const & v,

91 T const & angle);

92

95template <typename T, precision P>

96 GLM_FUNC_DECL tvec4<T, P> rotateY(

97 tvec4<T, P> const & v,

98 T const & angle);

99

102template <typename T, precision P>

103 GLM_FUNC_DECL tvec4<T, P> rotateZ(

104 tvec4<T, P> const & v,

105 T const & angle);

106

109template <typename T, precision P>

110 GLM_FUNC_DECL tmat4x4<T, P> orientation(

111 tvec3<T, P> const & Normal,

112 tvec3<T, P> const & Up);

113

115 }//namespace glm

116

117 #include "rotate_vector.inl"

glm::orientation

GLM_FUNC_DECL tmat4x4< T, P > orientation(tvec3< T, P > const &Normal, tvec3< T, P > const &Up)

Build a rotation matrix from a normal and a up vector.

glm::rotate

GLM_FUNC_DECL tvec4< T, P > rotate(tvec4< T, P > const &v, T const &angle, tvec3< T, P > const &normal)

Rotate a four dimensional vector around an axis.

glm::rotateZ

GLM_FUNC_DECL tvec4< T, P > rotateZ(tvec4< T, P > const &v, T const &angle)

Rotate a four dimensional vector around the X axis.

glm

Definition: _noise.hpp:11

glm::rotateY

GLM_FUNC_DECL tvec4< T, P > rotateY(tvec4< T, P > const &v, T const &angle)

Rotate a four dimensional vector around the X axis.

glm::slerp

GLM_FUNC_DECL tvec3< T, P > slerp(tvec3< T, P > const &x, tvec3< T, P > const &y, T const &a)

Returns Spherical interpolation between two vectors.

glm::angle

GLM_FUNC_DECL T angle(tquat< T, P > const &x)

Returns the quaternion rotation angle.

glm::rotateX

GLM_FUNC_DECL tvec4< T, P > rotateX(tvec4< T, P > const &v, T const &angle)

Rotate a four dimentionnals vector around the X axis.


Generated by 1.8.10