Blender V4.3
blender::math::AxisAngleBase< T, AngleT > Struct Template Reference

#include <BLI_math_axis_angle_types.hh>

Public Types

using vec3_type = VecBase<T, 3>
 

Public Member Functions

 AxisAngleBase ()=default
 
const vec3_typeaxis () const
 
const AngleT & angle () const
 
Constructors
 AxisAngleBase (const AxisSigned axis, const AngleT &angle)
 
 AxisAngleBase (const vec3_type &axis, const AngleT &angle)
 
 AxisAngleBase (const vec3_type &from, const vec3_type &to)
 

Static Public Member Functions

static AxisAngleBase identity ()
 

Friends

std::ostream & operator<< (std::ostream &stream, const AxisAngleBase &rot)
 

Detailed Description

template<typename T, typename AngleT>
struct blender::math::AxisAngleBase< T, AngleT >

Definition at line 32 of file BLI_math_axis_angle_types.hh.

Member Typedef Documentation

◆ vec3_type

template<typename T , typename AngleT >
using blender::math::AxisAngleBase< T, AngleT >::vec3_type = VecBase<T, 3>

Definition at line 33 of file BLI_math_axis_angle_types.hh.

Constructor & Destructor Documentation

◆ AxisAngleBase() [1/4]

template<typename T , typename AngleT >
blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase ( )
default

◆ AxisAngleBase() [2/4]

template<typename T , typename AngleT >
blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase ( const AxisSigned axis,
const AngleT & angle )

Create a rotation from a basis axis and an angle.

Definition at line 33 of file BLI_math_axis_angle.hh.

References angle(), and blender::math::to_vector().

◆ AxisAngleBase() [3/4]

template<typename T , typename AngleT >
blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase ( const vec3_type & axis,
const AngleT & angle )

Create a rotation from an axis and an angle.

Note
axis have to be normalized.

Definition at line 25 of file BLI_math_axis_angle.hh.

References angle(), BLI_assert, and blender::math::is_unit_scale().

◆ AxisAngleBase() [4/4]

template<typename T , typename AngleT >
blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase ( const vec3_type & from,
const vec3_type & to )

Create a rotation from 2 normalized vectors.

Note
from and to must be normalized.
Consider using AxisAngleCartesian for faster conversion to other rotation.

Definition at line 40 of file BLI_math_axis_angle.hh.

References BLI_assert, blender::math::cos(), blender::math::cross(), blender::math::is_unit_scale(), normalize(), blender::math::normalize_and_get_length(), blender::math::orthogonal(), blender::math::sin(), and T.

Member Function Documentation

◆ angle()

◆ axis()

◆ identity()

template<typename T , typename AngleT >
static AxisAngleBase blender::math::AxisAngleBase< T, AngleT >::identity ( )
inlinestatic

Static functions.

Definition at line 63 of file BLI_math_axis_angle_types.hh.

Friends And Related Symbol Documentation

◆ operator<<

template<typename T , typename AngleT >
std::ostream & operator<< ( std::ostream & stream,
const AxisAngleBase< T, AngleT > & rot )
friend

Operators.

Definition at line 84 of file BLI_math_axis_angle_types.hh.


The documentation for this struct was generated from the following files: