10 #ifndef INCLUDED_IMATHSHEAR_H
11 #define INCLUDED_IMATHSHEAR_H
20 IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
288 return std::numeric_limits<T>::lowest ();
306 return std::numeric_limits<T>::epsilon ();
321 std::ostream& operator<< (std::ostream& s, const Shear6<T>&
h);
324 template <
class S,
class T>
347 return reinterpret_cast<T*
> (
this)[i];
354 return reinterpret_cast<const T*
> (
this)[i];
360 xy = xz = yz = yx = zx = zy = 0;
399 T XY, T XZ, T YZ, T YX, T ZX, T ZY)
522 return (
const T*) &xy;
530 return xy == h.
xy && xz == h.
xz && yz == h.
yz && yx == h.
yx && zx == h.
zx &&
539 return xy != h.
xy || xz != h.
xz || yz != h.
yz || yx != h.
yx || zx != h.
zx ||
547 for (
int i = 0; i < 6; i++)
558 for (
int i = 0; i < 6; i++)
583 xy + h.
xy, xz + h.
xz, yz + h.
yz, yx + h.
yx, zx + h.
zx, zy + h.
zy);
604 xy - h.
xy, xz - h.
xz, yz - h.
yz, yx - h.
yx, zx - h.
zx, zy - h.
zy);
611 return Shear6 (-xy, -xz, -yz, -yx, -zx, -zy);
658 xy * h.
xy, xz * h.
xz, yz * h.
yz, yx * h.
yx, zx * h.
zx, zy * h.
zy);
665 return Shear6 (xy * a, xz * a, yz * a, yx * a, zx * a, zy * a);
699 xy / h.
xy, xz / h.
xz, yz / h.
yz, yx / h.
yx, zx / h.
zx, zy / h.
zy);
706 return Shear6 (xy / a, xz / a, yz / a, yx / a, zx / a, zy / a);
715 operator<< (std::ostream& s, const Shear6<T>&
h)
717 return s <<
'(' <<
h.xy <<
' ' <<
h.xz <<
' ' <<
h.yz <<
h.yx <<
' ' <<
h.zx
718 <<
' ' <<
h.zy <<
')';
725 template <
class S,
class T>
730 a * h.
xy, a * h.
xz, a * h.
yz, a * h.
yx, a * h.
zx, a * h.
zy);
733 IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
735 #endif // INCLUDED_IMATHSHEAR_H
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Shear6()
Initialize to 0.
IMATH_HOSTDEVICE static constexpr unsigned int dimensions()
Return the number of dimensions, i.e. 6.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool equalWithAbsError(T x1, T x2, T e) IMATH_NOEXCEPT
Mat3< typename promote< S, T >::type > operator*(S scalar, const Mat3< T > &m)
Multiply each element of the given matrix by scalar and return the result.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Shear6 & operator/=(const Shear6 &h)
Component-wise division.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Shear6 & operator-=(const Shear6 &h)
Component-wise subtraction.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool equalWithRelError(T x1, T x2, T e) IMATH_NOEXCEPT
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool equalWithAbsError(const Shear6< T > &h, T e) const
IMATH_HOSTDEVICE constexpr Plane3< T > operator-(const Plane3< T > &plane) IMATH_NOEXCEPT
Reflect the pla.
IMATH_HOSTDEVICE constexpr Shear6 operator-() const
Component-wise multiplication by -1.
GLboolean GLboolean GLboolean GLboolean a
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Shear6 & operator=(const Shear6 &h)
Assignment.
IMATH_HOSTDEVICE static constexpr T baseTypeEpsilon() IMATH_NOEXCEPT
Smallest possible e for which 1+e != 1.
IMATH_HOSTDEVICE constexpr Shear6 operator+(const Shear6 &h) const
Component-wise addition.
__hostdev__ float getValue(uint32_t i) const
Vec3< float > Shear3f
3D shear of type float
IMATH_HOSTDEVICE static constexpr T baseTypeLowest() IMATH_NOEXCEPT
Largest possible negative value.
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
IMATH_HOSTDEVICE constexpr Shear6 operator/(const Shear6 &h) const
Component-wise division.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Shear6 & operator*=(const Shear6 &h)
Component-wise multiplication.
Shear6< float > Shear6f
Shear6 of type float.
IMATH_HOSTDEVICE constexpr Shear6< T > operator*(S a, const Shear6< T > &h)
Reverse multiplication: scalar * Shear6<T>
IMATH_HOSTDEVICE constexpr Shear6 operator*(const Shear6 &h) const
Component-wise multiplication.
IMATH_HOSTDEVICE T * getValue()
Return a raw pointer to the array of values.
IMATH_HOSTDEVICE static constexpr T baseTypeSmallest() IMATH_NOEXCEPT
Smallest possible positive value.
IMATH_HOSTDEVICE static constexpr T baseTypeMax() IMATH_NOEXCEPT
Largest possible positive value.
IMATH_HOSTDEVICE constexpr Quat< T > operator+(const Quat< T > &q1, const Quat< T > &q2) IMATH_NOEXCEPT
Quaterion addition.
IMATH_HOSTDEVICE const Vec2< S > & operator*=(Vec2< S > &v, const Matrix22< T > &m) IMATH_NOEXCEPT
Vector-matrix multiplication: v *= m.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool equalWithRelError(const Shear6< T > &h, T e) const
IMATH_HOSTDEVICE constexpr bool operator!=(const Shear6< S > &h) const
Inequality.
GLfloat GLfloat GLfloat GLfloat h
Vec3< double > Shear3d
3D shear of type double
IMATH_HOSTDEVICE void setValue(S XY, S XZ, S YZ, S YX, S ZX, S ZY)
Set the value.
LeafData & operator=(const LeafData &)=delete
Shear6< double > Shear6d
Shear6 of type double.
#define IMATH_EXPORT_TEMPLATE_TYPE
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Shear6 & operator+=(const Shear6 &h)
Component-wise addition.
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
IMATH_HOSTDEVICE constexpr Quat< T > operator/(const Quat< T > &q1, const Quat< T > &q2) IMATH_NOEXCEPT
Quaterion division.
IMATH_HOSTDEVICE constexpr bool operator==(const Shear6< S > &h) const
Equality.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T & operator[](int i)
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Shear6 & negate()
Component-wise multiplication by -1.