Blender V4.3
BLI_math_basis_types.hh File Reference
#include <iosfwd>
#include "BLI_math_base.hh"
#include "BLI_math_vector_types.hh"

Go to the source code of this file.

Classes

class  blender::math::Axis
 
class  blender::math::AxisSigned
 
struct  blender::math::CartesianBasis
 

Namespaces

namespace  blender
 
namespace  blender::math
 

Functions

Axes
constexpr bool blender::math::operator<= (const Axis::Value a, const Axis::Value b)
 
constexpr bool blender::math::operator<= (const AxisSigned::Value a, const AxisSigned::Value b)
 
Axes Utilities
template<>
AxisSigned blender::math::abs (const AxisSigned &axis)
 
int blender::math::sign (const AxisSigned &axis)
 
AxisSigned blender::math::cross (const AxisSigned a, const AxisSigned b)
 
template<typename T >
T blender::math::to_vector (const Axis axis)
 
template<typename T >
T blender::math::to_vector (const AxisSigned axis)
 
CartesianBasis
CartesianBasis blender::math::from_orthonormal_axes (const AxisSigned forward, const AxisSigned up)
 
CartesianBasis blender::math::rotation_between (const CartesianBasis &a, const CartesianBasis &b)
 
CartesianBasis blender::math::rotation_between (const AxisSigned a_forward, const AxisSigned b_forward)
 
template<typename T >
VecBase< T, 3 > blender::math::transform_point (const CartesianBasis &basis, const VecBase< T, 3 > &v)
 
CartesianBasis blender::math::invert (const CartesianBasis &basis)
 

Detailed Description

Orthonormal rotation and orientation.

A practical reminder:

  • Forward is typically the positive Y direction in Blender.
  • Up is typically the positive Z direction in Blender.
  • Right is typically the positive X direction in Blender.
  • Blender uses right handedness.
  • For cross product, forward = thumb, up = index, right = middle finger.

The basis changes for each space:

  • Object: X-right, Y-forward, Z-up
  • World: X-right, Y-forward, Z-up
  • Armature Bone: X-right, Y-forward, Z-up (with forward being the root to tip direction)
  • Curve Tangent-Space: X-left, Y-up, Z-forward

Definition in file BLI_math_basis_types.hh.