|
Blender V4.3
|
#include <BLI_math_angle_types.hh>
Public Member Functions | |
| AngleCartesianBase ()=default | |
| AngleCartesianBase (const T &x, const T &y) | |
| AngleCartesianBase (const T &radian) | |
| AngleCartesianBase (const AngleRadianBase< T > &angle) | |
| operator T () const | |
| T | degree () const |
| T | radian () const |
| T | cos () const |
| T | sin () const |
| T | tan () const |
| AngleCartesianBase & | operator+= (const AngleCartesianBase &b) |
| AngleCartesianBase & | operator*= (const T &b) |
| AngleCartesianBase & | operator-= (const AngleCartesianBase &b) |
| AngleCartesianBase & | operator/= (const T &b) |
Static Public Member Functions | |
| static AngleCartesianBase | identity () |
| static AngleCartesianBase | from_degree (const T °rees) |
| static AngleCartesianBase | from_point (const T &x, const T &y) |
Friends | |
| AngleCartesianBase | operator+ (const AngleCartesianBase &a, const AngleCartesianBase &b) |
| AngleCartesianBase | operator- (const AngleCartesianBase &a, const AngleCartesianBase &b) |
| AngleCartesianBase | operator* (const AngleCartesianBase &a, const T &b) |
| AngleCartesianBase | operator* (const T &b, const AngleCartesianBase &a) |
| AngleCartesianBase | operator/ (const AngleCartesianBase &a, const T &divisor) |
| AngleCartesianBase | operator- (const AngleCartesianBase &a) |
| std::ostream & | operator<< (std::ostream &stream, const AngleCartesianBase &rot) |
A blender::math::AngleCartesianBase<T> stores the angle as cosine + sine tuple.
2 * sizeof(T)cos(), sin(), tan(), AngleCartesian(cos, sin)Definition at line 167 of file BLI_math_angle_types.hh.
|
default |
|
inline |
Create an angle from a (x, y) position on the unit circle.
Definition at line 178 of file BLI_math_angle_types.hh.
References blender::math::abs(), BLI_assert, e, and T.
|
inlineexplicit |
Create an angle from a radian value.
Definition at line 186 of file BLI_math_angle_types.hh.
|
inlineexplicit |
Definition at line 188 of file BLI_math_angle_types.hh.
|
inline |
Methods.
Definition at line 238 of file BLI_math_angle_types.hh.
Referenced by blender::math::from_vector(), blender::tests::TEST(), and blender::math::QuaternionBase< T >::twist().
|
inline |
Definition at line 225 of file BLI_math_angle_types.hh.
References blender::math::numbers::pi, and T.
|
inlinestatic |
Definition at line 198 of file BLI_math_angle_types.hh.
References blender::math::AngleCartesianBase< T >::AngleCartesianBase(), blender::math::numbers::pi, and T.
|
inlinestatic |
Create an angle from a (x, y) position on the 2D plane. Fallback to identity if (x, y) is origin (0, 0).
Definition at line 207 of file BLI_math_angle_types.hh.
References blender::math::AngleCartesianBase< T >::AngleCartesianBase(), blender::math::AngleCartesianBase< T >::identity(), norm(), and blender::math::sqrt().
Referenced by blender::math::QuaternionBase< T >::twist().
|
inlinestatic |
Static functions.
Definition at line 193 of file BLI_math_angle_types.hh.
Referenced by blender::math::AngleCartesianBase< T >::from_point().
|
inlineexplicit |
Conversions.
Definition at line 219 of file BLI_math_angle_types.hh.
References blender::math::atan2().
|
inline |
Definition at line 326 of file BLI_math_angle_types.hh.
References b.
|
inline |
Definition at line 320 of file BLI_math_angle_types.hh.
References b.
|
inline |
Definition at line 332 of file BLI_math_angle_types.hh.
References b.
|
inline |
Definition at line 338 of file BLI_math_angle_types.hh.
References b.
|
inline |
Definition at line 231 of file BLI_math_angle_types.hh.
References T.
|
inline |
Definition at line 243 of file BLI_math_angle_types.hh.
Referenced by blender::math::from_vector(), blender::tests::TEST(), and blender::math::QuaternionBase< T >::twist().
|
inline |
Definition at line 248 of file BLI_math_angle_types.hh.
|
friend |
Definition at line 275 of file BLI_math_angle_types.hh.
|
friend |
Definition at line 290 of file BLI_math_angle_types.hh.
|
friend |
Operators. NOTE: These use the trigonometric identities: https://en.wikipedia.org/wiki/List_of_trigonometric_identities (see Angle_sum_and_difference_identities, Multiple-angle_formulae and Half-angle_formulae)
There are no identities for (arbitrary) product or quotient of angles. Better leave these unimplemented to avoid accidentally using atan everywhere (which is the purpose of this class).
Definition at line 265 of file BLI_math_angle_types.hh.
|
friend |
Definition at line 315 of file BLI_math_angle_types.hh.
|
friend |
Definition at line 270 of file BLI_math_angle_types.hh.
|
friend |
Definition at line 295 of file BLI_math_angle_types.hh.
|
friend |
Definition at line 346 of file BLI_math_angle_types.hh.