11 #ifndef __UT_OBBox2D_h__
12 #define __UT_OBBox2D_h__
45 T bd_advantage = 0.0);
57 int imin = SYSargmin(myRadii.x(), myRadii.y());
64 int imax = SYSargmax(myRadii.x(), myRadii.y());
85 int getSupportPoints(
int &x0,
int &x1,
86 int &y0,
int &
y1)
const;
91 return !(*
this == obb);
99 T tol,
T bd_advantage);
114 Caliper(
int num_vertices,
121 inline int getPivot0()
const {
return myPivot0; }
122 inline int getPivot1()
const {
return myPivot1; }
148 inline T rotationRoom()
const;
154 int myNumVertices, myPivot0, myPivot1;
165 OrthoCalipers(
int num_idxs,
180 void getPivots(
int &xp0,
int &xp1,
int &yp0,
int &yp1)
const;
182 bool isTangentAtX0() {
return myXTangent0; }
183 bool isTangentAtX1() {
return myXTangent1; }
184 bool isTangentAtY0() {
return myYTangent0; }
185 bool isTangentAtY1() {
return myYTangent1; }
188 Caliper myXCaliper, myYCaliper;
189 bool myXTangent0, myXTangent1, myYTangent0, myYTangent1;
213 template <
typename T>
216 bool exclude_on_edge_pts =
true);
UT_OBBox2DT< fpreal > UT_OBBox2DR
UT_Vector2T< T > getMinAxis() const
Return the non-oriented bounding box.
GLdouble GLdouble GLint GLint const GLdouble * points
UT_Vector2T< T > getRadii() const
Return the half radii(side length) of the OBB.
UT_Matrix2T< T > getBasis() const
Return the basis that defines the orientation of the OBB.
GLboolean GLboolean GLboolean GLboolean a
bool operator!=(const UT_OBBox2DT< T > &obb) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
UT_OBBox2DT< fpreal32 > UT_OBBox2DF
UT_OBBox2DT< fpreal64 > UT_OBBox2DD
UT_Vector2T< T > myCenter
UT_API int UTconvexHull2D(const UT_Array< UT_Vector2T< T > > &pts, UT_Array< int > &hull, bool exclude_on_edge_pts=true)
UT_Vector2T< T > getMaxAxis() const
Return the non-oriented bounding box.
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)
UT_Vector2T< T > getTangentAxis() const
UT_Vector2T< T > getCenter() const
Return the center of the OBB.