12 #ifndef __HOM_hmath_h__
13 #define __HOM_hmath_h__
36 SWIGOUT(%newobject identityTransform;)
39 SWIGOUT(%newobject buildTranslate;)
40 virtual HOM_Matrix4 *buildTranslate(
double tx,
double ty,
double tz) = 0;
44 virtual HOM_Matrix4 *buildScale(
double sx,
double sy,
double sz) = 0;
48 virtual HOM_Matrix4 *buildShear(
double sxy,
double sxz,
double syz) = 0;
51 SWIGOUT(%newobject buildRotate;)
53 double rx,
double ry,
double rz,
const char *
order=
"xyz") = 0;
55 const std::vector<double> &
values,
const char *
order=
"xyz") = 0;
57 SWIGOUT(%newobject buildRotateAboutAxis;)
59 const std::vector<double> &axis,
double angle_in_deg)= 0;
61 SWIGOUT(%newobject buildRotateZToAxis;)
63 const std::vector<double> &axis) = 0;
64 SWIGOUT(%kwargs buildTransform;)
65 SWIGOUT(%newobject buildTransform;)
67 const std::map<
std::string, std::vector<double> > &values_dict,
68 const char *transform_order=
"srt",
69 const char *rotate_order=
"xyz") = 0;
71 SWIGOUT(%newobject _buildTransformTRS;)
76 const char *transform_order=
"srt",
77 const char *rotate_order=
"xyz") = 0;
79 SWIGOUT(%newobject _buildTransformTRSS;)
85 const char *transform_order=
"srt",
86 const char *rotate_order=
"xyz") = 0;
88 SWIGOUT(%newobject _buildTransformTR;)
92 const char *transform_order=
"srt",
93 const char *rotate_order=
"xyz") = 0;
95 SWIGOUT(%newobject _buildTransform;)
103 const char *transform_order=
"srt",
104 const char *rotate_order=
"xyz") = 0;
107 virtual double degToRad(
double degrees) = 0;
108 virtual double radToDeg(
double radians) = 0;
110 virtual double noise1d(
const std::vector<double> &pos)
const = 0;
112 virtual HOM_Vector3 noise3d(
const std::vector<double> &pos)
const = 0;
115 double value,
double oldmin,
double oldmax,
116 double newmin,
double newmax)
117 {
return SYSfit(value, oldmin, oldmax, newmin, newmax); }
120 {
return SYSfit(value, 0, 1, newmin, newmax); }
123 {
return SYSfit(value, 1, 0, newmin, newmax); }
126 {
return SYSfit(value, -1, 1, newmin, newmax); }
129 {
return value < 0 ? -1 : (value > 0); }
132 {
return SYSclamp(value, min, max); }
137 return SYSsmooth(min, max, value);
140 virtual double wrap(
double value,
double min,
double max)
const = 0;
142 virtual double rand(
double seed)
const = 0;
145 const std::vector<double> &pa,
146 const std::vector<double> &pb,
147 const std::vector<double> &point) = 0;
149 const std::vector<double> &pa,
150 const std::vector<double> &pb,
151 const std::vector<double> &pc,
152 const std::vector<double> &point) = 0;
153 virtual double inCircle(
154 const std::vector<double> &pa,
155 const std::vector<double> &pb,
156 const std::vector<double> &pc,
157 const std::vector<double> &point) = 0;
158 virtual double inSphere(
159 const std::vector<double> &pa,
160 const std::vector<double> &pb,
161 const std::vector<double> &pc,
162 const std::vector<double> &pd,
163 const std::vector<double> &point) = 0;
179 SWIGOUT(%newobject combineLocalTransform;)
180 SWIGOUT(%kwargs combineLocalTransform;)
187 SWIGOUT(%newobject extractLocalTransform;)
188 SWIGOUT(%kwargs extractLocalTransform;)
197 SWIGOUT(%newobject slerpTransforms;)
198 SWIGOUT(%kwargs slerpTransforms;)
200 const std::vector<HOM_Matrix4>& xforms,
201 const std::vector<double>& input_weights,
202 bool normalize_weigths =
true,
203 int slerp_method = 1,
204 int slerp_flip_mehtod = 1) = 0;
double fit10(double value, double newmin, double newmax)
MatType shear(Axis axis0, Axis axis1, typename MatType::value_type shear)
Set the matrix to a shear along axis0 by a fraction of axis1.
GLsizei const GLchar *const * string
string __repr__(VtArray< T > const &self)
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GA_API const UT_StringHolder scale
double smooth(double value, double min, double max)
double fit11(double value, double newmin, double newmax)
void ignore(T const &) VULKAN_HPP_NOEXCEPT
SYS_FORCE_INLINE REAL orient3d(const REAL pa[3], const REAL pb[3], const REAL pc[3], const REAL pd[3])
double clamp(double value, double min, double max)
UT_Vector3T< T > SYSclamp(const UT_Vector3T< T > &v, const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
GLdouble GLdouble GLint GLint order
ImageBuf OIIO_API rotate(const ImageBuf &src, float angle, string_view filtername=string_view(), float filterwidth=0.0f, bool recompute_roi=false, ROI roi={}, int nthreads=0)
double fit(double value, double oldmin, double oldmax, double newmin, double newmax)
GLenum GLsizei GLsizei GLint * values
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GA_API const UT_StringHolder pivot
double fit01(double value, double newmin, double newmax)
double sign(double value)
PUGI__FN char_t * translate(char_t *buffer, const char_t *from, const char_t *to, size_t to_length)
OIIO_FORCEINLINE OIIO_HOSTDEVICE T radians(T deg)
Convert degrees to radians.
SYS_FORCE_INLINE REAL orient2d(const REAL pa[2], const REAL pb[2], const REAL pc[2])
OIIO_FORCEINLINE OIIO_HOSTDEVICE T degrees(T rad)
Convert radians to degrees.