GLM_GTX_rotate_vector: Rotate vector

- Main Page
- Modules
- Namespaces
- Classes
- Files

Functions

# GLM_GTX_rotate_vector: Rotate vector

GTX Extensions (Experimental)

Function to directly rotate a vector. More...

## Functions

template<typename T >
detail::tmat4x4< T > | orientation (const detail::tvec3< T > &Normal, const detail::tvec3< T > &Up)
template<typename T >
detail::tvec2< T > | rotate (const detail::tvec2< T > &v, T angle)
template<typename T >
detail::tvec3< T > | rotate (const detail::tvec3< T > &v, T angle, const detail::tvec3< T > &normal)
template<typename T >
detail::tvec4< T > | rotate (const detail::tvec4< T > &v, T angle, const detail::tvec3< T > &normal)
template<typename T >
detail::tvec3< T > | rotateX (const detail::tvec3< T > &v, T angle)
template<typename T >
detail::tvec4< T > | rotateX (const detail::tvec4< T > &v, T angle)
template<typename T >
detail::tvec3< T > | rotateY (const detail::tvec3< T > &v, T angle)
template<typename T >
detail::tvec4< T > | rotateY (const detail::tvec4< T > &v, T angle)
template<typename T >
detail::tvec3< T > | rotateZ (const detail::tvec3< T > &v, T angle)
template<typename T >
detail::tvec4< T > | rotateZ (const detail::tvec4< T > &v, T angle)

## Detailed Description

Function to directly rotate a vector.

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

## Function Documentation

detail::tmat4x4<T> glm::gtx::rotate_vector::orientation | ( | const detail::tvec3< T > & | Normal,
|  | const detail::tvec3< T > & | Up
| ) |  |

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

From GLM_GTX_rotate_vector extension.

detail::tvec2<T> glm::gtx::rotate_vector::rotate | ( | const detail::tvec2< T > & | v,
|  | T | angle
| ) |  |

Rotate a two dimensional vector.

From GLM_GTX_rotate_vector extension.

detail::tvec3<T> glm::gtx::rotate_vector::rotate | ( | const detail::tvec3< T > & | v,
|  | T | angle,
|  | const detail::tvec3< T > & | normal
| ) |  |

Rotate a three dimensional vector around an axis.

From GLM_GTX_rotate_vector extension.

detail::tvec4<T> glm::gtx::rotate_vector::rotate | ( | const detail::tvec4< T > & | v,
|  | T | angle,
|  | const detail::tvec3< T > & | normal
| ) |  |

Rotate a four dimensional vector around an axis.

From GLM_GTX_rotate_vector extension.

detail::tvec3<T> glm::gtx::rotate_vector::rotateX | ( | const detail::tvec3< T > & | v,
|  | T | angle
| ) |  |

Rotate a three dimensional vector around the X axis.

From GLM_GTX_rotate_vector extension.

detail::tvec4<T> glm::gtx::rotate_vector::rotateX | ( | const detail::tvec4< T > & | v,
|  | T | angle
| ) |  |

Rotate a four dimentionnals vector around the X axis.

From GLM_GTX_rotate_vector extension.

detail::tvec3<T> glm::gtx::rotate_vector::rotateY | ( | const detail::tvec3< T > & | v,
|  | T | angle
| ) |  |

Rotate a three dimensional vector around the Y axis.

From GLM_GTX_rotate_vector extension.

detail::tvec4<T> glm::gtx::rotate_vector::rotateY | ( | const detail::tvec4< T > & | v,
|  | T | angle
| ) |  |

Rotate a four dimensional vector around the X axis.

From GLM_GTX_rotate_vector extension.

detail::tvec3<T> glm::gtx::rotate_vector::rotateZ | ( | const detail::tvec3< T > & | v,
|  | T | angle
| ) |  |

Rotate a three dimensional vector around the Z axis.

From GLM_GTX_rotate_vector extension.

detail::tvec4<T> glm::gtx::rotate_vector::rotateZ | ( | const detail::tvec4< T > & | v,
|  | T | angle
| ) |  |

Rotate a four dimensional vector around the X axis.

From GLM_GTX_rotate_vector extension.