9 #ifndef __HOM_BoundingRect_h__
10 #define __HOM_BoundingRect_h__
32 : myBoundingRect(
SYSmin(x1, x2),
39 : myBoundingRect(
SYSmin(pos1.myVector2.
x(), pos2.myVector2.
x()),
40 SYSmin(pos1.myVector2.
y(), pos2.myVector2.
y()),
41 SYSmax(pos1.myVector2.
x(), pos2.myVector2.
x()),
42 SYSmax(pos1.myVector2.
y(), pos2.myVector2.
y()))
46 : myBoundingRect(src.myBoundingRect)
51 : myBoundingRect(rect)
75 {
return myBoundingRect.isValid(); }
77 void setTo(
const std::vector<double> &tuple);
78 void translate(
const std::vector<double> &tuple);
79 void scale(
const std::vector<double> &tuple);
80 void expand(
const std::vector<double> &tuple);
84 {
return HOM_Vector2(myBoundingRect.xmin(), myBoundingRect.ymin()); }
87 {
return HOM_Vector2(myBoundingRect.xmax(), myBoundingRect.ymax()); }
89 {
return HOM_Vector2(myBoundingRect.sizeX(), myBoundingRect.sizeY()); }
91 {
return HOM_Vector2(myBoundingRect.centerX(), myBoundingRect.centerY()); }
95 void enlargeToContain(
const std::vector<double> &point);
101 bool intersects(
const std::vector<double> &point0,
102 const std::vector<double> &point1,
103 const std::vector<double> &point2);
104 bool intersects(
const std::vector<double> &point0,
105 const std::vector<double> &point1);
109 bool contains(
const std::vector<double> &point);
112 HOM_Vector2 closestPoint(
const std::vector<double> &point);
122 {
return &myBoundingRect; }
HOM_BoundingRect(const HOM_BoundingRect &src)
#define HOM_DESTRUCT_OBJECT(pointer)
HOM_BoundingRect(const HOM_Vector2 &pos1, const HOM_Vector2 &pos2)
bool intersects(const HOM_BoundingRect &rect)
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
GLsizei const GLchar *const * string
UT_BoundingRectD myBoundingRect
bool operator==(HOM_PtrOrNull< HOM_BoundingRect > rect)
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
void ignore(T const &) VULKAN_HPP_NOEXCEPT
bool contains(const HOM_BoundingRect &rect)
#define HOM_CONSTRUCT_OBJECT(pointer)
void enlargeToContain(const HOM_BoundingRect &rect)
HOM_BoundingRect(const UT_BoundingRectF &rect)
HOM_BoundingRect(double x1, double y1, double x2, double y2)
bool operator!=(HOM_PtrOrNull< HOM_BoundingRect > rect)
void setTo(const std::vector< double > &sequence)
bool isAlmostEqual(HOM_Matrix4 &matrix4, double tolerance=0.00001)
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)
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool intersects(const Box< Vec3< T >> &b, const Line3< T > &r, Vec3< T > &ip) IMATH_NOEXCEPT
PUGI__FN char_t * translate(char_t *buffer, const char_t *from, const char_t *to, size_t to_length)
GLdouble GLdouble GLdouble y2
int isInside(const UT_BoundingRectT< T > &brect) const
bool OIIO_UTIL_API contains(string_view a, string_view b)
Does 'a' contain the string 'b' within it?
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
void intersect(const HOM_BoundingRect &rect)
HOM_BoundingRect(const UT_BoundingRectD &rect)