31template<
typename T,
typename RotT>
32[[nodiscard]] QuaternionBase<T>
rotate(
const QuaternionBase<T> &a,
const RotT &
b);
40template<
typename T,
typename RotT,
typename AngleT>
41[[nodiscard]] AxisAngleBase<T, AngleT>
rotate(
const AxisAngleBase<T, AngleT> &a,
const RotT &
b);
49template<
typename T,
typename RotT>
50[[nodiscard]] EulerXYZBase<T>
rotate(
const EulerXYZBase<T> &a,
const RotT &
b);
58template<
typename T,
typename RotT>
59[[nodiscard]] Euler3Base<T>
rotate(
const Euler3Base<T> &a,
const RotT &
b);
66 const QuaternionBase<T> &
b);
74[[nodiscard]] QuaternionBase<T>
from_triangle(
const VecBase<T, 3> &v1,
75 const VecBase<T, 3> &
v2,
76 const VecBase<T, 3> &v3,
77 const VecBase<T, 3> &normal);
83[[nodiscard]] QuaternionBase<T>
from_triangle(
const VecBase<T, 3> &v1,
84 const VecBase<T, 3> &
v2,
85 const VecBase<T, 3> &v3);
95 const AxisSigned track_flag,
103[[nodiscard]] QuaternionBase<T>
from_tracking(AxisSigned forward_axis, Axis up_axis);
108template<
typename T> [[nodiscard]] MatBase<T, 3, 3>
to_gimbal_axis(
const Euler3Base<T> &rotation);
192template<
typename T,
typename RotT>
198template<
typename T,
typename RotT,
typename AngleT>
204template<
typename T,
typename RotT>
211template<
typename T,
typename RotT>
239 const Vec3T z_axis = normal;
240 Vec3T
nor =
normalize(Vec3T(z_axis.y, -z_axis.x, T(0)));
252 line =
normalize(Vec3T(line.x, line.y, T(0)));
283 const Axis axis = track_flag.
axis();
287 constexpr T
eps =
T(1
e-4);
292 if (axis_len <
eps) {
293 rotation_axis = Vec3T(0, 1, 0);
298 if (axis_len <
eps) {
299 rotation_axis = Vec3T(0, 0, 1);
305 if (axis_len <
eps) {
306 rotation_axis = Vec3T(1, 0, 0);
312 const T rotation_angle =
math::safe_acos(vec[axis.as_int()] / vec_len);
317 if (axis == up_flag) {
328 const Axis x_axis = up_flag;
329 const Axis y_axis = y_axis_signed.
axis();
334 projected.y = -projected.y;
339 projected = -projected;
365 const int i_index = rotation.i_index();
366 const int j_index = rotation.j_index();
367 const int k_index = rotation.k_index();
377 result[k_index] = Vec3T(0);
378 result[k_index][k_index] =
T(1);
401 return x.as_int() << 16 | y.as_int() << 8 |
z.as_int();
404 switch (map(rotation.axes.x, rotation.axes.y, rotation.axes.z)) {
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a vector
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
SIMD_FORCE_INLINE btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
static constexpr Value Z_POS
static constexpr Value Y_NEG
static constexpr Value Z_NEG
static constexpr Value X_NEG
static constexpr Value Y_POS
constexpr bool is_negative() const
static constexpr Value X_POS
constexpr Axis axis() const
constexpr int as_int() const
local_group_size(16, 16) .push_constant(Type b
QuaternionBase< T > from_triangle(const VecBase< T, 3 > &v1, const VecBase< T, 3 > &v2, const VecBase< T, 3 > &v3, const VecBase< T, 3 > &normal)
QuaternionBase< T > conjugate(const QuaternionBase< T > &a)
T cos(const AngleRadianBase< T > &a)
VecBase< T, 3 > normal_tri(const VecBase< T, 3 > &v1, const VecBase< T, 3 > &v2, const VecBase< T, 3 > &v3)
QuaternionBase< T > from_vector(const VecBase< T, 3 > &vector, const AxisSigned track_flag, const Axis up_flag)
QuaternionBase< T > to_quaternion(const AxisAngleBase< T, AngleT > &axis_angle)
QuaternionBase< T > from_tracking(AxisSigned forward_axis, Axis up_axis)
CartesianBasis rotation_between(const CartesianBasis &a, const CartesianBasis &b)
AngleRadianBase< T > angle_between(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
QuaternionBase< T > normalize_and_get_length(const QuaternionBase< T > &q, T &out_length)
bool is_unit_scale(const MatBase< T, NumCol, NumRow > &m)
AngleRadianBase< T > angle_between_signed(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
MatBase< T, 3, 3 > to_gimbal_axis(const Euler3Base< T > &rotation)
CartesianBasis invert(const CartesianBasis &basis)
AxisSigned cross(const AxisSigned a, const AxisSigned b)
AngleRadianBase< T > angle_of(const QuaternionBase< T > &q)
T atan2(const T &y, const T &x)
AxisAngleBase< T, AngleT > to_axis_angle(const EulerXYZBase< T > &euler)
T sin(const AngleRadianBase< T > &a)
AngleRadianBase< T > angle_of_signed(const QuaternionBase< T > &q)
MatBase< T, NumCol, NumRow > rotate(const MatBase< T, NumCol, NumRow > &mat, const RotationT &rotation)
CartesianBasis from_orthonormal_axes(const AxisSigned forward, const AxisSigned up)
MatT from_rotation(const RotationT &rotation)
Euler3Base< T > to_euler(const AxisAngleBase< T, AngleT > &axis_angle, EulerOrder order)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
Frequency::GEOMETRY nor[]
static AngleFraction pi()
static AngleFraction identity()
static QuaternionBase identity()