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;
65 SWIGOUT(%newobject buildRotateLookAt;)
71 SWIGOUT(%kwargs buildTransform;)
72 SWIGOUT(%newobject buildTransform;)
74 const std::map<
std::string, std::vector<double> > &values_dict,
75 const char *transform_order=
"srt",
76 const char *rotate_order=
"xyz") = 0;
78 SWIGOUT(%newobject _buildTransformTRS;)
83 const char *transform_order=
"srt",
84 const char *rotate_order=
"xyz") = 0;
86 SWIGOUT(%newobject _buildTransformTRSS;)
92 const char *transform_order=
"srt",
93 const char *rotate_order=
"xyz") = 0;
95 SWIGOUT(%newobject _buildTransformTR;)
99 const char *transform_order=
"srt",
100 const char *rotate_order=
"xyz") = 0;
102 SWIGOUT(%newobject _buildTransform;)
110 const char *transform_order=
"srt",
111 const char *rotate_order=
"xyz") = 0;
114 virtual double degToRad(
double degrees) = 0;
115 virtual double radToDeg(
double radians) = 0;
117 virtual double noise1d(
const std::vector<double> &pos)
const = 0;
119 virtual HOM_Vector3 noise3d(
const std::vector<double> &pos)
const = 0;
122 double value,
double oldmin,
double oldmax,
123 double newmin,
double newmax)
124 {
return SYSfit(value, oldmin, oldmax, newmin, newmax); }
127 {
return SYSfit(value, 0, 1, newmin, newmax); }
130 {
return SYSfit(value, 1, 0, newmin, newmax); }
133 {
return SYSfit(value, -1, 1, newmin, newmax); }
136 {
return value < 0 ? -1 : (value > 0); }
139 {
return SYSclamp(value, min, max); }
144 return SYSsmooth(min, max, value);
147 virtual double wrap(
double value,
double min,
double max)
const = 0;
149 virtual double rand(
double seed)
const = 0;
152 const std::vector<double> &pa,
153 const std::vector<double> &pb,
154 const std::vector<double> &point) = 0;
156 const std::vector<double> &pa,
157 const std::vector<double> &pb,
158 const std::vector<double> &pc,
159 const std::vector<double> &point) = 0;
160 virtual double inCircle(
161 const std::vector<double> &pa,
162 const std::vector<double> &pb,
163 const std::vector<double> &pc,
164 const std::vector<double> &point) = 0;
165 virtual double inSphere(
166 const std::vector<double> &pa,
167 const std::vector<double> &pb,
168 const std::vector<double> &pc,
169 const std::vector<double> &pd,
170 const std::vector<double> &point) = 0;
186 SWIGOUT(%newobject combineLocalTransform;)
187 SWIGOUT(%kwargs combineLocalTransform;)
194 SWIGOUT(%newobject extractLocalTransform;)
195 SWIGOUT(%kwargs extractLocalTransform;)
204 SWIGOUT(%newobject slerpTransforms;)
205 SWIGOUT(%kwargs slerpTransforms;)
207 const std::vector<HOM_Matrix4>& xforms,
208 const std::vector<double>& input_weights,
209 bool normalize_weigths =
true,
210 int slerp_method = 1,
211 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)
GA_API const UT_StringHolder up
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.