| 0.9.7

- Main Page
- Modules
- Files

Functions
GLM_GTX_rotate_vector
GTX Extensions (Experimental)

## Functions

template<typename T , precision P>
GLM_FUNC_DECL tmat4x4< T, P > | orientation (tvec3< T, P > const &Normal, tvec3< T, P > const &Up)
template<typename T , precision P>
GLM_FUNC_DECL tvec2< T, P > | rotate (tvec2< T, P > const &v, T const &angle)
template<typename T , precision P>
GLM_FUNC_DECL tvec3< T, P > | rotate (tvec3< T, P > const &v, T const &angle, tvec3< T, P > const &normal)
template<typename T , precision P>
GLM_FUNC_DECL tvec4< T, P > | rotate (tvec4< T, P > const &v, T const &angle, tvec3< T, P > const &normal)
template<typename T , precision P>
GLM_FUNC_DECL tvec3< T, P > | rotateX (tvec3< T, P > const &v, T const &angle)
template<typename T , precision P>
GLM_FUNC_DECL tvec4< T, P > | rotateX (tvec4< T, P > const &v, T const &angle)
template<typename T , precision P>
GLM_FUNC_DECL tvec3< T, P > | rotateY (tvec3< T, P > const &v, T const &angle)
template<typename T , precision P>
GLM_FUNC_DECL tvec4< T, P > | rotateY (tvec4< T, P > const &v, T const &angle)
template<typename T , precision P>
GLM_FUNC_DECL tvec3< T, P > | rotateZ (tvec3< T, P > const &v, T const &angle)
template<typename T , precision P>
GLM_FUNC_DECL tvec4< T, P > | rotateZ (tvec4< T, P > const &v, T const &angle)
template<typename T , precision P>
GLM_FUNC_DECL tvec3< T, P > | slerp (tvec3< T, P > const &x, tvec3< T, P > const &y, T const &a)

## Detailed Description

Function to directly rotate a vector.

<glm/gtx/rotate_vector.hpp> need to be included to use these functionalities.

## Function Documentation

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

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

From GLM_GTX_rotate_vector extension.

GLM_FUNC_DECL tvec2<T, P> glm::rotate | ( | tvec2< T, P > const & | v,
|  | T const & | angle
| ) |  |

Rotate a two dimensional vector.

From GLM_GTX_rotate_vector extension.

GLM_FUNC_DECL tvec3<T, P> glm::rotate | ( | tvec3< T, P > const & | v,
|  | T const & | angle,
|  | tvec3< T, P > const & | normal
| ) |  |

Rotate a three dimensional vector around an axis.

From GLM_GTX_rotate_vector extension.

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

Rotate a four dimensional vector around an axis.

From GLM_GTX_rotate_vector extension.

GLM_FUNC_DECL tvec3<T, P> glm::rotateX | ( | tvec3< T, P > const & | v,
|  | T const & | angle
| ) |  |

Rotate a three dimensional vector around the X axis.

From GLM_GTX_rotate_vector extension.

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

Rotate a four dimentionnals vector around the X axis.

From GLM_GTX_rotate_vector extension.

GLM_FUNC_DECL tvec3<T, P> glm::rotateY | ( | tvec3< T, P > const & | v,
|  | T const & | angle
| ) |  |

Rotate a three dimensional vector around the Y axis.

From GLM_GTX_rotate_vector extension.

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

Rotate a four dimensional vector around the X axis.

From GLM_GTX_rotate_vector extension.

GLM_FUNC_DECL tvec3<T, P> glm::rotateZ | ( | tvec3< T, P > const & | v,
|  | T const & | angle
| ) |  |

Rotate a three dimensional vector around the Z axis.

From GLM_GTX_rotate_vector extension.

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

Rotate a four dimensional vector around the X axis.

From GLM_GTX_rotate_vector extension.

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

Returns Spherical interpolation between two vectors.

Parameters

  x | A first vector
  y | A second vector
  a | Interpolation factor. The interpolation is defined beyond the range [0, 1].

See also
  GLM_GTX_rotate_vector