HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_OrientedBoundingBox.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_OrientedBoundingBox_h__
10 #define __HOM_OrientedBoundingBox_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_Module.h"
16 #include "HOM_PtrOrNull.h"
17 #include "HOM_Vector3.h"
18 #include <UT/UT_OBBox.h>
19 #include <vector>
20 
21 class HOM_Matrix4;
22 
23 SWIGOUT(%rename(OrientedBoundingBox) HOM_OrientedBoundingBox;)
24 
26 {
27 public:
29  { HOM_CONSTRUCT_OBJECT(this) }
30 
32  : myBBox(src.myBBox)
33  { HOM_CONSTRUCT_OBJECT(this) }
34 
37  : myBBox(bbox)
38  { HOM_CONSTRUCT_OBJECT(this) }
39 
41 
44  { return !operator==(bbox); }
45 
46  bool isAlmostEqual(const HOM_OrientedBoundingBox &other,
47  double tol = 0.00001) const;
48 
49  int __hash__() const;
50  std::string __str__() const;
51  std::string __repr__() const;
52 
53  HOM_OrientedBoundingBox __mul__(const HOM_Matrix4 &matrix4) const;
54 
55  HOM_Vector3 center() const;
56  HOM_Matrix3 rotation() const;
57  HOM_Vector3 sizevec() const;
58 
59  bool contains(const std::vector<double> &point) const;
60  bool isValid() const;
61 
62  SWIGOUT(%ignore operator=;)
63  HOM_OrientedBoundingBox &operator=(const HOM_OrientedBoundingBox &bbox);
64 
66  { return &myBBox; }
67 
68  SWIGOUT(%ignore myBBox;)
69  UT_OBBoxD myBBox;
70 };
71 
72 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1291
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:352
std::string __str__()
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1290
int __hash__()
SIM_API const UT_StringHolder rotation
HOM_OrientedBoundingBox(const HOM_OrientedBoundingBox &src)
HOM_OrientedBoundingBox(const UT_OBBoxD &bbox)
HOM_Matrix4 __mul__(HOM_Matrix4 &matrix4)
Definition: HOM_Matrix4.h:108
bool isAlmostEqual(HOM_Matrix4 &matrix4, double tolerance=0.00001)
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
bool operator!=(HOM_PtrOrNull< HOM_OrientedBoundingBox > bbox) 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.
Definition: Mat3.h:542
GLenum src
Definition: glcorearb.h:1793