10 #ifndef INCLUDED_IMATHSHEAR_H
11 #define INCLUDED_IMATHSHEAR_H
20 IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
288 template <
class T> std::ostream& operator<< (std::ostream& s, const Shear6<T>&
h);
291 template <
class S,
class T>
326 xy = xz = yz = yx = zx = zy = 0;
483 return (
const T*) &xy;
491 return xy == h.
xy && xz == h.
xz && yz == h.
yz && yx == h.
yx && zx == h.
zx && zy == h.
zy;
499 return xy != h.
xy || xz != h.
xz || yz != h.
yz || yx != h.
yx || zx != h.
zx || zy != h.
zy;
506 for (
int i = 0; i < 6; i++)
517 for (
int i = 0; i < 6; i++)
568 return Shear6 (-xy, -xz, -yz, -yx, -zx, -zy);
621 return Shear6 (xy * a, xz * a, yz * a, yx * a, zx * a, zy * a);
661 return Shear6 (xy / a, xz / a, yz / a, yx / a, zx / a, zy / a);
670 operator<< (std::ostream& s, const Shear6<T>&
h)
672 return s <<
'(' <<
h.xy <<
' ' <<
h.xz <<
' ' <<
h.yz <<
h.yx <<
' ' <<
h.zx <<
' ' <<
h.zy
680 template <
class S,
class T>
687 IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
689 #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.
OIIO_FORCEINLINE const vint4 & operator/=(vint4 &a, const vint4 &b)
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.
__hostdev__ void setValue(uint32_t offset, bool v)
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>
OIIO_FORCEINLINE const vint4 & operator+=(vint4 &a, const vint4 &b)
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)
OIIO_FORCEINLINE const vint4 & operator-=(vint4 &a, const vint4 &b)
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)
Element access.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Shear6 & negate()
Component-wise multiplication by -1.